mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 13:32:32 +00:00
@@ -55,7 +55,8 @@
|
||||
return //TODO: DEFERRED
|
||||
|
||||
/mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(status_flags & GODMODE) return
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(exposed_temperature > bodytemperature)
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
|
||||
@@ -48,6 +48,11 @@ var/list/ai_verbs_default = list(
|
||||
anchored = 1 // -- TLE
|
||||
density = 1
|
||||
status_flags = CANSTUN|CANPARALYSE|CANPUSH
|
||||
|
||||
var/fireloss = 0
|
||||
var/bruteloss = 0
|
||||
var/oxyloss = 0
|
||||
|
||||
//shouldnt_see - set in New()
|
||||
var/list/network = list("Station")
|
||||
var/obj/machinery/camera/camera = null
|
||||
@@ -189,6 +194,19 @@ var/list/ai_verbs_default = list(
|
||||
ai_list += src
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
QDEL_NULL(aiPDA)
|
||||
QDEL_NULL(aiMulti)
|
||||
QDEL_NULL(aiRadio)
|
||||
ai_list -= src
|
||||
destroy_eyeobj()
|
||||
QDEL_NULL(psupply)
|
||||
QDEL_NULL(aiMulti)
|
||||
QDEL_NULL(aiRadio)
|
||||
QDEL_NULL(aiCamera)
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/proc/init_powersupply()
|
||||
new /obj/machinery/ai_powersupply(src)
|
||||
|
||||
@@ -218,18 +236,49 @@ var/list/ai_verbs_default = list(
|
||||
setup_icon()
|
||||
eyeobj.possess(src)
|
||||
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
QDEL_NULL(aiPDA)
|
||||
QDEL_NULL(aiMulti)
|
||||
QDEL_NULL(aiRadio)
|
||||
ai_list -= src
|
||||
destroy_eyeobj()
|
||||
QDEL_NULL(psupply)
|
||||
QDEL_NULL(aiMulti)
|
||||
QDEL_NULL(aiRadio)
|
||||
QDEL_NULL(aiCamera)
|
||||
/mob/living/silicon/ai/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
return ..()
|
||||
/mob/living/silicon/ai/getBruteLoss()
|
||||
return bruteloss
|
||||
|
||||
/mob/living/silicon/ai/getOxyLoss()
|
||||
return oxyloss
|
||||
|
||||
/mob/living/silicon/ai/adjustFireLoss(var/amount)
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
fireloss = max(0, fireloss + min(amount, health))
|
||||
|
||||
/mob/living/silicon/ai/adjustBruteLoss(var/amount)
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
bruteloss = max(0, bruteloss + min(amount, health))
|
||||
|
||||
/mob/living/silicon/ai/adjustOxyLoss(var/amount)
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
oxyloss = max(0, oxyloss + min(amount, maxHealth - oxyloss))
|
||||
|
||||
/mob/living/silicon/ai/setFireLoss(var/amount)
|
||||
if(status_flags & GODMODE)
|
||||
fireloss = 0
|
||||
return
|
||||
fireloss = max(0, amount)
|
||||
|
||||
/mob/living/silicon/ai/setOxyLoss(var/amount)
|
||||
if(status_flags & GODMODE)
|
||||
oxyloss = 0
|
||||
return
|
||||
oxyloss = max(0, amount)
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
setOxyLoss(0)
|
||||
else
|
||||
health = maxHealth - getFireLoss() - getBruteLoss() // Oxyloss is not part of health as it represents AIs backup power. AI is immune against ToxLoss as it is machine.
|
||||
|
||||
/mob/living/silicon/ai/proc/setup_icon()
|
||||
var/datum/custom_synth/sprite = robot_custom_icons[name]
|
||||
|
||||
@@ -139,14 +139,6 @@
|
||||
var/area/A = get_area(src)
|
||||
return ((!A.power_equip) && A.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item)
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
health = 100
|
||||
stat = CONSCIOUS
|
||||
setOxyLoss(0)
|
||||
else
|
||||
health = 100 - getFireLoss() - getBruteLoss() // Oxyloss is not part of health as it represents AIs backup power. AI is immune against ToxLoss as it is machine.
|
||||
|
||||
/mob/living/silicon/ai/rejuvenate()
|
||||
..()
|
||||
add_ai_verbs(src)
|
||||
|
||||
@@ -102,11 +102,11 @@
|
||||
|
||||
// Returns percentage of AI's remaining backup capacitor charge (maxhealth - oxyloss).
|
||||
/mob/living/silicon/ai/proc/backup_capacitor()
|
||||
return ((200 - getOxyLoss()) / 2)
|
||||
return ((getOxyLoss() - maxHealth) / maxHealth) * -100
|
||||
|
||||
// Returns percentage of AI's remaining hardware integrity (maxhealth - (bruteloss + fireloss))
|
||||
/mob/living/silicon/ai/proc/hardware_integrity()
|
||||
return (health-config.health_threshold_dead)/2
|
||||
return (health / maxHealth) * 100
|
||||
|
||||
// Shows capacitor charge and hardware integrity information to the AI in Status tab.
|
||||
/mob/living/silicon/ai/show_system_integrity()
|
||||
|
||||
Reference in New Issue
Block a user