Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
733 changes: 306 additions & 427 deletions _maps/map_files/YogsBox/YogsBox.dmm

Large diffs are not rendered by default.

932 changes: 403 additions & 529 deletions _maps/map_files/Yogsmeta/Yogsmeta.dmm

Large diffs are not rendered by default.

263 changes: 125 additions & 138 deletions _maps/shuttles/emergency_luxury.dmm

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion code/__DEFINES/components.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
#define COMPONENT_BLOCK_MAGIC 1
#define COMSIG_MOB_HUD_CREATED "mob_hud_created" //from base of mob/create_mob_hud(): ()
#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" //from base of
#define COMSIG_MOB_ATTACK_HAND_TURF "mob_attack_hand_turf" //from the base of turf/attack_hand
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" //from base of /obj/item/attack(): (mob/M, mob/user)
#define COMSIG_MOB_APPLY_DAMAGE "mob_apply_damage" //from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone)
#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters)
Expand Down Expand Up @@ -240,7 +241,7 @@
#define COMSIG_CARBON_STATUS_STAMCRIT "living_stamcrit" //from base of mob/living/carbon/enter_stamcrit()
#define COMSIG_BODYPART_GAUZED "bodypart_gauzed" // from /obj/item/bodypart/proc/apply_gauze(/obj/item/stack/gauze)
#define COMSIG_BODYPART_GAUZE_DESTROYED "bodypart_degauzed" // from [/obj/item/bodypart/proc/seep_gauze] when it runs out of absorption

#define COMSIG_CARBON_SPECIESCHANGE "mob_carbon_specieschange" //from base of mob/living/carbon/set_species(): (new_race)
// /mob/living/simple_animal/hostile signals
#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget"
#define COMPONENT_HOSTILE_NO_ATTACK 1
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/movespeed_modification.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@
#define MOVESPEED_ID_CLOCKCHANT "CLOCKCHANT"

#define MOVESPEED_ID_NECRO_VIRUS_SLOWDOWN "NECRO_VIRUS"

#define MOVESPEED_ID_SWIMMING "SWIMMING_SPEED_MOD"
2 changes: 2 additions & 0 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ GLOBAL_LIST_EMPTY(station_turfs)

/turf/attack_hand(mob/user)
. = ..()
if(SEND_SIGNAL(user, COMSIG_MOB_ATTACK_HAND_TURF, src) & COMPONENT_NO_ATTACK_HAND)
. = TRUE
if(.)
return
user.Move_Pulled(src)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ GLOBAL_LIST_EMPTY(mentor_races)

///Bitflag that controls what in game ways can select this species as a spawnable source. Think magic mirror and pride mirror, slime extract, ERT etc, see defines in __DEFINES/mobs.dm, defaults to NONE, so people actually have to think about it
var/changesource_flags = NONE

//The component to add when swimming
var/swimming_component = /datum/component/swimming

///////////
// PROCS //
///////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
inert_mutation = SHOCKTOUCH
hair_color = "fixedmutcolor"
hair_alpha = 140
swimming_component = /datum/component/swimming/ethereal
var/current_color
var/EMPeffect = FALSE
var/emageffect = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
mutantears = /obj/item/organ/ears/cat
mutanttail = /obj/item/organ/tail/cat
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
swimming_component = /datum/component/swimming/felinid
species_language_holder = /datum/language_holder/felinid

/datum/species/human/felinid/qualifies_for_rank(rank, list/features)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// changes, only the Random Golem type can be chosen
limbs_id = "golem"
fixed_mut_color = "aaa"
swimming_component = /datum/component/swimming/golem
var/info_text = "As an <span class='danger'>Iron Golem</span>, you don't have any special traits."
var/random_eligible = TRUE //If false, the golem subtype can't be made through golem mutation toxin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
burnmod = 0.5 // = 1/2x generic burn damage
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
species_language_holder = /datum/language_holder/jelly
swimming_component = /datum/component/swimming/dissolve

/datum/species/jelly/on_species_loss(mob/living/carbon/C)
if(regenerate_limbs)
Expand Down Expand Up @@ -738,4 +739,4 @@
to_chat(H, span_notice("You connect [target]'s mind to your slime link!"))
else
to_chat(H, span_warning("You can't seem to link [target]'s mind..."))
to_chat(target, span_warning("The foreign presence leaves your mind."))
to_chat(target, span_warning("The foreign presence leaves your mind."))
131 changes: 131 additions & 0 deletions code/modules/pool/components/swimming.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
//Component used to show that a mob is swimming, and force them to swim a lil' bit slower. Components are actually really based!

/datum/component/swimming
dupe_mode = COMPONENT_DUPE_UNIQUE
var/lengths = 0 //How far have we swum?
var/lengths_for_bonus = 25 //If you swim this much, you'll count as having "excercised" and thus gain a buff.
var/list/species = list()
var/drowning = FALSE
var/ticks_drowned = 0
var/slowdown = 4
var/bob_height_min = 2
var/bob_height_max = 5
var/bob_tick = 0

/datum/component/swimming/Initialize()
. = ..()
if(!isliving(parent))
message_admins("Swimming component erroneously added to a non-living mob ([parent]).")
return INITIALIZE_HINT_QDEL //Only mobs can swim, like Ian...
var/mob/M = parent
M.visible_message("<span class='notice'>[parent] starts splashing around in the water!</span>")
M.add_movespeed_modifier(MOVESPEED_ID_SWIMMING, update=TRUE, priority=50, multiplicative_slowdown=slowdown, movetypes=GROUND)
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/onMove)
RegisterSignal(parent, COMSIG_CARBON_SPECIESCHANGE, .proc/onChangeSpecies)
RegisterSignal(parent, COMSIG_MOB_ATTACK_HAND_TURF, .proc/try_leave_pool)
START_PROCESSING(SSprocessing, src)
enter_pool()

/datum/component/swimming/proc/onMove()
lengths ++
if(lengths > lengths_for_bonus)
var/mob/living/L = parent
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise)
L.apply_status_effect(STATUS_EFFECT_EXERCISED) //Swimming is really good excercise!
lengths = 0

//Damn edge cases
/datum/component/swimming/proc/onChangeSpecies()
var/mob/living/carbon/C = parent
var/component_type = /datum/component/swimming
if(istype(C) && C?.dna?.species)
component_type = C.dna.species.swimming_component
var/mob/M = parent
RemoveComponent()
M.AddComponent(component_type)

/datum/component/swimming/proc/try_leave_pool(datum/source, turf/clicked_turf)
var/mob/living/L = parent
if(!L.can_interact_with(clicked_turf))
return
if(is_blocked_turf(clicked_turf))
return
if(istype(clicked_turf, /turf/open/indestructible/sound/pool))
return
to_chat(parent, "<span class='notice'>You start to climb out of the pool...</span>")
if(do_after(parent, 1 SECONDS, target=clicked_turf))
L.forceMove(clicked_turf)
L.visible_message("<span class='notice'>[parent] climbs out of the pool.</span>")
RemoveComponent()

/datum/component/swimming/UnregisterFromParent()
exit_pool()
var/mob/M = parent
if(drowning)
stop_drowning(M)
if(bob_tick)
M.pixel_y = 0
M.remove_movespeed_modifier(MOVESPEED_ID_SWIMMING)
UnregisterSignal(parent, COMSIG_MOVABLE_MOVED)
UnregisterSignal(parent, COMSIG_CARBON_SPECIESCHANGE)
UnregisterSignal(parent, COMSIG_MOB_ATTACK_HAND_TURF)
STOP_PROCESSING(SSprocessing, src)
return ..()

/datum/component/swimming/process()
var/mob/living/L = parent
var/floating = FALSE
var/obj/item/twohanded/required/pool/helditem = L.get_active_held_item()
if(istype(helditem) && helditem.wielded)
bob_tick ++
animate(L, time=9.5, pixel_y = (L.pixel_y == bob_height_max) ? bob_height_min : bob_height_max)
floating = TRUE
else
if(bob_tick)
animate(L, time=5, pixel_y = 0)
bob_tick = 0
if(!floating && is_drowning(L))
if(!drowning)
start_drowning(L)
drowning = TRUE
drown(L)
else if(drowning)
stop_drowning(L)
drowning = FALSE
L.adjust_fire_stacks(-1)

/datum/component/swimming/proc/is_drowning(mob/living/victim)
var/obj/item/twohanded/required/pool/helditem = victim.get_active_held_item()
if(istype(helditem) && helditem.wielded)
return
return ((!(victim.mobility_flags & MOBILITY_STAND)) && (!HAS_TRAIT(victim, TRAIT_NOBREATH)))

/datum/component/swimming/proc/drown(mob/living/victim)
if(victim.losebreath < 1)
victim.losebreath += 1
ticks_drowned ++
if(prob(20))
victim.emote("cough")
else if(prob(25))
victim.emote("gasp")
if(ticks_drowned > 20)
if(prob(10))
victim.visible_message("<span class='warning'>[victim] falls unconcious for a moment!</span>")
victim.Unconscious(10)

/datum/component/swimming/proc/start_drowning(mob/living/victim)
to_chat(victim, "<span class='userdanger'>Water fills your lungs and mouth, you can't breathe!</span>")
ADD_TRAIT(victim, TRAIT_MUTE, "pool")

/datum/component/swimming/proc/stop_drowning(mob/living/victim)
victim.emote("cough")
to_chat(victim, "<span class='notice'>You cough up the last of the water, regaining your ability to speak and breathe clearly!</span>")
REMOVE_TRAIT(victim, TRAIT_MUTE, "pool")
ticks_drowned = 0

/datum/component/swimming/proc/enter_pool()
return

//Essentially the same as remove component, but easier for overiding
/datum/component/swimming/proc/exit_pool()
return
28 changes: 28 additions & 0 deletions code/modules/pool/components/swimming_dissolve.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/datum/component/swimming/dissolve
var/start_alpha = 0

/datum/component/swimming/dissolve/enter_pool()
var/mob/living/L = parent
start_alpha = L.alpha
to_chat(parent, "<span class='userdanger'>You begin disolving into the pool, get out fast!</span>")

/datum/component/swimming/dissolve/process()
..()
var/mob/living/L = parent
var/mob/living/carbon/human/H = L
if(istype(H))
if(H.wear_suit && istype(H.wear_suit, /obj/item/clothing))
var/obj/item/clothing/CH = H.wear_suit
if (CH.clothing_flags & THICKMATERIAL)
return
L.adjustCloneLoss(1)
L.alpha = ((L.health-HEALTH_THRESHOLD_DEAD) / (L.maxHealth - HEALTH_THRESHOLD_DEAD)) * 255
if(L.stat == DEAD)
L.visible_message("<span class='warning'>[L] dissolves into the pool!</span>")
var/obj/item/organ/brain = L.getorgan(/obj/item/organ/brain)
brain.Remove(L) //Maybe making them completely unrecoverable is too far
brain.forceMove(get_turf(L))
qdel(L)

/datum/component/swimming/dissolve/exit_pool()
animate(parent, alpha=start_alpha, time=20)
11 changes: 11 additions & 0 deletions code/modules/pool/components/swimming_ethereal.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/datum/component/swimming/ethereal/enter_pool()
var/mob/living/L = parent
L.visible_message("<span class='warning'>Sparks of energy begin coursing around the pool!</span>")

/datum/component/swimming/ethereal/process()
..()
var/mob/living/L = parent
if(prob(2) && L.nutrition > NUTRITION_LEVEL_FED)
L.adjust_nutrition(-50)
tesla_zap(L, 7, 2000, TESLA_MOB_STUN)
playsound(L, 'sound/machines/defib_zap.ogg', 50, TRUE)
27 changes: 27 additions & 0 deletions code/modules/pool/components/swimming_felinid.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/datum/component/swimming/felinid/enter_pool()
var/mob/living/L = parent
L.emote("scream")
to_chat(parent, "<span class='userdanger'>You get covered in water and start panicking!</span>")

/datum/component/swimming/felinid/process()
..()
var/mob/living/L = parent
var/obj/item/twohanded/required/pool/helditem = L.get_active_held_item()
if(istype(helditem) && helditem.wielded)
return
switch(rand(1, 100))
if(1 to 4)
to_chat(parent, "<span class='userdanger'>You can't touch the bottom!</span>")
L.emote("scream")
if(5 to 7)
if(L.confused < 5)
L.confused += 1
if(8 to 12)
L.Jitter(10)
if(13 to 14)
shake_camera(L, 15, 1)
L.emote("whimper")
L.Paralyze(10)
to_chat(parent, "<span class='userdanger'>You feel like you are never going to get out...</span>")
if(15 to 17)
L.emote("cry")
9 changes: 9 additions & 0 deletions code/modules/pool/components/swimming_golem.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/datum/component/swimming/golem/enter_pool()
var/mob/living/M = parent
M.Paralyze(60)
M.visible_message("<span class='warning'>[M] crashed violently into the ground!</span>",
"<span class='warning'>You sink like a rock!</span>")
playsound(get_turf(M), 'sound/effects/picaxe1.ogg')

/datum/component/swimming/golem/is_drowning()
return FALSE
Loading