Skip to content

Commit

Permalink
yep
Browse files Browse the repository at this point in the history
  • Loading branch information
BurgerLUA committed Dec 30, 2018
1 parent 45d40aa commit 12ddf4b
Show file tree
Hide file tree
Showing 101 changed files with 672 additions and 135 deletions.
Binary file modified burgerstation.dmb
Binary file not shown.
11 changes: 10 additions & 1 deletion burgerstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
#include "code\__defines\chat_type.dm"
#include "code\__defines\damage.dm"
#include "code\__defines\debug.dm"
#include "code\__defines\enviroment.dm"
#include "code\__defines\interaction.dm"
#include "code\__defines\inventory.dm"
#include "code\__defines\layering.dm"
#include "code\__defines\movement.dm"
#include "code\__defines\resources.dm"
#include "code\__defines\screen.dm"
#include "code\__defines\vectors.dm"
#include "code\__defines\weight.dm"
#include "code\__defines\world.dm"
#include "code\__helpers\html.dm"
Expand All @@ -33,7 +35,9 @@
#include "code\__helpers\text.dm"
#include "code\__helpers\turf.dm"
#include "code\__helpers\type_checking.dm"
#include "code\_core\material_impacts.dm"
#include "code\_core\area\_area.dm"
#include "code\_core\area\debug.dm"
#include "code\_core\atom\_atom.dm"
#include "code\_core\atom\attacking.dm"
#include "code\_core\atom\directon.dm"
Expand All @@ -50,8 +54,12 @@
#include "code\_core\client\inventory.dm"
#include "code\_core\client\chat\_chat.dm"
#include "code\_core\client\chat\formatting.dm"
#include "code\_core\client\chat\stylesheet.dm"
#include "code\_core\client\debug\verbs.dm"
#include "code\_core\client\macros\_macros.dm"
#include "code\_core\damagetype\_damagetype.dm"
#include "code\_core\damagetype\body.dm"
#include "code\_core\damagetype\clothing.dm"
#include "code\_core\inventory\_inventory.dm"
#include "code\_core\inventory\hand.dm"
#include "code\_core\inventory\interaction.dm"
Expand Down Expand Up @@ -93,12 +101,14 @@
#include "code\_core\obj\overlay\_overlays.dm"
#include "code\_core\outfit\_outfit.dm"
#include "code\_core\outfit\assistant.dm"
#include "code\_core\sound\_sound.dm"
#include "code\_core\species\_species.dm"
#include "code\_core\species\human.dm"
#include "code\_core\subsystems\_subsystems.dm"
#include "code\_core\subsystems\client.dm"
#include "code\_core\subsystems\combat.dm"
#include "code\_core\subsystems\mobs.dm"
#include "code\_core\subsystems\sound.dm"
#include "code\_core\subsystems\throwing.dm"
#include "code\_core\turf\_turf.dm"
#include "code\_core\turf\movement.dm"
Expand All @@ -117,6 +127,5 @@
#include "interface\default.dmf"
#include "maps\debug\debug_01.dmm"
#include "scripts\macro.dms"
#include "scripts\style.dms"
// END_INCLUDE

10 changes: 5 additions & 5 deletions burgerstation.int
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// BEGIN_INTERNALS
/*
MAP_ZOOM: 2.000
LAST_COMPILE_TIME: 1546131032
DIR: code\_core\atom code\_core\atom\moveable code\_core\client code\_core\client\chat code\_core\client\debug code\_core\client\macros code\_core\inventory code\_core\mob code\_core\mob\living code\_core\mob\living\advanced code\_core\mob\living\advanced\human code\_core\obj code\_core\obj\item code\_core\obj\item\clothing code\_core\obj\item\clothing\feet code\_core\obj\item\clothing\feet\shoes code\_core\obj\item\clothing\hands code\_core\obj\item\clothing\uniform code\_core\obj\item\organs code\_core\outfit icons\hud icons\mob\living icons\mob\living\advanced icons\mob\living\advanced\overlays icons\obj icons\obj\items icons\obj\items\clothing icons\obj\items\clothing\inventory icons\obj\items\clothing\worn maps\debug scripts
MAP_ZOOM: 1.000
LAST_COMPILE_TIME: 1546154478
DIR: code code\__defines code\__helpers code\_core code\_core\atom code\_core\atom\moveable code\_core\client code\_core\client\chat code\_core\client\debug code\_core\client\macros code\_core\damagetype code\_core\inventory code\_core\mob code\_core\mob\living code\_core\mob\living\advanced code\_core\mob\living\advanced\human code\_core\obj code\_core\obj\item code\_core\obj\item\clothing code\_core\obj\item\clothing\feet code\_core\obj\item\clothing\feet\shoes code\_core\obj\item\clothing\hands code\_core\obj\item\clothing\uniform code\_core\obj\item\organs code\_core\sound code\_core\subsystems code\_core\turf code\_core\turf\simulated code\_core\turf\simulated\floor icons icons\mob\living icons\mob\living\advanced icons\mob\living\advanced\overlays icons\obj icons\obj\items icons\obj\items\clothing\held icons\obj\items\clothing\worn interface maps maps\debug scripts sounds sounds\effects sounds\effects\impacts
PACKAGE_RSC_NAME: C:\Users\Matthew\Desktop\AurorastationDev\Burgerstation\burgerstation\burgerstation_rsc.zip
AUTO_FILE_DIR: OFF
PACKAGE_DMB_INFO:
Expand All @@ -11,9 +11,9 @@ PACKAGE_DME_NAME: C:\Users\Matthew\Desktop\AurorastationDev\Burgerstation\burger
LAST_COMPILE_VERSION: 512.1462
PACKAGE_TYPE: 0
PACKAGE_DME_START:
WINDOW: code\_core\mob\living\advanced\_advanced.dm;code\_core\inventory\_inventory.dm;code\_core\client\inventory.dm;code\_core\mob\_mob.dm;code\_core\obj\interaction.dm;code\_core\client\_client.dm;code\_core\obj\item\_item.dm;code\_core\inventory\hand.dm;code\_core\inventory\interaction.dm;code\_core\atom\listening.dm;code\_core\atom\attacking.dm;scripts\macro.dms;scripts\style.dms
WINDOW: code\_core\sound\_sound.dm;code\_core\damagetype\_damagetype.dm;code\_core\damagetype\clothing.dm;code\_core\damagetype\body.dm;code\_core\obj\item\clothing\feet\shoes\grey.dm
PACKAGE_DME_INFO:
FILE: scripts\style.dms
FILE: code\_core\damagetype\clothing.dm
PACKAGE_DMB_NAME: C:\Users\Matthew\Desktop\AurorastationDev\Burgerstation\burgerstation\burgerstation.zip
PACKAGE_DME_DEMO:
*/
Expand Down
Binary file modified burgerstation.rsc
Binary file not shown.
28 changes: 28 additions & 0 deletions code/__defines/enviroment.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#define ENVIRONMENT_GENERIC 0
#define ENVIRONMENT_PADDED_CELL 1
#define ENVIRONMENT_ROOM 2
#define ENVIRONMENT_BATHROOM 3
#define ENVIRONMENT_LIVINGROOM 4
#define ENVIRONMENT_STONEROOM 5
#define ENVIRONMENT_AUDITORIUM 6
#define ENVIRONMENT_CONCERT_HALL 7
#define ENVIRONMENT_CAVE 8
#define ENVIRONMENT_ARENA 9
#define ENVIRONMENT_HANGAR 10
#define ENVIRONMENT_CARPETTED_HALLWAY 12
#define ENVIRONMENT_HALLWAY 12
#define ENVIRONMENT_STONE_CORRIDOR 13
#define ENVIRONMENT_ALLEY 14
#define ENVIRONMENT_FOREST 15
#define ENVIRONMENT_CITY 16
#define ENVIRONMENT_MOUNTAINS 17
#define ENVIRONMENT_QUARRY 18
#define ENVIRONMENT_PLAIN 19
#define ENVIRONMENT_PARKING_LOT 20
#define ENVIRONMENT_SEWER PIPE 21
#define ENVIRONMENT_UNDERWATER 22
#define ENVIRONMENT_DRUGGED 23
#define ENVIRONMENT_DIZZY 24
#define ENVIRONMENT_PSYCHOTIC 25


1 change: 1 addition & 0 deletions code/__defines/layering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define LAYER_MOB_GLOVES LAYER_MOB + 0.09
#define LAYER_MOB_UNIFORM LAYER_MOB + 0.10

#define LAYER_MOB_HELD LAYER_MOB + 0.11



Expand Down
1 change: 1 addition & 0 deletions code/__defines/vectors.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define vector(x,y,z) list(x,y,z)
3 changes: 2 additions & 1 deletion code/__helpers/turf.dm
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#define get_turf(A) (get_step(A, 0)) //This helper is so fucking weird.
#define get_turf(A) (get_step(A, 0)) //This helper is so fucking weird.
#define get_area(A) (get_step(A, 0).loc) //This helper is so fucking weird.
4 changes: 3 additions & 1 deletion code/_core/area/_area.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
icon = 'icons/debug/areas.dmi'
icon_state = ""
layer = LAYER_AREA
invisibility = 101
invisibility = 101

var/sound_environment = ENVIRONMENT_GENERIC
20 changes: 20 additions & 0 deletions code/_core/area/debug.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/area/debug/
name = "DEBUG AREA"
desc = "Area for debugging."

/area/debug/interior
name = "interior"
sound_environment = ENVIRONMENT_HALLWAY
icon_state = "green"

/area/debug/interior/office
name = "office"
sound_environment = ENVIRONMENT_ROOM
icon_state = "red"

/area/debug/exterior
name = "outside"
sound_environment = ENVIRONMENT_FOREST
icon_state = "blue"


5 changes: 4 additions & 1 deletion code/_core/atom/_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

var/throw_speed = 8 //How far the object travels in pixels per decisecond, when thrown

var/list/attack_damage = list(BRUTE = 1, BURN = 0, TOX = 0, OXY = 0) //How much attack damage to deal
var/datum/damage_type //The damage type of the weapon, if any.

var/list/resistance = list(BRUTE = 0, BURN = 0, TOX = 0, OXY = 0) //How much to subtract damage

var/attack_range = 1 //If it's a melee weapon, it needs a range.
Expand All @@ -14,4 +15,6 @@
//Initialize things here

/atom/New()
if(damage_type)
damage_type = new damage_type
. = ..()
30 changes: 9 additions & 21 deletions code/_core/atom/attacking.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,26 @@
var/atom/object_to_damage_with = get_object_to_damage_with(attacker,victim,params)
var/atom/object_to_damage = victim.get_object_to_damage(attacker,victim,params)

/*
attacker << "ATTACKER: [attacker]"
attacker << "VICTIM: [victim]"
attacker << "OBJECT TO DAMAGE WITH: [object_to_damage_with]"
attacker << "OBJECT TO DAMAGE: [object_to_damage]"
*/


if(!object_to_damage || !object_to_damage_with)
attacker << "You can't attack that!"
return FALSE

if(get_dist(attacker,victim) > object_to_damage_with.attack_range) //Out of range
//attacker << "You miss!"
return FALSE

if(victim == object_to_damage)
attacker << "You attacked \the [victim] with \the [object_to_damage_with]!"
else
attacker << "You attacked \the [victim]\s [object_to_damage] with \the [object_to_damage_with]!"

var/damage_dealt = object_to_damage.adjust_brute_loss(object_to_damage_with.attack_damage[BRUTE]) + object_to_damage.adjust_burn_loss(object_to_damage_with.attack_damage[BURN]) + object_to_damage.adjust_tox_loss(object_to_damage_with.attack_damage[TOX]) + object_to_damage.adjust_oxy_loss(object_to_damage_with.attack_damage[OXY])
var/datum/damagetype/DT = object_to_damage_with.damage_type

if(!DT)
attacker << "You can't see any way you can inflict harm with \the [object_to_damage_with.type]."
return 0

//attacker << "You dealt [damage_dealt] damage!"
if(DT.last_hit + DT.delay > world.time)
return 0

//object_to_damage_with.update_icon()
//object_to_damage.update_icon()
//attacker.update_icon()
victim.update_icon()
DT.last_hit = world.time

return damage_dealt
return DT.do_damage(attacker,victim,object_to_damage_with,object_to_damage)

/atom/proc/get_object_to_damage(var/atom/attacker,var/atom/victim,params) //Which object should the attacker damage?
return victim
Expand Down
2 changes: 1 addition & 1 deletion code/_core/client/_client.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ var/global/list/all_clients = list()
if(desired_zoom_level == 0)
desired_zoom_level = initial(zoom_level)
zoom_level = clamp(desired_zoom_level,32,256)
winset(src, "main.map","icon-size=[zoom_level]")
winset(src, "map.map","icon-size=[zoom_level]")
13 changes: 13 additions & 0 deletions code/_core/client/chat/_chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,17 @@ proc/display_message(var/atom/source, var/text_to_say as text, var/text_type as
for(var/atom/object in world)
object.to_chat(format_speech(source,text_to_say,text_type))

/atom/proc/visible_message(var/third_person_text,var/first_person_text,var/blind_text,var/view_range=VIEW_RANGE)
for(var/atom/object in range(view_range))
if(src in view(object))
if(src == object)
object.to_chat(first_person_text)
else
object.to_chat(third_person_text)
else
object.to_chat(blind_text)





6 changes: 3 additions & 3 deletions code/_core/client/chat/formatting.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
proc/format_speech(var/atom/source,var/text,var/talk_type)

text = periodize(capitalize(sanitize(text)))
//text = periodize(capitalize(sanitize(text)))

var/html = "ERROR"
switch(talk_type)
Expand All @@ -11,9 +11,9 @@ proc/format_speech(var/atom/source,var/text,var/talk_type)
if(TEXT_YELL)
html = "[format_speaker(source)] yells, \"[span("yell",text)]\""
if(TEXT_LOOC)
html = "[format_speaker(source,"LOOC")]: \"[span("looc",text)]\""
html = "[format_speaker(source,"LOOC")]: [span("looc",text)]"
if(TEXT_OOC)
html = "[format_speaker(source,"OOC")]: \"[span("ooc",text)]\""
html = "[format_speaker(source,"OOC")]: [span("ooc",text)]"
if(TEXT_GHOST)
html = "[format_speaker(source,"GHOSTCHAT")] moans, \"[span("ghost",text)]\""

Expand Down
26 changes: 26 additions & 0 deletions code/_core/client/chat/stylesheet.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
client/script = {"
<style>
body {
font-family: Verdana, sans-serif;
font-size: 100%;
}
span.warning{
color: red;
font-style: italic;
}
span.danger{
color: red;
font-weight: bold;
}
span.ooc{
color: blue;
font-weight: bold;
}
span.looc{
color: cyan;
font-weight: bold;
}


</style>
"}
5 changes: 5 additions & 0 deletions code/_core/client/debug/verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,8 @@ client/verb/add_clothes()
set category = "Debug"
var/mob/living/advanced/A = mob
A.add_clothes(A.mob_outfit)


client/verb/debug_sounds()
set category = "Debug"
src << "Found [length(active_sounds)] active sounds."
67 changes: 67 additions & 0 deletions code/_core/damagetype/_damagetype.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/datum/damagetype/
var/name = "Damage type."
var/id
var/desc = "The type of damage dealt and all it's information."
var/list/verbs = list("strike","hit","pummel") //Verbs to use
var/weapon_name = "damage"
var/impact_sounds = list()
var/list/attack_damage = list(BRUTE = 0, BURN = 0, TOX = 0, OXY = 0) //How much attack damage to deal

var/delay = 8
var/last_hit = 0

/datum/damagetype/proc/do_damage(var/atom/attacker,var/atom/victim,var/atom/weapon,var/atom/hit_object)

play_effects(attacker,victim,weapon,hit_object)

attacker.visible_message(\
get_attack_message_3rd(attacker,victim,weapon,hit_object),\
get_attack_message_1st(attacker,victim,weapon,hit_object),\
get_attack_message_sound(attacker,victim,weapon,hit_object)\
)

var/damage_to_deal = get_attack_damage(attacker,victim,weapon,hit_object)
var/damage_dealt = hit_object.adjust_brute_loss(damage_to_deal[BRUTE]) + hit_object.adjust_burn_loss(damage_to_deal[BURN]) + hit_object.adjust_tox_loss(damage_to_deal[TOX]) + hit_object.adjust_oxy_loss(damage_to_deal[OXY])
victim.update_icon()
return damage_dealt

/datum/damagetype/proc/play_effects(var/atom/attacker,var/atom/victim,var/atom/weapon,var/atom/hit_object)
if(length(impact_sounds))
var/area/A = get_area(victim)
play_sound(pick(impact_sounds),all_mobs,vector(victim.x,victim.y,victim.z),environment = A.sound_environment)

var/movement_x = 0
var/movement_y = 0


if(attacker.dir & NORTH)
movement_y = 5

if(attacker.dir & SOUTH)
movement_y = -5

if(attacker.dir & EAST)
movement_x = 5

if(attacker.dir & WEST)
movement_x = -5

animate(attacker,LINEAR_EASING,time = 2, pixel_x = movement_x, pixel_y = movement_y)
animate(attacker,LINEAR_EASING,time = 4, pixel_x = 0, pixel_y = 0)

/datum/damagetype/proc/get_attack_message_3rd(var/atom/attacker,var/atom/victim,var/atom/weapon,var/atom/hit_object)
if(victim == hit_object)
return span("danger","\The [attacker] [pick(verbs)]s \the [hit_object] with \his [weapon_name].")
else
return span("danger","\The [attacker] [pick(verbs)]s \the [victim]'s [hit_object] with \his [weapon_name].")

/datum/damagetype/proc/get_attack_message_1st(var/atom/attacker,var/atom/victim,var/atom/weapon,var/atom/hit_object)
if(victim == hit_object)
return span("danger","You [pick(verbs)] \the [hit_object] with your [weapon_name].")
else
return span("danger","You [pick(verbs)] \the [victim]'s [hit_object] with your [weapon_name].")
/datum/damagetype/proc/get_attack_message_sound(var/atom/attacker,var/atom/victim,var/atom/weapon,var/atom/hit_object)
return span("danger","You hear a sickening impact.")

/datum/damagetype/proc/get_attack_damage(var/atom/attacker,var/atom/victim,var/atom/weapon,var/atom/hit_object)
return attack_damage
23 changes: 23 additions & 0 deletions code/_core/damagetype/body.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/datum/damagetype/body/
name = "MY BODY IS A WEAPON"
desc = "Your body deals damage."

/datum/damagetype/body/fists/
name = "Fist"
desc = "Your fist."
verbs = list("punch","hit","slap","strike","pummel","pound")
weapon_name = "right fist"
impact_sounds = list(
'sounds/effects/impacts/punch1.ogg',
'sounds/effects/impacts/punch2.ogg',
'sounds/effects/impacts/punch3.ogg',
'sounds/effects/impacts/punch4.ogg'
)

attack_damage = list(BRUTE = 5, BURN = 0, TOX = 0, OXY = 0)

/datum/damagetype/body/fists/get_attack_message_sound(var/atom/attacker,var/atom/victim,var/atom/weapon,var/atom/hit_object)
return span("danger","You hear bone hitting flesh.")

/datum/damagetype/body/fists/left
weapon_name = "left fist"
Loading

0 comments on commit 12ddf4b

Please sign in to comment.