0bca862419
* map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures * lazy fix for bleeding edgy (#252) * map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures
74 lines
3.8 KiB
Plaintext
74 lines
3.8 KiB
Plaintext
//Here are the procs used to modify status effects of a mob.
|
|
//The effects include: stunned, weakened, paralysis, sleeping, resting, jitteriness, dizziness, ear damage,
|
|
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
|
|
|
|
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
|
|
|
//damage/heal the mob ears and adjust the deaf amount
|
|
/mob/living/adjustEarDamage(damage, deaf)
|
|
ear_damage = max(0, ear_damage + damage)
|
|
ear_deaf = max(0, ear_deaf + deaf)
|
|
|
|
//pass a negative argument to skip one of the variable
|
|
/mob/living/setEarDamage(damage, deaf)
|
|
if(damage >= 0)
|
|
ear_damage = damage
|
|
if(deaf >= 0)
|
|
ear_deaf = deaf
|
|
|
|
|
|
//////////////////////////////STUN ////////////////////////////////////
|
|
|
|
/mob/living/proc/add_stun_absorption(key, duration, priority, message, self_message, examine_message)
|
|
//adds a stun absorption with a key, a duration in deciseconds, its priority, and the messages it makes when you're stunned/examined, if any
|
|
if(!islist(stun_absorption))
|
|
stun_absorption = list()
|
|
if(stun_absorption[key])
|
|
stun_absorption[key]["end_time"] = world.time + duration
|
|
stun_absorption[key]["priority"] = priority
|
|
stun_absorption[key]["stuns_absorbed"] = 0
|
|
else
|
|
stun_absorption[key] = list("end_time" = world.time + duration, "priority" = priority, "stuns_absorbed" = 0, \
|
|
"visible_message" = message, "self_message" = self_message, "examine_message" = examine_message)
|
|
|
|
/mob/living/Stun(amount, updating = 1, ignore_canstun = 0)
|
|
if(!stat && islist(stun_absorption) && (status_flags & CANSTUN || ignore_canstun))
|
|
var/priority_absorb_key
|
|
var/highest_priority
|
|
for(var/i in stun_absorption)
|
|
if(stun_absorption[i]["end_time"] > world.time && (!priority_absorb_key || stun_absorption[i]["priority"] > highest_priority))
|
|
priority_absorb_key = stun_absorption[i]
|
|
highest_priority = stun_absorption[i]["priority"]
|
|
if(priority_absorb_key)
|
|
if(priority_absorb_key["visible_message"] || priority_absorb_key["self_message"])
|
|
if(priority_absorb_key["visible_message"] && priority_absorb_key["self_message"])
|
|
visible_message("<span class='warning'>[src][priority_absorb_key["visible_message"]]</span>", "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>")
|
|
else if(priority_absorb_key["visible_message"])
|
|
visible_message("<span class='warning'>[src][priority_absorb_key["visible_message"]]</span>")
|
|
else if(priority_absorb_key["self_message"])
|
|
src << "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>"
|
|
priority_absorb_key["stuns_absorbed"] += amount
|
|
return 0
|
|
return ..()
|
|
|
|
///////////////////////////////// WEAKEN /////////////////////////////////////
|
|
|
|
/mob/living/Weaken(amount, updating = 1, ignore_canweaken = 0)
|
|
if(!stat && islist(stun_absorption) && (status_flags & CANWEAKEN || ignore_canweaken))
|
|
var/priority_absorb_key
|
|
var/highest_priority
|
|
for(var/i in stun_absorption)
|
|
if(stun_absorption[i]["end_time"] > world.time && (!priority_absorb_key || stun_absorption[i]["priority"] > highest_priority))
|
|
priority_absorb_key = stun_absorption[i]
|
|
highest_priority = priority_absorb_key["priority"]
|
|
if(priority_absorb_key)
|
|
if(priority_absorb_key["visible_message"] || priority_absorb_key["self_message"])
|
|
if(priority_absorb_key["visible_message"] && priority_absorb_key["self_message"])
|
|
visible_message("<span class='warning'>[src][priority_absorb_key["visible_message"]]</span>", "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>")
|
|
else if(priority_absorb_key["visible_message"])
|
|
visible_message("<span class='warning'>[src][priority_absorb_key["visible_message"]]</span>")
|
|
else if(priority_absorb_key["self_message"])
|
|
src << "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>"
|
|
priority_absorb_key["stuns_absorbed"] += amount
|
|
return 0
|
|
return ..() |