mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Fix merge conflict
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
density = 0
|
||||
anchored = 1
|
||||
status_flags = GODMODE // You can't damage it.
|
||||
mouse_opacity = 0
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
see_in_dark = 7
|
||||
invisibility = 101 // No one can see us
|
||||
sight = SEE_SELF
|
||||
|
||||
@@ -12,7 +12,6 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
|
||||
stat = DEAD
|
||||
density = 0
|
||||
canmove = 0
|
||||
blinded = 0
|
||||
anchored = 1 // don't get pushed around
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
var/can_reenter_corpse
|
||||
@@ -171,7 +170,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
response = alert(src, alertmsg,"Are you sure you want to ghost?","Stay in body","Ghost")
|
||||
if(response != "Ghost")
|
||||
return //didn't want to ghost after-all
|
||||
resting = 1
|
||||
StartResting()
|
||||
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
|
||||
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
|
||||
var/obj/structure/morgue/Morgue = locate() in M.loc
|
||||
@@ -207,7 +206,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
|
||||
S.Crossed(src)
|
||||
|
||||
var/area/A = get_area_master(src)
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
A.Entered(src)
|
||||
|
||||
|
||||
@@ -1,94 +1,12 @@
|
||||
//This is the proc for gibbing a mob. Cannot gib ghosts.
|
||||
//added different sort of gibs and animations. N
|
||||
// can't die if you're not alive
|
||||
/mob/proc/gib()
|
||||
death(1)
|
||||
var/atom/movable/overlay/animation = null
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
return FALSE
|
||||
|
||||
playsound(src.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
// flick("gibbed-m", animation)
|
||||
gibs(loc, dna)
|
||||
dead_mob_list -= src
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
spawn(15)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
|
||||
//This is the proc for turning a mob into ash. Mostly a copy of gib code (above).
|
||||
//Originally created for wizard disintegrate. I've removed the virus code since it's irrelevant here.
|
||||
//Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N
|
||||
/mob/proc/dust()
|
||||
death(1)
|
||||
var/atom/movable/overlay/animation = null
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
// flick("dust-m", animation)
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
|
||||
dead_mob_list -= src
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
spawn(15)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
return FALSE
|
||||
|
||||
/mob/proc/melt()
|
||||
death(1)
|
||||
var/atom/movable/overlay/animation = null
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
// flick("liquify", animation)
|
||||
// new /obj/effect/decal/cleanable/ash(loc)
|
||||
|
||||
dead_mob_list -= src
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
spawn(15)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
return FALSE
|
||||
|
||||
/mob/proc/death(gibbed)
|
||||
|
||||
//Makes it so gib/dust/melt all unbuckle their victims from anything they may be buckled to to avoid breaking beds/chairs/etc
|
||||
if(gibbed && buckled)
|
||||
buckled.unbuckle_mob()
|
||||
|
||||
//Quick fix for corpses kept propped up in chairs. ~Z
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
//End of fix.
|
||||
|
||||
timeofdeath = world.time
|
||||
|
||||
living_mob_list -= src
|
||||
dead_mob_list += src
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
return ..(gibbed)
|
||||
return FALSE
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/obj/item/clothing/mask/muzzle/M = wear_mask
|
||||
if(m_type == EMOTE_SOUND && M.mute >= MUZZLE_MUTE_MUFFLE)
|
||||
return //Not all muzzles block sound
|
||||
if(!can_speak())
|
||||
if(m_type == EMOTE_SOUND && !can_speak())
|
||||
return
|
||||
|
||||
var/input
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// At minimum every mob has a hear_say proc.
|
||||
|
||||
/mob/proc/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
/mob/proc/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
if(!client)
|
||||
return 0
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
|
||||
if(language && (language.flags & NONVERBAL))
|
||||
if(!has_vision()) //blind people can't see dumbass
|
||||
if(!has_vision(information_only = TRUE)) //blind people can't see dumbass
|
||||
message = stars(message)
|
||||
|
||||
if(!speaker || !(speaker in view(src)))
|
||||
@@ -70,12 +70,12 @@
|
||||
if(speaker == src)
|
||||
to_chat(src, "<span class='warning'>You cannot hear yourself speak!</span>")
|
||||
else
|
||||
to_chat(src, "<span class='name'>[speaker_name]</span>[alt_name] talks but you cannot hear [speaker.p_them()].")
|
||||
to_chat(src, "<span class='name'>[speaker_name]</span>[speaker.GetAltName()] talks but you cannot hear [speaker.p_them()].")
|
||||
else
|
||||
if(language)
|
||||
to_chat(src, "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][language.format_message(message, verb)]</span>")
|
||||
to_chat(src, "<span class='game say'><span class='name'>[speaker_name]</span>[speaker.GetAltName()] [track][language.format_message(message, verb)]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][verb], <span class='message'><span class='body'>\"[message]\"</span></span></span>")
|
||||
to_chat(src, "<span class='game say'><span class='name'>[speaker_name]</span>[speaker.GetAltName()] [track][verb], <span class='message'><span class='body'>\"[message]\"</span></span></span>")
|
||||
if(speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z))
|
||||
var/turf/source = speaker? get_turf(speaker) : get_turf(src)
|
||||
src.playsound_local(source, speech_sound, sound_vol, 1)
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
|
||||
if(language && (language.flags & NONVERBAL))
|
||||
if(!has_vision()) //blind people can't see dumbass
|
||||
if(!has_vision(information_only=TRUE)) //blind people can't see dumbass
|
||||
message = stars(message)
|
||||
|
||||
if(!speaker || !(speaker in view(src)))
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
//This is probably the main one you need to know :)
|
||||
//Just puts stuff on the floor for most mobs, since all mobs have hands but putting stuff in the AI/corgi/ghost hand is VERY BAD.
|
||||
/mob/proc/put_in_hands(obj/item/W)
|
||||
W.forceMove(get_turf(src))
|
||||
W.forceMove(drop_location())
|
||||
W.layer = initial(W.layer)
|
||||
W.plane = initial(W.plane)
|
||||
W.dropped()
|
||||
@@ -137,7 +137,7 @@
|
||||
if(I)
|
||||
if(client)
|
||||
client.screen -= I
|
||||
I.forceMove(loc)
|
||||
I.forceMove(drop_location())
|
||||
I.dropped(src)
|
||||
if(I)
|
||||
I.layer = initial(I.layer)
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
var/leaping = 0
|
||||
ventcrawler = 2
|
||||
var/list/alien_organs = list()
|
||||
var/death_message = "lets out a waning guttural screech, green blood bubbling from its maw..."
|
||||
var/death_sound = 'sound/voice/hiss6.ogg'
|
||||
|
||||
/mob/living/carbon/alien/New()
|
||||
verbs += /mob/living/verb/mob_sleep
|
||||
@@ -49,25 +51,25 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/adjustToxLoss(amount)
|
||||
return
|
||||
return STATUS_UPDATE_NONE
|
||||
|
||||
/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire
|
||||
if(amount > 0)
|
||||
..(amount * 2)
|
||||
return ..(amount * 2)
|
||||
else
|
||||
..(amount)
|
||||
return
|
||||
return ..(amount)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/check_eye_prot()
|
||||
return 2
|
||||
|
||||
/mob/living/carbon/alien/updatehealth()
|
||||
/mob/living/carbon/alien/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
|
||||
update_stat("updatehealth([reason])")
|
||||
|
||||
/mob/living/carbon/alien/handle_environment(var/datum/gas_mixture/environment)
|
||||
|
||||
@@ -256,4 +258,4 @@ Des: Removes all infected images from the alien.
|
||||
if(getBruteLoss() < 200)
|
||||
return pick("xltrails_1", "xltrails_2")
|
||||
else
|
||||
return pick("xttrails_1", "xttrails_2")
|
||||
return pick("xttrails_1", "xttrails_2")
|
||||
|
||||
@@ -17,7 +17,7 @@ In all, this is a lot like the monkey code. /N
|
||||
switch(M.a_intent)
|
||||
if(INTENT_HELP)
|
||||
AdjustSleeping(-5)
|
||||
resting = 0
|
||||
StopResting()
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
@@ -36,7 +36,6 @@ In all, this is a lot like the monkey code. /N
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>")
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(M, src, "Alien attack", ATKLOG_ALL)
|
||||
updatehealth()
|
||||
else
|
||||
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
|
||||
@@ -75,4 +74,3 @@ In all, this is a lot like the monkey code. /N
|
||||
adjustCloneLoss(damage)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
@@ -43,18 +43,15 @@
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/living/carbon/alien/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
if(healths) healths.icon_state = "health6"
|
||||
stat = DEAD
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(healths)
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if(!gibbed)
|
||||
playsound(loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw...", 1)
|
||||
update_canmove()
|
||||
if(death_sound)
|
||||
playsound(loc, death_sound, 80, 1, 1)
|
||||
visible_message("<B>[src]</B> [death_message]")
|
||||
update_icons()
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -146,7 +146,7 @@ Doesn't work on other aliens/AI.*/
|
||||
if("resin membrane")
|
||||
new /obj/structure/alien/resin/membrane(loc)
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
new /obj/structure/bed/nest(loc)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/regurgitate()
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#define MAX_ALIEN_LEAP_DIST 7
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/proc/leap_at(var/atom/A)
|
||||
if(pounce_cooldown)
|
||||
if(pounce_cooldown > world.time)
|
||||
to_chat(src, "<span class='alertalien'>You are too fatigued to pounce right now!</span>")
|
||||
return
|
||||
|
||||
@@ -114,9 +114,7 @@
|
||||
Weaken(2, 1, 1)
|
||||
|
||||
toggle_leap(0)
|
||||
pounce_cooldown = !pounce_cooldown
|
||||
spawn(pounce_cooldown_time) //3s by default
|
||||
pounce_cooldown = !pounce_cooldown
|
||||
pounce_cooldown = world.time + pounce_cooldown_time
|
||||
else if(A.density && !A.CanPass(src))
|
||||
visible_message("<span class ='danger'>[src] smashes into [A]!</span>", "<span class ='alertalien'>[src] smashes into [A]!</span>")
|
||||
Weaken(2, 1, 1)
|
||||
|
||||
@@ -73,10 +73,7 @@
|
||||
AdjustEarDamage(15)
|
||||
AdjustEarDeaf(60)
|
||||
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
|
||||
updatehealth()
|
||||
take_overall_damage(b_loss, f_loss)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M)
|
||||
..()
|
||||
@@ -85,7 +82,6 @@
|
||||
damage = rand(10, 40)
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(src, M, "Slime'd for [damage] damage")
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/restrained()
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
"<span class='danger'>You hear someone fall.</span>")
|
||||
adjustBruteLoss(damage)
|
||||
add_attack_logs(M, src, "Melee attacked with fists")
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
|
||||
@@ -56,4 +55,4 @@
|
||||
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(!no_effect && !visual_effect_icon)
|
||||
visual_effect_icon = ATTACK_EFFECT_CLAW
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -44,12 +44,10 @@
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
SetSilence(0)
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain))
|
||||
death()
|
||||
blinded = 1
|
||||
SetSilence(0)
|
||||
return 1
|
||||
|
||||
@@ -62,10 +60,8 @@
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if(prob(10) && health)
|
||||
emote("hiss")
|
||||
@@ -77,12 +73,8 @@
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
if(eye_blind) //blindness, heals slowly over time
|
||||
AdjustEyeBlind(-1)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
AdjustEyeBlurry(-1)
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/mob/living/carbon/alien/larva/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
if(healths) healths.icon_state = "health6"
|
||||
stat = DEAD
|
||||
icon_state = "larva_dead"
|
||||
|
||||
if(!gibbed)
|
||||
visible_message("<span class='name'>[src]</span> lets out a waning high-pitched cry.")
|
||||
update_canmove()
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
living_mob_list -= src
|
||||
|
||||
return ..(gibbed)
|
||||
@@ -12,6 +12,8 @@
|
||||
var/amount_grown = 0
|
||||
var/max_grown = 200
|
||||
var/time_of_birth
|
||||
death_message = "lets out a waning high-pitched cry."
|
||||
death_sound = null
|
||||
|
||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
||||
/mob/living/carbon/alien/larva/New()
|
||||
|
||||
@@ -11,12 +11,10 @@
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
SetSilence(0)
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < -25 || !get_int_organ(/obj/item/organ/internal/brain))
|
||||
death()
|
||||
blinded = 1
|
||||
SetSilence(0)
|
||||
return 1
|
||||
|
||||
@@ -30,10 +28,8 @@
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if(prob(10) && health)
|
||||
emote("hiss_")
|
||||
@@ -45,12 +41,8 @@
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
if(eye_blind) //blindness, heals slowly over time
|
||||
AdjustEyeBlind(-1)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
AdjustEyeBlurry(-1)
|
||||
|
||||
|
||||
@@ -9,16 +9,10 @@
|
||||
|
||||
if(layer != TURF_LAYER+0.2)
|
||||
layer = TURF_LAYER+0.2
|
||||
to_chat(src, text("<span class='noticealien'>You are now hiding.</span>"))
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
to_chat(O, text("<B>[] scurries to the ground!</B>", src))
|
||||
visible_message("<B>[src] scurries to the ground!</B>", "<span class='noticealien'>You are now hiding.</span>")
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
to_chat(src, text("<span class=notice'>You have stopped hiding.</span>"))
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
to_chat(O, text("[] slowly peaks up from the ground...", src))
|
||||
visible_message("[src] slowly peeks up from the ground...", "<span class=notice'>You have stopped hiding.</span>")
|
||||
|
||||
/mob/living/carbon/alien/larva/verb/evolve()
|
||||
set name = "Evolve"
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
desc = "Enables radio capability on MMIs when either installed directly on the MMI, or through a cyborg's chassis."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "cyborg_upgrade1"
|
||||
origin_tech = "programming=3;biotech=2;engineering=2"
|
||||
|
||||
@@ -1,42 +1,26 @@
|
||||
/mob/living/carbon/brain/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
// Only execute the below if we successfully died
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(!gibbed && container && istype(container, /obj/item/mmi))//If not gibbed but in a container.
|
||||
for(var/mob/O in viewers(container, null))
|
||||
O.show_message(text("<span class='danger'>[]'s MMI flatlines!</span>", src), 1, "<span class='warning'>You hear something flatline.</span>", 2)
|
||||
visible_message("<span class='danger'>[src]'s MMI flatlines!</span>", "<span class='warning'>You hear something flatline.</span>")
|
||||
container.icon_state = "mmi_dead"
|
||||
stat = DEAD
|
||||
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0) //mind. ?
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/brain/gib()
|
||||
death(1)
|
||||
var/atom/movable/overlay/animation = null
|
||||
// can we muster a parent call here?
|
||||
if(!death(TRUE) && stat != DEAD)
|
||||
return FALSE
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
// flick("gibbed-m", animation)
|
||||
gibs(loc, dna)
|
||||
|
||||
dead_mob_list -= src
|
||||
if(container && istype(container, /obj/item/mmi))
|
||||
qdel(container)//Gets rid of the MMI if there is one
|
||||
if(loc)
|
||||
if(istype(loc,/obj/item/organ/internal/brain))
|
||||
qdel(loc)//Gets rid of the brain item
|
||||
spawn(15)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
QDEL_IN(src, 0)
|
||||
|
||||
@@ -29,19 +29,12 @@
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
/mob/living/carbon/brain/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
. = ..()
|
||||
|
||||
if(stat == DEAD)
|
||||
blinded = 1
|
||||
SetSilence(0)
|
||||
else
|
||||
if(.)
|
||||
if(!container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)))
|
||||
death()
|
||||
blinded = 1
|
||||
SetSilence(0)
|
||||
return 1
|
||||
|
||||
. = 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/brain/breathe()
|
||||
return
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
to_chat(usr, "<span class='warning'>You cannot speak, as your internal speaker is turned off.</span>")
|
||||
. = FALSE
|
||||
|
||||
/mob/living/carbon/brain/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name)
|
||||
/mob/living/carbon/brain/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios)
|
||||
switch(message_mode)
|
||||
if("headset")
|
||||
var/radio_worked = 0 // If any of the radios our brainmob could use functioned, this is set true so that we don't use any others
|
||||
@@ -45,6 +45,6 @@
|
||||
radio_worked = c.radio.talk_into(src, message, message_mode, verb, speaking)
|
||||
return radio_worked
|
||||
if("whisper")
|
||||
whisper_say(message, speaking, alt_name)
|
||||
whisper_say(message, speaking)
|
||||
return 1
|
||||
else return 0
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
/mob/living/carbon/brain/update_stat()
|
||||
/mob/living/carbon/brain/update_stat(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
// if(health <= min_health)
|
||||
if(health <= config.health_threshold_dead)
|
||||
if(stat != DEAD)
|
||||
if(stat == DEAD)
|
||||
if(container && health > config.health_threshold_dead)
|
||||
update_revive()
|
||||
create_debug_log("revived, trigger reason: [reason]")
|
||||
return
|
||||
else
|
||||
if(!container || health <= config.health_threshold_dead)
|
||||
// Considered "dead" without any external apparatus
|
||||
death()
|
||||
create_debug_log("died, trigger reason: [reason]")
|
||||
return
|
||||
// Put brain(organ) damaging code here
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(organ.receive_damage(d, 0))
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
H.updatehealth()
|
||||
H.updatehealth("stomach attack")
|
||||
|
||||
else
|
||||
src.take_organ_damage(d)
|
||||
@@ -78,6 +78,10 @@
|
||||
|
||||
#undef STOMACH_ATTACK_DELAY
|
||||
|
||||
/mob/living/carbon/proc/has_mutated_organs()
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/carbon/proc/vomit(var/lost_nutrition = 10, var/blood = 0, var/stun = 1, var/distance = 0, var/message = 1)
|
||||
if(src.is_muzzled())
|
||||
if(message)
|
||||
@@ -140,7 +144,7 @@
|
||||
return 0
|
||||
if(reagents.has_reagent("teslium"))
|
||||
shock_damage *= 1.5 //If the mob has teslium in their body, shocks are 50% more damaging!
|
||||
take_overall_damage(0,shock_damage, used_weapon = "Electrocution")
|
||||
take_overall_damage(0,shock_damage, TRUE, used_weapon = "Electrocution")
|
||||
visible_message(
|
||||
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
@@ -265,7 +269,7 @@
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
AdjustSleeping(-5)
|
||||
if(sleeping == 0)
|
||||
resting = 0
|
||||
StopResting()
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
@@ -574,14 +578,14 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
|
||||
/mob/living/carbon/can_use_hands()
|
||||
if(handcuffed)
|
||||
return 0
|
||||
if(buckled && ! istype(buckled, /obj/structure/stool/bed/chair)) // buckling does not restrict hands
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
if(buckled && ! istype(buckled, /obj/structure/chair)) // buckling does not restrict hands
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/restrained()
|
||||
if(handcuffed)
|
||||
return 1
|
||||
return TRUE
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
var/stunprob = M.powerlevel * 7 + 10
|
||||
if(prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
updatehealth()
|
||||
updatehealth("slime attack")
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/is_mouth_covered(head_only = FALSE, mask_only = FALSE)
|
||||
if((!mask_only && head && (head.flags_cover & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)))
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/mob/living/carbon/death(gibbed)
|
||||
SetLoseBreath(0)
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
if(reagents)
|
||||
reagents.death_metabolize(src)
|
||||
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
I.on_owner_death()
|
||||
|
||||
..(gibbed)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/mob/living/carbon/human/gib()
|
||||
death(1)
|
||||
if(!death(TRUE) && stat != DEAD)
|
||||
return FALSE
|
||||
var/atom/movable/overlay/animation = null
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
@@ -43,13 +44,13 @@
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
spawn(15)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
QDEL_IN(animation, 15)
|
||||
QDEL_IN(src, 0)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/dust()
|
||||
death(1)
|
||||
if(!death(TRUE) && stat != DEAD)
|
||||
return FALSE
|
||||
var/atom/movable/overlay/animation = null
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
@@ -63,13 +64,13 @@
|
||||
|
||||
flick("dust-h", animation)
|
||||
new dna.species.remains_type(get_turf(src))
|
||||
|
||||
spawn(15)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
QDEL_IN(src, 0)
|
||||
QDEL_IN(animation, 15)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/melt()
|
||||
death(1)
|
||||
if(!death(TRUE) && stat != DEAD)
|
||||
return FALSE
|
||||
var/atom/movable/overlay/animation = null
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
@@ -82,60 +83,48 @@
|
||||
animation.master = src
|
||||
|
||||
flick("liquify", animation)
|
||||
QDEL_IN(src, 0)
|
||||
QDEL_IN(animation, 15)
|
||||
//new /obj/effect/decal/remains/human(loc)
|
||||
|
||||
spawn(15)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(healths)
|
||||
healths.icon_state = "health5"
|
||||
|
||||
if(!gibbed)
|
||||
if(can_die() && !gibbed)
|
||||
emote("deathgasp") //let the world KNOW WE ARE DEAD
|
||||
|
||||
stat = DEAD
|
||||
SetDizzy(0)
|
||||
SetJitter(0)
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
set_heartattack(FALSE)
|
||||
|
||||
//Handle species-specific deaths.
|
||||
if(dna.species)
|
||||
dna.species.handle_hud_icons(src)
|
||||
//Handle species-specific deaths.
|
||||
dna.species.handle_death(src)
|
||||
|
||||
callHook("death", list(src, gibbed))
|
||||
|
||||
if(ishuman(LAssailant))
|
||||
var/mob/living/carbon/human/H=LAssailant
|
||||
if(H.mind)
|
||||
H.mind.kills += "[key_name(src)]"
|
||||
|
||||
if(!gibbed)
|
||||
update_canmove()
|
||||
|
||||
timeofdeath = world.time
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
if(ticker && ticker.mode)
|
||||
// log_world("k")
|
||||
sql_report_death(src)
|
||||
ticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
|
||||
|
||||
if(wearing_rig)
|
||||
wearing_rig.notify_ai("<span class='danger'>Warning: user death event. Mobility control passed to integrated intelligence system.</span>")
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/human/update_revive()
|
||||
. = ..()
|
||||
// Update healthdoll
|
||||
if(. && healthdoll)
|
||||
// We're alive again, so re-build the entire healthdoll
|
||||
healthdoll.cached_healthdoll_overlays.Cut()
|
||||
// Update healthdoll
|
||||
if(dna.species)
|
||||
dna.species.update_sight(src)
|
||||
dna.species.handle_hud_icons(src)
|
||||
|
||||
/mob/living/carbon/human/proc/makeSkeleton()
|
||||
var/obj/item/organ/external/head/H = get_organ("head")
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
if(prob(50) && !shielded)
|
||||
Paralyse(10)
|
||||
|
||||
take_overall_damage(b_loss,f_loss, used_weapon = "Explosive Blast")
|
||||
take_overall_damage(b_loss,f_loss, TRUE, used_weapon = "Explosive Blast")
|
||||
|
||||
..()
|
||||
|
||||
@@ -1272,7 +1272,7 @@
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>")
|
||||
|
||||
/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE, skip_same_check = FALSE)
|
||||
/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE, skip_same_check = FALSE, retain_damage = FALSE)
|
||||
if(!skip_same_check)
|
||||
if(dna.species.name == initial(new_species.name))
|
||||
return
|
||||
@@ -1325,7 +1325,69 @@
|
||||
if(I)
|
||||
kept_items[I] = thing
|
||||
|
||||
dna.species.create_organs(src)
|
||||
if(retain_damage)
|
||||
//Create a list of body parts which are damaged by burn or brute and save them to apply after new organs are generated. First we just handle external organs.
|
||||
var/bodypart_damages = list()
|
||||
//Loop through all external organs and save the damage states for brute and burn
|
||||
for(var/obj/item/organ/external/E in bodyparts)
|
||||
if(E.brute_dam == 0 && E.burn_dam == 0 && E.internal_bleeding == FALSE) //If there's no damage we don't bother remembering it.
|
||||
continue
|
||||
var/brute = E.brute_dam
|
||||
var/burn = E.burn_dam
|
||||
var/IB = E.internal_bleeding
|
||||
var/obj/item/organ/external/OE = new E.type()
|
||||
var/stats = list(OE, brute, burn, IB)
|
||||
bodypart_damages += list(stats)
|
||||
|
||||
//Now we do the same for internal organs via the same proceedure.
|
||||
var/internal_damages = list()
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
if(I.damage == 0)
|
||||
continue
|
||||
var/obj/item/organ/internal/OI = new I.type()
|
||||
var/damage = I.damage
|
||||
var/broken = I.is_broken()
|
||||
var/stats = list(OI, damage, broken)
|
||||
internal_damages += list(stats)
|
||||
|
||||
//Create the new organs for the species change
|
||||
dna.species.create_organs(src)
|
||||
|
||||
//Apply relevant damages and variables to the new organs.
|
||||
for(var/B in bodyparts)
|
||||
var/obj/item/organ/external/E = B
|
||||
for(var/list/part in bodypart_damages)
|
||||
var/obj/item/organ/external/OE = part[1]
|
||||
if((E.type == OE.type)) // Type has to be explicit, as right limbs are a child of left ones etc.
|
||||
var/brute = part[2]
|
||||
var/burn = part[3]
|
||||
var/IB = part[4]
|
||||
//Deal the damage to the new organ and then delete the entry to prevent duplicate checks
|
||||
E.receive_damage(brute, burn, ignore_resists = TRUE)
|
||||
E.internal_bleeding = IB
|
||||
qdel(part)
|
||||
|
||||
for(var/O in internal_organs)
|
||||
var/obj/item/organ/internal/I = O
|
||||
for(var/list/part in internal_damages)
|
||||
var/obj/item/organ/internal/OI = part[1]
|
||||
var/organ_type
|
||||
|
||||
if(OI.parent_type == /obj/item/organ/internal) //Dealing with species organs
|
||||
organ_type = OI.type
|
||||
else
|
||||
organ_type = OI.parent_type
|
||||
|
||||
if(istype(I, organ_type))
|
||||
var/damage = part[2]
|
||||
var/broken = part[3]
|
||||
I.receive_damage(damage, 1)
|
||||
if(broken && !(I.status & ORGAN_BROKEN))
|
||||
I.status |= ORGAN_BROKEN
|
||||
qdel(part)
|
||||
|
||||
else
|
||||
dna.species.create_organs(src)
|
||||
|
||||
for(var/thing in kept_items)
|
||||
equip_to_slot_if_possible(thing, kept_items[thing], redraw_mob = 0)
|
||||
@@ -1598,7 +1660,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
if(H.health > config.health_threshold_dead && H.health <= config.health_threshold_crit)
|
||||
var/suff = min(H.getOxyLoss(), 7)
|
||||
H.adjustOxyLoss(-suff)
|
||||
H.updatehealth()
|
||||
H.updatehealth("cpr")
|
||||
visible_message("<span class='danger'>[src] performs CPR on [H.name]!</span>", \
|
||||
"<span class='notice'>You perform CPR on [H.name].</span>")
|
||||
|
||||
@@ -1615,6 +1677,12 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/has_mutated_organs()
|
||||
for(var/obj/item/organ/external/E in bodyparts)
|
||||
if(E.status & ORGAN_MUTATED)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/InCritical()
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
|
||||
@@ -1861,4 +1929,4 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
|
||||
/mob/living/carbon/human/proc/special_post_clone_handling()
|
||||
if(mind && mind.assigned_role == "Cluwne") //HUNKE your suffering never stops
|
||||
makeCluwne()
|
||||
makeCluwne()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//Updates the mob's health from organs and mob damage variables
|
||||
/mob/living/carbon/human/updatehealth()
|
||||
/mob/living/carbon/human/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
@@ -17,20 +17,14 @@
|
||||
//TODO: fix husking
|
||||
if(((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD)
|
||||
ChangeToHusk()
|
||||
if(dna.species.can_revive_by_healing)
|
||||
var/obj/item/organ/internal/brain/B = get_int_organ(/obj/item/organ/internal/brain)
|
||||
if(B)
|
||||
if((health >= (config.health_threshold_dead + config.health_threshold_crit) * 0.5) && stat == DEAD && getBrainLoss()<120)
|
||||
update_revive()
|
||||
if(stat == CONSCIOUS && (src in dead_mob_list)) //Defib fix
|
||||
update_revive()
|
||||
update_stat("updatehealth([reason])")
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
handle_hud_icons()
|
||||
handle_hud_icons_health()
|
||||
|
||||
/mob/living/carbon/human/adjustBrainLoss(amount)
|
||||
/mob/living/carbon/human/adjustBrainLoss(amount, updating = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return 0 //godmode
|
||||
return STATUS_UPDATE_NONE //godmode
|
||||
|
||||
if(dna.species && dna.species.has_organ["brain"])
|
||||
var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain)
|
||||
@@ -38,15 +32,13 @@
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.brain_mod
|
||||
sponge.receive_damage(amount, 1)
|
||||
brainloss = sponge.damage
|
||||
else
|
||||
brainloss = 200
|
||||
else
|
||||
brainloss = 0
|
||||
if(updating)
|
||||
update_stat("adjustBrainLoss")
|
||||
return STATUS_UPDATE_STAT
|
||||
|
||||
/mob/living/carbon/human/setBrainLoss(amount)
|
||||
/mob/living/carbon/human/setBrainLoss(amount, updating = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return 0 //godmode
|
||||
return STATUS_UPDATE_NONE //godmode
|
||||
|
||||
if(dna.species && dna.species.has_organ["brain"])
|
||||
var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain)
|
||||
@@ -54,11 +46,9 @@
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.brain_mod
|
||||
sponge.damage = min(max(amount, 0), (maxHealth*2))
|
||||
brainloss = sponge.damage
|
||||
else
|
||||
brainloss = 200
|
||||
else
|
||||
brainloss = 0
|
||||
if(updating)
|
||||
update_stat("setBrainLoss")
|
||||
return STATUS_UPDATE_STAT
|
||||
|
||||
/mob/living/carbon/human/getBrainLoss()
|
||||
if(status_flags & GODMODE)
|
||||
@@ -67,12 +57,11 @@
|
||||
if(dna.species && dna.species.has_organ["brain"])
|
||||
var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain)
|
||||
if(sponge)
|
||||
brainloss = min(sponge.damage,maxHealth*2)
|
||||
return min(sponge.damage,maxHealth*2)
|
||||
else
|
||||
brainloss = 200
|
||||
return 200
|
||||
else
|
||||
brainloss = 0
|
||||
return brainloss
|
||||
return 0
|
||||
|
||||
//These procs fetch a cumulative total damage from all organs
|
||||
/mob/living/carbon/human/getBruteLoss()
|
||||
@@ -88,23 +77,27 @@
|
||||
return amount
|
||||
|
||||
|
||||
/mob/living/carbon/human/adjustBruteLoss(amount, damage_source)
|
||||
/mob/living/carbon/human/adjustBruteLoss(amount, updating_health = TRUE, damage_source = null, robotic = FALSE)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.brute_mod
|
||||
if(amount > 0)
|
||||
take_overall_damage(amount, 0, used_weapon = damage_source)
|
||||
take_overall_damage(amount, 0, updating_health, used_weapon = damage_source)
|
||||
else
|
||||
heal_overall_damage(-amount, 0)
|
||||
heal_overall_damage(-amount, 0, updating_health, FALSE, robotic)
|
||||
// brainless default for now
|
||||
return STATUS_UPDATE_HEALTH
|
||||
|
||||
/mob/living/carbon/human/adjustFireLoss(amount, damage_source)
|
||||
/mob/living/carbon/human/adjustFireLoss(amount, updating_health = TRUE, damage_source = null, robotic = FALSE)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.burn_mod
|
||||
if(amount > 0)
|
||||
take_overall_damage(0, amount, used_weapon = damage_source)
|
||||
take_overall_damage(0, amount, updating_health, used_weapon = damage_source)
|
||||
else
|
||||
heal_overall_damage(0, -amount)
|
||||
heal_overall_damage(0, -amount, updating_health, FALSE, robotic)
|
||||
// brainless default for now
|
||||
return STATUS_UPDATE_HEALTH
|
||||
|
||||
/mob/living/carbon/human/proc/adjustBruteLossByPart(amount, organ_name, obj/damage_source = null)
|
||||
/mob/living/carbon/human/proc/adjustBruteLossByPart(amount, organ_name, obj/damage_source = null, updating_health = TRUE)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.brute_mod
|
||||
|
||||
@@ -112,13 +105,14 @@
|
||||
var/obj/item/organ/external/O = get_organ(organ_name)
|
||||
|
||||
if(amount > 0)
|
||||
O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source)
|
||||
O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source, list(), FALSE, updating_health)
|
||||
else
|
||||
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
|
||||
O.heal_damage(-amount, 0, internal = 0, robo_repair = O.is_robotic())
|
||||
O.heal_damage(-amount, 0, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health)
|
||||
return STATUS_UPDATE_HEALTH
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/adjustFireLossByPart(amount, organ_name, obj/damage_source = null)
|
||||
/mob/living/carbon/human/proc/adjustFireLossByPart(amount, organ_name, obj/damage_source = null, updating_health = TRUE)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.burn_mod
|
||||
|
||||
@@ -126,22 +120,23 @@
|
||||
var/obj/item/organ/external/O = get_organ(organ_name)
|
||||
|
||||
if(amount > 0)
|
||||
O.receive_damage(0, amount, sharp=is_sharp(damage_source), used_weapon=damage_source)
|
||||
O.receive_damage(0, amount, sharp=is_sharp(damage_source), used_weapon=damage_source, forbidden_limbs = list(), ignore_resists = FALSE, updating_health = updating_health)
|
||||
else
|
||||
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
|
||||
O.heal_damage(0, -amount, internal = 0, robo_repair = O.is_robotic())
|
||||
O.heal_damage(0, -amount, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health)
|
||||
return STATUS_UPDATE_HEALTH
|
||||
|
||||
|
||||
/mob/living/carbon/human/Paralyse(amount)
|
||||
// Notify our AI if they can now control the suit.
|
||||
if(wearing_rig && !stat && paralysis < amount) //We are passing out right this second.
|
||||
wearing_rig.notify_ai("<span class='danger'>Warning: user consciousness failure. Mobility control passed to integrated intelligence system.</span>")
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/adjustCloneLoss(amount)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.clone_mod
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
var/heal_prob = max(0, 80 - getCloneLoss())
|
||||
var/mut_prob = min(80, getCloneLoss() + 10)
|
||||
@@ -181,22 +176,22 @@
|
||||
/mob/living/carbon/human/adjustOxyLoss(amount)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.oxy_mod
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/setOxyLoss(amount)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.oxy_mod
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/adjustToxLoss(amount)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.tox_mod
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/setToxLoss(amount)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.tox_mod
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
||||
@@ -223,31 +218,29 @@
|
||||
//Heals ONE external organ, organ gets randomly selected from damaged ones.
|
||||
//It automatically updates damage overlays if necesary
|
||||
//It automatically updates health status
|
||||
/mob/living/carbon/human/heal_organ_damage(brute, burn)
|
||||
/mob/living/carbon/human/heal_organ_damage(brute, burn, updating_health = TRUE)
|
||||
var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn)
|
||||
if(!parts.len)
|
||||
return
|
||||
var/obj/item/organ/external/picked = pick(parts)
|
||||
if(picked.heal_damage(brute,burn))
|
||||
if(picked.heal_damage(brute,burn, updating_health))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
|
||||
//Damages ONE external organ, organ gets randomly selected from damagable ones.
|
||||
//It automatically updates damage overlays if necesary
|
||||
//It automatically updates health status
|
||||
/mob/living/carbon/human/take_organ_damage(brute, burn, sharp = 0, edge = 0)
|
||||
/mob/living/carbon/human/take_organ_damage(brute, burn, updating_health = TRUE, sharp = 0, edge = 0)
|
||||
var/list/obj/item/organ/external/parts = get_damageable_organs()
|
||||
if(!parts.len)
|
||||
return
|
||||
var/obj/item/organ/external/picked = pick(parts)
|
||||
if(picked.receive_damage(brute, burn, sharp))
|
||||
if(picked.receive_damage(brute, burn, sharp, updating_health))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
speech_problem_flag = 1
|
||||
|
||||
|
||||
//Heal MANY external organs, in random order
|
||||
/mob/living/carbon/human/heal_overall_damage(brute, burn, internal=0, robotic=0)
|
||||
/mob/living/carbon/human/heal_overall_damage(brute, burn, updating_health = TRUE, internal=0, robotic=0)
|
||||
var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn)
|
||||
|
||||
var/update = 0
|
||||
@@ -257,20 +250,21 @@
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
update |= picked.heal_damage(brute,burn, internal, robotic)
|
||||
update |= picked.heal_damage(brute,burn, internal, robotic, updating_health = FALSE)
|
||||
|
||||
brute -= (brute_was-picked.brute_dam)
|
||||
burn -= (burn_was-picked.burn_dam)
|
||||
|
||||
parts -= picked
|
||||
|
||||
updatehealth()
|
||||
if(updating_health)
|
||||
updatehealth("heal overall damage")
|
||||
speech_problem_flag = 1
|
||||
if(update)
|
||||
UpdateDamageIcon()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/carbon/human/take_overall_damage(brute, burn, sharp = 0, edge = 0, used_weapon = null)
|
||||
/mob/living/carbon/human/take_overall_damage(brute, burn, updating_health = TRUE, used_weapon = null, sharp = 0, edge = 0)
|
||||
if(status_flags & GODMODE)
|
||||
return //godmode
|
||||
var/list/obj/item/organ/external/parts = get_damageable_organs()
|
||||
@@ -285,14 +279,15 @@
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
|
||||
update |= picked.receive_damage(brute_per_part, burn_per_part, sharp, used_weapon)
|
||||
update |= picked.receive_damage(brute_per_part, burn_per_part, sharp, used_weapon, list(), FALSE, FALSE)
|
||||
|
||||
brute -= (picked.brute_dam - brute_was)
|
||||
burn -= (picked.burn_dam - burn_was)
|
||||
|
||||
parts -= picked
|
||||
|
||||
updatehealth()
|
||||
if(updating_health)
|
||||
updatehealth("take overall damage")
|
||||
|
||||
if(update)
|
||||
UpdateDamageIcon()
|
||||
@@ -364,7 +359,7 @@ This function restores all organs.
|
||||
var/list/attack_bubble_recipients = list()
|
||||
var/mob/living/user
|
||||
for(var/mob/O in viewers(user, src))
|
||||
if(O.client && !(O.blinded))
|
||||
if(O.client && O.has_vision(information_only=TRUE))
|
||||
attack_bubble_recipients.Add(O.client)
|
||||
spawn(0)
|
||||
var/image/dmgIcon = image('icons/effects/hit_blips.dmi', src, "dmg[rand(1,2)]",MOB_LAYER+1)
|
||||
@@ -383,5 +378,5 @@ This function restores all organs.
|
||||
UpdateDamageIcon()
|
||||
|
||||
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
|
||||
updatehealth()
|
||||
updatehealth("apply damage")
|
||||
return 1
|
||||
|
||||
@@ -178,7 +178,7 @@ emp_act
|
||||
/mob/living/carbon/human/grabbedby(mob/living/user)
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(user)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//Returns 1 if the attack hit, 0 if it missed.
|
||||
/mob/living/carbon/human/attacked_by(obj/item/I, mob/living/user, def_zone)
|
||||
@@ -375,7 +375,7 @@ emp_act
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
updatehealth()
|
||||
updatehealth("larva attack")
|
||||
|
||||
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(check_shields(0, M.name))
|
||||
@@ -404,7 +404,7 @@ emp_act
|
||||
"<span class='userdanger'>[M] has wounded [src]!</span>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
add_attack_logs(M, src, "Alien attacked")
|
||||
updatehealth()
|
||||
updatehealth("alien attack")
|
||||
|
||||
if(M.a_intent == INTENT_DISARM)
|
||||
if(prob(80))
|
||||
@@ -434,7 +434,7 @@ emp_act
|
||||
if(affected)
|
||||
affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
|
||||
apply_damage(damage, M.melee_damage_type, affecting, armor)
|
||||
updatehealth()
|
||||
updatehealth("animal attack")
|
||||
|
||||
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M)
|
||||
..()
|
||||
@@ -473,7 +473,7 @@ emp_act
|
||||
M.mech_toxin_damage(src)
|
||||
else
|
||||
return
|
||||
updatehealth()
|
||||
updatehealth("mech melee attack")
|
||||
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
|
||||
@@ -502,4 +502,4 @@ emp_act
|
||||
if(check_head && head && (head.flags_cover & HEADCOVERSEYES))
|
||||
return TRUE
|
||||
if(check_mask && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH))
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
@@ -630,7 +630,7 @@
|
||||
var/obj/item/reagent_containers/food/snacks/newSnack = new chosenType(get_turf(src))
|
||||
TARGET = newSnack
|
||||
newSnack.reagents.remove_any((newSnack.reagents.total_volume/2)-1)
|
||||
newSnack.name = "Synthetic [newSnack.name]"
|
||||
newSnack.name = "synthetic [newSnack.name]"
|
||||
custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")] as [p_they()] vomit[p_s()] [newSnack] from [p_their()] mouth!")
|
||||
catch(var/exception/e)
|
||||
log_runtime(e, src, "Caught in SNPC cooking module")
|
||||
|
||||
@@ -67,14 +67,13 @@
|
||||
//modules
|
||||
var/list/functions = list("nearbyscan","combat","shitcurity","chatter")
|
||||
var/restrictedJob = 0
|
||||
var/shouldUseDynamicProc = 0 // switch to make the AI control it's own proccessing
|
||||
var/alternateProcessing = 0
|
||||
var/forceProcess = 0
|
||||
var/processTime = 10
|
||||
var/speak_file = "npc_chatter.json"
|
||||
var/debugexamine = FALSE //If we show debug info in our examine
|
||||
var/showexaminetext = TRUE //If we show our telltale examine text
|
||||
|
||||
var/voice_saved = FALSE
|
||||
|
||||
var/list/knownStrings = list()
|
||||
|
||||
//snpc traitor variables
|
||||
@@ -95,6 +94,8 @@
|
||||
knownStrings = list()
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/saveVoice()
|
||||
if(voice_saved)
|
||||
return
|
||||
var/savefile/S = new /savefile("data/npc_saves/snpc.sav")
|
||||
S["knownStrings"] << knownStrings
|
||||
|
||||
@@ -142,7 +143,7 @@
|
||||
doing = 0
|
||||
inactivity_period = 0
|
||||
|
||||
/client/proc/resetSNPC(mob/living/carbon/human/interactive/T in npc_master.botPool_l)
|
||||
/client/proc/resetSNPC(mob/living/carbon/human/interactive/T in SSnpcpool.processing)
|
||||
set name = "Reset SNPC"
|
||||
set desc = "Reset the SNPC"
|
||||
set category = "Debug"
|
||||
@@ -153,20 +154,7 @@
|
||||
if(istype(T))
|
||||
T.reset()
|
||||
|
||||
/client/proc/toggleSNPC(mob/living/carbon/human/interactive/T in npc_master.botPool_l)
|
||||
set name = "Toggle SNPC Proccessing Mode"
|
||||
set desc = "Toggle SNPC Proccessing Mode"
|
||||
set category = "Debug"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
if(istype(T))
|
||||
T.alternateProcessing = !T.alternateProcessing
|
||||
T.forceProcess = 1
|
||||
to_chat(usr, "[T]'s processing has been switched to [T.alternateProcessing ? "High Profile" : "Low Profile"]")
|
||||
|
||||
/client/proc/customiseSNPC(mob/living/carbon/human/interactive/T in npc_master.botPool_l)
|
||||
/client/proc/customiseSNPC(mob/living/carbon/human/interactive/T in SSnpcpool.processing)
|
||||
set name = "Customize SNPC"
|
||||
set desc = "Customize the SNPC"
|
||||
set category = "Debug"
|
||||
@@ -191,8 +179,12 @@
|
||||
T.myjob = cjob
|
||||
T.job = cjob.title
|
||||
T.mind.assigned_role = cjob.title
|
||||
for(var/obj/item/W in T)
|
||||
qdel(W)
|
||||
for(var/obj/item/I in T)
|
||||
if(istype(I, /obj/item/implant))
|
||||
continue
|
||||
if(istype(I, /obj/item/organ))
|
||||
continue
|
||||
qdel(I)
|
||||
T.myjob.equip(T)
|
||||
T.doSetup(alt_title)
|
||||
|
||||
@@ -316,6 +308,12 @@
|
||||
if(TRAITS & TRAIT_THIEVING)
|
||||
slyness = 75
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/InteractiveProcess()
|
||||
if(ticker.current_state == GAME_STATE_FINISHED)
|
||||
saveVoice()
|
||||
voice_saved = TRUE
|
||||
doProcess()
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/setup_job(thejob)
|
||||
switch(thejob)
|
||||
if("Civilian")
|
||||
@@ -419,7 +417,7 @@
|
||||
sync_mind()
|
||||
random()
|
||||
doSetup()
|
||||
npc_master.insertBot(src)
|
||||
START_PROCESSING(SSnpcpool, src)
|
||||
loadVoice()
|
||||
hear_radio_list += src
|
||||
|
||||
@@ -432,9 +430,7 @@
|
||||
doProcess()
|
||||
|
||||
/mob/living/carbon/human/interactive/Destroy()
|
||||
hear_radio_list -= src
|
||||
snpc_list -= src
|
||||
npc_master.removeBot(src)
|
||||
SSnpcpool.stop_processing(src)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/retalTarget(mob/living/target)
|
||||
@@ -578,10 +574,13 @@
|
||||
return get_dist(get_turf(towhere), get_turf(src))
|
||||
|
||||
/mob/living/carbon/human/interactive/death()
|
||||
// Only execute the below if we successfully died
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
saveVoice()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/interactive/hear_say(message, verb = "says", datum/language/language = null, alt_name = "", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol)
|
||||
/mob/living/carbon/human/interactive/hear_say(message, verb = "says", datum/language/language = null, italics = 0, mob/speaker = null, sound/speech_sound, sound_vol)
|
||||
if(!istype(speaker, /mob/living/carbon/human/interactive))
|
||||
knownStrings |= html_decode(message)
|
||||
..()
|
||||
@@ -592,17 +591,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/doProcess()
|
||||
forceProcess = 0
|
||||
|
||||
if(shouldUseDynamicProc)
|
||||
var/isSeen = 0
|
||||
for(var/mob/living/carbon/human/A in orange(12, src))
|
||||
if(A.client)
|
||||
isSeen = 1
|
||||
alternateProcessing = isSeen
|
||||
if(alternateProcessing)
|
||||
forceProcess = 1
|
||||
|
||||
set waitfor = FALSE
|
||||
if(IsDeadOrIncap())
|
||||
reset()
|
||||
return
|
||||
@@ -630,10 +619,13 @@
|
||||
if(istype(D,/obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/AL = D
|
||||
if(!AL.CanAStarPass(RPID)) // only crack open doors we can't get through
|
||||
inactivity_period = 20
|
||||
AL.panel_open = 1
|
||||
AL.update_icon()
|
||||
AL.shock(src, mistake_chance)
|
||||
sleep(5)
|
||||
if(QDELETED(AL))
|
||||
return
|
||||
AL.unlock()
|
||||
if(prob(mistake_chance))
|
||||
if(!AL.wires.IsIndexCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||
@@ -650,6 +642,8 @@
|
||||
if(prob(mistake_chance) && !AL.wires.IsIndexCut(AIRLOCK_WIRE_ELECTRIFY))
|
||||
AL.wires.CutWireIndex(AIRLOCK_WIRE_ELECTRIFY)
|
||||
sleep(5)
|
||||
if(QDELETED(AL))
|
||||
return
|
||||
AL.panel_open = 0
|
||||
AL.update_icon()
|
||||
D.open()
|
||||
@@ -683,7 +677,7 @@
|
||||
//proc functions
|
||||
for(var/Proc in functions)
|
||||
if(!IsDeadOrIncap())
|
||||
callfunction(Proc)
|
||||
INVOKE_ASYNC(src, Proc)
|
||||
|
||||
|
||||
//target interaction stays hardcoded
|
||||
@@ -697,8 +691,8 @@
|
||||
if(istype(TARGET, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = TARGET
|
||||
if(D.check_access(MYID) && !istype(D,/obj/machinery/door/poddoor))
|
||||
inactivity_period = 10
|
||||
D.open()
|
||||
sleep(15)
|
||||
var/turf/T = get_step(get_step(D.loc, dir), dir) //recursion yo
|
||||
tryWalk(T)
|
||||
//THIEVING SKILLS
|
||||
@@ -722,15 +716,8 @@
|
||||
insert_into_backpack()
|
||||
//---------FASHION
|
||||
if(istype(TARGET, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = TARGET
|
||||
drop_item()
|
||||
spawn(5)
|
||||
take_to_slot(C,1)
|
||||
if(!equip_to_appropriate_slot(C))
|
||||
var/obj/item/I = get_item_by_slot(C)
|
||||
unEquip(I)
|
||||
spawn(5)
|
||||
equip_to_appropriate_slot(C)
|
||||
dressup(TARGET)
|
||||
update_hands = 1
|
||||
if(MYPDA in loc)
|
||||
equip_to_appropriate_slot(MYPDA)
|
||||
@@ -787,9 +774,19 @@
|
||||
TARGET = traitorTarget
|
||||
tryWalk(TARGET)
|
||||
LAST_TARGET = TARGET
|
||||
if(alternateProcessing)
|
||||
spawn(processTime)
|
||||
doProcess()
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/dressup(obj/item/clothing/C)
|
||||
set waitfor = FALSE
|
||||
inactivity_period = 12
|
||||
sleep(5)
|
||||
if(!QDELETED(C) && !QDELETED(src))
|
||||
take_to_slot(C,1)
|
||||
if(!equip_to_appropriate_slot(C))
|
||||
var/obj/item/I = get_item_by_slot(C)
|
||||
unEquip(I)
|
||||
sleep(5)
|
||||
if(!QDELETED(src) && !QDELETED(C))
|
||||
equip_to_appropriate_slot(C)
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/favouredObjIn(list/inList)
|
||||
var/list/outList = list()
|
||||
@@ -801,10 +798,6 @@
|
||||
outList = inList
|
||||
return outList
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/callfunction(Proc)
|
||||
spawn(0)
|
||||
call(src, Proc)(src)
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/tryWalk(turf/inTarget)
|
||||
if(restrictedJob) // we're a job that has to stay in our home
|
||||
if(!(get_turf(inTarget) in get_area_turfs(job2area(myjob))))
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
if(G.tint)
|
||||
update_tint()
|
||||
if(G.prescription)
|
||||
clear_fullscreen("nearsighted")
|
||||
update_nearsighted_effects()
|
||||
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
|
||||
update_sight()
|
||||
update_inv_glasses()
|
||||
@@ -266,8 +266,7 @@
|
||||
if(G.tint)
|
||||
update_tint()
|
||||
if(G.prescription)
|
||||
if(disabilities & NEARSIGHTED)
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
update_nearsighted_effects()
|
||||
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
|
||||
update_sight()
|
||||
update_inv_glasses(redraw_mob)
|
||||
|
||||
@@ -144,12 +144,12 @@
|
||||
if(3)
|
||||
emote("drool")
|
||||
|
||||
if(getBrainLoss() >= 100 && stat != 2) //you lapse into a coma and die without immediate aid; RIP. -Fox
|
||||
if(getBrainLoss() >= 100 && stat != DEAD) //you lapse into a coma and die without immediate aid; RIP. -Fox
|
||||
Weaken(20)
|
||||
AdjustLoseBreath(10)
|
||||
AdjustSilence(2)
|
||||
|
||||
if(getBrainLoss() >= 120 && stat != 2) //they died from stupidity--literally. -Fox
|
||||
if(getBrainLoss() >= 120 && stat != DEAD) //they died from stupidity--literally. -Fox
|
||||
visible_message("<span class='alert'><B>[src]</B> goes limp, [p_their()] facial expression utterly blank.</span>")
|
||||
death()
|
||||
|
||||
@@ -339,16 +339,16 @@
|
||||
|
||||
if(bodytemperature >= dna.species.heat_level_1 && bodytemperature <= dna.species.heat_level_2)
|
||||
throw_alert("temp", /obj/screen/alert/hot, 1)
|
||||
take_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
|
||||
take_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_1, updating_health = TRUE, used_weapon = "High Body Temperature")
|
||||
if(bodytemperature > dna.species.heat_level_2 && bodytemperature <= dna.species.heat_level_3)
|
||||
throw_alert("temp", /obj/screen/alert/hot, 2)
|
||||
take_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
|
||||
take_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_2, updating_health = TRUE, used_weapon = "High Body Temperature")
|
||||
if(bodytemperature > dna.species.heat_level_3 && bodytemperature < INFINITY)
|
||||
throw_alert("temp", /obj/screen/alert/hot, 3)
|
||||
if(on_fire)
|
||||
take_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_3, used_weapon = "Fire")
|
||||
take_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_3, updating_health = TRUE, used_weapon = "Fire")
|
||||
else
|
||||
take_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
|
||||
take_overall_damage(burn=mult*HEAT_DAMAGE_LEVEL_2, updating_health = TRUE, used_weapon = "High Body Temperature")
|
||||
|
||||
else if(bodytemperature < dna.species.cold_level_1)
|
||||
if(status_flags & GODMODE)
|
||||
@@ -360,13 +360,13 @@
|
||||
var/mult = dna.species.coldmod
|
||||
if(bodytemperature >= dna.species.cold_level_2 && bodytemperature <= dna.species.cold_level_1)
|
||||
throw_alert("temp", /obj/screen/alert/cold, 1)
|
||||
take_overall_damage(burn=mult*COLD_DAMAGE_LEVEL_1, used_weapon = "Low Body Temperature")
|
||||
take_overall_damage(burn=mult*COLD_DAMAGE_LEVEL_1, updating_health = TRUE, used_weapon = "Low Body Temperature")
|
||||
if(bodytemperature >= dna.species.cold_level_3 && bodytemperature < dna.species.cold_level_2)
|
||||
throw_alert("temp", /obj/screen/alert/cold, 2)
|
||||
take_overall_damage(burn=mult*COLD_DAMAGE_LEVEL_2, used_weapon = "Low Body Temperature")
|
||||
take_overall_damage(burn=mult*COLD_DAMAGE_LEVEL_2, updating_health = TRUE, used_weapon = "Low Body Temperature")
|
||||
if(bodytemperature > -INFINITY && bodytemperature < dna.species.cold_level_3)
|
||||
throw_alert("temp", /obj/screen/alert/cold, 3)
|
||||
take_overall_damage(burn=mult*COLD_DAMAGE_LEVEL_3, used_weapon = "Low Body Temperature")
|
||||
take_overall_damage(burn=mult*COLD_DAMAGE_LEVEL_3, updating_health = TRUE, used_weapon = "Low Body Temperature")
|
||||
else
|
||||
clear_alert("temp")
|
||||
else
|
||||
@@ -382,7 +382,7 @@
|
||||
if(adjusted_pressure >= dna.species.hazard_high_pressure)
|
||||
if(!(HEATRES in mutations))
|
||||
var/pressure_damage = min( ( (adjusted_pressure / dna.species.hazard_high_pressure) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE)
|
||||
take_overall_damage(brute=pressure_damage, used_weapon = "High Pressure")
|
||||
take_overall_damage(brute=pressure_damage, updating_health = TRUE, used_weapon = "High Pressure")
|
||||
throw_alert("pressure", /obj/screen/alert/highpressure, 2)
|
||||
else
|
||||
clear_alert("pressure")
|
||||
@@ -396,7 +396,7 @@
|
||||
if(COLDRES in mutations)
|
||||
clear_alert("pressure")
|
||||
else
|
||||
take_overall_damage(brute=LOW_PRESSURE_DAMAGE, used_weapon = "Low Pressure")
|
||||
take_overall_damage(brute=LOW_PRESSURE_DAMAGE, updating_health = TRUE, used_weapon = "Low Pressure")
|
||||
throw_alert("pressure", /obj/screen/alert/lowpressure, 2)
|
||||
|
||||
|
||||
@@ -657,8 +657,6 @@
|
||||
|
||||
handle_trace_chems()
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
/mob/living/carbon/human/handle_drunk()
|
||||
@@ -744,13 +742,11 @@
|
||||
heal_overall_damage(0.1, 0.1)
|
||||
|
||||
if(paralysis)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
else if(sleeping)
|
||||
speech_problem_flag = 1
|
||||
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
if(mind)
|
||||
@@ -761,7 +757,6 @@
|
||||
adjustToxLoss(-1)
|
||||
|
||||
else if(status_flags & FAKEDEATH)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
//Vision //god knows why this is here
|
||||
@@ -771,26 +766,21 @@
|
||||
|
||||
if(!dna.species.vision_organ) // Presumably if a species has no vision organs, they see via some other means.
|
||||
SetEyeBlind(0)
|
||||
blinded = 0
|
||||
SetEyeBlurry(0)
|
||||
|
||||
else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
|
||||
EyeBlind(2)
|
||||
blinded = 1
|
||||
EyeBlurry(2)
|
||||
|
||||
else
|
||||
//blindness
|
||||
if(disabilities & BLIND) // Disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
|
||||
else if(eye_blind) // Blindness, heals slowly over time
|
||||
AdjustEyeBlind(-1)
|
||||
blinded = 1
|
||||
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster
|
||||
AdjustEyeBlurry(-3)
|
||||
blinded = 1
|
||||
|
||||
//blurry sight
|
||||
if(vision.is_bruised()) // Vision organs impaired? Permablurry.
|
||||
@@ -826,7 +816,6 @@
|
||||
|
||||
|
||||
else //dead
|
||||
blinded = 1
|
||||
SetSilence(0)
|
||||
|
||||
|
||||
@@ -860,11 +849,13 @@
|
||||
remoteview_target = null
|
||||
reset_perspective(null)
|
||||
|
||||
dna.species.handle_vision(src)
|
||||
|
||||
/mob/living/carbon/human/handle_hud_icons()
|
||||
dna.species.handle_hud_icons(src)
|
||||
|
||||
/mob/living/carbon/human/handle_hud_icons_health()
|
||||
dna.species.handle_hud_icons_health(src)
|
||||
handle_hud_icons_health_overlay()
|
||||
|
||||
/mob/living/carbon/human/handle_random_events()
|
||||
// Puke if toxloss is too high
|
||||
if(!stat)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/mob/living/carbon/human/say(var/message, var/sanitize = TRUE, var/ignore_speech_problems = FALSE, var/ignore_atmospherics = FALSE)
|
||||
var/alt_name = ""
|
||||
..(message, sanitize = sanitize, ignore_speech_problems = ignore_speech_problems, ignore_atmospherics = ignore_atmospherics) //ohgod we should really be passing a datum here.
|
||||
|
||||
/mob/living/carbon/human/GetAltName()
|
||||
if(name != GetVoice())
|
||||
alt_name = " (as [get_id_name("Unknown")])"
|
||||
|
||||
..(message, alt_name = alt_name, sanitize = sanitize, ignore_speech_problems = ignore_speech_problems, ignore_atmospherics = ignore_atmospherics) //ohgod we should really be passing a datum here.
|
||||
return " (as [get_id_name("Unknown")])"
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/proc/forcesay(list/append)
|
||||
if(stat == CONSCIOUS)
|
||||
@@ -160,7 +160,7 @@
|
||||
returns[3] = speech_problem_flag
|
||||
return returns
|
||||
|
||||
/mob/living/carbon/human/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name)
|
||||
/mob/living/carbon/human/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios)
|
||||
switch(message_mode)
|
||||
if("intercom")
|
||||
for(var/obj/item/radio/intercom/I in view(1, src))
|
||||
@@ -203,7 +203,7 @@
|
||||
R.talk_into(src, message, null, verb, speaking)
|
||||
|
||||
if("whisper")
|
||||
whisper_say(message, speaking, alt_name)
|
||||
whisper_say(message, speaking)
|
||||
return 1
|
||||
else
|
||||
if(message_mode)
|
||||
|
||||
@@ -253,8 +253,8 @@
|
||||
|
||||
if(H.status_flags & GOTTAGOFAST)
|
||||
. -= 1
|
||||
if(H.status_flags & GOTTAGOREALLYFAST)
|
||||
. -= 2
|
||||
if(H.status_flags & GOTTAGOFAST_METH)
|
||||
. -= 1
|
||||
return .
|
||||
|
||||
/datum/species/proc/on_species_gain(mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment.
|
||||
@@ -504,43 +504,23 @@
|
||||
/datum/species/proc/handle_can_equip(obj/item/I, slot, disable_warning = 0, mob/living/carbon/human/user)
|
||||
return FALSE
|
||||
|
||||
/datum/species/proc/handle_vision(mob/living/carbon/human/H)
|
||||
// Right now this just handles blind, blurry, and similar states
|
||||
if(H.blinded || H.eye_blind)
|
||||
H.overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
H.throw_alert("blind", /obj/screen/alert/blind)
|
||||
else
|
||||
H.clear_fullscreen("blind")
|
||||
H.clear_alert("blind")
|
||||
|
||||
|
||||
if(H.disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
|
||||
if(H.glasses) //to every /obj/item
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
if(G.prescription)
|
||||
H.clear_fullscreen("nearsighted")
|
||||
else
|
||||
H.overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
H.overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
H.clear_fullscreen("nearsighted")
|
||||
|
||||
if(H.eye_blurry)
|
||||
H.overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
else
|
||||
H.clear_fullscreen("blurry")
|
||||
|
||||
if(H.druggy)
|
||||
H.overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
H.throw_alert("high", /obj/screen/alert/high)
|
||||
else
|
||||
H.clear_fullscreen("high")
|
||||
H.clear_alert("high")
|
||||
/datum/species/proc/get_perceived_trauma(mob/living/carbon/human/H)
|
||||
return 100 - ((NO_PAIN in species_traits) ? 0 : H.traumatic_shock) - H.getStaminaLoss()
|
||||
|
||||
/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
|
||||
if(!H.client)
|
||||
return
|
||||
handle_hud_icons_health(H)
|
||||
H.handle_hud_icons_health_overlay()
|
||||
handle_hud_icons_nutrition(H)
|
||||
|
||||
/datum/species/proc/handle_hud_icons_health(mob/living/carbon/H)
|
||||
if(!H.client)
|
||||
return
|
||||
handle_hud_icons_health_side(H)
|
||||
handle_hud_icons_health_doll(H)
|
||||
|
||||
/datum/species/proc/handle_hud_icons_health_side(mob/living/carbon/human/H)
|
||||
if(H.healths)
|
||||
if(H.stat == DEAD)
|
||||
H.healths.icon_state = "health7"
|
||||
@@ -550,7 +530,7 @@
|
||||
if(SCREWYHUD_DEAD) H.healths.icon_state = "health7"
|
||||
if(SCREWYHUD_HEALTHY) H.healths.icon_state = "health0"
|
||||
else
|
||||
switch(100 - ((NO_PAIN in species_traits) ? 0 : H.traumatic_shock) - H.staminaloss)
|
||||
switch(get_perceived_trauma(H))
|
||||
if(100 to INFINITY) H.healths.icon_state = "health0"
|
||||
if(80 to 100) H.healths.icon_state = "health1"
|
||||
if(60 to 80) H.healths.icon_state = "health2"
|
||||
@@ -559,6 +539,7 @@
|
||||
if(0 to 20) H.healths.icon_state = "health5"
|
||||
else H.healths.icon_state = "health6"
|
||||
|
||||
/datum/species/proc/handle_hud_icons_health_doll(mob/living/carbon/human/H)
|
||||
if(H.healthdoll)
|
||||
if(H.stat == DEAD)
|
||||
H.healthdoll.icon_state = "healthdoll_DEAD"
|
||||
@@ -588,6 +569,7 @@
|
||||
H.healthdoll.overlays -= (cached_overlays - new_overlays)
|
||||
H.healthdoll.cached_healthdoll_overlays = new_overlays
|
||||
|
||||
/datum/species/proc/handle_hud_icons_nutrition(mob/living/carbon/human/H)
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
H.throw_alert("nutrition", /obj/screen/alert/fat)
|
||||
@@ -717,4 +699,4 @@ It'll return null if the organ doesn't correspond, so include null checks when u
|
||||
random_species += initial(S.name)
|
||||
var/picked_species = pick(random_species)
|
||||
var/datum/species/selected_species = GLOB.all_species[picked_species]
|
||||
return species_name ? picked_species : selected_species.type
|
||||
return species_name ? picked_species : selected_species.type
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
skinned_type = /obj/item/stack/sheet/metal // Let's grind up IPCs for station resources!
|
||||
|
||||
eyes = "blank_eyes"
|
||||
brute_mod = 2.5 // 100% * 2.5 * 0.6 (robolimbs) ~= 150%
|
||||
burn_mod = 2.5 // So they take 50% extra damage from brute/burn overall.
|
||||
brute_mod = 2.5 // 100% * 2.5 * 0.66 (robolimbs) = 165%
|
||||
burn_mod = 2.5 // So they take 65% extra damage from brute/burn overall.
|
||||
tox_mod = 0
|
||||
clone_mod = 0
|
||||
oxy_mod = 0
|
||||
@@ -127,9 +127,26 @@
|
||||
if((head_organ.dna.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use.
|
||||
hair += i
|
||||
|
||||
var/file = file2text("config/custom_sprites.txt") //Pulls up the custom_sprites list
|
||||
var/lines = splittext(file, "\n")
|
||||
|
||||
for(var/line in lines) // Looks for lines set up as screen:ckey:screen_name
|
||||
var/list/Entry = splittext(line, ":") // split lines
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i]) // Cleans up lines
|
||||
if(Entry.len != 3 || Entry[1] != "screen") // Ignore entries that aren't for screens
|
||||
continue
|
||||
if(Entry[2] == H.ckey) // They're in the list? Custom sprite time, var and icon change required
|
||||
hair += Entry[3] // Adds custom screen to list
|
||||
|
||||
var/new_style = input(H, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair
|
||||
var/new_color = input("Please select hair color.", "Monitor Color", head_organ.hair_colour) as null|color
|
||||
|
||||
if(H.incapacitated())
|
||||
to_chat(src, "<span class='warning'>You were interrupted while changing your monitor display.</span>")
|
||||
to_chat(H, "<span class='warning'>You were interrupted while changing your monitor display.</span>")
|
||||
return
|
||||
|
||||
if(new_style)
|
||||
H.change_hair(new_style)
|
||||
H.change_hair(new_style, 1) // The 1 is to enable custom sprites
|
||||
if(new_color)
|
||||
H.change_hair_color(new_color)
|
||||
|
||||
@@ -83,7 +83,6 @@
|
||||
if("Warden","Security Officer","Security Pod Pilot")
|
||||
suit=/obj/item/clothing/suit/space/eva/plasmaman/security
|
||||
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/security
|
||||
H.equip_or_collect(new /obj/item/gun/energy/gun/advtaser(H), slot_in_backpack)
|
||||
if("Internal Affairs Agent")
|
||||
suit=/obj/item/clothing/suit/space/eva/plasmaman/lawyer
|
||||
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/lawyer
|
||||
@@ -93,7 +92,6 @@
|
||||
if("Head of Security")
|
||||
suit=/obj/item/clothing/suit/space/eva/plasmaman/security/hos
|
||||
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/security/hos
|
||||
H.equip_or_collect(new /obj/item/gun/energy/gun(H), slot_in_backpack)
|
||||
if("Captain", "Blueshield")
|
||||
suit=/obj/item/clothing/suit/space/eva/plasmaman/security/captain
|
||||
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/security/captain
|
||||
@@ -106,7 +104,6 @@
|
||||
if("Medical Doctor","Brig Physician","Virologist")
|
||||
suit=/obj/item/clothing/suit/space/eva/plasmaman/medical
|
||||
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/medical
|
||||
H.equip_or_collect(new /obj/item/flashlight/pen(H), slot_in_backpack)
|
||||
if("Paramedic")
|
||||
suit=/obj/item/clothing/suit/space/eva/plasmaman/medical/paramedic
|
||||
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/medical/paramedic
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -84,16 +84,21 @@
|
||||
/datum/species/vox/after_equip_job(datum/job/J, mob/living/carbon/human/H)
|
||||
if(!H.mind || !H.mind.assigned_role || H.mind.assigned_role != "Clown" && H.mind.assigned_role != "Mime")
|
||||
H.unEquip(H.wear_mask)
|
||||
H.unEquip(H.l_hand)
|
||||
|
||||
H.equip_or_collect(new /obj/item/clothing/mask/breath/vox(H), slot_wear_mask)
|
||||
var/tank_pref = H.client && H.client.prefs ? H.client.prefs.speciesprefs : null
|
||||
var/obj/item/tank/internal_tank
|
||||
if(tank_pref)//Diseasel, here you go
|
||||
H.equip_or_collect(new /obj/item/tank/nitrogen(H), slot_l_hand)
|
||||
internal_tank = new /obj/item/tank/nitrogen(H)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/tank/emergency_oxygen/vox(H), slot_l_hand)
|
||||
to_chat(H, "<span class='notice'>You are now running on nitrogen internals from the [H.l_hand] in your hand. Your species finds oxygen toxic, so you must breathe nitrogen only.</span>")
|
||||
H.internal = H.l_hand
|
||||
internal_tank = new /obj/item/tank/emergency_oxygen/vox(H)
|
||||
if(!H.equip_to_appropriate_slot(internal_tank))
|
||||
if(!H.put_in_any_hand_if_possible(internal_tank))
|
||||
H.unEquip(H.l_hand)
|
||||
H.equip_or_collect(internal_tank, slot_l_hand)
|
||||
to_chat(H, "<span class='boldannounce'>Could not find an empty slot for internals! Please report this as a bug</span>")
|
||||
H.internal = internal_tank
|
||||
to_chat(H, "<span class='notice'>You are now running on nitrogen internals from the [internal_tank]. Your species finds oxygen toxic, so you must breathe nitrogen only.</span>")
|
||||
H.update_action_buttons_icon()
|
||||
|
||||
/datum/species/vox/on_species_gain(mob/living/carbon/human/H)
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/mob/living/carbon/human/update_stat(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
..(reason)
|
||||
if(stat != DEAD)
|
||||
switch(getBrainLoss())
|
||||
if(100 to 120)
|
||||
Weaken(20)
|
||||
create_debug_log("collapsed from brain damage, trigger reason: [reason]")
|
||||
if(120 to INFINITY)
|
||||
visible_message("<span class='alert'><B>[src]</B> goes limp, [p_their()] facial expression utterly blank.</span>")
|
||||
death()
|
||||
create_debug_log("died of brain damage, trigger reason: [reason]")
|
||||
else
|
||||
if(dna.species && dna.species.can_revive_by_healing)
|
||||
var/obj/item/organ/internal/brain/B = get_int_organ(/obj/item/organ/internal/brain)
|
||||
if(B)
|
||||
if((health >= (config.health_threshold_dead + config.health_threshold_crit) * 0.5) && getBrainLoss()<120)
|
||||
update_revive()
|
||||
create_debug_log("revived from healing, trigger reason: [reason]")
|
||||
|
||||
/mob/living/carbon/human/update_nearsighted_effects()
|
||||
var/obj/item/clothing/glasses/G = glasses
|
||||
if((disabilities & NEARSIGHTED) && (!istype(G) || !G.prescription))
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
clear_fullscreen("nearsighted")
|
||||
@@ -1,10 +1,5 @@
|
||||
//Lallander was here
|
||||
/mob/living/carbon/human/whisper(message as text)
|
||||
var/alt_name = ""
|
||||
|
||||
if(name != GetVoice())
|
||||
alt_name = "(as [get_id_name("Unknown")])"
|
||||
|
||||
message = trim_strip_html_properly(message) //bit of duplicate code, acceptable because the workaround would be annoying
|
||||
|
||||
//parse the language code and consume it
|
||||
@@ -23,4 +18,4 @@
|
||||
message = trim_left(message)
|
||||
message = handle_autohiss(message, speaking)
|
||||
|
||||
whisper_say(message, speaking, alt_name)
|
||||
whisper_say(message, speaking)
|
||||
@@ -219,19 +219,19 @@
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
updatehealth("handle mutations and radiation(0-50)")
|
||||
|
||||
if(50 to 75)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
updatehealth()
|
||||
updatehealth("handle mutations and radiation(50-75)")
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
updatehealth("handle mutations and radiation(75-100)")
|
||||
|
||||
radiation = Clamp(radiation, 0, 100)
|
||||
|
||||
@@ -259,39 +259,11 @@
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
//This updates the health and status of the mob (conscious, unconscious, dead)
|
||||
/mob/living/carbon/handle_regular_status_updates()
|
||||
|
||||
if(..()) //alive
|
||||
|
||||
if(health <= config.health_threshold_dead)
|
||||
death()
|
||||
return
|
||||
|
||||
if(getOxyLoss() > 50 || health <= config.health_threshold_crit)
|
||||
Paralyse(3)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
if(sleeping)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/CheckStamina()
|
||||
if(staminaloss)
|
||||
var/total_health = (health - staminaloss)
|
||||
if(total_health <= config.health_threshold_softcrit && !stat)
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
Weaken(5)
|
||||
setStaminaLoss(health - 2)
|
||||
return
|
||||
setStaminaLoss(max((staminaloss - 3), 0))
|
||||
|
||||
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
|
||||
/mob/living/carbon/handle_status_effects()
|
||||
..()
|
||||
|
||||
CheckStamina()
|
||||
setStaminaLoss(max((staminaloss - 3), 0))
|
||||
|
||||
var/restingpwr = 1 + 4 * resting
|
||||
|
||||
@@ -354,8 +326,8 @@
|
||||
handle_dreams()
|
||||
adjustStaminaLoss(-10)
|
||||
var/comfort = 1
|
||||
if(istype(buckled, /obj/structure/stool/bed))
|
||||
var/obj/structure/stool/bed/bed = buckled
|
||||
if(istype(buckled, /obj/structure/bed))
|
||||
var/obj/structure/bed/bed = buckled
|
||||
comfort+= bed.comfort
|
||||
for(var/obj/item/bedsheet/bedsheet in range(loc,0))
|
||||
if(bedsheet.loc != loc) //bedsheets in your backpack/neck don't give you comfort
|
||||
@@ -375,61 +347,6 @@
|
||||
Sleeping(2)
|
||||
return sleeping
|
||||
|
||||
|
||||
//this handles hud updates. Calls update_vision() and handle_hud_icons()
|
||||
/mob/living/carbon/handle_regular_hud_updates()
|
||||
if(!client)
|
||||
return 0
|
||||
|
||||
if(stat == UNCONSCIOUS && health <= config.health_threshold_crit)
|
||||
var/severity = 0
|
||||
switch(health)
|
||||
if(-20 to -10) severity = 1
|
||||
if(-30 to -20) severity = 2
|
||||
if(-40 to -30) severity = 3
|
||||
if(-50 to -40) severity = 4
|
||||
if(-60 to -50) severity = 5
|
||||
if(-70 to -60) severity = 6
|
||||
if(-80 to -70) severity = 7
|
||||
if(-90 to -80) severity = 8
|
||||
if(-95 to -90) severity = 9
|
||||
if(-INFINITY to -95) severity = 10
|
||||
overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity)
|
||||
else
|
||||
clear_fullscreen("crit")
|
||||
if(oxyloss)
|
||||
var/severity = 0
|
||||
switch(oxyloss)
|
||||
if(10 to 20) severity = 1
|
||||
if(20 to 25) severity = 2
|
||||
if(25 to 30) severity = 3
|
||||
if(30 to 35) severity = 4
|
||||
if(35 to 40) severity = 5
|
||||
if(40 to 45) severity = 6
|
||||
if(45 to INFINITY) severity = 7
|
||||
overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity)
|
||||
else
|
||||
clear_fullscreen("oxy")
|
||||
|
||||
//Fire and Brute damage overlay (BSSR)
|
||||
var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp
|
||||
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
|
||||
if(hurtdamage)
|
||||
var/severity = 0
|
||||
switch(hurtdamage)
|
||||
if(5 to 15) severity = 1
|
||||
if(15 to 30) severity = 2
|
||||
if(30 to 45) severity = 3
|
||||
if(45 to 70) severity = 4
|
||||
if(70 to 85) severity = 5
|
||||
if(85 to INFINITY) severity = 6
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
..()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
@@ -464,6 +381,9 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/handle_hud_icons_health()
|
||||
if(!client)
|
||||
return
|
||||
|
||||
if(healths)
|
||||
if(stat != DEAD)
|
||||
switch(health)
|
||||
@@ -483,3 +403,51 @@
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
handle_hud_icons_health_overlay()
|
||||
|
||||
/mob/living/carbon/proc/handle_hud_icons_health_overlay()
|
||||
if(stat == UNCONSCIOUS && health <= config.health_threshold_crit)
|
||||
var/severity = 0
|
||||
switch(health)
|
||||
if(-20 to -10) severity = 1
|
||||
if(-30 to -20) severity = 2
|
||||
if(-40 to -30) severity = 3
|
||||
if(-50 to -40) severity = 4
|
||||
if(-60 to -50) severity = 5
|
||||
if(-70 to -60) severity = 6
|
||||
if(-80 to -70) severity = 7
|
||||
if(-90 to -80) severity = 8
|
||||
if(-95 to -90) severity = 9
|
||||
if(-INFINITY to -95) severity = 10
|
||||
overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity)
|
||||
else if(stat == CONSCIOUS)
|
||||
clear_fullscreen("crit")
|
||||
if(oxyloss)
|
||||
var/severity = 0
|
||||
switch(oxyloss)
|
||||
if(10 to 20) severity = 1
|
||||
if(20 to 25) severity = 2
|
||||
if(25 to 30) severity = 3
|
||||
if(30 to 35) severity = 4
|
||||
if(35 to 40) severity = 5
|
||||
if(40 to 45) severity = 6
|
||||
if(45 to INFINITY) severity = 7
|
||||
overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity)
|
||||
else
|
||||
clear_fullscreen("oxy")
|
||||
|
||||
//Fire and Brute damage overlay (BSSR)
|
||||
var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp
|
||||
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
|
||||
if(hurtdamage)
|
||||
var/severity = 0
|
||||
switch(hurtdamage)
|
||||
if(5 to 15) severity = 1
|
||||
if(15 to 30) severity = 2
|
||||
if(30 to 45) severity = 3
|
||||
if(45 to 70) severity = 4
|
||||
if(70 to 85) severity = 5
|
||||
if(85 to INFINITY) severity = 6
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/mob/living/carbon/slime/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
// Only execute the below if we successfully died
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(!gibbed)
|
||||
if(is_adult)
|
||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
|
||||
@@ -15,13 +17,5 @@
|
||||
return
|
||||
else
|
||||
visible_message("<b>The [name]</b> seizes up and falls limp...")
|
||||
stat = DEAD
|
||||
icon_state = "[colour] baby slime dead"
|
||||
overlays.len = 0
|
||||
|
||||
update_canmove()
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.check_win()
|
||||
|
||||
return ..(gibbed)
|
||||
overlays.Cut()
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
|
||||
updatehealth()
|
||||
updatehealth("handle environment")
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
if(reagents.get_reagent_amount("epinephrine")>=5)
|
||||
mutation_chance = max(mutation_chance - 5,0) //Prevents mutation chance going <0%
|
||||
reagents.remove_reagent("epinephrine", 5)
|
||||
updatehealth()
|
||||
updatehealth("handle chemicals in body")
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
@@ -195,7 +195,6 @@
|
||||
|
||||
if(src.stat == DEAD)
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
else
|
||||
if(src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||
if(src.stunned > 0)
|
||||
@@ -207,7 +206,6 @@
|
||||
src.stat = 0
|
||||
if(src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 0
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
@@ -219,7 +217,6 @@
|
||||
|
||||
if(src.eye_blind)
|
||||
src.SetEyeBlind(0)
|
||||
src.blinded = 1
|
||||
|
||||
if(src.ear_deaf > 0) SetEarDeaf(0)
|
||||
if(src.ear_damage < 25)
|
||||
@@ -227,8 +224,6 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if(src.disabilities & BLIND)
|
||||
src.blinded = 1
|
||||
if(src.disabilities & DEAF)
|
||||
EarDeaf(1)
|
||||
|
||||
|
||||
@@ -102,9 +102,9 @@
|
||||
adjustFireLoss(-10)
|
||||
adjustCloneLoss(-10)
|
||||
|
||||
updatehealth()
|
||||
updatehealth("slime feeding")
|
||||
if(Victim)
|
||||
Victim.updatehealth()
|
||||
Victim.updatehealth("slime feeding")
|
||||
|
||||
sleep(rand(15,45))
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/slime/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
/mob/living/carbon/slime/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
if(speaker in Friends)
|
||||
speech_buffer = list()
|
||||
speech_buffer.Add(speaker)
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
/mob/living/carbon/update_stat()
|
||||
/mob/living/carbon/update_stat(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
// if(health <= min_health)
|
||||
if(health <= config.health_threshold_dead)
|
||||
death()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
return
|
||||
// if(paralysis || sleeping || getOxyLoss() > low_oxy_ko || (status_flags & FAKEDEATH) || health <= crit_health)
|
||||
if(paralysis || sleeping || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= config.health_threshold_crit)
|
||||
if(stat == CONSCIOUS)
|
||||
KnockOut()
|
||||
create_debug_log("fell unconscious, trigger reason: [reason]")
|
||||
else
|
||||
if(stat == UNCONSCIOUS)
|
||||
WakeUp()
|
||||
create_debug_log("woke up, trigger reason: [reason]")
|
||||
|
||||
/mob/living/carbon/update_stamina()
|
||||
..()
|
||||
if(staminaloss)
|
||||
var/total_health = (health - staminaloss)
|
||||
if(total_health <= config.health_threshold_softcrit && !stat)
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
Weaken(5)
|
||||
setStaminaLoss(health - 2)
|
||||
handle_hud_icons_health()
|
||||
return
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
adjustCloneLoss(damage * blocked)
|
||||
if(STAMINA)
|
||||
adjustStaminaLoss(damage * blocked)
|
||||
updatehealth()
|
||||
updatehealth("apply damage")
|
||||
return 1
|
||||
|
||||
/mob/living/proc/apply_damage_type(damage = 0, damagetype = BRUTE) //like apply damage except it always uses the damage procs
|
||||
@@ -83,7 +83,7 @@
|
||||
if(JITTER)
|
||||
if(status_flags & CANSTUN)
|
||||
Jitter(effect * blocked)
|
||||
updatehealth()
|
||||
updatehealth("apply effect")
|
||||
return 1
|
||||
|
||||
/mob/living/proc/apply_effects(var/stun = 0, var/weaken = 0, var/paralyze = 0, var/irradiate = 0, var/slur = 0, var/stutter = 0, var/eyeblur = 0, var/drowsy = 0, var/blocked = 0, var/stamina = 0, var/jitter = 0)
|
||||
@@ -99,3 +99,205 @@
|
||||
if(stamina) apply_damage(stamina, STAMINA, null, blocked)
|
||||
if(jitter) apply_effect(jitter, JITTER, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/proc/getBruteLoss()
|
||||
return bruteloss
|
||||
|
||||
/mob/living/proc/adjustBruteLoss(var/amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_bruteloss = bruteloss
|
||||
bruteloss = min(max(bruteloss + amount, 0),(maxHealth*2))
|
||||
if(old_bruteloss == bruteloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_HEALTH
|
||||
if(updating_health)
|
||||
updatehealth("adjustBruteLoss")
|
||||
|
||||
/mob/living/proc/getOxyLoss()
|
||||
return oxyloss
|
||||
|
||||
/mob/living/proc/adjustOxyLoss(var/amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_oxyloss = oxyloss
|
||||
oxyloss = min(max(oxyloss + amount, 0),(maxHealth*2))
|
||||
if(old_oxyloss == oxyloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_HEALTH
|
||||
if(updating_health)
|
||||
updatehealth("adjustOxyLoss")
|
||||
|
||||
/mob/living/proc/setOxyLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_oxyloss = oxyloss
|
||||
oxyloss = amount
|
||||
if(old_oxyloss == oxyloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_HEALTH
|
||||
if(updating_health)
|
||||
updatehealth("setOxyLoss")
|
||||
|
||||
/mob/living/proc/getToxLoss()
|
||||
return toxloss
|
||||
|
||||
/mob/living/proc/adjustToxLoss(var/amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_toxloss = toxloss
|
||||
toxloss = min(max(toxloss + amount, 0),(maxHealth*2))
|
||||
if(old_toxloss == toxloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_HEALTH
|
||||
if(updating_health)
|
||||
updatehealth("adjustToxLoss")
|
||||
|
||||
/mob/living/proc/setToxLoss(var/amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_toxloss = toxloss
|
||||
toxloss = amount
|
||||
if(old_toxloss == toxloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_HEALTH
|
||||
if(updating_health)
|
||||
updatehealth("setToxLoss")
|
||||
|
||||
/mob/living/proc/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
/mob/living/proc/adjustFireLoss(var/amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_fireloss = fireloss
|
||||
fireloss = min(max(fireloss + amount, 0),(maxHealth*2))
|
||||
if(old_fireloss == fireloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_HEALTH
|
||||
if(updating_health)
|
||||
updatehealth("adjustFireLoss")
|
||||
|
||||
/mob/living/proc/getCloneLoss()
|
||||
return cloneloss
|
||||
|
||||
/mob/living/proc/adjustCloneLoss(var/amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_cloneloss = cloneloss
|
||||
cloneloss = min(max(cloneloss + amount, 0),(maxHealth*2))
|
||||
if(old_cloneloss == cloneloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_HEALTH
|
||||
if(updating_health)
|
||||
updatehealth("adjustCloneLoss")
|
||||
|
||||
/mob/living/proc/setCloneLoss(var/amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
var/old_cloneloss = cloneloss
|
||||
cloneloss = amount
|
||||
if(old_cloneloss == cloneloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_HEALTH
|
||||
if(updating_health)
|
||||
updatehealth("setCloneLoss")
|
||||
|
||||
/mob/living/proc/getBrainLoss()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/adjustBrainLoss(amount, updating = TRUE)
|
||||
return STATUS_UPDATE_NONE
|
||||
|
||||
/mob/living/proc/setBrainLoss(amount, updating = TRUE)
|
||||
return STATUS_UPDATE_NONE
|
||||
|
||||
/mob/living/proc/getStaminaLoss()
|
||||
return staminaloss
|
||||
|
||||
/mob/living/proc/adjustStaminaLoss(amount, updating = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE
|
||||
var/old_stamloss = staminaloss
|
||||
staminaloss = min(max(staminaloss + amount, 0),(maxHealth*2))
|
||||
if(old_stamloss == staminaloss)
|
||||
updating = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_STAMINA
|
||||
if(updating)
|
||||
handle_hud_icons_health()
|
||||
update_stamina()
|
||||
|
||||
/mob/living/proc/setStaminaLoss(amount, updating = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE
|
||||
var/old_stamloss = staminaloss
|
||||
staminaloss = amount
|
||||
if(old_stamloss == staminaloss)
|
||||
updating = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
else
|
||||
. = STATUS_UPDATE_STAMINA
|
||||
if(updating)
|
||||
handle_hud_icons_health()
|
||||
update_stamina()
|
||||
|
||||
/mob/living/proc/getMaxHealth()
|
||||
return maxHealth
|
||||
|
||||
/mob/living/proc/setMaxHealth(var/newMaxHealth)
|
||||
maxHealth = newMaxHealth
|
||||
|
||||
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_organ_damage(brute, burn, updating_health = TRUE)
|
||||
adjustBruteLoss(-brute, FALSE)
|
||||
adjustFireLoss(-burn, FALSE)
|
||||
if(updating_health)
|
||||
updatehealth("heal organ damage")
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_organ_damage(brute, burn, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
adjustBruteLoss(brute, FALSE)
|
||||
adjustFireLoss(burn, FALSE)
|
||||
if(updating_health)
|
||||
updatehealth("take organ damage")
|
||||
|
||||
// heal MANY external organs, in random order
|
||||
/mob/living/proc/heal_overall_damage(brute, burn, updating_health = TRUE)
|
||||
adjustBruteLoss(-brute, FALSE)
|
||||
adjustFireLoss(-burn, FALSE)
|
||||
if(updating_health)
|
||||
updatehealth("heal overall damage")
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/proc/take_overall_damage(brute, burn, updating_health = TRUE, used_weapon = null)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
adjustBruteLoss(brute, FALSE)
|
||||
adjustFireLoss(burn, FALSE)
|
||||
if(updating_health)
|
||||
updatehealth("take overall damage")
|
||||
|
||||
/mob/living/proc/has_organic_damage()
|
||||
return (maxHealth - health)
|
||||
|
||||
@@ -1,12 +1,71 @@
|
||||
//This is the proc for gibbing a mob. Cannot gib ghosts.
|
||||
//added different sort of gibs and animations. N
|
||||
/mob/living/gib()
|
||||
if(!death(TRUE) && stat != DEAD)
|
||||
return FALSE
|
||||
// hide and freeze for the GC
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
playsound(src.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
|
||||
gibs(loc, dna)
|
||||
QDEL_IN(src, 0)
|
||||
return TRUE
|
||||
|
||||
//This is the proc for turning a mob into ash. Mostly a copy of gib code (above).
|
||||
//Originally created for wizard disintegrate. I've removed the virus code since it's irrelevant here.
|
||||
//Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N
|
||||
/mob/living/dust()
|
||||
if(!death(TRUE) && stat != DEAD)
|
||||
return FALSE
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
// hide and freeze them while they get GC'd
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
QDEL_IN(src, 0)
|
||||
return TRUE
|
||||
|
||||
/mob/living/melt()
|
||||
if(!death(TRUE) && stat != DEAD)
|
||||
return FALSE
|
||||
// hide and freeze them while they get GC'd
|
||||
notransform = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
QDEL_IN(src, 0)
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/can_die()
|
||||
return !(stat == DEAD || (status_flags & GODMODE))
|
||||
|
||||
// Returns true if mob transitioned from live to dead
|
||||
// Do a check with `can_die` beforehand if you need to do any
|
||||
// handling before `stat` is set
|
||||
/mob/living/death(gibbed)
|
||||
blinded = max(blinded, 1)
|
||||
if(!can_die())
|
||||
// Whew! Good thing I'm indestructible! (or already dead)
|
||||
return FALSE
|
||||
|
||||
stat = DEAD
|
||||
SetDizzy(0)
|
||||
SetJitter(0)
|
||||
SetLoseBreath(0)
|
||||
|
||||
if(suiciding)
|
||||
mind.suicided = TRUE
|
||||
|
||||
clear_fullscreens()
|
||||
update_sight()
|
||||
update_action_buttons_icon()
|
||||
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
callHook("death", list(src, gibbed))
|
||||
|
||||
for(var/s in ownedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.ownerDies(gibbed, src)
|
||||
@@ -14,7 +73,19 @@
|
||||
var/datum/soullink/S = s
|
||||
S.sharerDies(gibbed, src)
|
||||
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
if(!gibbed)
|
||||
update_canmove()
|
||||
|
||||
..(gibbed)
|
||||
timeofdeath = world.time
|
||||
|
||||
living_mob_list -= src
|
||||
dead_mob_list += src
|
||||
if(mind)
|
||||
mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
respawnable_list += src
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.check_win()
|
||||
|
||||
// u no we dead
|
||||
return TRUE
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
return
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
//to find it.
|
||||
blinded = null
|
||||
|
||||
if(stat != DEAD)
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
@@ -51,8 +45,6 @@
|
||||
handle_disabilities() // eye, ear, brain damages
|
||||
handle_status_effects() //all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc
|
||||
|
||||
update_canmove(1) // set to 1 to not update icon action buttons; rip this argument out if Life is ever refactored to be non-stupid. -Fox
|
||||
|
||||
if(client)
|
||||
//regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT
|
||||
handle_regular_hud_updates() //IT JUST REMOVES FUCKING HUD IMAGES
|
||||
@@ -90,21 +82,7 @@
|
||||
|
||||
//This updates the health and status of the mob (conscious, unconscious, dead)
|
||||
/mob/living/proc/handle_regular_status_updates()
|
||||
|
||||
updatehealth()
|
||||
|
||||
if(stat != DEAD)
|
||||
|
||||
if(paralysis)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
else if(status_flags & FAKEDEATH)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
return 1
|
||||
return stat != DEAD
|
||||
|
||||
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
|
||||
/mob/living/proc/handle_status_effects()
|
||||
@@ -215,29 +193,6 @@
|
||||
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(blinded || eye_blind)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
else
|
||||
clear_fullscreen("blind")
|
||||
clear_alert("blind")
|
||||
|
||||
if(disabilities & NEARSIGHTED)
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
clear_fullscreen("nearsighted")
|
||||
|
||||
if(eye_blurry)
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
else
|
||||
clear_fullscreen("blurry")
|
||||
|
||||
if(druggy)
|
||||
overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
else
|
||||
clear_fullscreen("high")
|
||||
clear_alert("high")
|
||||
|
||||
if(machine)
|
||||
if(!machine.check_eye(src))
|
||||
@@ -247,6 +202,8 @@
|
||||
reset_perspective(null)
|
||||
|
||||
/mob/living/proc/update_sight()
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
// Gives a mob the vision of being dead
|
||||
|
||||
@@ -214,16 +214,14 @@
|
||||
/mob/living/verb/succumb()
|
||||
set hidden = 1
|
||||
if(InCritical())
|
||||
attack_log += "[src] has ["succumbed to death"] with [round(health, 0.1)] points of health!"
|
||||
create_attack_log("[src] has ["succumbed to death"] with [round(health, 0.1)] points of health!")
|
||||
adjustOxyLoss(health - config.health_threshold_dead)
|
||||
updatehealth()
|
||||
// super check for weird mobs, including ones that adjust hp
|
||||
// we don't want to go overboard and gib them, though
|
||||
for(var/i = 1 to 5)
|
||||
if(health < config.health_threshold_dead)
|
||||
break
|
||||
take_overall_damage(max(5, health - config.health_threshold_dead), 0)
|
||||
updatehealth()
|
||||
to_chat(src, "<span class='notice'>You have given up life and succumbed to death.</span>")
|
||||
|
||||
/mob/living/proc/InCritical()
|
||||
@@ -233,12 +231,15 @@
|
||||
..()
|
||||
flash_eyes()
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
/mob/living/proc/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
|
||||
|
||||
update_stat("updatehealth([reason])")
|
||||
handle_hud_icons_health()
|
||||
med_hud_set_health()
|
||||
|
||||
|
||||
@@ -268,89 +269,6 @@
|
||||
return temperature
|
||||
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
|
||||
// Stop! ... Hammertime! ~Carn
|
||||
// I touched them without asking... I'm soooo edgy ~Erro (added nodamage checks)
|
||||
// no ~Tigerkitty
|
||||
|
||||
/mob/living/proc/getBruteLoss()
|
||||
return bruteloss
|
||||
|
||||
/mob/living/proc/adjustBruteLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
bruteloss = min(max(bruteloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/getOxyLoss()
|
||||
return oxyloss
|
||||
|
||||
/mob/living/proc/adjustOxyLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
oxyloss = min(max(oxyloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setOxyLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
oxyloss = amount
|
||||
|
||||
/mob/living/proc/getToxLoss()
|
||||
return toxloss
|
||||
|
||||
/mob/living/proc/adjustToxLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
toxloss = min(max(toxloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setToxLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
toxloss = amount
|
||||
|
||||
/mob/living/proc/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
/mob/living/proc/adjustFireLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
fireloss = min(max(fireloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/getCloneLoss()
|
||||
return cloneloss
|
||||
|
||||
/mob/living/proc/adjustCloneLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
cloneloss = min(max(cloneloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setCloneLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
cloneloss = amount
|
||||
|
||||
/mob/living/proc/getBrainLoss()
|
||||
return brainloss
|
||||
|
||||
/mob/living/proc/adjustBrainLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
brainloss = min(max(brainloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setBrainLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
brainloss = amount
|
||||
|
||||
/mob/living/proc/getStaminaLoss()
|
||||
return staminaloss
|
||||
|
||||
/mob/living/proc/adjustStaminaLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0
|
||||
staminaloss = min(max(staminaloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setStaminaLoss(var/amount)
|
||||
if(status_flags & GODMODE) return 0
|
||||
staminaloss = amount
|
||||
|
||||
/mob/living/proc/getMaxHealth()
|
||||
return maxHealth
|
||||
|
||||
/mob/living/proc/setMaxHealth(var/newMaxHealth)
|
||||
maxHealth = newMaxHealth
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
|
||||
/mob/proc/get_contents()
|
||||
|
||||
|
||||
@@ -421,35 +339,6 @@
|
||||
var/obj/item/organ/external/def_zone = ran_zone(t)
|
||||
return def_zone
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
|
||||
adjustBruteLoss(-brute)
|
||||
adjustFireLoss(-burn)
|
||||
updatehealth()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_organ_damage(var/brute, var/burn)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
updatehealth()
|
||||
|
||||
// heal MANY external organs, in random order
|
||||
/mob/living/proc/heal_overall_damage(var/brute, var/burn)
|
||||
adjustBruteLoss(-brute)
|
||||
adjustFireLoss(-burn)
|
||||
updatehealth()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/proc/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/proc/has_organic_damage()
|
||||
return (maxHealth - health)
|
||||
|
||||
|
||||
/mob/living/proc/restore_all_organs()
|
||||
return
|
||||
@@ -474,6 +363,8 @@
|
||||
C.reagents.clear_reagents()
|
||||
C.reagents.addiction_list.Cut()
|
||||
|
||||
// rejuvenate: Called by `revive` to get the mob into a revivable state
|
||||
// the admin "rejuvenate" command calls `revive`, not this proc.
|
||||
/mob/living/proc/rejuvenate()
|
||||
var/mob/living/carbon/human/human_mob = null //Get this declared for use later.
|
||||
|
||||
@@ -496,7 +387,6 @@
|
||||
radiation = 0
|
||||
SetDruggy(0)
|
||||
SetHallucinate(0)
|
||||
blinded = 0
|
||||
nutrition = NUTRITION_LEVEL_FED + 50
|
||||
bodytemperature = 310
|
||||
CureBlind()
|
||||
@@ -544,11 +434,10 @@
|
||||
restore_all_organs()
|
||||
surgeries.Cut() //End all surgeries.
|
||||
if(stat == DEAD)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
timeofdeath = 0
|
||||
update_revive()
|
||||
else if(stat == UNCONSCIOUS)
|
||||
WakeUp()
|
||||
|
||||
stat = CONSCIOUS
|
||||
update_fire()
|
||||
regenerate_icons()
|
||||
restore_blood()
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
M.mech_toxin_damage(src)
|
||||
else
|
||||
return
|
||||
updatehealth()
|
||||
updatehealth("mech melee attack")
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
|
||||
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
var/toxloss = 0 //Toxic damage caused by being poisoned or radiated
|
||||
var/fireloss = 0 //Burn damage caused by being way too hot, too cold or burnt.
|
||||
var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. slimes also deal cloneloss damage to victims
|
||||
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
|
||||
var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this.
|
||||
|
||||
|
||||
@@ -67,4 +66,3 @@
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD)
|
||||
|
||||
var/list/status_effects //a list of all status effects the mob has
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
..()
|
||||
//Mind updates
|
||||
sync_mind()
|
||||
update_stat("mob login")
|
||||
update_sight()
|
||||
|
||||
//If they're SSD, remove it so they can wake back up.
|
||||
player_logged = 0
|
||||
@@ -11,8 +13,8 @@
|
||||
to_chat(src, "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>")
|
||||
|
||||
if(ranged_ability)
|
||||
ranged_ability.add_ranged_ability(src, "<span class='notice'>You currently have <b>[ranged_ability]</b> active!</span>")
|
||||
|
||||
ranged_ability.add_ranged_ability(src, "<span class='notice'>You currently have <b>[ranged_ability]</b> active!</span>")
|
||||
|
||||
//Should update regardless of if we can ventcrawl, since we can end up in pipes in other ways.
|
||||
update_pipe_vision()
|
||||
|
||||
|
||||
@@ -95,10 +95,10 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
returns[3] = speech_problem_flag
|
||||
return returns
|
||||
|
||||
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios)
|
||||
switch(message_mode)
|
||||
if("whisper") //all mobs can whisper by default
|
||||
whisper_say(message, speaking, alt_name)
|
||||
whisper_say(message, speaking)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -109,7 +109,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
return returns
|
||||
|
||||
|
||||
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb = "says", var/alt_name = "", var/sanitize = TRUE, var/ignore_speech_problems = FALSE, var/ignore_atmospherics = FALSE)
|
||||
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb = "says", var/sanitize = TRUE, var/ignore_speech_problems = FALSE, var/ignore_atmospherics = FALSE)
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "<span class='danger'>You cannot speak in IC (Muted).</span>")
|
||||
@@ -184,7 +184,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
return 0
|
||||
|
||||
var/list/used_radios = list()
|
||||
if(handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name))
|
||||
if(handle_message_mode(message_mode, message, verb, speaking, used_radios))
|
||||
return 1
|
||||
|
||||
var/list/handle_v = handle_speech_sound()
|
||||
@@ -268,7 +268,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
var/speech_bubble_test = say_test(message)
|
||||
|
||||
for(var/mob/M in listening)
|
||||
M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol)
|
||||
M.hear_say(message, verb, speaking, italics, src, speech_sound, sound_vol)
|
||||
if(M.client)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
spawn(0)
|
||||
@@ -359,7 +359,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
/mob/living/proc/get_whisper_loc()
|
||||
return src
|
||||
|
||||
/mob/living/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
|
||||
/mob/living/proc/whisper_say(var/message, var/datum/language/speaking = null, var/verb="whispers")
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "<span class='danger'>You cannot speak in IC (Muted).</span>")
|
||||
@@ -381,6 +381,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
var/eavesdropping_range = 2
|
||||
var/watching_range = 5
|
||||
var/italics = 1
|
||||
var/adverb_added = FALSE
|
||||
|
||||
var/not_heard //the message displayed to people who could not hear the whispering
|
||||
if(speaking)
|
||||
@@ -389,6 +390,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
not_heard = "[verb] something"
|
||||
else
|
||||
var/adverb = pick("quietly", "softly")
|
||||
adverb_added = TRUE
|
||||
verb = "[speaking.speech_verb] [adverb]"
|
||||
not_heard = "[speaking.speech_verb] something [adverb]"
|
||||
else
|
||||
@@ -404,7 +406,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
if(verb == "yells loudly")
|
||||
verb = "slurs emphatically"
|
||||
|
||||
else if(speech_problem_flag)
|
||||
else if(speech_problem_flag && !adverb_added)
|
||||
var/adverb = pick("quietly", "softly")
|
||||
verb = "[verb] [adverb]"
|
||||
|
||||
@@ -464,14 +466,14 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
var/speech_bubble_test = say_test(message)
|
||||
|
||||
for(var/mob/M in listening)
|
||||
M.hear_say(message, verb, speaking, alt_name, italics, src)
|
||||
M.hear_say(message, verb, speaking, italics, src)
|
||||
if(M.client)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
|
||||
if(eavesdropping.len)
|
||||
var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
|
||||
for(var/mob/M in eavesdropping)
|
||||
M.hear_say(new_message, verb, speaking, alt_name, italics, src)
|
||||
M.hear_say(new_message, verb, speaking, italics, src)
|
||||
if(M.client)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE
|
||||
var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite
|
||||
var/malf_cooldown = 0 //Cooldown var for malf modules
|
||||
var/malf_cooldown = 0 //Cooldown var for malf modules, stores a worldtime + cooldown
|
||||
|
||||
var/obj/machinery/power/apc/malfhack = null
|
||||
var/explosive = 0 //does the AI explode when it dies?
|
||||
@@ -265,7 +265,7 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
ai_list -= src
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
SSshuttle.autoEvac()
|
||||
QDEL_NULL(eyeobj) // No AI, no Eye
|
||||
if(malfhacking)
|
||||
deltimer(malfhacking)
|
||||
@@ -281,7 +281,7 @@ var/list/ai_verbs_default = list(
|
||||
/obj/machinery/ai_powersupply
|
||||
name="\improper AI power supply"
|
||||
active_power_usage=1000
|
||||
use_power = 2
|
||||
use_power = ACTIVE_POWER_USE
|
||||
power_channel = EQUIP
|
||||
var/mob/living/silicon/ai/powered_ai = null
|
||||
invisibility = 100
|
||||
@@ -303,9 +303,9 @@ var/list/ai_verbs_default = list(
|
||||
return
|
||||
if(!powered_ai.anchored)
|
||||
loc = powered_ai.loc
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
if(powered_ai.anchored)
|
||||
use_power = 2
|
||||
use_power = ACTIVE_POWER_USE
|
||||
|
||||
/mob/living/silicon/ai/proc/pick_icon()
|
||||
set category = "AI Commands"
|
||||
@@ -549,7 +549,6 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
if(stat != 2)
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -685,7 +684,6 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/ai/bullet_act(var/obj/item/projectile/Proj)
|
||||
..(Proj)
|
||||
updatehealth()
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/ai/reset_perspective(atom/A)
|
||||
@@ -1250,7 +1248,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Target is not on or near any active cameras on the station.</span>")
|
||||
|
||||
|
||||
/mob/living/silicon/ai/handle_fire()
|
||||
return
|
||||
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
/mob/living/silicon/ai/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stat = DEAD
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(custom_sprite == 1)//check for custom AI sprite, defaulting to blue screen if no.
|
||||
icon_state = "[ckey]-ai_dead"
|
||||
else if("[icon_state]_dead" in icon_states(icon,1))
|
||||
icon_state = "[icon_state]_dead"
|
||||
else
|
||||
icon_state = "ai_dead"
|
||||
update_canmove()
|
||||
if(eyeobj)
|
||||
eyeobj.setLoc(get_turf(src))
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
SSshuttle.autoEvac()
|
||||
|
||||
if(nuking)
|
||||
set_security_level("red")
|
||||
@@ -26,10 +23,10 @@
|
||||
|
||||
if(doomsday_device)
|
||||
doomsday_device.timing = 0
|
||||
shuttle_master.emergencyNoEscape = 0
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_STRANDED)
|
||||
shuttle_master.emergency.mode = SHUTTLE_DOCKED
|
||||
shuttle_master.emergency.timer = world.time
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
SSshuttle.emergency.timer = world.time
|
||||
priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
|
||||
qdel(doomsday_device)
|
||||
|
||||
@@ -38,12 +35,7 @@
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
O.mode = 2
|
||||
if(istype(loc, /obj/item/aicard))
|
||||
loc.icon_state = "aicard-404"
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
|
||||
return ..(gibbed)
|
||||
if(istype(loc, /obj/item/aicard))
|
||||
loc.icon_state = "aicard-404"
|
||||
|
||||
@@ -137,6 +137,6 @@
|
||||
acceleration = !acceleration
|
||||
to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].")
|
||||
|
||||
/mob/camera/aiEye/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
/mob/camera/aiEye/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
if(relay_speech)
|
||||
ai.relay_speech(speaker, message, verb, language)
|
||||
|
||||
@@ -14,13 +14,11 @@
|
||||
reset_perspective(null)
|
||||
unset_machine()
|
||||
|
||||
updatehealth()
|
||||
updatehealth("life")
|
||||
if(stat == DEAD)
|
||||
return
|
||||
update_gravity(mob_has_gravity())
|
||||
|
||||
if(health <= config.health_threshold_dead)
|
||||
death()
|
||||
return 0
|
||||
|
||||
if(!eyeobj || QDELETED(eyeobj) || !eyeobj.loc)
|
||||
view_core()
|
||||
|
||||
@@ -44,21 +42,15 @@
|
||||
var/area/my_area = get_area(src)
|
||||
|
||||
if(!lacks_power())
|
||||
if(aiRestorePowerRoutine == 2)
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
if(aiRestorePowerRoutine > 1)
|
||||
update_blind_effects()
|
||||
aiRestorePowerRoutine = 0
|
||||
clear_fullscreen("blind")
|
||||
update_sight()
|
||||
else if(aiRestorePowerRoutine == 3)
|
||||
to_chat(src, "Alert cancelled. Power has been restored.")
|
||||
aiRestorePowerRoutine = 0
|
||||
clear_fullscreen("blind")
|
||||
update_sight()
|
||||
to_chat(src, "Alert cancelled. Power has been restored[aiRestorePowerRoutine == 2 ? "without our assistance" : ""].")
|
||||
else
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
|
||||
if(lacks_power())
|
||||
if(!aiRestorePowerRoutine)
|
||||
update_blind_effects()
|
||||
aiRestorePowerRoutine = 1
|
||||
update_sight()
|
||||
to_chat(src, "<span class='danger'>You have lost power!</span>")
|
||||
@@ -73,7 +65,7 @@
|
||||
if(!lacks_power())
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
aiRestorePowerRoutine = 0
|
||||
clear_fullscreen("blind")
|
||||
update_blind_effects()
|
||||
update_sight()
|
||||
return
|
||||
to_chat(src, "Fault confirmed: missing external power. Shutting down main control system to save power.")
|
||||
@@ -112,7 +104,7 @@
|
||||
if(!lacks_power())
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
aiRestorePowerRoutine = 0
|
||||
clear_fullscreen("blind")
|
||||
update_blind_effects()
|
||||
update_sight()
|
||||
return
|
||||
|
||||
@@ -143,12 +135,13 @@
|
||||
if(get_nations_mode())
|
||||
process_nations_ai()
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
/mob/living/silicon/ai/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = 100
|
||||
stat = CONSCIOUS
|
||||
else
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
update_stat("updatehealth([reason])")
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
/mob/living/silicon/ai/update_stat()
|
||||
/mob/living/silicon/ai/update_stat(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
if(health <= config.health_threshold_dead)
|
||||
death()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
return
|
||||
else if(stat == UNCONSCIOUS)
|
||||
WakeUp()
|
||||
create_debug_log("woke up, trigger reason: [reason]")
|
||||
//diag_hud_set_status()
|
||||
|
||||
/mob/living/silicon/ai/has_vision(information_only = FALSE)
|
||||
return ..() && !lacks_power()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/mob/living/silicon/decoy/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stat = DEAD
|
||||
// Only execute the below if we successfully died
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
icon_state = "ai-crash"
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
if(atoms_share_level(O, src))
|
||||
O.mode = 2
|
||||
..(0)
|
||||
gib()
|
||||
gib()
|
||||
|
||||
@@ -2,17 +2,18 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/decoy/updatehealth()
|
||||
/mob/living/silicon/decoy/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = 100
|
||||
stat = CONSCIOUS
|
||||
else
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
update_stat()
|
||||
update_stat("updatehealth([reason])")
|
||||
|
||||
|
||||
/mob/living/silicon/decoy/update_stat()
|
||||
/mob/living/silicon/decoy/update_stat(reason = "none given")
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(health <= 0)
|
||||
death()
|
||||
death()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
|
||||
@@ -1,28 +1,17 @@
|
||||
/mob/living/silicon/pai/death(gibbed, cleanWipe)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(can_die())
|
||||
if(!cleanWipe)
|
||||
force_fold_out()
|
||||
|
||||
if(!cleanWipe)
|
||||
force_fold_out()
|
||||
visible_message("<span class=warning>[src] emits a dull beep before it loses power and collapses.</span>", "<span class=warning>You hear a dull beep followed by the sound of glass crunching.</span>")
|
||||
name = "pAI debris"
|
||||
desc = "The unfortunate remains of some poor personal AI device."
|
||||
icon_state = "[chassis]_dead"
|
||||
|
||||
var/turf/T = get_turf_or_move(loc)
|
||||
for(var/mob/M in viewers(T))
|
||||
M.show_message("<span class=warning>[src] emits a dull beep before it loses power and collapses.</span>", 3, "<span class=warning>You hear a dull beep followed by the sound of glass crunching.</span>", 2)
|
||||
name = "pAI debris"
|
||||
desc = "The unfortunate remains of some poor personal AI device."
|
||||
icon_state = "[chassis]_dead"
|
||||
stat = DEAD
|
||||
canmove = 0
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
//var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
//mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
//New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here.
|
||||
//Read as: I have no idea what I'm doing but asking for help got me nowhere so this is what you get. - Nodrak
|
||||
if(mind) qdel(mind)
|
||||
living_mob_list -= src
|
||||
if(icon_state != "[chassis]_dead" || cleanWipe)
|
||||
qdel(src)
|
||||
|
||||
@@ -18,11 +18,10 @@
|
||||
qdel(src.cable)
|
||||
cable = null
|
||||
|
||||
/mob/living/silicon/pai/updatehealth()
|
||||
/mob/living/silicon/pai/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = 100
|
||||
stat = CONSCIOUS
|
||||
else
|
||||
health = 100 - getBruteLoss() - getFireLoss()
|
||||
if(health <= 0)
|
||||
death(0)
|
||||
update_stat("updatehealth([reason])")
|
||||
|
||||
@@ -160,9 +160,8 @@
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/pai/blob_act()
|
||||
if(stat != 2)
|
||||
if(stat != DEAD)
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -238,7 +237,6 @@
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
add_attack_logs(M, src, "Animal attacked for [damage] damage")
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C)
|
||||
usr:cameraFollow = null
|
||||
@@ -324,11 +322,11 @@
|
||||
return
|
||||
|
||||
if(loc != card)
|
||||
to_chat(src, "<span class=warning>You are already in your mobile form!</span>")
|
||||
to_chat(src, "<span class='warning'>You are already in your mobile form!</span>")
|
||||
return
|
||||
|
||||
if(world.time <= last_special)
|
||||
to_chat(src, "<span class=warning>You must wait before folding your chassis out again!</span>")
|
||||
to_chat(src, "<span class='warning'>You must wait before folding your chassis out again!</span>")
|
||||
return
|
||||
|
||||
last_special = world.time + 200
|
||||
@@ -336,7 +334,7 @@
|
||||
//I'm not sure how much of this is necessary, but I would rather avoid issues.
|
||||
force_fold_out()
|
||||
|
||||
visible_message("<span class=notice>[src] folds outwards, expanding into a mobile form.</span>", "<span class=notice>You fold outwards, expanding into a mobile form.</span>")
|
||||
visible_message("<span class='notice'>[src] folds outwards, expanding into a mobile form.</span>", "<span class='notice'>You fold outwards, expanding into a mobile form.</span>")
|
||||
|
||||
/mob/living/silicon/pai/proc/force_fold_out()
|
||||
if(istype(card.loc, /mob))
|
||||
@@ -359,11 +357,11 @@
|
||||
return
|
||||
|
||||
if(loc == card)
|
||||
to_chat(src, "<span class=warning>You are already in your card form!</span>")
|
||||
to_chat(src, "<span class='warning'>You are already in your card form!</span>")
|
||||
return
|
||||
|
||||
if(world.time <= last_special)
|
||||
to_chat(src, "<span class=warning>You must wait before returning to your card form!</span>")
|
||||
to_chat(src, "<span class='warning'>You must wait before returning to your card form!</span>")
|
||||
return
|
||||
|
||||
close_up()
|
||||
@@ -454,9 +452,7 @@
|
||||
if(stat == DEAD)
|
||||
to_chat(user, "<span class='danger'>\The [src] is beyond help, at this point.</span>")
|
||||
else if(getBruteLoss() || getFireLoss())
|
||||
adjustBruteLoss(-15)
|
||||
adjustFireLoss(-15)
|
||||
updatehealth()
|
||||
heal_overall_damage(15, 15)
|
||||
N.use(1)
|
||||
user.visible_message("<span class='notice'>[user.name] applied some [W] at [src]'s damaged areas.</span>",\
|
||||
"<span class='notice'>You apply some [W] at [name]'s damaged areas.</span>")
|
||||
@@ -467,7 +463,6 @@
|
||||
else if(W.force)
|
||||
visible_message("<span class='danger'>[user.name] attacks [src] with [W]!</span>")
|
||||
adjustBruteLoss(W.force)
|
||||
updatehealth()
|
||||
else
|
||||
visible_message("<span class='warning'>[user.name] bonks [src] harmlessly with [W].</span>")
|
||||
spawn(1)
|
||||
@@ -494,7 +489,7 @@
|
||||
if(loc == card)
|
||||
return
|
||||
|
||||
visible_message("<span class=notice>[src] neatly folds inwards, compacting down to a rectangular card.</span>", "<span class=notice>You neatly fold inwards, compacting down to a rectangular card.</span>")
|
||||
visible_message("<span class='notice'>[src] neatly folds inwards, compacting down to a rectangular card.</span>", "<span class='notice'>You neatly fold inwards, compacting down to a rectangular card.</span>")
|
||||
|
||||
stop_pulling()
|
||||
reset_perspective(card)
|
||||
@@ -557,7 +552,6 @@
|
||||
|
||||
/mob/living/silicon/pai/bullet_act(var/obj/item/projectile/Proj)
|
||||
..(Proj)
|
||||
updatehealth()
|
||||
if(stat != 2)
|
||||
spawn(1)
|
||||
close_up()
|
||||
|
||||
@@ -65,7 +65,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if("name")
|
||||
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
|
||||
if(t)
|
||||
candidate.name = sanitize(copytext(t,1,MAX_NAME_LEN))
|
||||
candidate.name = reject_bad_name(sanitize(copytext(t,1,MAX_NAME_LEN)))
|
||||
if("desc")
|
||||
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
|
||||
if(t)
|
||||
@@ -84,7 +84,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
candidate.savefile_load(usr)
|
||||
//In case people have saved unsanitized stuff.
|
||||
if(candidate.name)
|
||||
candidate.name = sanitize(copytext(candidate.name,1,MAX_NAME_LEN))
|
||||
candidate.name = reject_bad_name(sanitize(copytext(candidate.name,1,MAX_NAME_LEN)))
|
||||
if(candidate.description)
|
||||
candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
|
||||
if(candidate.role)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/mob/living/silicon/pai/update_stat()
|
||||
/mob/living/silicon/pai/update_stat(reason = "none given")
|
||||
if(health <= 0)
|
||||
death(gibbed = 0)
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
src.owner = R
|
||||
|
||||
/datum/robot_component/proc/install()
|
||||
go_online()
|
||||
/datum/robot_component/proc/uninstall()
|
||||
go_offline()
|
||||
|
||||
/datum/robot_component/proc/destroy()
|
||||
if(wrapped)
|
||||
@@ -34,34 +36,62 @@
|
||||
installed = -1
|
||||
uninstall()
|
||||
|
||||
/datum/robot_component/proc/take_damage(brute, electronics, sharp)
|
||||
/datum/robot_component/proc/take_damage(brute, electronics, sharp, updating_health = TRUE)
|
||||
if(installed != 1)
|
||||
return
|
||||
|
||||
if(owner && updating_health)
|
||||
owner.updatehealth("component '[src]' take damage")
|
||||
|
||||
brute_damage += brute
|
||||
electronics_damage += electronics
|
||||
|
||||
if(brute_damage + electronics_damage >= max_damage)
|
||||
destroy()
|
||||
|
||||
/datum/robot_component/proc/heal_damage(brute, electronics)
|
||||
/datum/robot_component/proc/heal_damage(brute, electronics, updating_health = TRUE)
|
||||
if(installed != 1)
|
||||
// If it's not installed, can't repair it.
|
||||
return 0
|
||||
|
||||
if(owner && updating_health)
|
||||
owner.updatehealth("component '[src]' heal damage")
|
||||
|
||||
brute_damage = max(0, brute_damage - brute)
|
||||
electronics_damage = max(0, electronics_damage - electronics)
|
||||
|
||||
/datum/robot_component/proc/is_powered()
|
||||
return (installed == 1) && (brute_damage + electronics_damage < max_damage) && (powered)
|
||||
|
||||
|
||||
/datum/robot_component/proc/consume_power()
|
||||
if(toggled == 0)
|
||||
powered = 0
|
||||
return
|
||||
powered = 1
|
||||
|
||||
/datum/robot_component/proc/disable()
|
||||
if(!component_disabled)
|
||||
go_offline()
|
||||
component_disabled++
|
||||
|
||||
/datum/robot_component/proc/enable()
|
||||
component_disabled--
|
||||
if(!component_disabled)
|
||||
go_online()
|
||||
|
||||
/datum/robot_component/proc/toggle()
|
||||
toggled = !toggled
|
||||
if(toggled)
|
||||
go_online()
|
||||
else
|
||||
go_offline()
|
||||
|
||||
/datum/robot_component/proc/go_online()
|
||||
return
|
||||
|
||||
/datum/robot_component/proc/go_offline()
|
||||
return
|
||||
|
||||
/datum/robot_component/armour
|
||||
name = "armour plating"
|
||||
external_type = /obj/item/robot_parts/robot_component/armour
|
||||
@@ -72,10 +102,25 @@
|
||||
external_type = /obj/item/robot_parts/robot_component/actuator
|
||||
max_damage = 50
|
||||
|
||||
/datum/robot_component/actuator/go_online()
|
||||
owner.update_stat()
|
||||
|
||||
/datum/robot_component/actuator/go_offline()
|
||||
owner.update_stat()
|
||||
|
||||
/datum/robot_component/cell
|
||||
name = "power cell"
|
||||
max_damage = 50
|
||||
|
||||
/datum/robot_component/cell/is_powered()
|
||||
return ..() && owner.cell
|
||||
|
||||
/datum/robot_component/cell/go_online()
|
||||
owner.update_stat()
|
||||
|
||||
/datum/robot_component/cell/go_offline()
|
||||
owner.update_stat()
|
||||
|
||||
/datum/robot_component/cell/destroy()
|
||||
..()
|
||||
owner.cell = null
|
||||
@@ -95,6 +140,14 @@
|
||||
external_type = /obj/item/robot_parts/robot_component/camera
|
||||
max_damage = 40
|
||||
|
||||
/datum/robot_component/camera/go_online()
|
||||
owner.update_blind_effects()
|
||||
owner.update_sight()
|
||||
|
||||
/datum/robot_component/camera/go_offline()
|
||||
owner.update_blind_effects()
|
||||
owner.update_sight()
|
||||
|
||||
/datum/robot_component/diagnosis_unit
|
||||
name = "self-diagnosis unit"
|
||||
external_type = /obj/item/robot_parts/robot_component/diagnosis_unit
|
||||
@@ -117,9 +170,9 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/disable_component(module_name, duration)
|
||||
var/datum/robot_component/D = get_component(module_name)
|
||||
D.component_disabled++
|
||||
D.disable()
|
||||
spawn(duration)
|
||||
D.component_disabled--
|
||||
D.enable()
|
||||
|
||||
// Returns component by it's string name
|
||||
/mob/living/silicon/robot/proc/get_component(var/component_name)
|
||||
@@ -154,6 +207,8 @@
|
||||
name = "camera"
|
||||
icon_state = "camera"
|
||||
|
||||
|
||||
|
||||
/obj/item/robot_parts/robot_component/diagnosis_unit
|
||||
name = "diagnosis unit"
|
||||
icon_state = "diagnosis_unit"
|
||||
@@ -163,7 +218,7 @@
|
||||
icon_state = "radio"
|
||||
|
||||
//
|
||||
//Robotic Component Analyser, basically a health analyser for robots
|
||||
//Robotic Component Analyzer, basically a health analyzer for robots
|
||||
//
|
||||
/obj/item/robotanalyzer
|
||||
name = "cyborg analyzer"
|
||||
|
||||
@@ -46,11 +46,20 @@
|
||||
|
||||
|
||||
/mob/living/silicon/robot/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
if(!gibbed)
|
||||
emote("deathgasp")
|
||||
stat = DEAD
|
||||
update_canmove()
|
||||
if(can_die())
|
||||
if(!gibbed)
|
||||
emote("deathgasp")
|
||||
|
||||
if(module)
|
||||
module.handle_death(gibbed)
|
||||
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
if(camera)
|
||||
camera.status = 0
|
||||
update_headlamp(1) //So borg lights are disabled when killed.
|
||||
@@ -59,13 +68,6 @@
|
||||
var/obj/machinery/recharge_station/RC = loc
|
||||
RC.go_out()
|
||||
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
update_icons()
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
|
||||
sql_report_cyborg_death(src)
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -215,33 +215,13 @@
|
||||
//DRONE LIFE/DEATH
|
||||
|
||||
//For some goddamn reason robots have this hardcoded. Redefining it for our fragile friends here.
|
||||
/mob/living/silicon/robot/drone/updatehealth()
|
||||
/mob/living/silicon/robot/drone/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = 35
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
health = 35 - (getBruteLoss() + getFireLoss())
|
||||
return
|
||||
|
||||
//Easiest to check this here, then check again in the robot proc.
|
||||
//Standard robots use config for crit, which is somewhat excessive for these guys.
|
||||
//Drones killed by damage will gib.
|
||||
/mob/living/silicon/robot/drone/handle_regular_status_updates()
|
||||
|
||||
if(health <= -35 && src.stat != DEAD)
|
||||
timeofdeath = world.time
|
||||
death() //Possibly redundant, having trouble making death() cooperate.
|
||||
gib()
|
||||
return
|
||||
return ..() // If you don't return anything here, you won't update status effects, like weakening
|
||||
|
||||
/mob/living/silicon/robot/drone/death(gibbed)
|
||||
|
||||
if(module)
|
||||
var/obj/item/gripper/G = locate(/obj/item/gripper) in module
|
||||
if(G) G.drop_item()
|
||||
|
||||
..(gibbed)
|
||||
update_stat("updatehealth([reason])")
|
||||
|
||||
|
||||
//CONSOLE PROCS
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
//Redefining some robot procs, since drones can't be repaired and really shouldn't take component damage.
|
||||
/mob/living/silicon/robot/drone/take_overall_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/used_weapon = null)
|
||||
/mob/living/silicon/robot/drone/take_overall_damage(brute, burn, updating_health = TRUE, used_weapon = null, sharp = 0)
|
||||
bruteloss += brute
|
||||
fireloss += burn
|
||||
if(updating_health)
|
||||
updatehealth("take overall damage")
|
||||
|
||||
/mob/living/silicon/robot/drone/heal_overall_damage(var/brute, var/burn)
|
||||
/mob/living/silicon/robot/drone/heal_overall_damage(brute, burn, updating_health = TRUE)
|
||||
|
||||
bruteloss -= brute
|
||||
fireloss -= burn
|
||||
|
||||
if(bruteloss<0) bruteloss = 0
|
||||
if(fireloss<0) fireloss = 0
|
||||
if(updating_health)
|
||||
updatehealth("heal overall damage")
|
||||
|
||||
/mob/living/silicon/robot/drone/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0)
|
||||
take_overall_damage(brute,burn)
|
||||
/mob/living/silicon/robot/drone/take_organ_damage(brute, burn, updating_health = TRUE, sharp = 0)
|
||||
take_overall_damage(brute,burn, updating_health, null, sharp)
|
||||
|
||||
/mob/living/silicon/robot/drone/heal_organ_damage(var/brute, var/burn)
|
||||
heal_overall_damage(brute,burn)
|
||||
/mob/living/silicon/robot/drone/heal_organ_damage(brute, burn, updating_health = TRUE)
|
||||
heal_overall_damage(brute,burn, updating_health)
|
||||
|
||||
/mob/living/silicon/robot/drone/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
/mob/living/silicon/robot/drone/getBruteLoss()
|
||||
return bruteloss
|
||||
return bruteloss
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
grabbed_something = 1
|
||||
|
||||
if(grabbed_something)
|
||||
to_chat(user, "<span class='notice'>You deploy your decompiler and clear out the contents of \the [T].<span>")
|
||||
to_chat(user, "<span class='notice'>You deploy your decompiler and clear out the contents of \the [T].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Nothing on \the [T] is useful to you.</span>")
|
||||
return
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/silicon/robot/drone/say(var/message, var/datum/language/speaking = null)
|
||||
if(copytext(message, 1, 2) == "*")
|
||||
return emote(copytext(message, 2))
|
||||
|
||||
|
||||
if(!speaking)
|
||||
speaking = parse_language(message)
|
||||
if(!speaking)
|
||||
@@ -10,6 +10,6 @@
|
||||
if(speaking)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/drone/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
|
||||
/mob/living/silicon/robot/drone/whisper_say(var/message, var/datum/language/speaking = null, var/verb="whispers")
|
||||
say(message) //drones do not get to whisper, only speak normally
|
||||
return 1
|
||||
@@ -1,10 +1,11 @@
|
||||
//Easiest to check this here, then check again in the robot proc.
|
||||
//Standard robots use config for crit, which is somewhat excessive for these guys.
|
||||
//Drones killed by damage will gib.
|
||||
/mob/living/silicon/robot/drone/update_stat()
|
||||
/mob/living/silicon/robot/drone/update_stat(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(health <= -35 && stat != DEAD)
|
||||
gib()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
return
|
||||
return ..()
|
||||
return ..(reason)
|
||||
|
||||
@@ -13,13 +13,16 @@
|
||||
if(!O)
|
||||
return 0
|
||||
|
||||
O.mouse_opacity = 2
|
||||
O.mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
|
||||
if(client)
|
||||
client.screen -= O
|
||||
contents -= O
|
||||
if(module)
|
||||
O.loc = module //Return item to module so it appears in its contents, so it can be taken out again.
|
||||
for(var/X in O.actions) // Remove assocated actions
|
||||
var/datum/action/A = X
|
||||
A.Remove(src)
|
||||
|
||||
if(module_active == O)
|
||||
module_active = null
|
||||
@@ -56,6 +59,7 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv1.screen_loc
|
||||
contents += O
|
||||
set_actions(O)
|
||||
else if(!module_state_2)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_2 = O
|
||||
@@ -63,6 +67,7 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv2.screen_loc
|
||||
contents += O
|
||||
set_actions(O)
|
||||
else if(!module_state_3)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_3 = O
|
||||
@@ -70,10 +75,16 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv3.screen_loc
|
||||
contents += O
|
||||
set_actions(O)
|
||||
else
|
||||
to_chat(src, "You need to disable a module first!")
|
||||
update_icons()
|
||||
|
||||
/mob/living/silicon/robot/proc/set_actions(obj/item/I)
|
||||
for(var/X in I.actions)
|
||||
var/datum/action/A = X
|
||||
A.Grant(src)
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
uneq_module(module_active)
|
||||
|
||||
|
||||
@@ -21,22 +21,22 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_robot_cell()
|
||||
if(stat != DEAD)
|
||||
if(!is_component_functioning("power cell") || !cell)
|
||||
Paralyse(2)
|
||||
if(!is_component_functioning("power cell"))
|
||||
uneq_all()
|
||||
low_power_mode = 1
|
||||
update_headlamp()
|
||||
diag_hud_set_borgcell()
|
||||
return
|
||||
if(low_power_mode)
|
||||
if(is_component_functioning("power cell") && cell && cell.charge)
|
||||
if(is_component_functioning("power cell") && cell.charge)
|
||||
low_power_mode = 0
|
||||
update_headlamp()
|
||||
else if(stat == CONSCIOUS)
|
||||
use_power()
|
||||
|
||||
/mob/living/silicon/robot/proc/use_power()
|
||||
if(is_component_functioning("power cell") && cell && cell.charge)
|
||||
// this check is safe because `cell` is guaranteed to be set when the power cell is functioning
|
||||
if(is_component_functioning("power cell") && cell.charge)
|
||||
if(cell.charge <= 100)
|
||||
uneq_all()
|
||||
var/amt = Clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
|
||||
@@ -57,22 +57,10 @@
|
||||
else
|
||||
camera.status = 1
|
||||
|
||||
if(getOxyLoss() > 50)
|
||||
Paralyse(3)
|
||||
|
||||
if(sleeping)
|
||||
Paralyse(3)
|
||||
AdjustSleeping(-1)
|
||||
|
||||
if(resting)
|
||||
Weaken(5)
|
||||
|
||||
if(.) //alive
|
||||
if(health <= config.health_threshold_dead)
|
||||
death()
|
||||
diag_hud_set_status()
|
||||
return
|
||||
|
||||
if(!istype(src, /mob/living/silicon/robot/drone))
|
||||
if(health < 50) //Gradual break down of modules as more damage is sustained
|
||||
if(uneq_module(module_state_3))
|
||||
@@ -86,19 +74,8 @@
|
||||
if(uneq_module(module_state_1))
|
||||
to_chat(src, "<span class='warning'>CRITICAL ERROR: All modules OFFLINE.</span>")
|
||||
|
||||
if(paralysis || stunned || weakened)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
if(!paralysis > 0)
|
||||
SetEyeBlind(0)
|
||||
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
diag_hud_set_health()
|
||||
diag_hud_set_status()
|
||||
else //dead
|
||||
SetEyeBlind(0)
|
||||
|
||||
//update the state of modules and components here
|
||||
if(stat != CONSCIOUS)
|
||||
@@ -109,14 +86,6 @@
|
||||
else
|
||||
radio.on = 1
|
||||
|
||||
if(is_component_functioning("camera") && stat == CONSCIOUS)
|
||||
blinded = 0
|
||||
else
|
||||
blinded = 1
|
||||
|
||||
if(!is_component_functioning("actuator"))
|
||||
Paralyse(3)
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/update_sight()
|
||||
@@ -234,7 +203,7 @@
|
||||
weaponlock_time = 120
|
||||
|
||||
/mob/living/silicon/robot/update_canmove(delay_action_updates = 0)
|
||||
if(paralysis || stunned || weakened || buckled || lockcharge)
|
||||
if(paralysis || stunned || weakened || buckled || lockcharge || stat)
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
@@ -51,6 +51,7 @@ var/list/robot_verbs_default = list(
|
||||
var/opened = 0
|
||||
var/custom_panel = null
|
||||
var/list/custom_panel_names = list("Cricket")
|
||||
var/list/custom_eye_names = list("Cricket","Standard")
|
||||
var/emagged = 0
|
||||
var/is_emaggable = TRUE
|
||||
var/eye_protection = 0
|
||||
@@ -290,7 +291,7 @@ var/list/robot_verbs_default = list(
|
||||
if(N.kickoff)
|
||||
modules = list("Nations")
|
||||
if(mmi != null && mmi.alien)
|
||||
modules = "Hunter"
|
||||
modules = list("Hunter")
|
||||
modtype = input("Please, select a module!", "Robot", null, null) as null|anything in modules
|
||||
if(!modtype)
|
||||
return
|
||||
@@ -306,7 +307,7 @@ var/list/robot_verbs_default = list(
|
||||
module.channels = list("Service" = 1)
|
||||
module_sprites["Basic"] = "robot_old"
|
||||
module_sprites["Android"] = "droid"
|
||||
module_sprites["Default"] = "robot"
|
||||
module_sprites["Default"] = "Standard"
|
||||
module_sprites["Noble-STD"] = "Noble-STD"
|
||||
|
||||
if("Service")
|
||||
@@ -317,7 +318,7 @@ var/list/robot_verbs_default = list(
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
module_sprites["Rich"] = "maximillion"
|
||||
module_sprites["Default"] = "Service2"
|
||||
module_sprites["Standard"] = "robotServ"
|
||||
module_sprites["Standard"] = "Standard-Serv"
|
||||
module_sprites["Noble-SRV"] = "Noble-SRV"
|
||||
module_sprites["Cricket"] = "Cricket-SERV"
|
||||
|
||||
@@ -329,7 +330,7 @@ var/list/robot_verbs_default = list(
|
||||
module_sprites["Basic"] = "Miner_old"
|
||||
module_sprites["Advanced Droid"] = "droid-miner"
|
||||
module_sprites["Treadhead"] = "Miner"
|
||||
module_sprites["Standard"] = "robotMine"
|
||||
module_sprites["Standard"] = "Standard-Mine"
|
||||
module_sprites["Noble-DIG"] = "Noble-DIG"
|
||||
module_sprites["Cricket"] = "Cricket-MINE"
|
||||
|
||||
@@ -342,7 +343,7 @@ var/list/robot_verbs_default = list(
|
||||
module_sprites["Surgeon"] = "surgeon"
|
||||
module_sprites["Advanced Droid"] = "droid-medical"
|
||||
module_sprites["Needles"] = "medicalrobot"
|
||||
module_sprites["Standard"] = "robotMedi"
|
||||
module_sprites["Standard"] = "Standard-Medi"
|
||||
module_sprites["Noble-MED"] = "Noble-MED"
|
||||
module_sprites["Cricket"] = "Cricket-MEDI"
|
||||
status_flags &= ~CANPUSH
|
||||
@@ -354,7 +355,7 @@ var/list/robot_verbs_default = list(
|
||||
module_sprites["Red Knight"] = "Security"
|
||||
module_sprites["Black Knight"] = "securityrobot"
|
||||
module_sprites["Bloodhound"] = "bloodhound"
|
||||
module_sprites["Standard"] = "robotSecy"
|
||||
module_sprites["Standard"] = "Standard-Secy"
|
||||
module_sprites["Noble-SEC"] = "Noble-SEC"
|
||||
module_sprites["Cricket"] = "Cricket-SEC"
|
||||
status_flags &= ~CANPUSH
|
||||
@@ -367,7 +368,7 @@ var/list/robot_verbs_default = list(
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
module_sprites["Antique"] = "engineerrobot"
|
||||
module_sprites["Landmate"] = "landmate"
|
||||
module_sprites["Standard"] = "robotEngi"
|
||||
module_sprites["Standard"] = "Standard-Engi"
|
||||
module_sprites["Noble-ENG"] = "Noble-ENG"
|
||||
module_sprites["Cricket"] = "Cricket-ENGI"
|
||||
magpulse = 1
|
||||
@@ -378,7 +379,7 @@ var/list/robot_verbs_default = list(
|
||||
module_sprites["Basic"] = "JanBot2"
|
||||
module_sprites["Mopbot"] = "janitorrobot"
|
||||
module_sprites["Mop Gear Rex"] = "mopgearrex"
|
||||
module_sprites["Standard"] = "robotJani"
|
||||
module_sprites["Standard"] = "Standard-Jani"
|
||||
module_sprites["Noble-CLN"] = "Noble-CLN"
|
||||
module_sprites["Cricket"] = "Cricket-JANI"
|
||||
|
||||
@@ -394,7 +395,6 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
if("Hunter")
|
||||
module = new /obj/item/robot_module/alien/hunter(src)
|
||||
icon = "icons/mob/alien.dmi"
|
||||
icon_state = "xenoborg-state-a"
|
||||
modtype = "Xeno-Hu"
|
||||
feedback_inc("xeborg_hunter",1)
|
||||
@@ -477,12 +477,8 @@ var/list/robot_verbs_default = list(
|
||||
return
|
||||
|
||||
var/datum/robot_component/C = components[toggle]
|
||||
if(C.toggled)
|
||||
C.toggled = 0
|
||||
to_chat(src, "<span class='warning'>You disable [C.name].</span>")
|
||||
else
|
||||
C.toggled = 1
|
||||
to_chat(src, "<span class='warning'>You enable [C.name].</span>")
|
||||
C.toggle()
|
||||
to_chat(src, "<span class='warning'>You [C.toggled ? "enable" : "disable"] [C.name].</span>")
|
||||
|
||||
/mob/living/silicon/robot/proc/sensor_mode()
|
||||
set name = "Set Sensor Augmentation"
|
||||
@@ -528,9 +524,8 @@ var/list/robot_verbs_default = list(
|
||||
thruster_button.icon_state = "ionpulse[ionpulse_on]"
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if(stat != 2)
|
||||
if(stat != DEAD)
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
else
|
||||
gib()
|
||||
@@ -573,7 +568,6 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj)
|
||||
..(Proj)
|
||||
updatehealth()
|
||||
if(prob(75) && Proj.damage > 0) spark_system.start()
|
||||
return 2
|
||||
|
||||
@@ -609,7 +603,6 @@ var/list/robot_verbs_default = list(
|
||||
if(WT.remove_fuel(0))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
adjustBruteLoss(-30)
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
user.visible_message("<span class='alert'>\The [user] patches some dents on \the [src] with \the [WT].</span>")
|
||||
else
|
||||
@@ -653,10 +646,13 @@ var/list/robot_verbs_default = list(
|
||||
var/datum/robot_component/C = components[V]
|
||||
if(C.installed == 1 || C.installed == -1)
|
||||
removable_components += V
|
||||
|
||||
if(module)
|
||||
removable_components += module.custom_removals
|
||||
var/remove = input(user, "Which component do you want to pry out?", "Remove Component") as null|anything in removable_components
|
||||
if(!remove)
|
||||
return
|
||||
if(module && module.handle_custom_removal(remove, user, W, params))
|
||||
return
|
||||
var/datum/robot_component/C = components[remove]
|
||||
var/obj/item/robot_parts/robot_component/I = C.wrapped
|
||||
to_chat(user, "You remove \the [I].")
|
||||
@@ -871,7 +867,10 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
overlays.Cut()
|
||||
if(stat != DEAD && !(paralysis || stunned || weakened || low_power_mode)) //Not dead, not stunned.
|
||||
overlays += "eyes-[icon_state]"
|
||||
if(custom_panel in custom_eye_names)
|
||||
overlays += "eyes-[custom_panel]"
|
||||
else
|
||||
overlays += "eyes-[icon_state]"
|
||||
else
|
||||
overlays -= "eyes"
|
||||
|
||||
@@ -1253,7 +1252,9 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/robot/adjustOxyLoss(var/amount)
|
||||
if(suiciding)
|
||||
..()
|
||||
return ..()
|
||||
else
|
||||
return STATUS_UPDATE_NONE
|
||||
|
||||
/mob/living/silicon/robot/regenerate_icons()
|
||||
..()
|
||||
@@ -1433,6 +1434,7 @@ var/list/robot_verbs_default = list(
|
||||
disable_component("comms", 160)
|
||||
if(2)
|
||||
disable_component("comms", 60)
|
||||
|
||||
/mob/living/silicon/robot/rejuvenate()
|
||||
..()
|
||||
var/brute = 1000
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
/mob/living/silicon/robot/updatehealth()
|
||||
/mob/living/silicon/robot/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss())
|
||||
if(stat == DEAD && health > 0)
|
||||
update_revive()
|
||||
var/mob/dead/observer/ghost = get_ghost()
|
||||
if(ghost)
|
||||
to_chat(ghost, "<span class='ghostalert'>Your cyborg shell has been repaired, re-enter if you want to continue!</span> (Verbs -> Ghost -> Re-enter corpse)")
|
||||
ghost << sound('sound/effects/genetics.ogg')
|
||||
return
|
||||
|
||||
update_stat("updatehealth([reason])")
|
||||
handle_hud_icons_health()
|
||||
diag_hud_set_health()
|
||||
|
||||
/mob/living/silicon/robot/getBruteLoss()
|
||||
var/amount = 0
|
||||
@@ -27,17 +22,19 @@
|
||||
if(C.installed != 0) amount += C.electronics_damage
|
||||
return amount
|
||||
|
||||
/mob/living/silicon/robot/adjustBruteLoss(var/amount)
|
||||
/mob/living/silicon/robot/adjustBruteLoss(amount, updating_health = TRUE)
|
||||
if(amount > 0)
|
||||
take_overall_damage(amount, 0)
|
||||
take_overall_damage(amount, 0, updating_health)
|
||||
else
|
||||
heal_overall_damage(-amount, 0)
|
||||
heal_overall_damage(-amount, 0, updating_health)
|
||||
return STATUS_UPDATE_HEALTH
|
||||
|
||||
/mob/living/silicon/robot/adjustFireLoss(var/amount)
|
||||
/mob/living/silicon/robot/adjustFireLoss(amount, updating_health = TRUE)
|
||||
if(amount > 0)
|
||||
take_overall_damage(0, amount)
|
||||
take_overall_damage(0, amount, updating_health)
|
||||
else
|
||||
heal_overall_damage(0, -amount)
|
||||
heal_overall_damage(0, -amount, updating_health)
|
||||
return STATUS_UPDATE_HEALTH
|
||||
|
||||
/mob/living/silicon/robot/proc/get_damaged_components(var/brute, var/burn, var/get_all)
|
||||
var/list/datum/robot_component/parts = list()
|
||||
@@ -62,13 +59,13 @@
|
||||
return C
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/heal_organ_damage(var/brute, var/burn)
|
||||
/mob/living/silicon/robot/heal_organ_damage(brute, burn, updating_health = TRUE)
|
||||
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
|
||||
if(!parts.len) return
|
||||
var/datum/robot_component/picked = pick(parts)
|
||||
picked.heal_damage(brute,burn)
|
||||
picked.heal_damage(brute,burn, updating_health)
|
||||
|
||||
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/edge = 0)
|
||||
/mob/living/silicon/robot/take_organ_damage(brute = 0, burn = 0, updating_health = TRUE, sharp = 0, edge = 0)
|
||||
var/list/components = get_damageable_components()
|
||||
if(!components.len)
|
||||
return
|
||||
@@ -98,13 +95,13 @@
|
||||
|
||||
var/datum/robot_component/armour/A = get_armour()
|
||||
if(A)
|
||||
A.take_damage(brute, burn, sharp)
|
||||
A.take_damage(brute, burn, sharp, updating_health)
|
||||
return
|
||||
|
||||
var/datum/robot_component/C = pick(components)
|
||||
C.take_damage(brute, burn, sharp)
|
||||
C.take_damage(brute, burn, sharp, updating_health)
|
||||
|
||||
/mob/living/silicon/robot/heal_overall_damage(var/brute, var/burn)
|
||||
/mob/living/silicon/robot/heal_overall_damage(var/brute, var/burn, updating_health = TRUE)
|
||||
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
|
||||
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
@@ -113,14 +110,14 @@
|
||||
var/brute_was = picked.brute_damage
|
||||
var/burn_was = picked.electronics_damage
|
||||
|
||||
picked.heal_damage(brute,burn)
|
||||
picked.heal_damage(brute,burn, updating_health)
|
||||
|
||||
brute -= (brute_was-picked.brute_damage)
|
||||
burn -= (burn_was-picked.electronics_damage)
|
||||
|
||||
parts -= picked
|
||||
|
||||
/mob/living/silicon/robot/take_overall_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/used_weapon = null)
|
||||
/mob/living/silicon/robot/take_overall_damage(brute = 0, burn = 0, updating_health = TRUE, used_weapon = null, sharp = 0)
|
||||
if(status_flags & GODMODE) return //godmode
|
||||
var/list/datum/robot_component/parts = get_damageable_components()
|
||||
|
||||
@@ -158,9 +155,10 @@
|
||||
var/brute_was = picked.brute_damage
|
||||
var/burn_was = picked.electronics_damage
|
||||
|
||||
picked.take_damage(brute, burn)
|
||||
picked.take_damage(brute, burn, sharp, FALSE)
|
||||
|
||||
brute -= (picked.brute_damage - brute_was)
|
||||
burn -= (picked.electronics_damage - burn_was)
|
||||
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
damage = rand(5, 35)
|
||||
damage = round(damage / 2) // borgs recieve half damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user)
|
||||
@@ -47,7 +46,7 @@
|
||||
user.put_in_active_hand(cell)
|
||||
to_chat(user, "<span class='notice'>You remove \the [cell].</span>")
|
||||
cell = null
|
||||
update_icons()
|
||||
update_stat()
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
if(!opened)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
var/list/stacktypes
|
||||
var/channels = list()
|
||||
var/list/custom_removals = list()
|
||||
|
||||
|
||||
/obj/item/robot_module/emp_act(severity)
|
||||
@@ -39,10 +40,10 @@
|
||||
/obj/item/robot_module/proc/fix_modules()
|
||||
for(var/obj/item/I in modules)
|
||||
I.flags |= NODROP
|
||||
I.mouse_opacity = 2
|
||||
I.mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
if(emag)
|
||||
emag.flags |= NODROP
|
||||
emag.mouse_opacity = 2
|
||||
emag.mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
|
||||
/obj/item/robot_module/proc/respawn_consumable(mob/living/silicon/robot/R)
|
||||
if(!stacktypes || !stacktypes.len)
|
||||
@@ -103,6 +104,13 @@
|
||||
qdel(A)
|
||||
R.module_actions.Cut()
|
||||
|
||||
// Return true in an overridden subtype to prevent normal removal handling
|
||||
/obj/item/robot_module/proc/handle_custom_removal(component_id, mob/living/user, obj/item/W, params)
|
||||
return FALSE
|
||||
|
||||
/obj/item/robot_module/proc/handle_death(gibbed)
|
||||
return
|
||||
|
||||
/obj/item/robot_module/standard
|
||||
name = "standard robot module"
|
||||
module_type = "Standard"
|
||||
@@ -212,6 +220,11 @@
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/robot_module/engineering/handle_death()
|
||||
var/obj/item/gripper/G = locate(/obj/item/gripper) in modules
|
||||
if(G)
|
||||
G.drop_item()
|
||||
|
||||
/obj/item/robot_module/security
|
||||
name = "security robot module"
|
||||
module_type = "Security"
|
||||
@@ -325,6 +338,7 @@
|
||||
module_actions = list(
|
||||
/datum/action/innate/robot_sight/meson,
|
||||
)
|
||||
custom_removals = list("KA modkits")
|
||||
|
||||
/obj/item/robot_module/miner/New()
|
||||
..()
|
||||
@@ -341,6 +355,13 @@
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/robot_module/miner/handle_custom_removal(component_id, mob/living/user, obj/item/W, params)
|
||||
if(component_id == "KA modkits")
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/D in src)
|
||||
D.attackby(W, user, params)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/robot_module/deathsquad
|
||||
name = "NT advanced combat module"
|
||||
module_type = "Malf"
|
||||
@@ -517,6 +538,12 @@
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/robot_module/drone/handle_death()
|
||||
var/obj/item/gripper/G = locate(/obj/item/gripper) in modules
|
||||
if(G)
|
||||
G.drop_item()
|
||||
|
||||
//checks whether this item is a module of the robot it is located in.
|
||||
/obj/item/proc/is_robot_module()
|
||||
if(!istype(loc, /mob/living/silicon/robot))
|
||||
|
||||
@@ -3,19 +3,38 @@
|
||||
if(stat || lockcharge || weakened || stunned || paralysis || !is_component_functioning("actuator"))
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/update_stat()
|
||||
/mob/living/silicon/robot/has_vision(information_only = FALSE)
|
||||
return ..(information_only) && ((stat == DEAD && information_only) || is_component_functioning("camera"))
|
||||
|
||||
/mob/living/silicon/robot/update_stat(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
if(health <= -maxHealth) //die only once
|
||||
death()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
return
|
||||
if(!is_component_functioning("actuator") || paralysis || sleeping || stunned || weakened || getOxyLoss() > maxHealth * 0.5)
|
||||
if(!is_component_functioning("actuator") || !is_component_functioning("power cell") || paralysis || sleeping || resting || stunned || weakened || getOxyLoss() > maxHealth * 0.5)
|
||||
if(stat == CONSCIOUS)
|
||||
KnockOut()
|
||||
create_debug_log("fell unconscious, trigger reason: [reason]")
|
||||
else
|
||||
if(stat == UNCONSCIOUS)
|
||||
WakeUp()
|
||||
create_debug_log("woke up, trigger reason: [reason]")
|
||||
else
|
||||
if(health > 0)
|
||||
update_revive()
|
||||
var/mob/dead/observer/ghost = get_ghost()
|
||||
if(ghost)
|
||||
to_chat(ghost, "<span class='ghostalert'>Your cyborg shell has been repaired, re-enter if you want to continue!</span> (Verbs -> Ghost -> Re-enter corpse)")
|
||||
ghost << sound('sound/effects/genetics.ogg')
|
||||
create_attack_log("revived, trigger reason: [reason]")
|
||||
// diag_hud_set_status()
|
||||
// diag_hud_set_health()
|
||||
// update_health_hud()
|
||||
|
||||
/mob/living/silicon/robot/update_revive(updating = TRUE)
|
||||
. = ..(updating)
|
||||
if(.)
|
||||
update_icons()
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
/mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios)
|
||||
log_say(message, src)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios)
|
||||
if(..())
|
||||
return 1
|
||||
used_radios += radio
|
||||
if(message_mode)
|
||||
used_radios += radio
|
||||
if(!is_component_functioning("radio"))
|
||||
to_chat(src, "<span class='warning'>Your radio isn't functional at this time.</span>")
|
||||
return 0
|
||||
@@ -15,13 +15,14 @@
|
||||
message_mode = null
|
||||
return radio.talk_into(src,message,message_mode,verb,speaking)
|
||||
|
||||
/mob/living/silicon/ai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
/mob/living/silicon/ai/handle_message_mode(message_mode, message, verb, speaking, used_radios)
|
||||
if(..())
|
||||
return 1
|
||||
used_radios += aiRadio
|
||||
if(message_mode == "department")
|
||||
used_radios += aiRadio
|
||||
return holopad_talk(message, verb, speaking)
|
||||
else if(message_mode)
|
||||
used_radios += aiRadio
|
||||
if(aiRadio.disabledAi || aiRestorePowerRoutine || stat)
|
||||
to_chat(src, "<span class='danger'>System Error - Transceiver Disabled.</span>")
|
||||
return 0
|
||||
@@ -29,11 +30,11 @@
|
||||
message_mode = null
|
||||
return aiRadio.talk_into(src,message,message_mode,verb,speaking)
|
||||
|
||||
/mob/living/silicon/pai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
/mob/living/silicon/pai/handle_message_mode(message_mode, message, verb, speaking, used_radios)
|
||||
if(..())
|
||||
return 1
|
||||
else if(message_mode == "whisper")
|
||||
whisper_say(message, speaking, alt_name)
|
||||
whisper_say(message, speaking)
|
||||
return 1
|
||||
else if(message_mode)
|
||||
if(message_mode == "general")
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])")
|
||||
|
||||
/mob/living/silicon/adjustToxLoss(var/amount)
|
||||
return
|
||||
return STATUS_UPDATE_NONE
|
||||
|
||||
/mob/living/silicon/get_access()
|
||||
return IGNORE_ACCESS //silicons always have access
|
||||
|
||||
@@ -202,8 +202,11 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/death(gibbed)
|
||||
// Only execute the below if we successfully died
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
explode()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/proc/explode()
|
||||
qdel(src)
|
||||
@@ -242,8 +245,8 @@
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
return ..(amount)
|
||||
|
||||
/mob/living/simple_animal/bot/updatehealth()
|
||||
..()
|
||||
/mob/living/simple_animal/bot/updatehealth(reason = "none given")
|
||||
..(reason)
|
||||
diag_hud_set_bothealth()
|
||||
|
||||
/mob/living/simple_animal/bot/handle_automated_action()
|
||||
@@ -889,7 +892,7 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
|
||||
// Machinery to simplify topic and access calls
|
||||
/obj/machinery/bot_core
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
var/mob/living/simple_animal/bot/owner = null
|
||||
|
||||
/obj/machinery/bot_core/New(loc)
|
||||
@@ -1106,4 +1109,4 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
var/image/I = path[path[1]]
|
||||
if(I)
|
||||
I.icon = null
|
||||
path.Cut(1, 2)
|
||||
path.Cut(1, 2)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
icon_state = "ed209_frame"
|
||||
item_state = "ed209_frame"
|
||||
var/build_step = 0
|
||||
var/created_name = "ED-209 Security Robot" //To preserve the name if it's a unique securitron I guess
|
||||
var/created_name = "\improper ED-209 Security Robot" //To preserve the name if it's a unique securitron I guess
|
||||
var/lasercolor = ""
|
||||
|
||||
/obj/item/ed209_assembly/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/examinate(atom/A as mob|obj|turf in view())
|
||||
..()
|
||||
if(!is_blind(src))
|
||||
if(has_vision(information_only=TRUE))
|
||||
chemscan(src, A)
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/proc/medicate_patient(mob/living/carbon/C)
|
||||
|
||||
@@ -694,7 +694,7 @@
|
||||
/mob/living/simple_animal/bot/mulebot/proc/RunOver(mob/living/carbon/human/H)
|
||||
add_attack_logs(src, H, "Run over (DAMTYPE: [uppertext(BRUTE)])")
|
||||
H.visible_message("<span class='danger'>[src] drives over [H]!</span>", \
|
||||
"<span class='userdanger'>[src] drives over you!<span>")
|
||||
"<span class='userdanger'>[src] drives over you!</span>")
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/damage = rand(5,15)
|
||||
@@ -706,10 +706,14 @@
|
||||
H.apply_damage(0.5*damage, BRUTE, "r_arm", run_armor_check("r_arm", "melee"))
|
||||
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
H.add_mob_blood(H)
|
||||
H.add_splatter_floor(T)
|
||||
|
||||
|
||||
if(NO_BLOOD in H.dna.species.species_traits)//Does the run over mob have blood?
|
||||
return//If it doesn't it shouldn't bleed (Though a check should be made eventually for things with liquid in them, like slime people, vox armalis, etc.)
|
||||
|
||||
var/turf/T = get_turf(src)//Where are we?
|
||||
H.add_mob_blood(H)//Cover the victim in their own blood.
|
||||
H.add_splatter_floor(T)//Put the blood where we are.
|
||||
bloodiness += 4
|
||||
|
||||
var/list/blood_dna = H.get_blood_dna_list()
|
||||
|
||||
@@ -175,7 +175,7 @@ Auto Patrol: []"},
|
||||
mode = BOT_HUNT
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == INTENT_HARM)
|
||||
if(H.a_intent == INTENT_HARM || H.a_intent == INTENT_DISARM)
|
||||
retaliate(H)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1,162 +1,115 @@
|
||||
//Meant for simple animals to drop lootable human bodies.
|
||||
|
||||
//If someone can do this in a neater way, be my guest-Kor
|
||||
|
||||
//This has to be seperate from the Away Mission corpses, because New() doesn't work for those, and initialize() doesn't work for these.
|
||||
|
||||
//To do: Allow corpses to appear mangled, bloody, etc. Allow customizing the bodies appearance (they're all bald and white right now).
|
||||
|
||||
|
||||
/obj/effect/landmark/mobcorpse
|
||||
name = "Unknown"
|
||||
var/mobname = "Unknown" //Unused now but it'd fuck up maps to remove it now
|
||||
var/corpseuniform = null //Set this to an object path to have the slot filled with said object on the corpse.
|
||||
var/corpsesuit = null
|
||||
var/corpseshoes = null
|
||||
var/corpsegloves = null
|
||||
var/corpseradio = null
|
||||
var/corpseglasses = null
|
||||
var/corpsemask = null
|
||||
var/corpsehelmet = null
|
||||
var/corpsebelt = null
|
||||
var/corpsepocket1 = null
|
||||
var/corpsepocket2 = null
|
||||
var/corpseback = null
|
||||
var/corpseid = 0 //Just set to 1 if you want them to have an ID
|
||||
var/corpseidjob = null // Needs to be in quotes, such as "Clown" or "Chef." This just determines what the ID reads as, not their access
|
||||
var/corpseidaccess = null //This is for access. See access.dm for which jobs give what access. Again, put in quotes. Use "Captain" if you want it to be all access.
|
||||
var/corpseidicon = null //For setting it to be a gold, silver, centcomm etc ID
|
||||
|
||||
/obj/effect/landmark/mobcorpse/New()
|
||||
createCorpse()
|
||||
|
||||
/obj/effect/landmark/mobcorpse/proc/createCorpse() //Creates a mob and checks for gear in each slot before attempting to equip it.
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human (src.loc)
|
||||
M.real_name = src.name
|
||||
M.stat = 2 //Kills the new mob
|
||||
if(src.corpseuniform)
|
||||
M.equip_to_slot_or_del(new src.corpseuniform(M), slot_w_uniform)
|
||||
if(src.corpsesuit)
|
||||
M.equip_to_slot_or_del(new src.corpsesuit(M), slot_wear_suit)
|
||||
if(src.corpseshoes)
|
||||
M.equip_to_slot_or_del(new src.corpseshoes(M), slot_shoes)
|
||||
if(src.corpsegloves)
|
||||
M.equip_to_slot_or_del(new src.corpsegloves(M), slot_gloves)
|
||||
if(src.corpseradio)
|
||||
M.equip_to_slot_or_del(new src.corpseradio(M), slot_l_ear)
|
||||
if(src.corpseglasses)
|
||||
M.equip_to_slot_or_del(new src.corpseglasses(M), slot_glasses)
|
||||
if(src.corpsemask)
|
||||
M.equip_to_slot_or_del(new src.corpsemask(M), slot_wear_mask)
|
||||
if(src.corpsehelmet)
|
||||
M.equip_to_slot_or_del(new src.corpsehelmet(M), slot_head)
|
||||
if(src.corpsebelt)
|
||||
M.equip_to_slot_or_del(new src.corpsebelt(M), slot_belt)
|
||||
if(src.corpsepocket1)
|
||||
M.equip_to_slot_or_del(new src.corpsepocket1(M), slot_r_store)
|
||||
if(src.corpsepocket2)
|
||||
M.equip_to_slot_or_del(new src.corpsepocket2(M), slot_l_store)
|
||||
if(src.corpseback)
|
||||
M.equip_to_slot_or_del(new src.corpseback(M), slot_back)
|
||||
if(src.corpseid == 1)
|
||||
var/obj/item/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
var/datum/job/jobdatum
|
||||
for(var/jobtype in typesof(/datum/job))
|
||||
var/datum/job/J = new jobtype
|
||||
if(J.title == corpseidaccess)
|
||||
jobdatum = J
|
||||
break
|
||||
if(src.corpseidicon)
|
||||
W.icon_state = corpseidicon
|
||||
if(src.corpseidaccess)
|
||||
if(jobdatum)
|
||||
W.access = jobdatum.get_access()
|
||||
else
|
||||
W.access = list()
|
||||
if(corpseidjob)
|
||||
W.assignment = corpseidjob
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
//List of different corpse types
|
||||
|
||||
/obj/effect/landmark/mobcorpse/syndicatesoldier
|
||||
/obj/effect/mob_spawn/human/corpse/syndicatesoldier
|
||||
name = "Syndicate Operative"
|
||||
corpseuniform = /obj/item/clothing/under/syndicate
|
||||
corpsesuit = /obj/item/clothing/suit/armor/vest
|
||||
corpseshoes = /obj/item/clothing/shoes/combat
|
||||
corpsegloves = /obj/item/clothing/gloves/combat
|
||||
corpseradio = /obj/item/radio/headset
|
||||
corpsemask = /obj/item/clothing/mask/gas
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/swat
|
||||
corpseback = /obj/item/storage/backpack
|
||||
corpseid = 1
|
||||
corpseidjob = "Operative"
|
||||
corpseidaccess = "Syndicate"
|
||||
mob_name = "Syndicate Operative"
|
||||
hair_style = "bald"
|
||||
facial_hair_style = "shaved"
|
||||
id_job = "Operative"
|
||||
id_access_list = list(access_syndicate)
|
||||
outfit = /datum/outfit/syndicatesoldiercorpse
|
||||
|
||||
/datum/outfit/syndicatesoldiercorpse
|
||||
name = "Syndicate Operative Corpse"
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
suit = /obj/item/clothing/suit/armor/vest
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
l_ear = /obj/item/radio/headset
|
||||
mask = /obj/item/clothing/mask/gas
|
||||
head = /obj/item/clothing/head/helmet/swat
|
||||
back = /obj/item/storage/backpack
|
||||
id = /obj/item/card/id
|
||||
|
||||
|
||||
|
||||
/obj/effect/landmark/mobcorpse/syndicatecommando
|
||||
/obj/effect/mob_spawn/human/corpse/syndicatecommando
|
||||
name = "Syndicate Commando"
|
||||
corpseuniform = /obj/item/clothing/under/syndicate
|
||||
corpsesuit = /obj/item/clothing/suit/space/hardsuit/syndi
|
||||
corpseshoes = /obj/item/clothing/shoes/combat
|
||||
corpsegloves = /obj/item/clothing/gloves/combat
|
||||
corpseradio = /obj/item/radio/headset
|
||||
corpsemask = /obj/item/clothing/mask/gas/syndicate
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/hardsuit/syndi
|
||||
corpseback = /obj/item/tank/jetpack/oxygen
|
||||
corpsepocket1 = /obj/item/tank/emergency_oxygen
|
||||
corpseid = 1
|
||||
corpseidjob = "Operative"
|
||||
corpseidaccess = "Syndicate"
|
||||
mob_name = "Syndicate Commando"
|
||||
hair_style = "bald"
|
||||
facial_hair_style = "shaved"
|
||||
id_job = "Operative"
|
||||
id_access_list = list(access_syndicate)
|
||||
outfit = /datum/outfit/syndicatecommandocorpse
|
||||
|
||||
/obj/effect/landmark/mobcorpse/syndicateautogib/createCorpse()
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(loc)
|
||||
M.real_name = src.name
|
||||
M.gib()
|
||||
qdel(src)
|
||||
/datum/outfit/syndicatecommandocorpse
|
||||
name = "Syndicate Commando Corpse"
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
l_ear = /obj/item/radio/headset
|
||||
mask = /obj/item/clothing/mask/gas/syndicate
|
||||
back = /obj/item/tank/jetpack/oxygen
|
||||
r_pocket = /obj/item/tank/emergency_oxygen
|
||||
id = /obj/item/card/id
|
||||
|
||||
|
||||
/obj/effect/landmark/mobcorpse/clown
|
||||
name = "Clown"
|
||||
corpseuniform = /obj/item/clothing/under/rank/clown
|
||||
corpseshoes = /obj/item/clothing/shoes/clown_shoes
|
||||
corpseradio = /obj/item/radio/headset
|
||||
corpsemask = /obj/item/clothing/mask/gas/clown_hat
|
||||
corpsepocket1 = /obj/item/bikehorn
|
||||
corpseback = /obj/item/storage/backpack/clown
|
||||
corpseid = 1
|
||||
corpseidjob = "Clown"
|
||||
corpseidaccess = "Clown"
|
||||
/obj/effect/mob_spawn/human/clown/corpse
|
||||
roundstart = TRUE
|
||||
instant = TRUE
|
||||
|
||||
/obj/effect/mob_spawn/human/mime/corpse
|
||||
roundstart = TRUE
|
||||
instant = TRUE
|
||||
|
||||
|
||||
/obj/effect/landmark/mobcorpse/pirate
|
||||
/obj/effect/mob_spawn/human/corpse/pirate
|
||||
name = "Pirate"
|
||||
corpseuniform = /obj/item/clothing/under/pirate
|
||||
corpseshoes = /obj/item/clothing/shoes/jackboots
|
||||
corpseglasses = /obj/item/clothing/glasses/eyepatch
|
||||
corpsehelmet = /obj/item/clothing/head/bandana
|
||||
mob_name = "Pirate"
|
||||
hair_style = "bald"
|
||||
facial_hair_style = "shaved"
|
||||
outfit = /datum/outfit/piratecorpse
|
||||
|
||||
/datum/outfit/piratecorpse
|
||||
name = "Pirate Corpse"
|
||||
uniform = /obj/item/clothing/under/pirate
|
||||
shoes = /obj/item/clothing/shoes/jackboots
|
||||
glasses = /obj/item/clothing/glasses/eyepatch
|
||||
head = /obj/item/clothing/head/bandana
|
||||
|
||||
|
||||
|
||||
/obj/effect/landmark/mobcorpse/pirate/ranged
|
||||
/obj/effect/mob_spawn/human/corpse/pirate/ranged
|
||||
name = "Pirate Gunner"
|
||||
corpsesuit = /obj/item/clothing/suit/pirate_black
|
||||
corpsehelmet = /obj/item/clothing/head/pirate
|
||||
mob_name = "Pirate Gunner"
|
||||
outfit = /datum/outfit/piratecorpse/ranged
|
||||
|
||||
/datum/outfit/piratecorpse/ranged
|
||||
name = "Pirate Gunner Corpse"
|
||||
suit = /obj/item/clothing/suit/pirate_black
|
||||
head = /obj/item/clothing/head/pirate
|
||||
|
||||
|
||||
|
||||
/obj/effect/landmark/mobcorpse/russian
|
||||
/obj/effect/mob_spawn/human/corpse/russian
|
||||
name = "Russian"
|
||||
corpseuniform = /obj/item/clothing/under/soviet
|
||||
corpseshoes = /obj/item/clothing/shoes/jackboots
|
||||
corpsehelmet = /obj/item/clothing/head/bearpelt
|
||||
mob_name = "Russian"
|
||||
hair_style = "bald"
|
||||
facial_hair_style = "shaved"
|
||||
outfit = /datum/outfit/russiancorpse
|
||||
|
||||
/obj/effect/landmark/mobcorpse/russian/ranged
|
||||
corpsehelmet = /obj/item/clothing/head/ushanka
|
||||
/datum/outfit/russiancorpse
|
||||
name = "Russian Corpse"
|
||||
uniform = /obj/item/clothing/under/soviet
|
||||
shoes = /obj/item/clothing/shoes/jackboots
|
||||
head = /obj/item/clothing/head/bearpelt
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/russian/ranged
|
||||
outfit = /datum/outfit/russiancorpse/ranged
|
||||
|
||||
/datum/outfit/russiancorpse/ranged
|
||||
name = "Ranged Russian Corpse"
|
||||
head = /obj/item/clothing/head/ushanka
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/wizard
|
||||
name = "Space Wizard Corpse"
|
||||
outfit = /datum/outfit/wizardcorpse
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/clownoff/Initialize()
|
||||
mob_name = "[pick(wizard_first)], [pick(wizard_second)]"
|
||||
..()
|
||||
|
||||
/datum/outfit/wizardcorpse
|
||||
name = "Space Wizard Corpse"
|
||||
uniform = /obj/item/clothing/under/color/lightpurple
|
||||
suit = /obj/item/clothing/suit/wizrobe
|
||||
shoes = /obj/item/clothing/shoes/sandal
|
||||
head = /obj/item/clothing/head/wizard
|
||||
@@ -60,9 +60,9 @@
|
||||
return baby
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/death()
|
||||
if(!memory_saved)
|
||||
if(can_die() && !memory_saved)
|
||||
Write_Memory(1)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/proc/Read_Memory()
|
||||
var/savefile/S = new /savefile("data/npc_saves/Runtime.sav")
|
||||
@@ -176,4 +176,4 @@
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
melee_damage_upper = 15
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
loot = list(/obj/effect/decal/cleanable/deadcockroach)
|
||||
del_on_death = 1
|
||||
|
||||
/mob/living/simple_animal/cockroach/death(gibbed)
|
||||
if(ticker.cinematic) //If the nuke is going off, then cockroaches are invincible. Keeps the nuke from killing them, cause cockroaches are immune to nukes.
|
||||
return
|
||||
..()
|
||||
/mob/living/simple_animal/cockroach/can_die()
|
||||
return ..() && !ticker.cinematic //If the nuke is going off, then cockroaches are invincible. Keeps the nuke from killing them, cause cockroaches are immune to nukes.
|
||||
|
||||
/mob/living/simple_animal/cockroach/Crossed(var/atom/movable/AM)
|
||||
if(isliving(AM))
|
||||
@@ -48,4 +46,4 @@
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
anchored = 1
|
||||
anchored = 1
|
||||
|
||||
@@ -41,14 +41,6 @@
|
||||
. = ..()
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/pet/corgi/death(gibbed)
|
||||
..()
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/pet/corgi/revive()
|
||||
..()
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/pet/corgi/show_inv(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
if(user.stat) return
|
||||
@@ -78,7 +70,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] is wearing too much armor! You can't cause [p_them()] any damage.</span>")
|
||||
visible_message("<span class='danger'> [user] hits [src] with [O], however [src] is too armored.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is wearing too much armor! You can't reach [p_their()] skin.<span>")
|
||||
to_chat(user, "<span class='warning'>[src] is wearing too much armor! You can't reach [p_their()] skin.</span>")
|
||||
visible_message("[user] gently taps [src] with [O].")
|
||||
if(health>0 && prob(15))
|
||||
custom_emote(1, "looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression.")
|
||||
@@ -626,7 +618,10 @@
|
||||
s.start()
|
||||
|
||||
/mob/living/simple_animal/pet/corgi/Ian/borgi/death(gibbed)
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
..()
|
||||
|
||||
@@ -2,8 +2,5 @@
|
||||
set name = "Chase your tail"
|
||||
set desc = "d'awwww."
|
||||
set category = "Corgi"
|
||||
to_chat(src, text("[pick("You dance around","You chase your tail")]."))
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
to_chat(O, text("[] [pick("dances around","chases its tail")].", src))
|
||||
spin(20, 1)
|
||||
visible_message("[src] [pick("dances around","chases [p_their()] tail")].","[pick("You dance around","You chase your tail")].")
|
||||
spin(20, 1)
|
||||
|
||||
@@ -67,22 +67,15 @@
|
||||
MED.amount -= 1
|
||||
if(MED.amount <= 0)
|
||||
qdel(MED)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='notice'>[user] applies the [MED] on [src]</span>")
|
||||
user.visible_message("<span class='notice'>[user] applies the [MED] on [src]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>this [src] is dead, medical items won't bring it back to life.</span>")
|
||||
else
|
||||
if(O.force)
|
||||
health -= O.force
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
|
||||
visible_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This weapon is ineffective, it does no damage.</span>")
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='warning'>[user] gently taps [src] with the [O]. </span>")
|
||||
user.visible_message("<span class='warning'>[user] gently taps [src] with the [O]. </span>","<span class='warning'>This weapon is ineffective, it does no damage.</span>")
|
||||
|
||||
/mob/living/simple_animal/crab/Topic(href, href_list)
|
||||
if(usr.stat) return
|
||||
|
||||
@@ -250,7 +250,10 @@ var/global/chicken_count = 0
|
||||
chicken_count += 1
|
||||
|
||||
/mob/living/simple_animal/chicken/death(gibbed)
|
||||
..(gibbed)
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return
|
||||
chicken_count -= 1
|
||||
|
||||
/mob/living/simple_animal/chicken/attackby(obj/item/O, mob/user, params)
|
||||
|
||||
@@ -117,10 +117,13 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/mouse/death(gibbed)
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
layer = MOB_LAYER
|
||||
if(client)
|
||||
client.time_died_as_mouse = world.time
|
||||
..()
|
||||
|
||||
/*
|
||||
* Mouse types
|
||||
@@ -146,3 +149,55 @@
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "splats"
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
|
||||
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
|
||||
var/cycles_alive = 0
|
||||
var/cycles_limit = 30
|
||||
var/has_burst = FALSE
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected/Life()
|
||||
cycles_alive++
|
||||
var/timeleft = (cycles_limit - cycles_alive) * 2
|
||||
if(ismob(loc)) // if someone ate it, burst immediately
|
||||
burst(FALSE)
|
||||
else if(timeleft < 1) // if timer expired, burst.
|
||||
burst(FALSE)
|
||||
else if(cycles_alive % 2 == 0) // give the mouse/player a countdown reminder every 2 cycles
|
||||
to_chat(src, "<span class='warning'>[timeleft] seconds until you burst, and become a blob...</span>")
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected/death(gibbed)
|
||||
burst(gibbed)
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected/proc/burst(gibbed)
|
||||
if(has_burst)
|
||||
return FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
if(!is_station_level(T.z) || isspaceturf(T))
|
||||
to_chat(src, "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>")
|
||||
return FALSE
|
||||
has_burst = TRUE
|
||||
var/datum/mind/blobmind = mind
|
||||
var/client/C = client
|
||||
if(istype(blobmind) && istype(C))
|
||||
blobmind.special_role = SPECIAL_ROLE_BLOB
|
||||
var/obj/structure/blob/core/core = new(T, 200, C, 3)
|
||||
core.lateblobtimer()
|
||||
else
|
||||
new /obj/structure/blob/core(T) // Ghosts will be prompted to control it.
|
||||
if(ismob(loc)) // in case some taj/etc ate the mouse.
|
||||
var/mob/M = loc
|
||||
M.gib()
|
||||
if(!gibbed)
|
||||
gib()
|
||||
|
||||
/mob/living/simple_animal/mouse/blobinfected/get_scooped(mob/living/carbon/grabber)
|
||||
to_chat(grabber, "<span class='warning'>You try to pick up [src], but they slip out of your grasp!</span>")
|
||||
to_chat(src, "<span class='warning'>[src] tries to pick you up, but you wriggle free of their grasp!</span>")
|
||||
@@ -31,7 +31,7 @@
|
||||
move_to_delay = 0
|
||||
obj_damage = 0
|
||||
environment_smash = 0
|
||||
mouse_opacity = 2
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
|
||||
flying = 1
|
||||
search_objects = 1 //have to find those plant trays!
|
||||
|
||||
@@ -48,10 +48,13 @@
|
||||
ranged = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/death(gibbed)
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/tele//this still needs work
|
||||
name = "Beacon"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user