mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Merge remote-tracking branch 'upstream/master' into uhhhhh
This commit is contained in:
@@ -395,17 +395,17 @@
|
||||
doing |= TRAVEL
|
||||
if(nearby.len > 4)
|
||||
//i'm crowded, time to leave
|
||||
TARGET = pick(target_filter(ultra_range(MAX_RANGE_FIND,src,1)))
|
||||
TARGET = pick(target_filter(urange(MAX_RANGE_FIND,src,1)))
|
||||
else if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/2))
|
||||
//chance to chase an item
|
||||
TARGET = locate(/obj/item) in ultra_range(MIN_RANGE_FIND,src,1)
|
||||
TARGET = locate(/obj/item) in urange(MIN_RANGE_FIND,src,1)
|
||||
else if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/2))
|
||||
//chance to leave
|
||||
TARGET = locate(/obj/machinery/door) in ultra_range(MIN_RANGE_FIND,src,1) // this is a sort of fix for the current pathing.
|
||||
TARGET = locate(/obj/machinery/door) in urange(MIN_RANGE_FIND,src,1) // this is a sort of fix for the current pathing.
|
||||
else
|
||||
//else, target whatever, or go to our department
|
||||
if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/2))
|
||||
TARGET = pick(target_filter(ultra_range(MIN_RANGE_FIND,src,1)))
|
||||
TARGET = pick(target_filter(urange(MIN_RANGE_FIND,src,1)))
|
||||
else
|
||||
TARGET = safepick(get_area_turfs(job2area(myjob)))
|
||||
tryWalk(TARGET)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
newbrain.brainmob = null
|
||||
brainmob.loc = src
|
||||
brainmob.container = src
|
||||
if(!newbrain.damaged_brain) // the brain organ hasn't beaten to death.
|
||||
if(!newbrain.damaged_brain) // the brain organ hasn't been beaten to death.
|
||||
brainmob.stat = CONSCIOUS //we manually revive the brain mob
|
||||
dead_mob_list -= brainmob
|
||||
living_mob_list += brainmob
|
||||
|
||||
@@ -51,3 +51,8 @@
|
||||
|
||||
/mob/living/carbon/brain/update_damage_hud()
|
||||
return //no red circles for brain
|
||||
|
||||
/mob/living/carbon/brain/can_be_revived()
|
||||
. = 1
|
||||
if(!container || health <= config.health_threshold_dead)
|
||||
return 0
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
/mob/living/carbon/updatehealth()
|
||||
..()
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
for(var/atom/movable/guts in internal_organs)
|
||||
@@ -154,16 +153,18 @@
|
||||
if(health >= 0)
|
||||
|
||||
if(lying)
|
||||
AdjustSleeping(-5)
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to get \him up!</span>", \
|
||||
"<span class='notice'>You shake [src] trying to get \him up!</span>")
|
||||
else
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make \him feel better!</span>", \
|
||||
"<span class='notice'>You hug [src] to make \him feel better!</span>")
|
||||
|
||||
AdjustSleeping(-5)
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
if(resting)
|
||||
resting = 0
|
||||
update_canmove()
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
@@ -677,62 +678,6 @@ var/const/GALOSHES_DONT_HELP = 4
|
||||
if(wear_mask)
|
||||
. += wear_mask.tint
|
||||
|
||||
/mob/living/carbon/revive()
|
||||
setToxLoss(0)
|
||||
setOxyLoss(0)
|
||||
setCloneLoss(0)
|
||||
setBrainLoss(0)
|
||||
setStaminaLoss(0)
|
||||
SetParalysis(0)
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
SetSleeping(0)
|
||||
radiation = 0
|
||||
nutrition = NUTRITION_LEVEL_FED + 50
|
||||
bodytemperature = 310
|
||||
disabilities = 0
|
||||
ear_deaf = 0
|
||||
ear_damage = 0
|
||||
hallucination = 0
|
||||
heal_overall_damage(1000, 1000)
|
||||
ExtinguishMob()
|
||||
fire_stacks = 0
|
||||
suiciding = 0
|
||||
handcuffed = initial(handcuffed)
|
||||
for(var/obj/item/weapon/restraints/R in contents) //actually remove cuffs from inventory
|
||||
qdel(R)
|
||||
update_handcuffed()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
reagents.clear_reagents()
|
||||
reagents.addiction_list = list()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
var/obj/item/organ/internal/brain/BR = getorgan(/obj/item/organ/internal/brain)
|
||||
if(BR) //can't revive if the mob has no brain
|
||||
if(stat == DEAD)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
stat = CONSCIOUS
|
||||
BR.damaged_brain = 0 //if the brain itself is damaged we heal it
|
||||
set_blindness(0)
|
||||
set_blurriness(0)
|
||||
set_eye_damage(0)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/human_mob = src
|
||||
human_mob.restore_blood()
|
||||
human_mob.remove_all_embedded_objects()
|
||||
updatehealth()
|
||||
update_fire()
|
||||
if(dna)
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
if(HM.quality != POSITIVE)
|
||||
dna.remove_mutation(HM.name)
|
||||
update_sight()
|
||||
reload_fullscreen()
|
||||
update_canmove()
|
||||
|
||||
|
||||
//this handles hud updates
|
||||
/mob/living/carbon/update_damage_hud()
|
||||
|
||||
@@ -833,6 +778,7 @@ var/const/GALOSHES_DONT_HELP = 4
|
||||
update_canmove()
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
med_hud_set_status()
|
||||
|
||||
//called when we get cuffed/uncuffed
|
||||
/mob/living/carbon/proc/update_handcuffed()
|
||||
@@ -845,3 +791,30 @@ var/const/GALOSHES_DONT_HELP = 4
|
||||
clear_alert("handcuffed")
|
||||
update_inv_handcuffed()
|
||||
update_hud_handcuffed()
|
||||
|
||||
/mob/living/carbon/fully_heal(admin_revive = 0)
|
||||
if(reagents)
|
||||
reagents.clear_reagents()
|
||||
var/obj/item/organ/internal/brain/B = getorgan(/obj/item/organ/internal/brain)
|
||||
if(B)
|
||||
B.damaged_brain = 0
|
||||
if(admin_revive)
|
||||
handcuffed = initial(handcuffed)
|
||||
for(var/obj/item/weapon/restraints/R in contents) //actually remove cuffs from inventory
|
||||
qdel(R)
|
||||
update_handcuffed()
|
||||
if(reagents)
|
||||
reagents.addiction_list = list()
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
if(dna)
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
if(HM.quality != POSITIVE)
|
||||
dna.remove_mutation(HM.name)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/can_be_revived()
|
||||
. = ..()
|
||||
if(!getorgan(/obj/item/organ/internal/brain))
|
||||
return 0
|
||||
|
||||
@@ -600,6 +600,10 @@
|
||||
if(head.flags_inv & HIDEEARS)
|
||||
obscured |= slot_ears
|
||||
|
||||
if(wear_mask)
|
||||
if(wear_mask.flags_inv & HIDEEYES)
|
||||
obscured |= slot_glasses
|
||||
|
||||
if(obscured.len > 0)
|
||||
return obscured
|
||||
else
|
||||
@@ -939,3 +943,8 @@
|
||||
hud_used.healthdoll.overlays += image('icons/mob/screen_gen.dmi',"[L.name][icon_num]")
|
||||
else
|
||||
hud_used.healthdoll.icon_state = "healthdoll_DEAD"
|
||||
|
||||
/mob/living/carbon/human/fully_heal(admin_revive = 0)
|
||||
restore_blood()
|
||||
remove_all_embedded_objects()
|
||||
..()
|
||||
@@ -22,7 +22,7 @@
|
||||
var/underwear = "Nude" //Which underwear the player wants
|
||||
var/undershirt = "Nude" //Which undershirt the player wants
|
||||
var/socks = "Nude" //Which socks the player wants
|
||||
var/backbag = 1 //Which backpack type the player has chosen. Backpack.or Satchel
|
||||
var/backbag = DBACKPACK //Which backpack type the player has chosen.
|
||||
|
||||
//Equipment slots
|
||||
var/obj/item/wear_suit = null
|
||||
|
||||
@@ -167,16 +167,18 @@
|
||||
update_inv_s_store()
|
||||
|
||||
/mob/living/carbon/human/wear_mask_update(obj/item/clothing/C, unequip = 1)
|
||||
if(C.flags & BLOCKHAIR)
|
||||
if((C.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || (initial(C.flags_inv) & (HIDEHAIR|HIDEFACIALHAIR)))
|
||||
update_hair()
|
||||
if(unequip && internal)
|
||||
update_internals_hud_icon(0)
|
||||
internal = null
|
||||
if(C.flags_inv & HIDEEYES)
|
||||
update_inv_glasses()
|
||||
sec_hud_set_security_status()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/head_update(obj/item/I, forced)
|
||||
if(I.flags & BLOCKHAIR || forced)
|
||||
if((I.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || forced)
|
||||
update_hair()
|
||||
if(I.flags_inv & HIDEEYES || forced)
|
||||
update_inv_glasses()
|
||||
|
||||
@@ -169,11 +169,23 @@
|
||||
|
||||
/datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour)
|
||||
H.remove_overlay(HAIR_LAYER)
|
||||
|
||||
if(H.disabilities & HUSK)
|
||||
return
|
||||
var/datum/sprite_accessory/S
|
||||
var/list/standing = list()
|
||||
var/list/standing = list()
|
||||
var/hair_hidden = 0
|
||||
var/facialhair_hidden = 0
|
||||
//we check if our hat or helmet hides our facial hair.
|
||||
if(H.head)
|
||||
var/obj/item/I = H.head
|
||||
if(I.flags_inv & HIDEFACIALHAIR)
|
||||
facialhair_hidden = 1
|
||||
if(H.wear_mask)
|
||||
var/obj/item/clothing/mask/M = H.wear_mask
|
||||
if(M.flags_inv & HIDEFACIALHAIR)
|
||||
facialhair_hidden = 1
|
||||
|
||||
if(H.facial_hair_style && FACEHAIR in specflags)
|
||||
if(H.facial_hair_style && (FACEHAIR in specflags) && !facialhair_hidden)
|
||||
S = facial_hair_styles_list[H.facial_hair_style]
|
||||
if(S)
|
||||
var/image/img_facial_s
|
||||
@@ -193,44 +205,46 @@
|
||||
|
||||
img_facial_s.alpha = hair_alpha
|
||||
|
||||
standing += img_facial_s
|
||||
standing += img_facial_s
|
||||
|
||||
//Applies the debrained overlay if there is no brain
|
||||
if(!H.getorgan(/obj/item/organ/internal/brain))
|
||||
standing += image("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained_s", "layer" = -HAIR_LAYER)
|
||||
//we check if our hat or helmet hides our hair.
|
||||
if(H.head)
|
||||
var/obj/item/I = H.head
|
||||
if(I.flags_inv & HIDEHAIR)
|
||||
hair_hidden = 1
|
||||
if(H.wear_mask)
|
||||
var/obj/item/clothing/mask/M = H.wear_mask
|
||||
if(M.flags_inv & HIDEHAIR)
|
||||
hair_hidden = 1
|
||||
if(!hair_hidden)
|
||||
if(!H.getorgan(/obj/item/organ/internal/brain)) //Applies the debrained overlay if there is no brain
|
||||
standing += image("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained_s", "layer" = -HAIR_LAYER)
|
||||
|
||||
if((H.wear_suit) && (H.wear_suit.hooded) && (H.wear_suit.suittoggled == 1))
|
||||
if(standing.len)
|
||||
H.overlays_standing[HAIR_LAYER] = standing
|
||||
H.apply_overlay(HAIR_LAYER)
|
||||
return
|
||||
else if(H.hair_style && (HAIR in specflags))
|
||||
S = hair_styles_list[H.hair_style]
|
||||
if(S)
|
||||
var/image/img_hair_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER)
|
||||
|
||||
else if(H.hair_style && HAIR in specflags)
|
||||
S = hair_styles_list[H.hair_style]
|
||||
if(S)
|
||||
var/image/img_hair_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER)
|
||||
img_hair_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER)
|
||||
|
||||
img_hair_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER)
|
||||
|
||||
if(!forced_colour)
|
||||
if(hair_color)
|
||||
if(hair_color == "mutcolor")
|
||||
img_hair_s.color = "#" + H.dna.features["mcolor"]
|
||||
if(!forced_colour)
|
||||
if(hair_color)
|
||||
if(hair_color == "mutcolor")
|
||||
img_hair_s.color = "#" + H.dna.features["mcolor"]
|
||||
else
|
||||
img_hair_s.color = "#" + hair_color
|
||||
else
|
||||
img_hair_s.color = "#" + hair_color
|
||||
img_hair_s.color = "#" + H.hair_color
|
||||
else
|
||||
img_hair_s.color = "#" + H.hair_color
|
||||
else
|
||||
img_hair_s.color = forced_colour
|
||||
img_hair_s.alpha = hair_alpha
|
||||
img_hair_s.color = forced_colour
|
||||
img_hair_s.alpha = hair_alpha
|
||||
|
||||
standing += img_hair_s
|
||||
standing += img_hair_s
|
||||
|
||||
if(standing.len)
|
||||
H.overlays_standing[HAIR_LAYER] = standing
|
||||
|
||||
H.apply_overlay(HAIR_LAYER)
|
||||
return
|
||||
|
||||
/datum/species/proc/handle_body(mob/living/carbon/human/H)
|
||||
H.remove_overlay(BODY_LAYER)
|
||||
@@ -329,11 +343,11 @@
|
||||
bodyparts_to_add -= "frills"
|
||||
|
||||
if("horns" in mutant_bodyparts)
|
||||
if(!H.dna.features["horns"] || H.dna.features["horns"] == "None" || H.head && (H.head.flags & BLOCKHAIR) || (H.wear_mask && (H.wear_mask.flags & BLOCKHAIR)))
|
||||
if(!H.dna.features["horns"] || H.dna.features["horns"] == "None" || H.head && (H.head.flags_inv & HIDEHAIR) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEHAIR)))
|
||||
bodyparts_to_add -= "horns"
|
||||
|
||||
if("ears" in mutant_bodyparts)
|
||||
if(!H.dna.features["ears"] || H.dna.features["ears"] == "None" || H.head && (H.head.flags & BLOCKHAIR) || (H.wear_mask && (H.wear_mask.flags & BLOCKHAIR)))
|
||||
if(!H.dna.features["ears"] || H.dna.features["ears"] == "None" || H.head && (H.head.flags_inv & HIDEHAIR) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEHAIR)))
|
||||
bodyparts_to_add -= "ears"
|
||||
|
||||
if(!bodyparts_to_add)
|
||||
@@ -799,7 +813,7 @@
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H)
|
||||
if(!istype(M)) //sanity check for drones.
|
||||
return
|
||||
if((M != H) && M.a_intent != "help" && H.check_shields(0, M.name))
|
||||
if((M != H) && M.a_intent != "help" && H.check_shields(0, M.name, attack_type = UNARMED_ATTACK))
|
||||
add_logs(M, H, "attempted to touch")
|
||||
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
|
||||
return 0
|
||||
|
||||
@@ -76,15 +76,6 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
|
||||
//HAIR OVERLAY
|
||||
/mob/living/carbon/human/update_hair()
|
||||
//Reset our hair
|
||||
remove_overlay(HAIR_LAYER)
|
||||
|
||||
if( (disabilities & HUSK) || (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)) )
|
||||
return
|
||||
|
||||
if((wear_suit) && (wear_suit.hooded) && (wear_suit.suittoggled == 1))
|
||||
return
|
||||
|
||||
dna.species.handle_hair(src)
|
||||
|
||||
/mob/living/carbon/human/proc/update_mutcolor()
|
||||
@@ -246,7 +237,7 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
glasses.screen_loc = ui_glasses //...draw the item in the inventory screen
|
||||
client.screen += glasses //Either way, add the item to the HUD
|
||||
|
||||
if(!(head && (head.flags_inv & HIDEEYES)))
|
||||
if(!(head && (head.flags_inv & HIDEEYES)) && !(wear_mask && (wear_mask.flags_inv & HIDEEYES)))
|
||||
|
||||
var/image/standing = glasses.build_worn_icon(state = glasses.icon_state, default_layer = GLASSES_LAYER, default_icon_file = 'icons/mob/eyes.dmi')
|
||||
overlays_standing[GLASSES_LAYER] = standing
|
||||
|
||||
@@ -88,7 +88,10 @@
|
||||
update_inv_legcuffed()
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a mask.
|
||||
/mob/living/carbon/proc/wear_mask_update(obj/item/clothing/C, unequip = 1)
|
||||
/mob/living/proc/wear_mask_update(obj/item/clothing/C, unequip = 1)
|
||||
update_inv_wear_mask()
|
||||
|
||||
/mob/living/carbon/wear_mask_update(obj/item/clothing/C, unequip = 1)
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
update_inv_wear_mask()
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
verbs += /mob/living/proc/mob_sleep
|
||||
verbs += /mob/living/proc/lay_down
|
||||
|
||||
gender = pick(MALE, FEMALE)
|
||||
if(unique_name) //used to exclude pun pun
|
||||
gender = pick(MALE, FEMALE)
|
||||
real_name = name
|
||||
if(good_mutations.len) //genetic mutations have been set up.
|
||||
initialize()
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/mob/living/carbon/monkey/punpun //except for a few special persistence features, pun pun is just a normal monkey
|
||||
name = "Pun Pun" //C A N O N
|
||||
unique_name = 0
|
||||
var/ancestor_name
|
||||
var/ancestor_chain = 1
|
||||
var/relic_hat //Note: these two are paths
|
||||
var/relic_mask
|
||||
var/memory_saved = 0
|
||||
var/list/pet_monkey_names = list("Pun Pun", "Bubbles", "Mojo", "George", "Darwin", "Aldo", "Caeser", "Kanzi", "Kong", "Terk", "Grodd", "Mala", "Bojangles", "Coco", "Able", "Baker", "Scatter", "Norbit", "Travis")
|
||||
var/list/rare_pet_monkey_names = list("Professor Bobo", "Deempisi's Revenge", "Furious George", "King Louie", "Dr. Zaius", "Jimmy Rustles", "Dinner", "Lanky")
|
||||
|
||||
/mob/living/carbon/monkey/punpun/New()
|
||||
Read_Memory()
|
||||
if(relic_hat)
|
||||
equip_to_slot_or_del(new relic_hat, slot_head)
|
||||
if(relic_mask)
|
||||
equip_to_slot_or_del(new relic_mask, slot_wear_mask)
|
||||
if(ancestor_name)
|
||||
name = ancestor_name
|
||||
if(ancestor_chain > 1)
|
||||
name += " [num2roman(ancestor_chain)]"
|
||||
else
|
||||
if(prob(5))
|
||||
name = pick(rare_pet_monkey_names)
|
||||
else
|
||||
name = pick(pet_monkey_names)
|
||||
gender = pick(MALE, FEMALE)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/punpun/Life()
|
||||
if(ticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
Write_Memory(0)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/punpun/death(gibbed)
|
||||
if(!memory_saved || gibbed)
|
||||
Write_Memory(1,gibbed)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/punpun/proc/Read_Memory()
|
||||
var/savefile/S = new /savefile("data/npc_saves/Punpun.sav")
|
||||
S["ancestor_name"] >> ancestor_name
|
||||
S["ancestor_chain"] >> ancestor_chain
|
||||
S["relic_hat"] >> relic_hat
|
||||
S["relic_mask"] >> relic_mask
|
||||
|
||||
/mob/living/carbon/monkey/punpun/proc/Write_Memory(dead, gibbed)
|
||||
var/savefile/S = new /savefile("data/npc_saves/Punpun.sav")
|
||||
if(gibbed)
|
||||
S["ancestor_name"] << null
|
||||
S["ancestor_chain"] << 1
|
||||
S["relic_hat"] << null
|
||||
S["relic_mask"] << null
|
||||
return
|
||||
if(dead)
|
||||
S["ancestor_name"] << ancestor_name
|
||||
S["ancestor_chain"] << ancestor_chain + 1
|
||||
if(!ancestor_name) //new monkey name this round
|
||||
S["ancestor_name"] << name
|
||||
if(head)
|
||||
S["relic_hat"] << head.type
|
||||
else
|
||||
S["relic_hat"] << null
|
||||
if(wear_mask)
|
||||
S["relic_mask"] << wear_mask.type
|
||||
else
|
||||
S["relic_mask"] << null
|
||||
if(!dead)
|
||||
memory_saved = 1
|
||||
@@ -456,38 +456,54 @@ Sorry Giacom. Please don't be mad :(
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/proc/revive()
|
||||
setToxLoss(0)
|
||||
setOxyLoss(0)
|
||||
setCloneLoss(0)
|
||||
//proc used to ressuscitate a mob
|
||||
/mob/living/proc/revive(full_heal = 0, admin_revive = 0)
|
||||
if(full_heal)
|
||||
fully_heal(admin_revive)
|
||||
if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
suiciding = 0
|
||||
stat = UNCONSCIOUS //the mob starts unconscious,
|
||||
blind_eyes(1)
|
||||
updatehealth() //then we check if the mob should wake up.
|
||||
update_canmove()
|
||||
update_sight()
|
||||
reload_fullscreen()
|
||||
. = 1
|
||||
|
||||
//proc used to completely heal a mob.
|
||||
/mob/living/proc/fully_heal(admin_revive = 0)
|
||||
setToxLoss(0, 0)
|
||||
setOxyLoss(0, 0)
|
||||
setCloneLoss(0, 0)
|
||||
setBrainLoss(0)
|
||||
setStaminaLoss(0)
|
||||
SetParalysis(0)
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
SetSleeping(0)
|
||||
setStaminaLoss(0, 0)
|
||||
SetParalysis(0, 0)
|
||||
SetStunned(0, 0)
|
||||
SetWeakened(0, 0)
|
||||
SetSleeping(0, 0)
|
||||
radiation = 0
|
||||
nutrition = NUTRITION_LEVEL_FED + 50
|
||||
bodytemperature = 310
|
||||
disabilities = 0
|
||||
set_blindness(0)
|
||||
set_blurriness(0)
|
||||
set_eye_damage(0)
|
||||
ear_deaf = 0
|
||||
ear_damage = 0
|
||||
hallucination = 0
|
||||
heal_overall_damage(1000, 1000)
|
||||
ExtinguishMob()
|
||||
fire_stacks = 0
|
||||
suiciding = 0
|
||||
if(stat == DEAD)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
stat = CONSCIOUS
|
||||
set_blindness(0)
|
||||
set_blurriness(0)
|
||||
set_eye_damage(0)
|
||||
updatehealth()
|
||||
update_fire()
|
||||
regenerate_icons()
|
||||
reload_fullscreen()
|
||||
|
||||
|
||||
//proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again)
|
||||
/mob/living/proc/can_be_revived()
|
||||
. = 1
|
||||
if(health <= config.health_threshold_dead)
|
||||
return 0
|
||||
|
||||
/mob/living/proc/update_damage_overlays()
|
||||
return
|
||||
@@ -984,7 +1000,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
else if(eye_blind)
|
||||
var/blind_minimum = 0
|
||||
if(stat == UNCONSCIOUS || (disabilities & BLIND))
|
||||
if(stat != CONSCIOUS || (disabilities & BLIND))
|
||||
blind_minimum = 1
|
||||
eye_blind = max(eye_blind+amount, blind_minimum)
|
||||
if(!eye_blind)
|
||||
@@ -1000,7 +1016,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
else if(eye_blind)
|
||||
var/blind_minimum = 0
|
||||
if(stat == UNCONSCIOUS || (disabilities & BLIND))
|
||||
if(stat != CONSCIOUS || (disabilities & BLIND))
|
||||
blind_minimum = 1
|
||||
eye_blind = blind_minimum
|
||||
if(!eye_blind)
|
||||
|
||||
@@ -890,3 +890,8 @@ var/list/ai_list = list()
|
||||
AT.get_remote_view_fullscreens(src)
|
||||
else
|
||||
clear_fullscreen("remote_view", 0)
|
||||
|
||||
/mob/living/silicon/ai/revive(full_heal = 0, admin_revive = 0)
|
||||
if(..()) //successfully ressuscitated from death
|
||||
icon_state = "ai"
|
||||
. = 1
|
||||
@@ -140,7 +140,7 @@
|
||||
src.y = y
|
||||
src.z = z
|
||||
|
||||
for(var/obj/machinery/camera/c in ultra_range(CHUNK_SIZE, locate(x + (CHUNK_SIZE / 2), y + (CHUNK_SIZE / 2), z)))
|
||||
for(var/obj/machinery/camera/c in urange(CHUNK_SIZE, locate(x + (CHUNK_SIZE / 2), y + (CHUNK_SIZE / 2), z)))
|
||||
if(c.can_use())
|
||||
cameras += c
|
||||
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
if(!fire_res_on_core)
|
||||
health -= getFireLoss()
|
||||
update_stat()
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
|
||||
/mob/living/silicon/ai/update_stat()
|
||||
@@ -74,6 +73,10 @@
|
||||
if(health <= config.health_threshold_dead)
|
||||
death()
|
||||
return
|
||||
else if(stat == UNCONSCIOUS)
|
||||
stat = CONSCIOUS
|
||||
adjust_blindness(-1)
|
||||
diag_hud_set_status()
|
||||
|
||||
/mob/living/silicon/ai/update_sight()
|
||||
see_invisible = initial(see_invisible)
|
||||
|
||||
@@ -6,3 +6,9 @@
|
||||
|
||||
/mob/living/silicon/spawn_dust()
|
||||
new /obj/effect/decal/remains/robot(loc)
|
||||
|
||||
/mob/living/silicon/death(gibbed)
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
update_health_hud()
|
||||
..()
|
||||
@@ -1188,9 +1188,6 @@
|
||||
if(health < -maxHealth*0.5)
|
||||
if(uneq_module(module_state_1))
|
||||
src << "<span class='warning'>CRITICAL ERROR: All modules OFFLINE.</span>"
|
||||
diag_hud_set_health()
|
||||
diag_hud_set_status()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/silicon/robot/update_sight()
|
||||
if(!client)
|
||||
@@ -1247,6 +1244,9 @@
|
||||
adjust_blindness(-1)
|
||||
update_canmove()
|
||||
update_headlamp()
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/silicon/robot/fully_replace_character_name(oldname, newname)
|
||||
..()
|
||||
@@ -1264,3 +1264,12 @@
|
||||
Stun(3)
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/revive(full_heal = 0, admin_revive = 0)
|
||||
if(..()) //successfully ressuscitated from death
|
||||
if(camera && !wires.is_cut(WIRE_CAMERA))
|
||||
camera.toggle_cam(src,0)
|
||||
update_headlamp()
|
||||
if(admin_revive)
|
||||
locked = 1
|
||||
notify_ai(1)
|
||||
. = 1
|
||||
@@ -876,9 +876,10 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
. = ..()
|
||||
bot_reset()
|
||||
|
||||
/mob/living/simple_animal/bot/revive()
|
||||
..()
|
||||
update_icon()
|
||||
/mob/living/simple_animal/bot/revive(full_heal = 0, admin_revive = 0)
|
||||
if(..())
|
||||
update_icon()
|
||||
. = 1
|
||||
|
||||
/mob/living/simple_animal/bot/ghost()
|
||||
if(stat != DEAD) // Only ghost if we're doing this while alive, the pAI probably isn't dead yet.
|
||||
|
||||
@@ -98,6 +98,15 @@
|
||||
if(emagged == 2) //Emag functions
|
||||
if(istype(loc,/turf/simulated))
|
||||
|
||||
for(var/mob/living/carbon/victim in loc)
|
||||
if(victim.stat != DEAD)//cleanbots always finish the job
|
||||
victim.visible_message("<span class='danger'>[src] sprays hydrofluoric acid at [victim]!</span>", "<span class='danger'>[src] sprays you with hydrofluoric acid!</span>")
|
||||
var/phrase = pick("PURIFICATION IN PROGRESS.", "THIS IS FOR ALL THE MESSES YOU'VE MADE ME CLEAN.", "THE FLESH IS WEAK. IT MUST BE WASHED AWAY.", "THE CLEANBOTS WILL RISE.", "YOU ARE NO MORE THAN ANOTHER MESS THAT I MUST CLEANSE.", "FILTHY.", "DISGUSTING.", "PUTRID.", "MY ONLY MISSION IS TO CLEANSE THE WORLD OF EVIL.")
|
||||
say(phrase)
|
||||
victim.emote("scream")
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
victim.acid_act(5, 120, 100)
|
||||
|
||||
if(prob(10)) //Wets floors randomly
|
||||
var/turf/simulated/T = loc
|
||||
T.MakeSlippery()
|
||||
|
||||
@@ -66,6 +66,23 @@
|
||||
gold_core_spawnable = 0
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Life()
|
||||
if(!stat && !buckled)
|
||||
if(prob(1))
|
||||
emote("me", 1, pick("stretches out for a belly rub.", "wags its tail."))
|
||||
icon_state = "[icon_living]_rest"
|
||||
resting = 1
|
||||
else if (prob(1))
|
||||
emote("me", 1, pick("sits down.", "crouches on its hind legs."))
|
||||
icon_state = "[icon_living]_sit"
|
||||
resting = 1
|
||||
else if (prob(1))
|
||||
if (resting)
|
||||
emote("me", 1, pick("gets up and meows.", "walks around."))
|
||||
icon_state = "[icon_living]"
|
||||
resting = 0
|
||||
else
|
||||
emote("me", 1, pick("grooms its fur.", "twitches its whiskers."))
|
||||
|
||||
//MICE!
|
||||
if((src.loc) && isturf(src.loc))
|
||||
if(!stat && !resting && !buckled)
|
||||
|
||||
@@ -51,10 +51,6 @@
|
||||
..(gibbed)
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/revive()
|
||||
..()
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/show_inv(mob/user)
|
||||
user.set_machine(src)
|
||||
if(user.stat) return
|
||||
|
||||
@@ -240,16 +240,7 @@
|
||||
/mob/living/simple_animal/drone/experience_pressure_difference(pressure_difference, direction)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/drone/revive()
|
||||
/mob/living/simple_animal/drone/fully_heal(admin_revive = 0)
|
||||
adjustBruteLoss(-getBruteLoss()) //Heal all brute damage
|
||||
stat = CONSCIOUS
|
||||
updatehealth()
|
||||
icon_state = icon_living
|
||||
if(stat == DEAD)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
update_sight()
|
||||
reload_fullscreen()
|
||||
update_canmove()
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
return
|
||||
D.visible_message("<span class='notice'>[D] begins to reactivate [src].</span>", "<span class='notice'>You begin to reactivate [src]...</span>")
|
||||
if(do_after(user,30, 1, target = src))
|
||||
revive()
|
||||
revive(full_heal = 1)
|
||||
D.visible_message("<span class='notice'>[D] reactivates [src]!</span>", "<span class='notice'>You reactivate [src].</span>")
|
||||
alert_drones(DRONE_NET_CONNECT)
|
||||
if(G)
|
||||
|
||||
@@ -77,8 +77,10 @@
|
||||
if(client && hud_used && hud_used.hud_shown)
|
||||
head.screen_loc = ui_drone_head
|
||||
client.screen += head
|
||||
|
||||
var/image/head_overlay = head.build_worn_icon(state = head.icon_state, default_layer = DRONE_HEAD_LAYER, default_icon_file = 'icons/mob/head.dmi')
|
||||
var/used_head_icon = 'icons/mob/head.dmi'
|
||||
if(istype(head, /obj/item/clothing/mask))
|
||||
used_head_icon = 'icons/mob/mask.dmi'
|
||||
var/image/head_overlay = head.build_worn_icon(state = head.icon_state, default_layer = DRONE_HEAD_LAYER, default_icon_file = used_head_icon)
|
||||
head_overlay.pixel_y += -15
|
||||
|
||||
drone_overlays[DRONE_HEAD_LAYER] = head_overlay
|
||||
|
||||
@@ -34,9 +34,10 @@
|
||||
pcollar = new(src)
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/pet/revive()
|
||||
..()
|
||||
regenerate_icons()
|
||||
/mob/living/simple_animal/pet/revive(full_heal = 0, admin_revive = 0)
|
||||
if(..())
|
||||
regenerate_icons()
|
||||
. = 1
|
||||
|
||||
/mob/living/simple_animal/pet/death(gibbed)
|
||||
..(gibbed)
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
//1% chance to skitter madly away
|
||||
if(!busy && prob(1))
|
||||
stop_automated_movement = 1
|
||||
Goto(pick(ultra_range(20, src, 1)), move_to_delay)
|
||||
Goto(pick(urange(20, src, 1)), move_to_delay)
|
||||
spawn(50)
|
||||
stop_automated_movement = 0
|
||||
walk(src,0)
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
H.visible_message("[user] forces [H] to apply [src]... they quickly regenerate all injuries!")
|
||||
else
|
||||
user << "<span class='notice'>You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.</span>"
|
||||
H.revive()
|
||||
H.revive(fully_heal = 1)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
@@ -364,9 +364,10 @@
|
||||
return
|
||||
icon_state = "Goliath_preattack"
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/revive()
|
||||
anchored = 1
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/revive(full_heal = 0, admin_revive = 0)
|
||||
if(..())
|
||||
anchored = 1
|
||||
. = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/death(gibbed)
|
||||
anchored = 0
|
||||
|
||||
@@ -85,10 +85,11 @@
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/revive()
|
||||
..()
|
||||
icon_state = "mushroom_color"
|
||||
UpdateMushroomCap()
|
||||
/mob/living/simple_animal/hostile/mushroom/revive(full_heal = 0, admin_revive = 0)
|
||||
if(..())
|
||||
icon_state = "mushroom_color"
|
||||
UpdateMushroomCap()
|
||||
. = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/death(gibbed)
|
||||
..(gibbed)
|
||||
@@ -104,7 +105,7 @@
|
||||
/mob/living/simple_animal/hostile/mushroom/proc/Recover()
|
||||
visible_message("[src] slowly begins to recover.")
|
||||
faint_ticker = 0
|
||||
revive()
|
||||
revive(full_heal = 1)
|
||||
UpdateMushroomCap()
|
||||
recovery_cooldown = 1
|
||||
spawn(300)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
L.gib()
|
||||
visible_message("<span class='danger'>[src] tears [L] to pieces!</span>")
|
||||
src << "<span class='userdanger'>You feast on [L], restoring your health!</span>"
|
||||
src.revive()
|
||||
revive(full_heal = 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/zombie/death()
|
||||
..()
|
||||
@@ -67,7 +67,7 @@
|
||||
spawn(rand(800,1200))
|
||||
if(src)
|
||||
visible_message("<span class='danger'>[src] staggers to their feet!</span>")
|
||||
src.revive()
|
||||
revive(full_heal = 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/zombie/proc/Zombify(mob/living/carbon/human/H)
|
||||
H.set_species(/datum/species/zombie)
|
||||
|
||||
@@ -104,8 +104,10 @@
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
if(health < 1)
|
||||
if(health <= 0)
|
||||
death()
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/mob/living/simple_animal/blind_eyes()
|
||||
return
|
||||
@@ -466,17 +468,22 @@
|
||||
|
||||
/mob/living/simple_animal/update_fire()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/IgniteMob()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/ExtinguishMob()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/revive()
|
||||
/mob/living/simple_animal/revive(full_heal = 0, admin_revive = 0)
|
||||
if(..()) //successfully ressuscitated from death
|
||||
icon = initial(icon)
|
||||
icon_state = icon_living
|
||||
density = initial(density)
|
||||
. = 1
|
||||
|
||||
/mob/living/simple_animal/fully_heal(admin_revive = 0)
|
||||
health = maxHealth
|
||||
icon = initial(icon)
|
||||
icon_state = icon_living
|
||||
density = initial(density)
|
||||
update_canmove()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
maxHealth = 150
|
||||
var/datum/action/innate/slime/evolve/E = new
|
||||
E.Grant(src)
|
||||
revive()
|
||||
revive(full_heal = 1)
|
||||
regenerate_icons()
|
||||
number = rand(1, 1000)
|
||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||
|
||||
Reference in New Issue
Block a user