Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into mercs
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikafox committed Oct 1, 2024
2 parents c96a83b + ea15b40 commit ef3987e
Show file tree
Hide file tree
Showing 59 changed files with 604 additions and 391 deletions.
2 changes: 1 addition & 1 deletion _maps/RandomRuins/JungleRuins/jungle_paradise.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5181,7 +5181,7 @@
pixel_x = 7;
pixel_y = 6
},
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
pixel_y = 28
},
/turf/open/floor/mineral/titanium,
Expand Down
6 changes: 3 additions & 3 deletions _maps/RandomRuins/SpaceRuins/singularity_lab.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -8625,13 +8625,13 @@
/turf/open/floor/plasteel/grimy,
/area/ruin/space/has_grav/singularitylab/lab)
"HU" = (
/obj/structure/fireaxecabinet{
pixel_y = 32
},
/obj/structure/sign/warning/incident{
pixel_x = -32
},
/obj/effect/decal/cleanable/cobweb,
/obj/structure/cabinet/fireaxe{
pixel_y = 28
},
/turf/open/floor/plasteel/dark,
/area/ruin/space/has_grav/singularitylab/engineering)
"HW" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/independent/independent_lagoon.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2347,7 +2347,7 @@
},
/obj/item/clothing/suit/hooded/wintercoat/engineering/atmos,
/obj/item/clothing/gloves/color/black,
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
dir = 8;
pixel_x = 28
},
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/inteq/inteq_talos.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,7 @@
dir = 1
},
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer4,
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
dir = 1;
pixel_y = -32
},
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/nanotrasen/nanotrasen_heron.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -13621,7 +13621,7 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{
dir = 6
},
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
pixel_y = 27
},
/obj/structure/closet/secure_closet/engineering_electrical,
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/nanotrasen/nanotrasen_osprey.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5632,7 +5632,7 @@
/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer2{
dir = 1
},
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
pixel_y = 32
},
/obj/structure/cable{
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/nanotrasen/nanotrasen_skipper.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
/turf/open/floor/plasteel/white,
/area/ship/medical)
"dZ" = (
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
pixel_y = -29
},
/obj/structure/catwalk/over/plated_catwalk/dark,
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/pirate/pirate_libertatia.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{
dir = 4
},
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
pixel_y = 32
},
/turf/open/floor/pod/light,
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/syndicate/syndicate_gorlex_komodo.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@
dir = 4
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4,
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
dir = 8;
pixel_x = 27
},
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/syndicate/syndicate_twinkleshine.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3500,7 +3500,7 @@
pixel_y = 4
},
/obj/item/storage/toolbox/electrical,
/obj/structure/fireaxecabinet{
/obj/structure/cabinet/fireaxe{
pixel_y = -32;
dir = 1
},
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/dcs/signals/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@
#define COMPONENT_TWOHANDED_BLOCK_WIELD 1
#define COMSIG_TWOHANDED_UNWIELD "twohanded_unwield" //from base of datum/component/two_handed/proc/unwield(mob/living/carbon/user): (/mob/user)


// /datum/action signals
#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action)
#define COMPONENT_ACTION_BLOCK_TRIGGER 1
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NO_STORAGE_INSERT "no_storage_insert" //cannot be inserted in a storage.
#define TRAIT_T_RAY_VISIBLE "t-ray-visible" // Visible on t-ray scanners if the atom/var/level == 1
#define TRAIT_NO_TELEPORT "no-teleport" //you just can't
#define TRAIT_WIELDED "wielded" //The item is currently being wielded

//quirk traits
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ GLOBAL_LIST_INIT(WALLITEMS, typecacheof(list(
/obj/machinery/newscaster, /obj/machinery/firealarm, /obj/structure/noticeboard, /obj/machinery/button,
/obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio/simple_vent_controller,
/obj/item/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth,
/obj/structure/mirror, /obj/structure/fireaxecabinet, /obj/machinery/computer/security/telescreen/entertainment,
/obj/structure/mirror, /obj/structure/cabinet, /obj/machinery/computer/security/telescreen/entertainment,
/obj/structure/sign/picture_frame, /obj/machinery/bounty_board
)))

Expand Down
5 changes: 4 additions & 1 deletion code/datums/components/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* When applied to an item it will make it two handed
*
*/

/datum/component/two_handed
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS // Only one of the component can exist on an item
var/wielded = FALSE /// Are we holding the two handed item properly
Expand Down Expand Up @@ -145,6 +146,7 @@
if(SEND_SIGNAL(parent, COMSIG_TWOHANDED_WIELD, user) & COMPONENT_TWOHANDED_BLOCK_WIELD)
return // blocked wield from item
wielded = TRUE
ADD_TRAIT(parent, TRAIT_WIELDED, REF(src))
RegisterSignal(user, COMSIG_MOB_SWAP_HANDS, PROC_REF(on_swap_hands))

// update item stats and name
Expand Down Expand Up @@ -188,6 +190,7 @@

// wield update status
wielded = FALSE
REMOVE_TRAIT(parent, TRAIT_WIELDED, REF(src))
UnregisterSignal(user, COMSIG_MOB_SWAP_HANDS)
SEND_SIGNAL(parent, COMSIG_TWOHANDED_UNWIELD, user)

Expand Down Expand Up @@ -303,7 +306,7 @@
sharpened_increase = min(amount, (max_amount - wielded_val))
return COMPONENT_BLOCK_SHARPEN_APPLIED

/**
/*
* The offhand dummy item for two handed items
*
*/
Expand Down
23 changes: 20 additions & 3 deletions code/datums/elements/bed_tucking.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@
var/y_offset = 0
/// our rotation degree - how much the item turns when in bed (+degrees turns it more parallel)
var/rotation_degree = 0
/// Whether the item changes its dir to match the desired lying direction of the bed that it's tucked into.
var/change_dir = FALSE
/// Whether the item changes its layer to the layer suggested by the bed for tucked-in item.
/// When the item is untucked, it is returned to its initial() layer.
var/change_layer = FALSE

/datum/element/bed_tuckable/Attach(obj/target, x = 0, y = 0, rotation = 0)
/datum/element/bed_tuckable/Attach(obj/target, x = 0, y = 0, rotation = 0, _change_dir = FALSE, _change_layer = FALSE)
. = ..()
if(!isitem(target))
return ELEMENT_INCOMPATIBLE

x_offset = x
y_offset = y
rotation_degree = rotation
change_dir = _change_dir
change_layer = _change_layer
RegisterSignal(target, COMSIG_ITEM_ATTACK_OBJ, PROC_REF(tuck_into_bed))

/datum/element/bed_tuckable/Detach(obj/target)
Expand All @@ -40,11 +47,20 @@
return

to_chat(tucker, "<span class='notice'>You lay [tucked] out on [target_bed].</span>")
tucked.pixel_x = x_offset
tucked.pixel_y = y_offset
tucked.pixel_x = x_offset + target_bed.tucked_x_shift
tucked.pixel_y = y_offset + target_bed.tucked_y_shift
if(rotation_degree)
tucked.transform = turn(tucked.transform, rotation_degree)
RegisterSignal(tucked, COMSIG_ITEM_PICKUP, PROC_REF(untuck))
// the buckle_lying value on the bed controls the direction that mobs lay down in when they're buckled into bed.
// some items (bedsheets) have different states to reflect those directions.
if(change_dir)
if(target_bed.buckle_lying == 270)
tucked.setDir(NORTH)
else
tucked.setDir(SOUTH)
if(target_bed.suggested_tuck_layer != null)
tucked.layer = target_bed.suggested_tuck_layer

return COMPONENT_NO_AFTERATTACK

Expand All @@ -57,4 +73,5 @@
SIGNAL_HANDLER

tucked.transform = turn(tucked.transform, -rotation_degree)
tucked.layer = initial(tucked.layer)
UnregisterSignal(tucked, COMSIG_ITEM_PICKUP)
2 changes: 1 addition & 1 deletion code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@
if(!operating)
if(istype(I, /obj/item/melee/axe/fire)) //being fireaxe'd
var/obj/item/melee/axe/fire/axe = I
if(axe && !axe.wielded)
if(axe && !HAS_TRAIT(axe, TRAIT_WIELDED))
to_chat(user, "<span class='warning'>You need to be wielding \the [axe] to do that!</span>")
return
INVOKE_ASYNC(src, (density ? PROC_REF(open) : PROC_REF(close)), 2)
Expand Down
5 changes: 3 additions & 2 deletions code/game/objects/effects/decals/cleanable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@
/obj/effect/decal/cleanable/wash(clean_types)
..()
if(!(flags_1 & INITIALIZED_1))
return FALSE
qdel(src)
return
if(clean_types in list(CLEAN_WASH, CLEAN_SCRUB))
qdel(src)
return TRUE

/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
Expand Down
29 changes: 27 additions & 2 deletions code/game/objects/effects/effect_system/effects_foam.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@

/obj/effect/particle_effect/foam/firefighting/kill_foam()
STOP_PROCESSING(SSfastprocess, src)

if(absorbed_plasma)
var/obj/effect/decal/cleanable/plasma/P = (locate(/obj/effect/decal/cleanable/plasma) in get_turf(src))
if(!P)
P = new(loc)
P.reagents.add_reagent(/datum/reagent/stable_plasma, absorbed_plasma)

flick("[icon_state]-disolve", src)
QDEL_IN(src, 5)

Expand All @@ -67,6 +65,33 @@
/obj/effect/particle_effect/foam/firefighting/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return


/obj/effect/particle_effect/foam/antirad
name = "antiradiation foam"
lifetime = 80
amount = 0 //no spread
slippery_foam = FALSE
color = "#A6FAFF55"


/obj/effect/particle_effect/foam/antirad/process()
..()

var/turf/open/T = get_turf(src)
var/obj/effect/radiation/rads = (locate(/obj/effect/radiation) in T)
if(rads && istype(T))
rads.rad_power = rads.rad_power * rand(0.8, 0.95)
if (rads.rad_power <= RAD_BACKGROUND_RADIATION)
new /obj/effect/decal/cleanable/greenglow/filled(loc)
qdel(rads)
for(var/obj/things in get_turf(src))
things.wash(CLEAN_TYPE_RADIATION)

/obj/effect/particle_effect/foam/antirad/kill_foam()
STOP_PROCESSING(SSfastprocess, src)
flick("[icon_state]-disolve", src)
QDEL_IN(src, 5)

/obj/effect/particle_effect/foam/metal
name = "aluminium foam"
metal = ALUMINIUM_FOAM
Expand Down
13 changes: 0 additions & 13 deletions code/game/objects/items/defib.dm
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,6 @@
AddElement(/datum/element/update_icon_updates_onmob)
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12)

/// triggered on wield of two handed item
/obj/item/shockpaddles/proc/on_wield(obj/item/source, mob/user)
SIGNAL_HANDLER

wielded = TRUE

/// triggered on unwield of two handed item
/obj/item/shockpaddles/proc/on_unwield(obj/item/source, mob/user)
SIGNAL_HANDLER

wielded = FALSE

/obj/item/shockpaddles/Destroy()
defib = null
Expand Down Expand Up @@ -369,8 +358,6 @@
/obj/item/shockpaddles/Initialize()
. = ..()
ADD_TRAIT(src, TRAIT_NO_STORAGE_INSERT, GENERIC_ITEM_TRAIT) //stops shockpaddles from being inserted in BoH
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, PROC_REF(on_wield))
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, PROC_REF(on_unwield))
if(!req_defib)
return //If it doesn't need a defib, just say it exists
if (!loc || !istype(loc, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
Expand Down
20 changes: 1 addition & 19 deletions code/game/objects/items/melee/chainsaw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,12 @@
tool_behaviour = TOOL_SAW
toolspeed = 0.5
var/on = FALSE
var/wielded = FALSE // track wielded status on item

/obj/item/chainsaw/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, PROC_REF(on_wield))
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, PROC_REF(on_unwield))

/obj/item/chainsaw/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 30, 100, 0, 'sound/weapons/chainsawhit.ogg', TRUE)
AddComponent(/datum/component/two_handed, require_twohands=TRUE)

/// triggered on wield of two handed item
/obj/item/chainsaw/proc/on_wield(obj/item/source, mob/user)
SIGNAL_HANDLER

wielded = TRUE

/// triggered on unwield of two handed item
/obj/item/chainsaw/proc/on_unwield(obj/item/source, mob/user)
SIGNAL_HANDLER

wielded = FALSE

/obj/item/chainsaw/attack_self(mob/user)
on = !on
to_chat(user, "As you pull the starting cord dangling from [src], [on ? "it begins to whirr." : "the chain stops moving."]")
Expand All @@ -67,7 +49,7 @@
A.UpdateButtonIcon()

/obj/item/chainsaw/get_dismemberment_chance()
if(wielded)
if(HAS_TRAIT(src, TRAIT_WIELDED))
. = ..()

/obj/item/chainsaw/doomslayer
Expand Down
Loading

0 comments on commit ef3987e

Please sign in to comment.