mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 17:11:52 +00:00
Merge pull request #17185 from phil235/FixBundle48
Fix Bundle: holosign creator, status procs, teleporter hub, timestop effect
This commit is contained in:
@@ -137,14 +137,6 @@
|
||||
if(statpanel("Status"))
|
||||
stat(null, "Intent: [a_intent]")
|
||||
|
||||
/mob/living/carbon/alien/Stun(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
else
|
||||
// add some movement delay
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/getTrail()
|
||||
if(getBruteLoss() < 200)
|
||||
return pick (list("xltrails_1", "xltrails2"))
|
||||
|
||||
14
code/modules/mob/living/carbon/alien/status_procs.dm
Normal file
14
code/modules/mob/living/carbon/alien/status_procs.dm
Normal file
@@ -0,0 +1,14 @@
|
||||
//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.
|
||||
|
||||
/////////////////////////////////// STUNNED ////////////////////////////////////
|
||||
|
||||
/mob/living/carbon/alien/Stun(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
if(updating)
|
||||
update_canmove()
|
||||
else
|
||||
// add some movement delay
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
@@ -54,33 +54,6 @@
|
||||
/mob/living/carbon/brain/handle_disabilities()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/setEarDamage() // no ears to damage or heal
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/blind_eyes() // no eyes to damage or heal
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/blur_eyes()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/adjust_blindness()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/adjust_blurriness()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/set_blindness()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/set_blurriness()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/become_blind()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/handle_changeling()
|
||||
return
|
||||
|
||||
|
||||
38
code/modules/mob/living/carbon/brain/status_procs.dm
Normal file
38
code/modules/mob/living/carbon/brain/status_procs.dm
Normal file
@@ -0,0 +1,38 @@
|
||||
//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 ////////////////////////////////////
|
||||
|
||||
/mob/living/carbon/brain/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/setEarDamage() // no ears to damage or heal
|
||||
return
|
||||
|
||||
/////////////////////////////////// EYE_BLIND ////////////////////////////////////
|
||||
|
||||
/mob/living/carbon/brain/blind_eyes() // no eyes to damage or heal
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/adjust_blindness()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/set_blindness()
|
||||
return
|
||||
|
||||
/////////////////////////////////// EYE_BLURRY ////////////////////////////////////
|
||||
|
||||
/mob/living/carbon/brain/blur_eyes()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/adjust_blurriness()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/set_blurriness()
|
||||
return
|
||||
|
||||
/////////////////////////////////// BLIND DISABILITY ////////////////////////////////////
|
||||
|
||||
/mob/living/carbon/brain/become_blind()
|
||||
return
|
||||
79
code/modules/mob/living/carbon/status_procs.dm
Normal file
79
code/modules/mob/living/carbon/status_procs.dm
Normal file
@@ -0,0 +1,79 @@
|
||||
//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.
|
||||
|
||||
/mob/living/carbon/damage_eyes(amount)
|
||||
if(amount>0)
|
||||
eye_damage = amount
|
||||
if(eye_damage > 20)
|
||||
if(eye_damage > 30)
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
|
||||
else
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/mob/living/carbon/set_eye_damage(amount)
|
||||
eye_damage = max(amount,0)
|
||||
if(eye_damage > 20)
|
||||
if(eye_damage > 30)
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
|
||||
else
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
clear_fullscreen("eye_damage")
|
||||
|
||||
/mob/living/carbon/adjust_eye_damage(amount)
|
||||
eye_damage = max(eye_damage+amount, 0)
|
||||
if(eye_damage > 20)
|
||||
if(eye_damage > 30)
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
|
||||
else
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
clear_fullscreen("eye_damage")
|
||||
|
||||
/mob/living/carbon/adjust_drugginess(amount)
|
||||
var/old_druggy = druggy
|
||||
if(amount>0)
|
||||
druggy += amount
|
||||
if(!old_druggy)
|
||||
overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
else if(old_druggy)
|
||||
druggy = max(druggy+amount, 0)
|
||||
if(!druggy)
|
||||
clear_fullscreen("high")
|
||||
clear_alert("high")
|
||||
/mob/living/carbon/set_drugginess(amount)
|
||||
var/old_druggy = druggy
|
||||
druggy = amount
|
||||
if(amount>0)
|
||||
if(!old_druggy)
|
||||
overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
else if(old_druggy)
|
||||
clear_fullscreen("high")
|
||||
clear_alert("high")
|
||||
|
||||
|
||||
/mob/living/carbon/cure_blind()
|
||||
if(disabilities & BLIND)
|
||||
disabilities &= ~BLIND
|
||||
adjust_blindness(-1)
|
||||
return 1
|
||||
/mob/living/carbon/become_blind()
|
||||
if(!(disabilities & BLIND))
|
||||
disabilities |= BLIND
|
||||
blind_eyes(1)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/cure_nearsighted()
|
||||
if(disabilities & NEARSIGHT)
|
||||
disabilities &= ~NEARSIGHT
|
||||
clear_fullscreen("nearsighted")
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/become_nearsighted()
|
||||
if(!(disabilities & NEARSIGHT))
|
||||
disabilities |= NEARSIGHT
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
return 1
|
||||
@@ -49,7 +49,8 @@
|
||||
paralysis = 0
|
||||
stunned = 0
|
||||
weakened = 0
|
||||
sleeping = 0
|
||||
set_drugginess(0)
|
||||
SetSleeping(0, 0)
|
||||
blind_eyes(1)
|
||||
reset_perspective(null)
|
||||
hide_fullscreens()
|
||||
|
||||
@@ -86,9 +86,9 @@
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
AdjustStunned(-1, 1, 1)
|
||||
if(weakened)
|
||||
AdjustWeakened(-1, ignore_canweaken=1)
|
||||
AdjustWeakened(-1, 1, 1)
|
||||
|
||||
/mob/living/proc/handle_disabilities()
|
||||
//Eyes
|
||||
|
||||
@@ -429,18 +429,6 @@ Sorry Giacom. Please don't be mad :(
|
||||
var/obj/item/organ/limb/def_zone = ran_zone(t)
|
||||
return def_zone
|
||||
|
||||
//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
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_organ_damage(brute, burn, updating_health=1)
|
||||
adjustBruteLoss(-brute, updating_health)
|
||||
@@ -998,174 +986,3 @@ Sorry Giacom. Please don't be mad :(
|
||||
|
||||
/mob/proc/update_sight()
|
||||
return
|
||||
|
||||
/mob/proc/blind_eyes(amount)
|
||||
if(amount>0)
|
||||
var/old_eye_blind = eye_blind
|
||||
eye_blind = max(eye_blind, amount)
|
||||
if(!old_eye_blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
|
||||
/mob/proc/adjust_blindness(amount)
|
||||
if(amount>0)
|
||||
var/old_eye_blind = eye_blind
|
||||
eye_blind += amount
|
||||
if(!old_eye_blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
else if(eye_blind)
|
||||
var/blind_minimum = 0
|
||||
if(stat != CONSCIOUS || (disabilities & BLIND))
|
||||
blind_minimum = 1
|
||||
eye_blind = max(eye_blind+amount, blind_minimum)
|
||||
if(!eye_blind)
|
||||
clear_alert("blind")
|
||||
clear_fullscreen("blind")
|
||||
|
||||
/mob/proc/set_blindness(amount)
|
||||
if(amount>0)
|
||||
var/old_eye_blind = eye_blind
|
||||
eye_blind = amount
|
||||
if(client && !old_eye_blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
else if(eye_blind)
|
||||
var/blind_minimum = 0
|
||||
if(stat != CONSCIOUS || (disabilities & BLIND))
|
||||
blind_minimum = 1
|
||||
eye_blind = blind_minimum
|
||||
if(!eye_blind)
|
||||
clear_alert("blind")
|
||||
clear_fullscreen("blind")
|
||||
|
||||
/mob/proc/blur_eyes(amount)
|
||||
if(amount>0)
|
||||
var/old_eye_blurry = eye_blurry
|
||||
eye_blurry = max(amount, eye_blurry)
|
||||
if(!old_eye_blurry)
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
|
||||
/mob/proc/adjust_blurriness(amount)
|
||||
var/old_eye_blurry = eye_blurry
|
||||
eye_blurry = max(eye_blurry+amount, 0)
|
||||
if(amount>0)
|
||||
if(!old_eye_blurry)
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
else if(old_eye_blurry && !eye_blurry)
|
||||
clear_fullscreen("blurry")
|
||||
|
||||
/mob/proc/set_blurriness(amount)
|
||||
var/old_eye_blurry = eye_blurry
|
||||
eye_blurry = max(amount, 0)
|
||||
if(amount>0)
|
||||
if(!old_eye_blurry)
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
else if(old_eye_blurry)
|
||||
clear_fullscreen("blurry")
|
||||
|
||||
|
||||
/mob/proc/damage_eyes(amount)
|
||||
return
|
||||
|
||||
/mob/living/carbon/damage_eyes(amount)
|
||||
if(amount>0)
|
||||
eye_damage = amount
|
||||
if(eye_damage > 20)
|
||||
if(eye_damage > 30)
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
|
||||
else
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
|
||||
/mob/proc/set_eye_damage(amount)
|
||||
return
|
||||
|
||||
/mob/living/carbon/set_eye_damage(amount)
|
||||
eye_damage = max(amount,0)
|
||||
if(eye_damage > 20)
|
||||
if(eye_damage > 30)
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
|
||||
else
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
clear_fullscreen("eye_damage")
|
||||
|
||||
/mob/proc/adjust_eye_damage(amount)
|
||||
return
|
||||
|
||||
/mob/living/carbon/adjust_eye_damage(amount)
|
||||
eye_damage = max(eye_damage+amount, 0)
|
||||
if(eye_damage > 20)
|
||||
if(eye_damage > 30)
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
|
||||
else
|
||||
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
clear_fullscreen("eye_damage")
|
||||
|
||||
/mob/proc/adjust_drugginess(amount)
|
||||
return
|
||||
|
||||
/mob/living/carbon/adjust_drugginess(amount)
|
||||
var/old_druggy = druggy
|
||||
if(amount>0)
|
||||
druggy += amount
|
||||
if(!old_druggy)
|
||||
overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
else if(old_druggy)
|
||||
druggy = max(druggy+amount, 0)
|
||||
if(!druggy)
|
||||
clear_fullscreen("high")
|
||||
clear_alert("high")
|
||||
|
||||
/mob/proc/set_drugginess(amount)
|
||||
return
|
||||
|
||||
/mob/living/carbon/set_drugginess(amount)
|
||||
var/old_druggy = druggy
|
||||
druggy = amount
|
||||
if(amount>0)
|
||||
if(!old_druggy)
|
||||
overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
else if(old_druggy)
|
||||
clear_fullscreen("high")
|
||||
clear_alert("high")
|
||||
|
||||
/mob/proc/cure_blind() //when we want to cure the BLIND disability only.
|
||||
return
|
||||
|
||||
/mob/living/carbon/cure_blind()
|
||||
if(disabilities & BLIND)
|
||||
disabilities &= ~BLIND
|
||||
adjust_blindness(-1)
|
||||
return 1
|
||||
|
||||
/mob/proc/cure_nearsighted()
|
||||
return
|
||||
|
||||
/mob/living/carbon/cure_nearsighted()
|
||||
if(disabilities & NEARSIGHT)
|
||||
disabilities &= ~NEARSIGHT
|
||||
clear_fullscreen("nearsighted")
|
||||
return 1
|
||||
|
||||
/mob/proc/become_nearsighted()
|
||||
return
|
||||
|
||||
/mob/living/carbon/become_nearsighted()
|
||||
if(!(disabilities & NEARSIGHT))
|
||||
disabilities |= NEARSIGHT
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
return 1
|
||||
|
||||
/mob/proc/become_blind()
|
||||
return
|
||||
|
||||
/mob/living/carbon/become_blind()
|
||||
if(!(disabilities & BLIND))
|
||||
disabilities |= BLIND
|
||||
blind_eyes(1)
|
||||
return 1
|
||||
|
||||
@@ -457,12 +457,6 @@
|
||||
"<span class='warning'>[M] punches [src], but doesn't leave a dent.</span>")
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/setEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/GetPhoto()
|
||||
if (aicamera)
|
||||
return aicamera.selectpicture(aicamera)
|
||||
@@ -489,33 +483,3 @@
|
||||
animate(src, transform = ntransform, time = 2,easing = EASE_IN|EASE_OUT)
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/silicon/Stun(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(amount,0)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustStunned(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(stunned + amount,0)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/Weaken(amount, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetWeakened(amount)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(amount,0)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustWeakened(amount, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(weakened + amount,0)
|
||||
update_stat()
|
||||
|
||||
52
code/modules/mob/living/silicon/status_procs.dm
Normal file
52
code/modules/mob/living/silicon/status_procs.dm
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
//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.
|
||||
|
||||
/////////////////////////////////// STUNNED ////////////////////////////////////
|
||||
|
||||
/mob/living/silicon/Stun(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustStunned(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(stunned + amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetStunned(amount, updating = 1, ignore_canstun = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/////////////////////////////////// WEAKENED ////////////////////////////////////
|
||||
|
||||
/mob/living/silicon/Weaken(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(weakened + amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
|
||||
/mob/living/silicon/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/setEarDamage()
|
||||
return
|
||||
@@ -111,32 +111,6 @@
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/mob/living/simple_animal/blind_eyes()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/blur_eyes()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/adjust_blindness()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/adjust_blurriness()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/set_blindness()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/set_blurriness()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/become_blind()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/setEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/handle_status_effects()
|
||||
..()
|
||||
|
||||
34
code/modules/mob/living/simple_animal/status_procs.dm
Normal file
34
code/modules/mob/living/simple_animal/status_procs.dm
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
/mob/living/simple_animal/blind_eyes()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/adjust_blindness()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/set_blindness()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/blur_eyes()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/adjust_blurriness()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/set_blurriness()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/become_blind()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/setEarDamage()
|
||||
return
|
||||
|
||||
17
code/modules/mob/living/status_procs.dm
Normal file
17
code/modules/mob/living/status_procs.dm
Normal file
@@ -0,0 +1,17 @@
|
||||
//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
|
||||
@@ -753,120 +753,6 @@ var/next_mob_id = 0
|
||||
/mob/proc/activate_hand(selhand)
|
||||
return
|
||||
|
||||
/mob/proc/Jitter(amount)
|
||||
jitteriness = max(jitteriness,amount,0)
|
||||
|
||||
/mob/proc/Dizzy(amount)
|
||||
dizziness = max(dizziness,amount,0)
|
||||
|
||||
/mob/proc/Stun(amount, updating_canmove = 1)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
if(updating_canmove)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/SetStunned(amount, updating_canmove = 1) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(amount,0)
|
||||
if(updating_canmove)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustStunned(amount, updating_canmove = 1)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(stunned + amount,0)
|
||||
if(updating_canmove)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/Weaken(amount, ignore_canweaken = 0, updating_canmove = 1)
|
||||
if((status_flags & CANWEAKEN) || ignore_canweaken)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
if(updating_canmove)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
|
||||
/mob/proc/SetWeakened(amount, updating_canmove = 1)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(amount,0)
|
||||
if(updating_canmove)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
|
||||
/mob/proc/AdjustWeakened(amount, ignore_canweaken = 0, updating_canmove = 1)
|
||||
if((status_flags & CANWEAKEN) || ignore_canweaken)
|
||||
weakened = max(weakened + amount,0)
|
||||
if(updating_canmove)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
|
||||
/mob/proc/Paralyse(amount, updating_stat = 1)
|
||||
if(status_flags & CANPARALYSE)
|
||||
var/old_paralysis = paralysis
|
||||
paralysis = max(max(paralysis,amount),0)
|
||||
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/SetParalysis(amount, updating_stat = 1)
|
||||
if(status_flags & CANPARALYSE)
|
||||
var/old_paralysis = paralysis
|
||||
paralysis = max(amount,0)
|
||||
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/AdjustParalysis(amount, updating_stat = 1)
|
||||
if(status_flags & CANPARALYSE)
|
||||
var/old_paralysis = paralysis
|
||||
paralysis = max(paralysis + amount,0)
|
||||
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/Sleeping(amount, updating_stat = 1)
|
||||
var/old_sleeping = sleeping
|
||||
sleeping = max(max(sleeping,amount),0)
|
||||
if(!old_sleeping && sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
else if(old_sleeping && !sleeping)
|
||||
clear_alert("asleep")
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/SetSleeping(amount, updating_stat = 1)
|
||||
var/old_sleeping = sleeping
|
||||
sleeping = max(amount,0)
|
||||
if(!old_sleeping && sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
else if(old_sleeping && !sleeping)
|
||||
clear_alert("asleep")
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/AdjustSleeping(amount, updating_stat = 1)
|
||||
var/old_sleeping = sleeping
|
||||
sleeping = max(sleeping + amount,0)
|
||||
if(!old_sleeping && sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
else if(old_sleeping && !sleeping)
|
||||
clear_alert("asleep")
|
||||
if(updating_stat)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/Resting(amount)
|
||||
resting = max(max(resting,amount),0)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/SetResting(amount)
|
||||
resting = max(amount,0)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustResting(amount)
|
||||
resting = max(resting + amount,0)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/assess_threat() //For sec bot threat assessment
|
||||
return
|
||||
|
||||
@@ -884,14 +770,6 @@ var/next_mob_id = 0
|
||||
ghost.notify_cloning(message, sound, source)
|
||||
return ghost
|
||||
|
||||
|
||||
|
||||
/mob/proc/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/proc/setEarDamage()
|
||||
return
|
||||
|
||||
/mob/proc/AddSpell(obj/effect/proc_holder/spell/S)
|
||||
mob_spell_list += S
|
||||
S.action.Grant(src)
|
||||
@@ -1054,3 +932,4 @@ var/next_mob_id = 0
|
||||
updatehealth()
|
||||
if("resize")
|
||||
update_transform()
|
||||
|
||||
|
||||
255
code/modules/mob/status_procs.dm
Normal file
255
code/modules/mob/status_procs.dm
Normal file
@@ -0,0 +1,255 @@
|
||||
|
||||
//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.
|
||||
|
||||
|
||||
/////////////////////////////////// STUNNED ////////////////////////////////////
|
||||
|
||||
/mob/proc/Stun(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
if(updating)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/SetStunned(amount, updating = 1, ignore_canstun = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(amount,0)
|
||||
if(updating)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustStunned(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(stunned + amount,0)
|
||||
if(updating)
|
||||
update_canmove()
|
||||
|
||||
/////////////////////////////////// WEAKENED ////////////////////////////////////
|
||||
|
||||
/mob/proc/Weaken(amount, updating = 1, ignore_canweaken = 0)
|
||||
if((status_flags & CANWEAKEN) || ignore_canweaken)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
if(updating)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
|
||||
/mob/proc/SetWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(amount,0)
|
||||
if(updating)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
|
||||
/mob/proc/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
if((status_flags & CANWEAKEN) || ignore_canweaken)
|
||||
weakened = max(weakened + amount,0)
|
||||
if(updating)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
|
||||
/////////////////////////////////// PARALYSIS ////////////////////////////////////
|
||||
|
||||
/mob/proc/Paralyse(amount, updating = 1)
|
||||
if(status_flags & CANPARALYSE)
|
||||
var/old_paralysis = paralysis
|
||||
paralysis = max(max(paralysis,amount),0)
|
||||
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/SetParalysis(amount, updating = 1)
|
||||
if(status_flags & CANPARALYSE)
|
||||
var/old_paralysis = paralysis
|
||||
paralysis = max(amount,0)
|
||||
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/AdjustParalysis(amount, updating = 1)
|
||||
if(status_flags & CANPARALYSE)
|
||||
var/old_paralysis = paralysis
|
||||
paralysis = max(paralysis + amount,0)
|
||||
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/////////////////////////////////// SLEEPING ////////////////////////////////////
|
||||
|
||||
/mob/proc/Sleeping(amount, updating = 1)
|
||||
var/old_sleeping = sleeping
|
||||
sleeping = max(max(sleeping,amount),0)
|
||||
if(!old_sleeping && sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if(updating)
|
||||
update_stat()
|
||||
else if(old_sleeping && !sleeping)
|
||||
clear_alert("asleep")
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/SetSleeping(amount, updating = 1)
|
||||
var/old_sleeping = sleeping
|
||||
sleeping = max(amount,0)
|
||||
if(!old_sleeping && sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if(updating)
|
||||
update_stat()
|
||||
else if(old_sleeping && !sleeping)
|
||||
clear_alert("asleep")
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/proc/AdjustSleeping(amount, updating = 1)
|
||||
var/old_sleeping = sleeping
|
||||
sleeping = max(sleeping + amount,0)
|
||||
if(!old_sleeping && sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if(updating)
|
||||
update_stat()
|
||||
else if(old_sleeping && !sleeping)
|
||||
clear_alert("asleep")
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/////////////////////////////////// RESTING ////////////////////////////////////
|
||||
|
||||
/mob/proc/Resting(amount)
|
||||
resting = max(max(resting,amount),0)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/SetResting(amount)
|
||||
resting = max(amount,0)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustResting(amount)
|
||||
resting = max(resting + amount,0)
|
||||
update_canmove()
|
||||
|
||||
/////////////////////////////////// JITTERINESS ////////////////////////////////////
|
||||
|
||||
/mob/proc/Jitter(amount)
|
||||
jitteriness = max(jitteriness,amount,0)
|
||||
|
||||
/////////////////////////////////// DIZZINESS ////////////////////////////////////
|
||||
|
||||
/mob/proc/Dizzy(amount)
|
||||
dizziness = max(dizziness,amount,0)
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
|
||||
/mob/proc/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/proc/setEarDamage()
|
||||
return
|
||||
|
||||
/////////////////////////////////// EYE DAMAGE ////////////////////////////////////
|
||||
|
||||
/mob/proc/damage_eyes(amount)
|
||||
return
|
||||
|
||||
/mob/proc/adjust_eye_damage(amount)
|
||||
return
|
||||
|
||||
/mob/proc/set_eye_damage(amount)
|
||||
return
|
||||
|
||||
/////////////////////////////////// EYE_BLIND ////////////////////////////////////
|
||||
|
||||
/mob/proc/blind_eyes(amount)
|
||||
if(amount>0)
|
||||
var/old_eye_blind = eye_blind
|
||||
eye_blind = max(eye_blind, amount)
|
||||
if(!old_eye_blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
|
||||
/mob/proc/adjust_blindness(amount)
|
||||
if(amount>0)
|
||||
var/old_eye_blind = eye_blind
|
||||
eye_blind += amount
|
||||
if(!old_eye_blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
else if(eye_blind)
|
||||
var/blind_minimum = 0
|
||||
if(stat != CONSCIOUS || (disabilities & BLIND))
|
||||
blind_minimum = 1
|
||||
eye_blind = max(eye_blind+amount, blind_minimum)
|
||||
if(!eye_blind)
|
||||
clear_alert("blind")
|
||||
clear_fullscreen("blind")
|
||||
|
||||
/mob/proc/set_blindness(amount)
|
||||
if(amount>0)
|
||||
var/old_eye_blind = eye_blind
|
||||
eye_blind = amount
|
||||
if(client && !old_eye_blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
else if(eye_blind)
|
||||
var/blind_minimum = 0
|
||||
if(stat != CONSCIOUS || (disabilities & BLIND))
|
||||
blind_minimum = 1
|
||||
eye_blind = blind_minimum
|
||||
if(!eye_blind)
|
||||
clear_alert("blind")
|
||||
clear_fullscreen("blind")
|
||||
|
||||
/////////////////////////////////// EYE_BLURRY ////////////////////////////////////
|
||||
|
||||
/mob/proc/blur_eyes(amount)
|
||||
if(amount>0)
|
||||
var/old_eye_blurry = eye_blurry
|
||||
eye_blurry = max(amount, eye_blurry)
|
||||
if(!old_eye_blurry)
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
|
||||
/mob/proc/adjust_blurriness(amount)
|
||||
var/old_eye_blurry = eye_blurry
|
||||
eye_blurry = max(eye_blurry+amount, 0)
|
||||
if(amount>0)
|
||||
if(!old_eye_blurry)
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
else if(old_eye_blurry && !eye_blurry)
|
||||
clear_fullscreen("blurry")
|
||||
|
||||
/mob/proc/set_blurriness(amount)
|
||||
var/old_eye_blurry = eye_blurry
|
||||
eye_blurry = max(amount, 0)
|
||||
if(amount>0)
|
||||
if(!old_eye_blurry)
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
else if(old_eye_blurry)
|
||||
clear_fullscreen("blurry")
|
||||
|
||||
/////////////////////////////////// DRUGGY ////////////////////////////////////
|
||||
|
||||
/mob/proc/adjust_drugginess(amount)
|
||||
return
|
||||
|
||||
/mob/proc/set_drugginess(amount)
|
||||
return
|
||||
|
||||
/////////////////////////////////// BLIND DISABILITY ////////////////////////////////////
|
||||
|
||||
/mob/proc/cure_blind() //when we want to cure the BLIND disability only.
|
||||
return
|
||||
|
||||
/mob/proc/become_blind()
|
||||
return
|
||||
|
||||
/////////////////////////////////// NEARSIGHT DISABILITY ////////////////////////////////////
|
||||
|
||||
/mob/proc/cure_nearsighted()
|
||||
return
|
||||
|
||||
/mob/proc/become_nearsighted()
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user