Skip to content

Commit

Permalink
Batch of TG PRs 10/12 (#4473)
Browse files Browse the repository at this point in the history
## About The Pull Request

Doing another one early for map vote fix

## Changelog

Autochangelogs included
  • Loading branch information
vinylspiders authored and FeenieRU committed Oct 12, 2024
1 parent 4ef8ddc commit edf2589
Show file tree
Hide file tree
Showing 46 changed files with 476 additions and 159 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,4 @@ GLOBAL_LIST_INIT(announcer_keys, list(
#define SFX_PLASTIC_BOTTLE_LIQUID_SLOSH "plastic_bottle_liquid_slosh"
#define SFX_DEFAULT_LIQUID_SLOSH "default_liquid_slosh"
#define SFX_PLATE_ARMOR_RUSTLE "plate_armor_rustle"
#define SFX_PIG_OINK "pig_oink"
5 changes: 4 additions & 1 deletion code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NOFIRE "nonflammable"
#define TRAIT_NOFIRE_SPREAD "no_fire_spreading"
/// Prevents plasmamen from self-igniting if only their helmet is missing
#define TRAIT_NOSELFIGNITION_HEAD_ONLY "no_selfignition_head_only"
#define TRAIT_HEAD_ATMOS_SEALED "no_selfignition_head_only"
#define TRAIT_NOGUNS "no_guns"
///Can toss a guns like a badass, causing additional damage/effect to their enemies
#define TRAIT_TOSS_GUN_HARD "toss_gun_hard"
Expand Down Expand Up @@ -288,6 +288,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Applied into wounds when they're scanned with the wound analyzer, halves time to treat them manually.
#define TRAIT_WOUND_SCANNED "wound_scanned"

/// Owner will ignore any fire protection when calculating fire damage
#define TRAIT_IGNORE_FIRE_PROTECTION "ignore_fire_protection"

#define TRAIT_NODEATH "nodeath"
#define TRAIT_NOHARDCRIT "nohardcrit"
#define TRAIT_NOSOFTCRIT "nosoftcrit"
Expand Down
3 changes: 2 additions & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NOHUNGER" = TRAIT_NOHUNGER,
"TRAIT_NOLIMBDISABLE" = TRAIT_NOLIMBDISABLE,
"TRAIT_NOMOBSWAP" = TRAIT_NOMOBSWAP,
"TRAIT_NOSELFIGNITION_HEAD_ONLY" = TRAIT_NOSELFIGNITION_HEAD_ONLY,
"TRAIT_HEAD_ATMOS_SEALED" = TRAIT_HEAD_ATMOS_SEALED,
"TRAIT_NOSOFTCRIT" = TRAIT_NOSOFTCRIT,
"TRAIT_NO_AUGMENTS" = TRAIT_NO_AUGMENTS,
"TRAIT_NO_BLOOD_OVERLAY" = TRAIT_NO_BLOOD_OVERLAY,
Expand Down Expand Up @@ -567,6 +567,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_SPEECH_BOOSTER" = TRAIT_SPEECH_BOOSTER,
"TRAIT_MINING_PARRYING" = TRAIT_MINING_PARRYING,
"TRAIT_ILLUSORY_EFFECT" = TRAIT_ILLUSORY_EFFECT,
"TRAIT_IGNORE_FIRE_PROTECTION" = TRAIT_IGNORE_FIRE_PROTECTION,
),
/obj/item = list(
"TRAIT_APC_SHOCKING" = TRAIT_APC_SHOCKING,
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_XRAY_HEARING" = TRAIT_XRAY_HEARING,
"TRAIT_XRAY_VISION" = TRAIT_XRAY_VISION,
"TRAIT_MINING_PARRYING" = TRAIT_MINING_PARRYING,
"TRAIT_IGNORE_FIRE_PROTECTION" = TRAIT_IGNORE_FIRE_PROTECTION,
),
/obj/item = list(
"TRAIT_APC_SHOCKING" = TRAIT_APC_SHOCKING,
Expand Down
14 changes: 10 additions & 4 deletions code/datums/actions/mobs/lava_swoop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,17 @@
for(var/turf/T in walled)
drakewalls += new /obj/effect/temp_visual/drakewall(T) // no people with lava immunity can just run away from the attack for free
var/list/indestructible_turfs = list()
for(var/turf/T in RANGE_TURFS(2, center))
if(isindestructiblefloor(T))

for(var/turf/turf_target as anything in RANGE_TURFS(2, center))
if(isindestructiblefloor(turf_target))
continue
if(isindestructiblewall(turf_target))
indestructible_turfs += turf_target
continue
if(isindestructiblewall(T))
indestructible_turfs += T
if(ismineralturf(turf_target))
var/turf/closed/mineral/mineral_turf = turf_target
mineral_turf.gets_drilled(owner)

SLEEP_CHECK_DEATH(1 SECONDS, owner) // give them a bit of time to realize what attack is actually happening

var/list/turfs = RANGE_TURFS(2, center)
Expand Down
57 changes: 57 additions & 0 deletions code/datums/components/self_ignition.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/// Component used by plasmeme limbs. Ignites the owner and prevents fire armor from working if they're exposed to oxygen
/datum/component/self_ignition
/// How many fire stacks do we apply per second?
/// Default value is 0.25 / 6 (default amount of limbs)
var/fire_stacks_per_second = 0.0416
/// How many fire stacks are removed when we're exposed to hypernoblium
/// Default value is 10 / 6 (default amount of limbs)
var/fire_stacks_loss = 1.66

/datum/component/self_ignition/Initialize(fire_stacks_per_second = 0.0416, fire_stacks_loss = 1.66)
. = ..()
if(!isbodypart(parent))
return COMPONENT_INCOMPATIBLE
src.fire_stacks_per_second = fire_stacks_per_second
src.fire_stacks_loss = fire_stacks_loss

/datum/component/self_ignition/RegisterWithParent()
RegisterSignal(parent, COMSIG_BODYPART_ATTACHED, PROC_REF(on_attached))
RegisterSignal(parent, COMSIG_BODYPART_REMOVED, PROC_REF(on_detached))

/datum/component/self_ignition/proc/on_attached(datum/source, mob/living/carbon/human/new_owner)
SIGNAL_HANDLER
RegisterSignal(new_owner, COMSIG_LIVING_LIFE, PROC_REF(on_life))

/datum/component/self_ignition/proc/on_detached(datum/source, mob/living/carbon/human/old_owner)
SIGNAL_HANDLER
UnregisterSignal(old_owner, COMSIG_LIVING_LIFE)
REMOVE_TRAIT(old_owner, TRAIT_IGNORE_FIRE_PROTECTION, REF(parent))

/datum/component/self_ignition/proc/on_life(mob/living/carbon/human/owner, seconds_per_tick, times_fired)
SIGNAL_HANDLER

if (owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, ignore_chest_pressureprot = TRUE))
if (!owner.on_fire)
REMOVE_TRAIT(owner, TRAIT_IGNORE_FIRE_PROTECTION, REF(parent))
return

var/datum/gas_mixture/environment = owner.loc.return_air()
if (!environment?.total_moles())
return

if(environment.gases[/datum/gas/hypernoblium] && environment.gases[/datum/gas/hypernoblium][MOLES] >= 5)
if(owner.on_fire && owner.fire_stacks > 0)
owner.adjust_fire_stacks(-fire_stacks_loss * seconds_per_tick)
return

if (HAS_TRAIT(owner, TRAIT_NOFIRE))
return

ADD_TRAIT(owner, TRAIT_IGNORE_FIRE_PROTECTION, REF(parent))

if(!environment.gases[/datum/gas/oxygen] || environment.gases[/datum/gas/oxygen][MOLES] < 1) //Same threshhold that extinguishes fire
return

owner.adjust_fire_stacks(fire_stacks_per_second * seconds_per_tick)
if(owner.ignite_mob())
owner.visible_message(span_danger("[owner]'s body reacts with the atmosphere and bursts into flames!"), span_userdanger("Your body reacts with the atmosphere and bursts into flame!"))
9 changes: 2 additions & 7 deletions code/datums/elements/pet_bonus.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@

///string key of the emote to do when pet.
var/emote_name
///optional cute message to send when you pet your pet!
var/emote_message
///actual moodlet given, defaults to the pet animal one
var/moodlet

/datum/element/pet_bonus/Attach(datum/target, emote_message, moodlet = /datum/mood_event/pet_animal)
/datum/element/pet_bonus/Attach(datum/target, emote_name, moodlet = /datum/mood_event/pet_animal)
. = ..()
if(!isliving(target))
return ELEMENT_INCOMPATIBLE

src.emote_message = emote_message
src.emote_name = emote_name
src.moodlet = moodlet
RegisterSignal(target, COMSIG_ATOM_ATTACK_HAND, PROC_REF(on_attack_hand))
Expand All @@ -37,8 +34,6 @@

new /obj/effect/temp_visual/heart(pet.loc)
SEND_SIGNAL(pet, COMSIG_ANIMAL_PET, petter, modifiers)
if(emote_message && prob(33))
pet.manual_emote(emote_message)
if(emote_name)
if(emote_name && prob(33))
INVOKE_ASYNC(pet, TYPE_PROC_REF(/mob, emote), emote_name)
petter.add_mood_event("petting_bonus", moodlet, pet)
6 changes: 3 additions & 3 deletions code/game/machinery/nebula_shielding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
/obj/item/paper/fluff/radiation_nebula
name = "radioactive nebula shielding"
default_raw_text = {"EXTREME IMPORTANCE!!!! <br>
Set up these radioactive nebula shielding units before the gravity generators native shielding is overwhelmed! <br>
Set up these radioactive nebula shielding units before the gravity generator's native shielding is overwhelmed! <br>
Shielding units passively generate tritium, so make sure to properly ventilate/isolate the area before setting up a shielding unit!
More circuit boards can be ordered through cargo. Consider setting up auxillary shielding units in-case of destruction, power loss or sabotage.
"}
Expand All @@ -149,6 +149,6 @@
/obj/item/paper/fluff/radiation_nebula_virologist
name = "radioactive resonance"
default_raw_text = {"EXTREME IMPORTANCE!!!! <br>
During routine bloodscreening on employees working in the nebula, we found no traces of the sympton called 'Radioactive Resonance'. <br>
Something inside the nebula is interfering with it, be wary of a more shallow viral genepool.
During routine blood screening on employees working within the nebula, we have found no traces of the symptom called 'Radioactive Resonance'. <br>
Something inside the nebula is interfering with it; be wary of a more shallow viral genepool.
"}
7 changes: 6 additions & 1 deletion code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@
'sound/mobs/humanoids/human/snore/snore_male1.ogg' = 20,
'sound/mobs/humanoids/human/snore/snore_male2.ogg' = 20,
'sound/mobs/humanoids/human/snore/snore_male3.ogg' = 20,
'sound/mobs/humanoids/human/snore/snore_male3.ogg' = 20,
'sound/mobs/humanoids/human/snore/snore_male4.ogg' = 20,
'sound/mobs/humanoids/human/snore/snore_male5.ogg' = 20,
'sound/mobs/humanoids/human/snore/snore_mimimi2.ogg' = 1,
))
Expand Down Expand Up @@ -580,4 +580,9 @@
'sound/items/handling/armor_rustle/plate_armor/plate_armor_rustle4.ogg' = 23,
'sound/items/handling/armor_rustle/plate_armor/plate_armor_rustle5.ogg' = 23,
))
if(SFX_PIG_OINK)
soundin = pick(
'sound/mobs/non-humanoids/pig/pig1.ogg',
'sound/mobs/non-humanoids/pig/pig2.ogg',
)
return soundin
56 changes: 43 additions & 13 deletions code/modules/clothing/spacesuits/plasmamen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
icon_state = "plasmaman_suit"
inhand_icon_state = "plasmaman_suit"
fishing_modifier = 0
var/next_extinguish = 0
COOLDOWN_DECLARE(extinguish_timer)
var/extinguish_cooldown = 100
var/extinguishes_left = 10


/datum/armor/eva_plasmaman
bio = 100
fire = 100
Expand All @@ -23,21 +22,52 @@
. = ..()
. += span_notice("There [extinguishes_left == 1 ? "is" : "are"] [extinguishes_left] extinguisher charge\s left in this suit.")

/obj/item/clothing/suit/space/eva/plasmaman/equipped(mob/living/user, slot)
. = ..()
if (slot & ITEM_SLOT_OCLOTHING)
RegisterSignals(user, list(COMSIG_MOB_EQUIPPED_ITEM, COMSIG_LIVING_IGNITED, SIGNAL_ADDTRAIT(TRAIT_HEAD_ATMOS_SEALED)), PROC_REF(check_fire_state))
check_fire_state()

/obj/item/clothing/suit/space/eva/plasmaman/dropped(mob/living/user)
. = ..()
UnregisterSignal(user, list(COMSIG_MOB_EQUIPPED_ITEM, COMSIG_LIVING_IGNITED, SIGNAL_ADDTRAIT(TRAIT_HEAD_ATMOS_SEALED)))

/obj/item/clothing/suit/space/eva/plasmaman/proc/check_fire_state(datum/source)
SIGNAL_HANDLER

if (!ishuman(loc))
return

// This is weird but basically we're calling this proc once the cooldown ends in case our wearer gets set on fire again during said cooldown
// This is why we're ignoring source and instead checking by loc
var/mob/living/carbon/human/owner = loc
if (!owner.on_fire || !owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, ignore_chest_pressureprot = TRUE))
return

/obj/item/clothing/suit/space/eva/plasmaman/proc/Extinguish(mob/living/carbon/human/H)
if(!istype(H))
if (!extinguishes_left || !COOLDOWN_FINISHED(src, extinguish_timer))
return

if(H.fire_stacks > 0)
if(extinguishes_left)
if(next_extinguish > world.time)
return
next_extinguish = world.time + extinguish_cooldown
extinguishes_left--
H.visible_message(span_warning("[H]'s suit automatically extinguishes [H.p_them()]!"),span_warning("Your suit automatically extinguishes you."))
H.extinguish_mob()
new /obj/effect/particle_effect/water(get_turf(H))
extinguishes_left -= 1
COOLDOWN_START(src, extinguish_timer, extinguish_cooldown)
// Check if our (possibly other) wearer is on fire once the cooldown ends
addtimer(CALLBACK(src, PROC_REF(check_fire_state)), extinguish_cooldown)
owner.visible_message(span_warning("[owner]'s suit automatically extinguishes [owner.p_them()]!"), span_warning("Your suit automatically extinguishes you."))
owner.extinguish_mob()
new /obj/effect/particle_effect/water(get_turf(owner))

/obj/item/clothing/suit/space/eva/plasmaman/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if (!istype(tool, /obj/item/extinguisher_refill))
return

if (extinguishes_left == 5)
to_chat(user, span_notice("The inbuilt extinguisher is full."))
return ITEM_INTERACT_BLOCKING

extinguishes_left = 5
to_chat(user, span_notice("You refill the suit's built-in extinguisher, using up the cartridge."))
check_fire_state()
qdel(tool)
return ITEM_INTERACT_SUCCESS

//I just want the light feature of helmets
/obj/item/clothing/head/helmet/space/plasmaman
Expand Down
Loading

0 comments on commit edf2589

Please sign in to comment.