Skip to content

Commit 120481a

Browse files
committed
Merge remote-tracking branch 'ParadiseSS13/master' into atmos-refactoring-part-7
2 parents e0bfde2 + 1bdb536 commit 120481a

File tree

107 files changed

+10194
-9983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+10194
-9983
lines changed

_maps/map_files/Delta/delta.dmm

Lines changed: 7312 additions & 7311 deletions
Large diffs are not rendered by default.

_maps/map_files/MetaStation/MetaStation.dmm

Lines changed: 1429 additions & 1428 deletions
Large diffs are not rendered by default.

_maps/map_files/generic/centcomm.dmm

Lines changed: 199 additions & 192 deletions
Large diffs are not rendered by default.

code/__DEFINES/dcs/signals.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@
530530
///from base of obj/item/hit_reaction(): (list/args)
531531
#define COMSIG_ITEM_HIT_REACT "item_hit_react"
532532
#define COMPONENT_BLOCK_SUCCESSFUL (1 << 0)
533+
#define COMPONENT_BLOCK_PERFECT (1 << 2)
533534
///called on item when crossed by something (): (/atom/movable, mob/living/crossed)
534535
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed"
535536
///called on item when microwaved (): (obj/machinery/microwave/M)

code/controllers/subsystem/air.dm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,11 @@ SUBSYSTEM_DEF(air)
283283
/datum/controller/subsystem/air/proc/add_to_active(turf/simulated/T, blockchanges = 1)
284284
if(!initialized)
285285
/* it makes no sense to "activate" turfs before setup_allturfs is
286-
called, as setup_allturfs would simply cull the list incorrectly.
287-
only /turf/simulated/Initialize_Atmos() is blessed enough to
288-
activate turfs during this phase of initialization, as it happens
289-
post-cull and inlines the logic (perhaps incorrectly) */
286+
* called, as setup_allturfs would simply cull the list incorrectly.
287+
* only /turf/simulated/Initialize_Atmos() is blessed enough to
288+
* activate turfs during this phase of initialization, as it happens
289+
* post-cull and inlines the logic (perhaps incorrectly)
290+
**/
290291
return
291292

292293
if(istype(T) && T.air)

code/controllers/subsystem/events.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SUBSYSTEM_DEF(events)
77
// Report events at the end of the rouund
88
var/report_at_round_end = 0
99

10-
// UI vars
10+
// UI vars
1111
var/window_x = 700
1212
var/window_y = 600
1313
var/table_options = " align='center'"
@@ -16,7 +16,7 @@ SUBSYSTEM_DEF(events)
1616
var/row_options2 = " width='260px'"
1717
var/row_options3 = " width='150px'"
1818

19-
// Event vars
19+
// Event vars
2020
var/datum/event_container/selected_event_container = null
2121
var/list/active_events = list()
2222
var/list/finished_events = list()

code/controllers/subsystem/npcpool.dm

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
SUBSYSTEM_DEF(npcpool)
2-
name = "NPC Pool"
3-
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
4-
priority = FIRE_PRIORITY_NPC
5-
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
6-
offline_implications = "Simple animals will no longer process. Shuttle call recommended."
2+
name = "NPC Pool"
3+
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
4+
priority = FIRE_PRIORITY_NPC
5+
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
6+
offline_implications = "Simple animals will no longer process. Shuttle call recommended."
77

8-
var/list/currentrun = list()
8+
var/list/currentrun = list()
99

1010
/datum/controller/subsystem/npcpool/get_stat_details()
11-
return "SimpleAnimals: [length(GLOB.simple_animals[AI_ON])]"
11+
return "SimpleAnimals: [length(GLOB.simple_animals[AI_ON])]"
1212

1313
/datum/controller/subsystem/npcpool/fire(resumed = FALSE)
1414

15-
if(!resumed)
16-
var/list/activelist = GLOB.simple_animals[AI_ON]
17-
src.currentrun = activelist.Copy()
15+
if(!resumed)
16+
var/list/activelist = GLOB.simple_animals[AI_ON]
17+
src.currentrun = activelist.Copy()
1818

19-
var/list/currentrun = src.currentrun
19+
var/list/currentrun = src.currentrun
2020

21-
while(currentrun.len)
22-
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
23-
--currentrun.len
24-
if(!SA)
25-
log_debug("npcpool encountered an invalid entry, resumed: [resumed], SA [SA], type of SA [SA?.type], null [SA == null], qdelled [QDELETED(SA)], SA in AI_ON list: [SA in GLOB.simple_animals[AI_ON]]")
26-
GLOB.simple_animals[AI_ON] -= SA
27-
continue
21+
while(currentrun.len)
22+
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
23+
--currentrun.len
24+
if(!SA)
25+
log_debug("npcpool encountered an invalid entry, resumed: [resumed], SA [SA], type of SA [SA?.type], null [SA == null], qdelled [QDELETED(SA)], SA in AI_ON list: [SA in GLOB.simple_animals[AI_ON]]")
26+
GLOB.simple_animals[AI_ON] -= SA
27+
continue
2828

29-
if(!SA.ckey && !SA.notransform)
30-
if(SA.stat != DEAD)
31-
SA.handle_automated_movement()
32-
if(SA.stat != DEAD)
33-
SA.handle_automated_action()
34-
if(SA.stat != DEAD)
35-
SA.handle_automated_speech()
36-
if(MC_TICK_CHECK)
37-
return
29+
if(!SA.ckey && !SA.notransform)
30+
if(SA.stat != DEAD)
31+
SA.handle_automated_movement()
32+
if(SA.stat != DEAD)
33+
SA.handle_automated_action()
34+
if(SA.stat != DEAD)
35+
SA.handle_automated_speech()
36+
if(MC_TICK_CHECK)
37+
return

code/controllers/subsystem/tickets/mentor_tickets.dm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets)
22

33
/datum/controller/subsystem/tickets/mentor_tickets/New()
4-
NEW_SS_GLOBAL(SSmentor_tickets)
5-
PreInit()
6-
ss_id = "mentor_tickets"
4+
NEW_SS_GLOBAL(SSmentor_tickets)
5+
PreInit()
6+
ss_id = "mentor_tickets"
77

88
/datum/controller/subsystem/tickets/mentor_tickets
99
name = "Mentor Tickets"

code/controllers/subsystem/tickets/tickets.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ UI STUFF
566566
* msg - The message being send
567567
* alt - If an alternative prefix should be used or not. Defaults to TICKET_STAFF_MESSAGE_PREFIX
568568
* important - If the message is important. If TRUE it will ignore the CHAT_NO_TICKETLOGS preferences,
569-
send a sound and flash the window. Defaults to FALSE
569+
* send a sound and flash the window. Defaults to FALSE
570570
*/
571571
/datum/controller/subsystem/tickets/proc/message_staff(msg, prefix_type = TICKET_STAFF_MESSAGE_PREFIX, important = FALSE)
572572
switch(prefix_type)

code/controllers/subsystem/weather.dm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ SUBSYSTEM_DEF(weather)
7979
next_hit_by_zlevel["[z]"] = null
8080

8181
/datum/controller/subsystem/weather/proc/get_weather(z, area/active_area)
82-
var/datum/weather/A
83-
for(var/V in processing)
84-
var/datum/weather/W = V
85-
if((z in W.impacted_z_levels) && W.area_type == active_area)
86-
A = W
87-
break
88-
return A
82+
var/datum/weather/A
83+
for(var/V in processing)
84+
var/datum/weather/W = V
85+
if((z in W.impacted_z_levels) && W.area_type == active_area)
86+
A = W
87+
break
88+
return A

code/datums/action.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@
402402
name = "Activate"
403403

404404
/datum/action/item_action/hands_free/activate/always
405-
check_flags = null
405+
check_flags = null
406406

407407
/datum/action/item_action/toggle_research_scanner
408408
name = "Toggle Research Scanner"

code/datums/armor.dm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]"
22

33
/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
4-
. = locate(ARMORID)
5-
if (!.)
6-
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
4+
. = locate(ARMORID)
5+
if (!.)
6+
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
77

88
/datum/armor
99
var/melee

code/datums/components/parry.dm

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
var/parryable_attack_types
1313
/// the time between parry attempts
1414
var/parry_cooldown
15+
///Do we wish to mute the parry sound?
16+
var/no_parry_sound
1517

1618
/datum/component/parry/RegisterWithParent()
1719
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(equipped))
@@ -26,14 +28,15 @@
2628
if(ismob(I.loc))
2729
UnregisterSignal(I.loc, COMSIG_LIVING_RESIST)
2830

29-
/datum/component/parry/Initialize(_stamina_constant = 0, _stamina_coefficient = 0, _parry_time_out_time = PARRY_DEFAULT_TIMEOUT, _parryable_attack_types = ALL_ATTACK_TYPES, _parry_cooldown = 2 SECONDS)
31+
/datum/component/parry/Initialize(_stamina_constant = 0, _stamina_coefficient = 0, _parry_time_out_time = PARRY_DEFAULT_TIMEOUT, _parryable_attack_types = ALL_ATTACK_TYPES, _parry_cooldown = 2 SECONDS, _no_parry_sound = FALSE)
3032
if(!isitem(parent))
3133
return COMPONENT_INCOMPATIBLE
3234

3335
parry_time_out_time = _parry_time_out_time
3436
stamina_constant = _stamina_constant
3537
stamina_coefficient = _stamina_coefficient
3638
parry_cooldown = _parry_cooldown
39+
no_parry_sound = _no_parry_sound
3740
if(islist(_parryable_attack_types))
3841
parryable_attack_types = _parryable_attack_types
3942
else
@@ -61,6 +64,7 @@
6164

6265
/datum/component/parry/proc/attempt_parry(datum/source, mob/living/carbon/human/owner, atom/movable/hitby, damage = 0, attack_type = MELEE_ATTACK)
6366
SIGNAL_HANDLER
67+
var/was_perfect = FALSE
6468
if(!(attack_type in parryable_attack_types))
6569
return
6670
var/time_since_parry = world.time - time_parried
@@ -80,17 +84,22 @@
8084

8185
var/stamina_damage = stamina_coefficient * (((time_since_parry / parry_time_out_time) + armour_penetration_percentage / 100) * (damage + armour_penetration_flat)) + stamina_constant
8286

83-
var/sound_to_play
84-
if(attack_type == PROJECTILE_ATTACK)
85-
sound_to_play = pick('sound/weapons/effects/ric1.ogg', 'sound/weapons/effects/ric2.ogg', 'sound/weapons/effects/ric3.ogg', 'sound/weapons/effects/ric4.ogg', 'sound/weapons/effects/ric5.ogg')
86-
else
87-
sound_to_play = 'sound/weapons/parry.ogg'
87+
if(!no_parry_sound)
88+
var/sound_to_play
89+
if(attack_type == PROJECTILE_ATTACK)
90+
sound_to_play = pick('sound/weapons/effects/ric1.ogg', 'sound/weapons/effects/ric2.ogg', 'sound/weapons/effects/ric3.ogg', 'sound/weapons/effects/ric4.ogg', 'sound/weapons/effects/ric5.ogg')
91+
else
92+
sound_to_play = 'sound/weapons/parry.ogg'
8893

89-
playsound(owner, sound_to_play, clamp(stamina_damage, 40, 120))
94+
playsound(owner, sound_to_play, clamp(stamina_damage, 40, 120))
95+
if(time_since_parry <= parry_time_out_time * 0.5) // a perfect parry
96+
was_perfect = TRUE
9097

9198
owner.adjustStaminaLoss(stamina_damage)
9299
if(owner.getStaminaLoss() < 100)
93-
return COMPONENT_BLOCK_SUCCESSFUL
100+
if(!was_perfect)
101+
return COMPONENT_BLOCK_SUCCESSFUL
102+
return (COMPONENT_BLOCK_SUCCESSFUL | COMPONENT_BLOCK_PERFECT)
94103

95104

96105

code/datums/diseases/advance/advance.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ GLOBAL_LIST_INIT(advance_cures, list(
361361
var/datum/disease/advance/D2 = pick(diseases)
362362
D2.Mix(D1)
363363

364-
// Should be only 1 entry left, but if not let's only return a single entry
365-
// to_chat(world, "END MIXING!!!!!")
364+
// Should be only 1 entry left, but if not let's only return a single entry
365+
// to_chat(world, "END MIXING!!!!!")
366366
var/datum/disease/advance/to_return = pick(diseases)
367367
to_return.Refresh(1)
368368
return to_return

code/datums/periodic_news.dm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
/datum/news_announcement/revolution_inciting_event/human_experiments
2929
round_time = 60*90
3030
message = {"Unbelievable reports about human experimentation have reached our ears. According
31-
to a refugee from one of the Tau Ceti Research Stations, their station, in order
32-
to increase revenue, has refactored several of their facilities to perform experiments
33-
on live humans, including virology research, genetic manipulation, and \"feeding them
34-
to the slimes to see what happens\". Allegedly, these test subjects were neither
35-
humanified monkeys nor volunteers, but rather unqualified staff that were forced into
31+
to a refugee from one of the Tau Ceti Research Stations, their station, in order
32+
to increase revenue, has refactored several of their facilities to perform experiments
33+
on live humans, including virology research, genetic manipulation, and \"feeding them
34+
to the slimes to see what happens\". Allegedly, these test subjects were neither
35+
humanified monkeys nor volunteers, but rather unqualified staff that were forced into
3636
the experiments, and reported to have died in a \"work accident\" by Nanotrasen Inc."}
3737
author = "Unauthorized"
3838

code/datums/recipe.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* * items are objects. Fruits, tools, circuit boards.
1010
* * result is type to create as new object
1111
* * time is optional parameter, you shall use in in your machine,
12-
default /datum/recipe/ procs does not rely on this parameter.
12+
* default /datum/recipe/ procs does not rely on this parameter.
1313
*
1414
* Functions you need:
1515
* /datum/recipe/proc/make(var/obj/container as obj)

code/datums/spells/rathens.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
spawn()
2626
A.throw_at(get_edge_target_turf(H, pick(GLOB.alldirs)), rand(1, 10), 5)
2727
H.visible_message("<span class='danger'>[H]'s [A.name] flies out of their body in a magical explosion!</span>",\
28-
"<span class='danger'>Your [A.name] flies out of your body in a magical explosion!</span>")
28+
"<span class='danger'>Your [A.name] flies out of your body in a magical explosion!</span>")
2929
H.Weaken(4 SECONDS)
3030
else
3131
var/obj/effect/decal/cleanable/blood/gibs/G = new/obj/effect/decal/cleanable/blood/gibs(get_turf(H))

code/datums/uplink_item.dm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,10 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
537537

538538
/datum/uplink_item/dangerous/powerfist
539539
name = "Power Fist"
540-
desc = "The power-fist is a metal gauntlet with a built-in piston-ram powered by an external gas supply.\
541-
Upon hitting a target, the piston-ram will extend foward to make contact for some serious damage. \
542-
Using a wrench on the piston valve will allow you to tweak the amount of gas used per punch to \
543-
deal extra damage and hit targets further. Use a screwdriver to take out any attached tanks."
540+
desc = "The power-fist is a metal gauntlet with a built-in piston-ram powered by an external gas supply. \
541+
Upon hitting a target, the piston-ram will extend foward to make contact for some serious damage. \
542+
Using a wrench on the piston valve will allow you to tweak the amount of gas used per punch to \
543+
deal extra damage and hit targets further. Use a screwdriver to take out any attached tanks."
544544
reference = "PF"
545545
item = /obj/item/melee/powerfist
546546
cost = 8
@@ -905,17 +905,17 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
905905

906906
/datum/uplink_item/stealthy_weapons/cameraflash
907907
name = "Camera Flash"
908-
desc = "A flash disguised as a camera with a self-charging safety system preventing the flash from burning out.\
909-
Due to its design, this flash cannot be overcharged like regular flashes can.\
910-
Useful for stunning borgs and individuals without eye protection or blinding a crowd for a get away."
908+
desc = "A flash disguised as a camera with a self-charging safety system preventing the flash from burning out. \
909+
Due to its design, this flash cannot be overcharged like regular flashes can. \
910+
Useful for stunning borgs and individuals without eye protection or blinding a crowd for a get away."
911911
reference = "CF"
912912
item = /obj/item/flash/cameraflash
913913
cost = 1
914914

915915
/datum/uplink_item/stealthy_weapons/throwingweapons
916916
name = "Box of Throwing Weapons"
917917
desc = "A box of shurikens and reinforced bolas from ancient Earth martial arts. They are highly effective \
918-
throwing weapons. The bolas can knock a target down and the shurikens will embed into limbs."
918+
throwing weapons. The bolas can knock a target down and the shurikens will embed into limbs."
919919
reference = "STK"
920920
item = /obj/item/storage/box/syndie_kit/throwing_weapons
921921
cost = 3

code/datums/wires/wires.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
holder.add_hiddenprint(user)
163163

164164
switch(action)
165-
// Toggles the cut/mend status.
165+
// Toggles the cut/mend status.
166166
if("cut")
167167
if(!istype(I, /obj/item/wirecutters) && !user.can_admin_interact())
168168
to_chat(user, "<span class='error'>You need wirecutters!</span>")
@@ -188,7 +188,7 @@
188188

189189
return TRUE
190190

191-
// Attach a signaler to a wire.
191+
// Attach a signaler to a wire.
192192
if("attach")
193193
if(is_attached(color))
194194
var/obj/item/O = detach_assembly(color)

code/game/area/ss13_areas.dm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,16 +565,16 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
565565
//STATION13
566566

567567
/area/atmos
568-
name = "Atmospherics"
569-
icon_state = "atmos"
568+
name = "Atmospherics"
569+
icon_state = "atmos"
570570

571571
/area/atmos/control
572-
name = "Atmospherics Control Room"
573-
icon_state = "atmosctrl"
572+
name = "Atmospherics Control Room"
573+
icon_state = "atmosctrl"
574574

575575
/area/atmos/distribution
576-
name = "Atmospherics Distribution Loop"
577-
icon_state = "atmos"
576+
name = "Atmospherics Distribution Loop"
577+
icon_state = "atmos"
578578

579579
//Maintenance
580580
/area/maintenance

code/game/atoms.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
11691169

11701170
/** Call this when you want to present a renaming prompt to the user.
11711171
1172-
It's a simple proc, but handles annoying edge cases such as forgetting to add a "cancel" button,
1172+
It's a simple proc, but handles annoying edge cases such as forgetting to add a "cancel" button,
11731173
or being able to rename stuff remotely.
11741174
11751175
Arguments:

code/game/dna/dna_modifier.dm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@
134134
go_out(user, force)
135135
for(var/obj/O in src)
136136
if(!istype(O,/obj/item/circuitboard/clonescanner) && \
137-
!istype(O,/obj/item/stock_parts) && \
138-
!istype(O,/obj/item/stack/cable_coil) && \
139-
O != beaker)
137+
!istype(O,/obj/item/stock_parts) && \
138+
!istype(O,/obj/item/stack/cable_coil) && \
139+
O != beaker)
140140
O.forceMove(get_turf(src))//Ejects items that manage to get in there (exluding the components and beaker)
141141
if(!occupant)
142142
for(var/mob/M in src)//Failsafe so you can get mobs out
@@ -262,7 +262,7 @@
262262
return
263263
for(var/obj/thing in contents) // in case there is something in the scanner
264264
thing.forceMove(loc)
265-
default_deconstruction_crowbar(user, I)
265+
default_deconstruction_crowbar(user, I)
266266

267267
/obj/machinery/dna_scannernew/screwdriver_act(mob/user, obj/item/I)
268268
if(occupant)

0 commit comments

Comments
 (0)