mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into dev
This commit is contained in:
@@ -1306,11 +1306,10 @@ proc/is_hot(obj/item/W as obj)
|
||||
|
||||
//check if mob is lying down on something we can operate him on.
|
||||
/proc/can_operate(mob/living/carbon/M)
|
||||
return (locate(/obj/machinery/optable, M.loc) && M.resting) || \
|
||||
(locate(/obj/structure/stool/bed/roller, M.loc) && \
|
||||
(M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || \
|
||||
(locate(/obj/structure/table/, M.loc) && \
|
||||
(M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))
|
||||
return (M.lying && \
|
||||
locate(/obj/machinery/optable, M.loc) || \
|
||||
(locate(/obj/structure/stool/bed/roller, M.loc) && prob(75)) || \
|
||||
(locate(/obj/structure/table/, M.loc) && prob(66)))
|
||||
|
||||
/proc/reverse_direction(var/dir)
|
||||
switch(dir)
|
||||
@@ -1381,4 +1380,4 @@ var/list/WALLITEMS = list(
|
||||
/proc/topic_link(var/datum/D, var/arglist, var/content)
|
||||
if(istype(arglist,/list))
|
||||
arglist = list2params(arglist)
|
||||
return "<a href='?src=\ref[D];[arglist]'>[content]</a>"
|
||||
return "<a href='?src=\ref[D];[arglist]'>[content]</a>"
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweroff.ogg')
|
||||
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
|
||||
var/area/current_area = get_area(S)
|
||||
if(current_area.type in skipped_areas || S.z != 1)
|
||||
continue
|
||||
S.last_charge = S.charge
|
||||
S.last_output = S.output
|
||||
@@ -16,43 +20,14 @@
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
|
||||
var/list/skipped_areas = list(/area/engine/engineering, /area/turret_protected/ai)
|
||||
|
||||
for(var/area/A in world)
|
||||
if( !A.requires_power || A.always_unpowered )
|
||||
continue
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(A.contents)
|
||||
for(var/atom/AT in A.contents)
|
||||
if(AT.z != 1) //Only check one, it's enough.
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
A.power_light = 0
|
||||
A.power_equip = 0
|
||||
A.power_environ = 0
|
||||
A.power_change()
|
||||
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
var/area/A = get_area(C)
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore(var/announce = 1)
|
||||
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
|
||||
if(announce)
|
||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
@@ -61,19 +36,14 @@
|
||||
if(C.cell && C.z == 1)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
|
||||
var/area/current_area = get_area(S)
|
||||
if(current_area.type in skipped_areas || S.z != 1)
|
||||
continue
|
||||
S.charge = S.last_charge
|
||||
S.output = S.last_output
|
||||
S.online = S.last_online
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
for(var/area/A in world)
|
||||
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "space" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
|
||||
A.power_light = 1
|
||||
A.power_equip = 1
|
||||
A.power_environ = 1
|
||||
A.power_change()
|
||||
|
||||
/proc/power_restore_quick(var/announce = 1)
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
/obj/machinery/optable/proc/check_victim()
|
||||
if(locate(/mob/living/carbon/human, src.loc))
|
||||
var/mob/living/carbon/human/M = locate(/mob/living/carbon/human, src.loc)
|
||||
if(M.resting)
|
||||
if(M.lying)
|
||||
src.victim = M
|
||||
icon_state = M.pulse ? "table2-active" : "table2-idle"
|
||||
return 1
|
||||
|
||||
@@ -357,22 +357,7 @@
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(!stunned)
|
||||
update_icons()
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
handle_statuses()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -461,3 +446,8 @@
|
||||
if(!(status_flags & GODMODE))
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
/mob/living/carbon/alien/humanoid/handle_stunned()
|
||||
if(stunned && !..())
|
||||
update_icons()
|
||||
return stunned
|
||||
|
||||
@@ -274,20 +274,7 @@ FUCK YOU MORE FAT CODE -Hawk*/
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
handle_statuses()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -186,20 +186,7 @@
|
||||
emp_damage -= 1
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
handle_statuses()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -1180,25 +1180,7 @@
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
speech_problem_flag = 1
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if(stuttering)
|
||||
speech_problem_flag = 1
|
||||
stuttering = max(stuttering-1, 0)
|
||||
if (slurring)
|
||||
speech_problem_flag = 1
|
||||
slurring = max(slurring-1, 0)
|
||||
if(silent)
|
||||
speech_problem_flag = 1
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
handle_statuses()
|
||||
|
||||
// If you're dirty, your gloves will become dirty, too.
|
||||
if(gloves && germ_level > gloves.germ_level && prob(10))
|
||||
@@ -1826,6 +1808,25 @@
|
||||
hud_list[SPECIALROLE_HUD] = holder
|
||||
hud_updateflag = 0
|
||||
|
||||
/mob/living/carbon/human/handle_silent()
|
||||
if(..())
|
||||
speech_problem_flag = 1
|
||||
return silent
|
||||
|
||||
/mob/living/carbon/human/handle_slurring()
|
||||
if(..())
|
||||
speech_problem_flag = 1
|
||||
return slurring
|
||||
|
||||
/mob/living/carbon/human/handle_stunned()
|
||||
if(..())
|
||||
speech_problem_flag = 1
|
||||
return stunned
|
||||
|
||||
/mob/living/carbon/human/handle_stuttering()
|
||||
if(..())
|
||||
speech_problem_flag = 1
|
||||
return stuttering
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
|
||||
@@ -555,20 +555,7 @@
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
handle_statuses()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
adjustOxyLoss(-1)
|
||||
|
||||
// Handle EMP-stun
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
handle_stunned()
|
||||
|
||||
//stage = 1
|
||||
//if (istype(src, /mob/living/silicon/ai)) // Are we not sure what we are?
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
if(world.timeofday >= silence_time)
|
||||
silence_time = null
|
||||
src << "<font color=green>Communication circuit reinitialized. Speech and messaging functionality restored.</font>"
|
||||
handle_statuses()
|
||||
|
||||
/mob/living/silicon/pai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
@@ -87,12 +87,9 @@
|
||||
if(health > maxHealth)
|
||||
health = maxHealth
|
||||
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(weakened)
|
||||
AdjustWeakened(-1)
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
handle_stunned()
|
||||
handle_weakened()
|
||||
handle_paralysed()
|
||||
|
||||
//Movement
|
||||
if(!client && !stop_automated_movement && wander && !anchored)
|
||||
|
||||
@@ -991,3 +991,46 @@ mob/proc/yank_out_object()
|
||||
if(!pinned.len)
|
||||
anchored = 0
|
||||
return 1
|
||||
|
||||
/mob/living/proc/handle_statuses()
|
||||
handle_stunned()
|
||||
handle_weakened()
|
||||
handle_stuttering()
|
||||
handle_silent()
|
||||
handle_drugged()
|
||||
handle_slurring()
|
||||
|
||||
/mob/living/proc/handle_stunned()
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
return stunned
|
||||
|
||||
/mob/living/proc/handle_weakened()
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
return weakened
|
||||
|
||||
/mob/living/proc/handle_stuttering()
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
return stuttering
|
||||
|
||||
/mob/living/proc/handle_silent()
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
return silent
|
||||
|
||||
/mob/living/proc/handle_drugged()
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return druggy
|
||||
|
||||
/mob/living/proc/handle_slurring()
|
||||
if(slurring)
|
||||
slurring = max(slurring-1, 0)
|
||||
return slurring
|
||||
|
||||
/mob/living/proc/handle_paralysed() // Currently only used by simple_animal.dm, treated as a special case in other mobs
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
return paralysis
|
||||
|
||||
@@ -315,6 +315,61 @@
|
||||
icon_state = "hair_e"
|
||||
gender = MALE // turnoff!
|
||||
|
||||
familyman
|
||||
name = "The Family Man"
|
||||
icon_state = "hair_thefamilyman"
|
||||
gender = MALE
|
||||
|
||||
mahdrills
|
||||
name = "Drillruru"
|
||||
icon_state = "hair_drillruru"
|
||||
gender = FEMALE
|
||||
|
||||
dandypomp
|
||||
name = "Dandy Pompadour"
|
||||
icon_state = "hair_dandypompadour"
|
||||
gender = MALE
|
||||
|
||||
poofy
|
||||
name = "Poofy"
|
||||
icon_state = "hair_poofy"
|
||||
gender = FEMALE
|
||||
|
||||
crono
|
||||
name = "Chrono"
|
||||
icon_state = "hair_toriyama"
|
||||
gender = MALE
|
||||
|
||||
vegeta
|
||||
name = "Vegeta"
|
||||
icon_state = "hair_toriyama2"
|
||||
gender = MALE
|
||||
|
||||
cia
|
||||
name = "CIA"
|
||||
icon_state = "hair_cia"
|
||||
gender = MALE
|
||||
|
||||
mulder
|
||||
name = "Mulder"
|
||||
icon_state = "hair_mulder"
|
||||
gender = MALE
|
||||
|
||||
scully
|
||||
name = "Scully"
|
||||
icon_state = "hair_scully"
|
||||
gender = FEMALE
|
||||
|
||||
nitori
|
||||
name = "Nitori"
|
||||
icon_state = "hair_nitori"
|
||||
gender = FEMALE
|
||||
|
||||
joestar
|
||||
name = "Joestar"
|
||||
icon_state = "hair_joestar"
|
||||
gender = MALE
|
||||
|
||||
bald
|
||||
name = "Bald"
|
||||
icon_state = "bald"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 55 KiB |
+304
-283
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user