First wave

This commit is contained in:
DGamerL
2024-07-06 02:03:38 +02:00
parent 06a52c5eac
commit eabfc41287
31 changed files with 51 additions and 51 deletions
@@ -23,7 +23,7 @@
to_chat(src, "<span class='danger'>You're too far from [A] to disguise it as a bomb.</span>")
return
if(isobj(A) && can_plant(A))
if(bomb_cooldown <= world.time && !stat)
if(bomb_cooldown <= world.time && stat == CONSCIOUS)
var/obj/item/guardian_bomb/B = new /obj/item/guardian_bomb(get_turf(A))
add_attack_logs(src, A, "booby trapped (summoner: [summoner])")
to_chat(src, "<span class='danger'>Success! Bomb on [A] armed!</span>")
@@ -63,7 +63,7 @@
if(toggle == HEALING)
if(iscarbon(target))
changeNext_move(1.5 SECONDS)
if(heal_cooldown <= world.time && !stat)
if(heal_cooldown <= world.time && stat == CONSCIOUS)
var/mob/living/carbon/human/C = target
C.adjustBruteLoss(-5, robotic=1)
C.adjustFireLoss(-5, robotic=1)
@@ -78,7 +78,7 @@
if(!iscarbon(target))
return
var/mob/living/carbon/human/C = target
if(surgical_cooldown <= world.time && !stat)
if(surgical_cooldown <= world.time && stat == CONSCIOUS)
to_chat(src, "<span class='notice'>You begin to do a mass repair on [C], keep them still!</span>")
surgical_cooldown = world.time + 10 SECONDS
if(!do_after_once(src, 10 SECONDS, target = src))
+3 -3
View File
@@ -614,7 +614,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
if("closing")
update_icon(AIRLOCK_CLOSING)
if("deny")
if(!stat)
if(stat == CONSCIOUS)
update_icon(AIRLOCK_DENY)
playsound(src,doorDeni,50,0,3)
sleep(6)
@@ -1490,7 +1490,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
/obj/machinery/door/airlock/hostile_lockdown(mob/origin)
// Must be powered and have working AI wire.
if(canAIControl(src) && !stat)
if(canAIControl(src) && stat == CONSCIOUS)
locked = FALSE //For airlocks that were bolted open.
safe = FALSE //DOOR CRUSH
close()
@@ -1501,7 +1501,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
/obj/machinery/door/airlock/disable_lockdown()
// Must be powered and have working AI wire.
if(canAIControl(src) && !stat)
if(canAIControl(src) && stat == CONSCIOUS)
unlock()
electrified_until = 0
open()
+5 -5
View File
@@ -350,7 +350,7 @@
else
flick("doorc1", src)
if("deny")
if(!stat)
if(stat == CONSCIOUS)
flick("door_deny", src)
/obj/machinery/door/proc/open()
@@ -495,11 +495,11 @@
return
/obj/machinery/door/proc/hostile_lockdown(mob/origin)
if(!stat) //So that only powered doors are closed.
if(stat == CONSCIOUS) //So that only powered doors are closed.
close() //Close ALL the doors!
/obj/machinery/door/proc/disable_lockdown()
if(!stat) //Opens only powered doors.
if(stat == CONSCIOUS) //Opens only powered doors.
open() //Open everything!
/obj/machinery/door/GetExplosionBlock()
@@ -537,9 +537,9 @@
/obj/machinery/door/proc/update_bounds()
if(width <= 1)
return
QDEL_LIST_CONTENTS(fillers)
if(dir in list(EAST, WEST))
bound_width = width * world.icon_size
bound_height = world.icon_size
+1 -1
View File
@@ -522,7 +522,7 @@
return
/obj/machinery/emp_act(severity)
if(power_state && !stat)
if(power_state && stat == CONSCIOUS)
use_power(7500/severity)
. = TRUE
..()
@@ -24,7 +24,7 @@
/mob/living/carbon/update_stamina()
var/stam = getStaminaLoss()
if(stam > DAMAGE_PRECISION && (maxHealth - stam) <= HEALTH_THRESHOLD_CRIT && !stat)
if(stam > DAMAGE_PRECISION && (maxHealth - stam) <= HEALTH_THRESHOLD_CRIT && stat == CONSCIOUS)
enter_stamcrit()
else if(stam_paralyzed)
SEND_SIGNAL(src, COMSIG_CARBON_EXIT_STAMINACRIT)
@@ -531,7 +531,7 @@ emp_act
if(get_dist(H, src) <= 1) //people with TK won't get smeared with blood
H.add_mob_blood(src)
if(!stat)
if(stat == CONSCIOUS)
switch(hit_area)
if("head")//Harder to score a stun but if you do it lasts a bit longer
if(stat == CONSCIOUS && armor < 50)
@@ -691,7 +691,7 @@
/mob/living/carbon/human/handle_random_events()
// Puke if toxloss is too high
if(!stat)
if(stat == CONSCIOUS)
if(getToxLoss() >= 45 && nutrition > 20)
lastpuke ++
if(lastpuke >= 25) // about 25 second delay I guess
@@ -764,7 +764,7 @@
if(reagents.has_reagent("formaldehyde")) //embalming fluid stops decay
return
if(decaytime <= 8 MINUTES)
if(decaytime <= 8 MINUTES)
return
if(decaytime > 8 MINUTES)
@@ -14,7 +14,6 @@
var/maxHealth = 100 //Maximum health that should be possible.
var/health = 100 //A mob's health
//Damage related vars, NOTE: THESE SHOULD ONLY BE MODIFIED BY PROCS
var/bruteloss = 0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage)
var/oxyloss = 0 //Oxygen depravation damage (no air in lungs)
@@ -121,7 +121,7 @@
collar_type = "[initial(collar_type)]_sit"
/mob/living/simple_animal/pet/cat/handle_automated_action()
if(!stat && !buckled)
if(stat == CONSCIOUS && !buckled)
if(prob(1))
custom_emote(EMOTE_VISIBLE, pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
lay_down()
@@ -23,7 +23,7 @@
/mob/living/simple_animal/crab/handle_automated_movement()
//CRAB movement
if(!stat || !isturf(loc) || IS_HORIZONTAL(src) || buckled)
if(stat == CONSCIOUS || !isturf(loc) || IS_HORIZONTAL(src) || buckled)
return
turns_since_move++
@@ -70,7 +70,7 @@
/mob/living/simple_animal/hostile/retaliate/goat/Move()
. = ..()
if(!stat)
if(stat == CONSCIOUS)
eat_plants()
/mob/living/simple_animal/hostile/retaliate/goat/attackby(obj/item/O as obj, mob/user as mob, params)
@@ -159,12 +159,12 @@
udder.generateMilk()
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
if(stat == CONSCIOUS && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
Weaken(60 SECONDS)
icon_state = icon_dead
spawn(rand(20,50))
if(!stat && M)
if(stat == CONSCIOUS && M)
icon_state = icon_living
var/list/responses = list( "[src] looks at you imploringly.",
"[src] looks at you pleadingly",
@@ -312,7 +312,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
/mob/living/simple_animal/chicken/attackby(obj/item/O, mob/user, params)
if(istype(O, food_type)) //feedin' dem chickens
if(!stat && eggsleft < 8)
if(stat == CONSCIOUS && eggsleft < 8)
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
user.visible_message(feedmsg)
user.drop_item()
@@ -31,7 +31,7 @@
var/has_tail = TRUE
/mob/living/simple_animal/lizard/handle_automated_action()
if(!stat && !buckled)
if(stat == CONSCIOUS && !buckled)
if(prob(1))
custom_emote(EMOTE_VISIBLE, pick("sticks out its tongue.", "wags its tail.", "lies down."))
@@ -100,7 +100,7 @@
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj, oldloc)
if(ishuman(AM))
if(!stat)
if(stat == CONSCIOUS)
var/mob/M = AM
to_chat(M, "<span class='notice'>[bicon(src)] Squeek!</span>")
..()
@@ -9,7 +9,7 @@
/mob/living/simple_animal/pet/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/newspaper))
if(!stat)
if(stat == CONSCIOUS)
user.visible_message("<span class='notice'>[user] baps [name] on the nose with the rolled up [O].</span>")
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2))
@@ -315,7 +315,7 @@
/mob/living/simple_animal/hostile/adjustHealth(damage, updating_health = TRUE)
. = ..()
if(!ckey && !stat && search_objects < 3 && damage > 0)//Not unconscious, and we don't ignore mobs
if(!ckey && stat == CONSCIOUS && search_objects < 3 && damage > 0)//Not unconscious, and we don't ignore mobs
if(search_objects)//Turn off item searching and ignore whatever item we were looking at, we're more concerned with fight or flight
target = null
LoseSearchObjects()
@@ -329,7 +329,7 @@ Difficulty: Very Hard
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom/movable, orbit), target, 0, FALSE, 0, 0, FALSE, TRUE)
/mob/living/simple_animal/hostile/megafauna/colossus/bullet_act(obj/item/projectile/P)
if(!stat)
if(stat == CONSCIOUS)
var/obj/effect/temp_visual/at_shield/AT = new /obj/effect/temp_visual/at_shield(loc, src)
var/random_x = rand(-32, 32)
AT.pixel_x += random_x
@@ -529,7 +529,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/hierophant/Moved(oldLoc, movement_dir)
. = ..()
if(!stat && .)
if(stat == CONSCIOUS && .)
var/obj/effect/temp_visual/hierophant/squares/HS = new(oldLoc)
HS.setDir(movement_dir)
playsound(src, 'sound/mecha/mechmove04.ogg', 65, TRUE, -4)
@@ -68,7 +68,7 @@
visible_message("<span class='notice'>The ore was swallowed whole!</span>")
/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time
if(!stat)
if(stat == CONSCIOUS)
visible_message("<span class='danger'>[src] buries into the ground, vanishing from sight!</span>")
qdel(src)
@@ -36,7 +36,7 @@
icon_state = icon_living
/mob/living/simple_animal/hostile/asteroid/bullet_act(obj/item/projectile/P)//Reduces damage from most projectiles to curb off-screen kills
if(!stat)
if(stat == CONSCIOUS)
Aggro()
if(P.damage < 30 && P.damage_type != BRUTE && has_laser_resist)
P.damage = (P.damage / 3)
@@ -46,7 +46,7 @@
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //No floor tiling them to death, wiseguy
if(isitem(AM))
var/obj/item/T = AM
if(!stat)
if(stat == CONSCIOUS)
Aggro()
if(T.throwforce <= 20)
visible_message("<span class='notice'>[T] [throw_message] [src.name]!</span>")
@@ -45,7 +45,7 @@
/mob/living/simple_animal/hostile/mushroom/Life(seconds, times_fired)
..()
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
if(stat == CONSCIOUS)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
adjustBruteLoss(-2)
/mob/living/simple_animal/hostile/mushroom/Initialize(mapload) //Makes every shroom a little unique
@@ -147,7 +147,7 @@
adjustBruteLoss(-maxHealth) //They'll always heal, even if they don't gain a level, in case you want to keep this shroom around instead of harvesting it
/mob/living/simple_animal/hostile/mushroom/proc/Bruise()
if(!bruised && !stat)
if(!bruised && stat == CONSCIOUS)
src.visible_message("<span class='notice'>[src] was bruised!</span>")
bruised = 1
@@ -109,7 +109,7 @@
/mob/living/simple_animal/hostile/poison/terror_spider/queen/princess/spider_special_action()
// Princess AI routine. GREATLY simplified version of queen routine.
if(!stat && !ckey)
if(stat == CONSCIOUS && !ckey)
// Utilize normal queen AI for finding a nest site (neststep=0), and activating NestMode() (neststep=1)
if(neststep != 2)
return ..()
@@ -136,7 +136,7 @@
/mob/living/simple_animal/hostile/poison/terror_spider/queen/spider_special_action()
if(!stat && !ckey)
if(stat == CONSCIOUS && !ckey)
switch(neststep)
if(0)
// No nest. If current location is eligible for nesting, advance to step 1.
@@ -139,7 +139,7 @@
if(client)
return
if(!stat && M.a_intent == "harm")
if(stat == CONSCIOUS && M.a_intent == "harm")
icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks
if(parrot_state == PARROT_PERCH)
@@ -161,7 +161,7 @@
//Mobs with objects
/mob/living/simple_animal/parrot/attackby(obj/item/O, mob/user, params)
..()
if(!stat && !client && !istype(O, /obj/item/stack/medical))
if(stat == CONSCIOUS && !client && !istype(O, /obj/item/stack/medical))
if(O.force)
if(parrot_state == PARROT_PERCH)
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
@@ -175,7 +175,7 @@
//Bullets
/mob/living/simple_animal/parrot/bullet_act(obj/item/projectile/P)
..()
if(!stat && !client)
if(stat == CONSCIOUS && !client)
if(parrot_state == PARROT_PERCH)
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
@@ -189,7 +189,7 @@
/mob/living/simple_animal/parrot/grabbedby(mob/living/carbon/user, supress_message)
..()
if(held_item && !stat)
if(held_item && stat == CONSCIOUS)
drop_held_item()
/*
@@ -622,7 +622,7 @@
/mob/living/simple_animal/adjustHealth(amount, updating_health = TRUE)
. = ..()
if(!ckey && !stat)//Not unconscious
if(!ckey && stat == CONSCIOUS)//Not unconscious
if(AIStatus == AI_IDLE)
toggle_ai(AI_ON)
@@ -5,7 +5,7 @@
if(..())
if(buckled)
handle_feeding()
if(!stat) // Slimes in stasis don't lose nutrition, don't change mood and don't respond to speech
if(stat == CONSCIOUS) // Slimes in stasis don't lose nutrition, don't change mood and don't respond to speech
handle_nutrition()
if(QDELETED(src)) // Stop if the slime split during handle_nutrition()
return
@@ -152,7 +152,7 @@
/mob/living/simple_animal/slime/handle_status_effects()
..()
if(prob(30) && !stat)
if(prob(30) && stat == CONSCIOUS)
adjustBruteLoss(-1)
/mob/living/simple_animal/slime/proc/handle_feeding()
@@ -436,7 +436,7 @@
phrases += "What happened?"
if(!slimes_near)
phrases += "Lonely..."
if(!stat)
if(stat == CONSCIOUS)
say (pick(phrases))
/mob/living/simple_animal/slime/proc/get_max_nutrition() // Can't go above it
@@ -133,7 +133,7 @@
icon_dead = "[icon_text] dead"
if(stat != DEAD)
icon_state = icon_text
if(mood && !stat)
if(mood && stat == CONSCIOUS)
add_overlay("aslime-[mood]")
else
icon_state = icon_dead
@@ -357,7 +357,7 @@
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
if(istype(I, /obj/item/stack/sheet/mineral/plasma) && !stat) //Let's you feed slimes plasma.
if(istype(I, /obj/item/stack/sheet/mineral/plasma) && stat == CONSCIOUS) //Let's you feed slimes plasma.
to_chat(user, "<span class='notice'>You feed the slime the plasma. It chirps happily.</span>")
var/obj/item/stack/sheet/mineral/plasma/S = I
S.use(1)
+2 -1
View File
@@ -7,7 +7,8 @@
var/datum/mind/mind
blocks_emissive = EMISSIVE_BLOCK_GENERIC
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
/// Is this mob alive, unconscious or dead?
var/stat = CONSCIOUS // TODO: Move to /mob/living
/// The zone this mob is currently targeting
var/zone_selected = null
@@ -119,11 +119,11 @@
if(stat & NOPOWER)
active = FALSE
change_power_mode(NO_POWER_USE)
else if(!stat && construction_state <= 3)
else if(stat == CONSCIOUS && construction_state <= 3)
change_power_mode(IDLE_POWER_USE)
update_icon()
if((stat & NOPOWER) || (!stat && construction_state <= 3)) //Only update the part icons if something's changed (i.e. any of the above condition sets are met).
if((stat & NOPOWER) || (stat == CONSCIOUS && construction_state <= 3)) //Only update the part icons if something's changed (i.e. any of the above condition sets are met).
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = null
part.powered = FALSE
+1 -1
View File
@@ -85,7 +85,7 @@
update_icon()
/obj/machinery/power/treadmill/proc/get_power_output()
if(speed && !stat && anchored && powernet)
if(speed && stat == CONSCIOUS && anchored && powernet)
return power_gen * speed / MAX_SPEED
return 0
+1 -1
View File
@@ -69,7 +69,7 @@ GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new)
/mob/living/silicon/pai/default_can_use_topic(src_object)
// pAIs can only use themselves and the owner's radio.
if((src_object == src || src_object == radio) && !stat)
if((src_object == src || src_object == radio) && stat == CONSCIOUS)
return UI_INTERACTIVE
else
return ..()