12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
//Largely beneficial effects go here, even if they have drawbacks. An example is provided in Shadow Mend.
|
||||
|
||||
/datum/status_effect/shadow_mend
|
||||
id = "shadow_mend"
|
||||
duration = 3
|
||||
alert_type = /obj/screen/alert/status_effect/shadow_mend
|
||||
|
||||
/obj/screen/alert/status_effect/shadow_mend
|
||||
name = "Shadow Mend"
|
||||
desc = "Shadowy energies wrap around your wounds, sealing them at a price. After healing, you will slowly lose health every three seconds for thirty seconds."
|
||||
icon_state = "shadow_mend"
|
||||
|
||||
/datum/status_effect/shadow_mend/on_apply()
|
||||
owner.visible_message("<span class='notice'>Violet light wraps around [owner]'s body!</span>", "<span class='notice'>Violet light wraps around your body!</span>")
|
||||
playsound(owner, 'sound/magic/Teleport_app.ogg', 50, 1)
|
||||
|
||||
/datum/status_effect/shadow_mend/tick()
|
||||
owner.adjustBruteLoss(-15)
|
||||
owner.adjustFireLoss(-15)
|
||||
|
||||
/datum/status_effect/shadow_mend/on_remove()
|
||||
owner.visible_message("<span class='warning'>The violet light around [owner] glows black!</span>", "<span class='warning'>The tendrils around you cinch tightly and reap their toll...</span>")
|
||||
playsound(owner, 'sound/magic/Teleport_diss.ogg', 50, 1)
|
||||
owner.apply_status_effect(STATUS_EFFECT_VOID_PRICE)
|
||||
|
||||
|
||||
/datum/status_effect/void_price
|
||||
id = "void_price"
|
||||
duration = 30
|
||||
tick_interval = 3
|
||||
alert_type = /obj/screen/alert/status_effect/void_price
|
||||
|
||||
/obj/screen/alert/status_effect/void_price
|
||||
name = "Void Price"
|
||||
desc = "Black tendrils cinch tightly against you, digging wicked barbs into your flesh."
|
||||
icon_state = "shadow_mend"
|
||||
|
||||
/datum/status_effect/void_price/tick()
|
||||
owner << sound('sound/magic/Summon_Karp.ogg', volume = 25)
|
||||
owner.adjustBruteLoss(3)
|
||||
|
||||
|
||||
|
||||
/datum/status_effect/vanguard_shield
|
||||
id = "vanguard"
|
||||
duration = 20
|
||||
alert_type = /obj/screen/alert/status_effect/vanguard
|
||||
|
||||
/obj/screen/alert/status_effect/vanguard
|
||||
name = "Vanguard"
|
||||
desc = "You're absorbing stuns! 25% of all stuns taken will affect you after this effect ends."
|
||||
icon_state = "vanguard"
|
||||
alerttooltipstyle = "clockcult"
|
||||
|
||||
/obj/screen/alert/status_effect/vanguard/MouseEntered(location,control,params)
|
||||
var/mob/living/L = usr
|
||||
if(istype(L)) //this is probably more safety than actually needed
|
||||
var/vanguard = L.stun_absorption["vanguard"]
|
||||
desc = initial(desc)
|
||||
desc += "<br><b>[vanguard["stuns_absorbed"] * 2]</b> seconds of stuns held back.<br><b>[round(min(vanguard["stuns_absorbed"] * 0.25, 20)) * 2]</b> seconds of stun will affect you."
|
||||
..()
|
||||
|
||||
/datum/status_effect/vanguard_shield/on_apply()
|
||||
add_logs(owner, null, "gained Vanguard stun immunity")
|
||||
owner.add_stun_absorption("vanguard", 200, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!")
|
||||
owner.visible_message("<span class='warning'>[owner] begins to faintly glow!</span>", "<span class='brass'>You will absorb all stuns for the next twenty seconds.</span>")
|
||||
|
||||
/datum/status_effect/vanguard_shield/on_remove()
|
||||
var/vanguard = owner.stun_absorption["vanguard"]
|
||||
var/stuns_blocked = 0
|
||||
if(vanguard)
|
||||
stuns_blocked = round(min(vanguard["stuns_absorbed"] * 0.25, 20))
|
||||
if(owner.stat != DEAD)
|
||||
var/message_to_owner = "<span class='warning'>You feel your Vanguard quietly fade...</span>"
|
||||
var/otheractiveabsorptions = FALSE
|
||||
for(var/i in owner.stun_absorption)
|
||||
if(owner.stun_absorption[i]["end_time"] > world.time && owner.stun_absorption[i]["priority"] > vanguard["priority"])
|
||||
otheractiveabsorptions = TRUE
|
||||
if(!ratvar_awakens && stuns_blocked && !otheractiveabsorptions)
|
||||
vanguard["end_time"] = 0 //so it doesn't absorb the stuns we're about to apply
|
||||
owner.Stun(stuns_blocked)
|
||||
owner.Weaken(stuns_blocked)
|
||||
message_to_owner = "<span class='boldwarning'>The weight of the Vanguard's protection crashes down upon you!</span>"
|
||||
if(stuns_blocked >= 15)
|
||||
message_to_owner += "\n<span class='userdanger'>You faint from the exertion!</span>"
|
||||
stuns_blocked *= 2
|
||||
owner.Paralyse(stuns_blocked)
|
||||
owner.visible_message("<span class='warning'>[owner]'s glowing aura fades!</span>", message_to_owner)
|
||||
add_logs(owner, null, "lost Vanguard stun immunity[stuns_blocked ? "and been stunned for [stuns_blocked]":""]")
|
||||
|
||||
|
||||
|
||||
/datum/status_effect/inathneqs_endowment
|
||||
id = "inathneqs_endowment"
|
||||
duration = 15
|
||||
alert_type = /obj/screen/alert/status_effect/inathneqs_endowment
|
||||
|
||||
/obj/screen/alert/status_effect/inathneqs_endowment
|
||||
name = "Inath-neq's Endowment"
|
||||
desc = "Adrenaline courses through you as the Resonant Cogwheel's energy shields you from all harm!"
|
||||
icon_state = "inathneqs_endowment"
|
||||
alerttooltipstyle = "clockcult"
|
||||
|
||||
/datum/status_effect/inathneqs_endowment/on_apply()
|
||||
add_logs(owner, null, "gained Inath-neq's invulnerability")
|
||||
owner.visible_message("<span class='warning'>[owner] shines with azure light!</span>", "<span class='notice'>You feel Inath-neq's power flow through you! You're invincible!</span>")
|
||||
var/oldcolor = owner.color
|
||||
owner.color = "#1E8CE1"
|
||||
owner.fully_heal()
|
||||
owner.add_stun_absorption("inathneq", 150, 2, "'s flickering blue aura momentarily intensifies!", "Inath-neq's power absorbs the stun!", " glowing with a flickering blue light!")
|
||||
owner.status_flags |= GODMODE
|
||||
animate(owner, color = oldcolor, time = 150, easing = EASE_IN)
|
||||
addtimer(owner, "update_atom_colour", 150)
|
||||
playsound(owner, 'sound/magic/Ethereal_Enter.ogg', 50, 1)
|
||||
|
||||
/datum/status_effect/inathneqs_endowment/on_remove()
|
||||
add_logs(owner, null, "lost Inath-neq's invulnerability")
|
||||
owner.visible_message("<span class='warning'>The light around [owner] flickers and dissipates!</span>", "<span class='boldwarning'>You feel Inath-neq's power fade from your body!</span>")
|
||||
owner.status_flags &= ~GODMODE
|
||||
playsound(owner, 'sound/magic/Ethereal_Exit.ogg', 50, 1)
|
||||
|
||||
/datum/status_effect/cyborg_power_regen
|
||||
id = "power_regen"
|
||||
duration = 10
|
||||
alert_type = /obj/screen/alert/status_effect/power_regen
|
||||
var/power_to_give = 0 //how much power is gained each tick
|
||||
|
||||
/obj/screen/alert/status_effect/power_regen
|
||||
name = "Power Regeneration"
|
||||
desc = "You are quickly regenerating power!"
|
||||
icon_state = "power_regen"
|
||||
|
||||
/datum/status_effect/cyborg_power_regen/tick()
|
||||
var/mob/living/silicon/robot/cyborg = owner
|
||||
if(!istype(cyborg) || !cyborg.cell)
|
||||
qdel(src)
|
||||
return
|
||||
playsound(cyborg, 'sound/effects/light_flicker.ogg', 50, 1)
|
||||
cyborg.cell.give(power_to_give)
|
||||
@@ -0,0 +1,30 @@
|
||||
/datum/status_effect/freon
|
||||
id = "frozen"
|
||||
duration = 10
|
||||
unique = TRUE
|
||||
alert_type = /obj/screen/alert/status_effect/freon
|
||||
var/icon/cube
|
||||
|
||||
/obj/screen/alert/status_effect/freon
|
||||
name = "Frozen Solid"
|
||||
desc = "You're frozen inside of an ice cube, and cannot move! You can still do stuff, like shooting. Resist out of the cube!"
|
||||
icon_state = "frozen"
|
||||
|
||||
/datum/status_effect/freon/on_apply()
|
||||
if(!owner.stat)
|
||||
owner << "You become frozen in a cube!"
|
||||
cube = icon('icons/effects/freeze.dmi', "ice_cube")
|
||||
owner.overlays += cube
|
||||
owner.update_canmove()
|
||||
|
||||
/datum/status_effect/freon/tick()
|
||||
owner.update_canmove()
|
||||
if(owner && owner.bodytemperature >= 310.055)
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/freon/on_remove()
|
||||
if(!owner.stat)
|
||||
owner << "The cube melts!"
|
||||
owner.overlays -= cube
|
||||
owner.bodytemperature += 100
|
||||
owner.update_canmove()
|
||||
@@ -0,0 +1,100 @@
|
||||
//Status effects are used to apply temporary or permanent effects to mobs. Mobs are aware of their status effects at all times.
|
||||
//This file contains their code, plus code for applying and removing them.
|
||||
//When making a new status effect, add a define to status_effects.dm in __DEFINES for ease of use!
|
||||
|
||||
var/global/list/all_status_effects = list() //a list of all status effects, if for some reason you need to remove all of them
|
||||
|
||||
/datum/status_effect
|
||||
var/id = "effect" //Used for screen alerts.
|
||||
var/duration = -1 //How long the status effect lasts in SECONDS. Enter -1 for an effect that never ends unless removed through some means.
|
||||
var/tick_interval = 1 //How many seconds between ticks. Leave at 1 for every second.
|
||||
var/mob/living/owner //The mob affected by the status effect.
|
||||
var/cosmetic = FALSE //If the status effect only exists for flavor.
|
||||
var/unique = TRUE //If there can be multiple status effects of this type on one mob.
|
||||
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
|
||||
|
||||
/datum/status_effect/New(mob/living/new_owner)
|
||||
if(new_owner)
|
||||
owner = new_owner
|
||||
if(owner)
|
||||
LAZYADD(owner.status_effects, src)
|
||||
all_status_effects += src
|
||||
addtimer(src, "start_ticking", 1) //Give us time to set any variables
|
||||
|
||||
/datum/status_effect/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
if(owner)
|
||||
owner.clear_alert(id)
|
||||
on_remove()
|
||||
LAZYREMOVE(owner.status_effects, src)
|
||||
all_status_effects -= src
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/proc/start_ticking()
|
||||
if(!src)
|
||||
return
|
||||
if(!owner)
|
||||
qdel(src)
|
||||
return
|
||||
on_apply()
|
||||
if(alert_type)
|
||||
var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type)
|
||||
A.attached_effect = src //so the alert can reference us, if it needs to
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/datum/status_effect/process()
|
||||
if(!owner)
|
||||
qdel(src)
|
||||
return
|
||||
if(duration != -1)
|
||||
duration--
|
||||
tick_interval--
|
||||
if(!tick_interval)
|
||||
tick()
|
||||
tick_interval = initial(tick_interval)
|
||||
if(!duration)
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/proc/on_apply() //Called whenever the buff is applied.
|
||||
/datum/status_effect/proc/tick() //Called every tick.
|
||||
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed.
|
||||
|
||||
////////////////
|
||||
// ALERT HOOK //
|
||||
////////////////
|
||||
|
||||
/obj/screen/alert/status_effect
|
||||
name = "Curse of Mundanity"
|
||||
desc = "You don't feel any different..."
|
||||
var/datum/status_effect/attached_effect
|
||||
|
||||
//////////////////
|
||||
// HELPER PROCS //
|
||||
//////////////////
|
||||
|
||||
/mob/living/proc/apply_status_effect(effect) //applies a given status effect to this mob, returning the effect if it was successful
|
||||
. = FALSE
|
||||
var/datum/status_effect/S1 = effect
|
||||
LAZYINITLIST(status_effects)
|
||||
for(var/datum/status_effect/S in status_effects)
|
||||
if(S.id == initial(S1.id) && initial(S1.unique))
|
||||
return
|
||||
S1 = new effect(src)
|
||||
. = S1
|
||||
|
||||
/mob/living/proc/remove_status_effect(effect) //removes all of a given status effect from this mob, returning TRUE if at least one was removed
|
||||
. = FALSE
|
||||
if(status_effects)
|
||||
var/datum/status_effect/S1 = effect
|
||||
for(var/datum/status_effect/S in status_effects)
|
||||
if(initial(S1.id) == S.id)
|
||||
qdel(S)
|
||||
. = TRUE
|
||||
|
||||
/mob/living/proc/has_status_effect(effect) //returns the effect if the mob calling the proc owns the given status effect
|
||||
. = FALSE
|
||||
if(status_effects)
|
||||
var/datum/status_effect/S1 = effect
|
||||
for(var/datum/status_effect/S in status_effects)
|
||||
if(initial(S1.id) == S.id)
|
||||
return S
|
||||
Reference in New Issue
Block a user