mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Adds SSD for Silicons (#31205)
* Silicon SSD * Tied everything with a bow * Update code/modules/mob/living/silicon/robot/robot_logout.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> * Update robot_mob.dm * Apply suggestions from code review Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> --------- Signed-off-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
else
|
||||
player_ghosted++
|
||||
if(player_ghosted % 150 == 0)
|
||||
force_cryo_human(src)
|
||||
force_cryo(src)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_ssd()
|
||||
player_logged++
|
||||
@@ -75,7 +75,7 @@
|
||||
var/area/A = get_area(src)
|
||||
cryo_ssd(src)
|
||||
if(A.fast_despawn)
|
||||
force_cryo_human(src)
|
||||
force_cryo(src)
|
||||
|
||||
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
|
||||
..()
|
||||
|
||||
@@ -48,8 +48,10 @@
|
||||
else
|
||||
adjustOxyLoss(-1)
|
||||
|
||||
var/area/my_area = get_area(src)
|
||||
if(player_logged > 0 && stat != DEAD && job)
|
||||
handle_ssd()
|
||||
|
||||
var/area/my_area = get_area(src)
|
||||
if(!lacks_power())
|
||||
if(aiRestorePowerRoutine > 1)
|
||||
update_blind_effects()
|
||||
@@ -139,6 +141,9 @@
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
|
||||
/mob/living/silicon/ai/proc/handle_ssd()
|
||||
player_logged++ // No auto cryo, but this will give the AI SSD protection after the value of `SSD_WARNING_TIMER` is reached.
|
||||
|
||||
/mob/living/silicon/ai/updatehealth(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
health = 100
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up �_� ~Carn
|
||||
if(player_logged)
|
||||
overlays -= image('icons/effects/effects.dmi', icon_state = "zzz_glow_silicon")
|
||||
..()
|
||||
|
||||
if(stat != DEAD)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/mob/living/silicon/ai/Logout()
|
||||
..()
|
||||
if(mind && mind.active && stat != DEAD)
|
||||
overlays += image('icons/effects/effects.dmi', icon_state = "zzz_glow_silicon")
|
||||
for(var/obj/machinery/ai_status_display/O as anything in GLOB.ai_displays) //change status
|
||||
O.mode = AI_DISPLAY_MODE_BLANK
|
||||
|
||||
|
||||
@@ -467,6 +467,8 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
/mob/living/silicon/ai/update_icons()
|
||||
. = ..()
|
||||
update_hat_icons()
|
||||
if(player_logged) // make sure the SSD overlay stays
|
||||
overlays += image('icons/effects/effects.dmi', icon_state = "zzz_glow_silicon")
|
||||
|
||||
/mob/living/silicon/ai/proc/do_research()
|
||||
last_research_time = world.time
|
||||
|
||||
@@ -47,6 +47,10 @@
|
||||
setStaminaLoss(0, FALSE)
|
||||
update_stamina_hud()
|
||||
|
||||
// Keep SSD robots eepy.
|
||||
if(player_logged)
|
||||
Sleeping(4 SECONDS)
|
||||
|
||||
/mob/living/silicon/robot/proc/get_damaged_components(get_brute, get_burn, get_borked = FALSE, get_missing = FALSE)
|
||||
var/list/datum/robot_component/parts = list()
|
||||
for(var/V in components)
|
||||
|
||||
@@ -7,11 +7,28 @@
|
||||
|
||||
handle_equipment()
|
||||
|
||||
if(player_logged > 0 && stat != DEAD && job)
|
||||
handle_ssd()
|
||||
|
||||
// if Alive
|
||||
if(.)
|
||||
handle_robot_hud_updates()
|
||||
handle_robot_cell()
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_ssd()
|
||||
player_logged++
|
||||
if(istype(loc, /obj/machinery/cryopod/robot))
|
||||
return
|
||||
|
||||
if(GLOB.configuration.afk.ssd_auto_cryo_minutes && (player_logged >= (GLOB.configuration.afk.ssd_auto_cryo_minutes * 30)) && player_logged % 30 == 0)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!is_station_level(T.z))
|
||||
return
|
||||
|
||||
cryo_ssd(src)
|
||||
var/area/A = get_area(src)
|
||||
if(A.fast_despawn)
|
||||
force_cryo(src)
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_robot_cell()
|
||||
if(stat == DEAD)
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/mob/living/silicon/robot/Login()
|
||||
if(player_logged)
|
||||
overlays -= image('icons/effects/effects.dmi', icon_state = "zzz_glow_silicon")
|
||||
..()
|
||||
regenerate_icons()
|
||||
|
||||
show_laws(0)
|
||||
if(connected_ai)
|
||||
if(connected_ai.mind.special_role == SPECIAL_ROLE_TRAITOR && connected_ai.malf_picker)
|
||||
make_malf_robot()
|
||||
regenerate_icons()
|
||||
update_icons()
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/mob/living/silicon/robot/Logout()
|
||||
..()
|
||||
if(mind?.active && stat != DEAD)
|
||||
overlays += image('icons/effects/effects.dmi', icon_state = "zzz_glow_silicon")
|
||||
@@ -1301,7 +1301,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
update_rolling_icon()
|
||||
|
||||
// Dead or incapacitated.
|
||||
if(stat == DEAD || (IsParalyzed() || IsStunned() || IsWeakened() || low_power_mode))
|
||||
if(stat == DEAD || (IsParalyzed() || IsStunned() || IsSleeping() || IsWeakened() || low_power_mode))
|
||||
overlays -= "eyes"
|
||||
else if((base_icon_state in grouped_eye_names) || (base_icon_state in sprites_with_variants))
|
||||
overlays += "eyes-[base_icon_state]"
|
||||
@@ -1324,6 +1324,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
robot_module_hat_offset()
|
||||
update_hat_icons()
|
||||
update_fire()
|
||||
if(player_logged) // make sure the SSD overlay stays
|
||||
overlays += image('icons/effects/effects.dmi', icon_state = "zzz_glow_silicon")
|
||||
|
||||
// Exists so that robot/destroyer can override it.
|
||||
/mob/living/silicon/robot/proc/update_rolling_icon()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
death()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
return
|
||||
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsStunned() || IsWeakened() || getOxyLoss() > maxHealth * 0.5) // Borgs need to be able to sleep for adminfreeze
|
||||
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsStunned() || IsSleeping() || IsWeakened() || getOxyLoss() > maxHealth * 0.5) // Borgs need to be able to sleep for adminfreeze
|
||||
if(stat == CONSCIOUS)
|
||||
KnockOut()
|
||||
create_debug_log("fell unconscious, trigger reason: [reason]")
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
var/has_limbs = 1 //Whether this mob have any limbs he can move with
|
||||
|
||||
//SSD var, changed it up some so people can have special things happen for different mobs when SSD.
|
||||
// Counts how many `Life()` ticks have occured on an SSD mob, for SSD handling. There isn't a `/mob`-level proc for SSD handling, so you must define one for any mob that you want to give SSD effects to.
|
||||
var/player_logged = 0
|
||||
|
||||
//Ghosted var, set only if a player has manually ghosted out of this mob.
|
||||
|
||||
Reference in New Issue
Block a user