Me go sleeb

This commit is contained in:
VerySoft
2022-06-27 06:20:03 -04:00
parent 0a36d76423
commit dc79359d34
7 changed files with 207 additions and 8 deletions
+15 -3
View File
@@ -1,8 +1,5 @@
/mob/living/silicon/pai/Life()
if (src.stat == DEAD)
return
if(src.cable)
if(get_dist(src, src.cable) > 1)
var/turf/T = get_turf_or_move(src.loc)
@@ -13,6 +10,21 @@
qdel(src.cable)
src.cable = null
if (src.stat == DEAD)
return
if(!card.cell || !card.processor || !card.board || !card.capacitor)
death()
if(!card.projector && !card.emitter)
if(loc != card)
close_up()
to_chat(src, "<span class ='warning'>ERROR: System malfunction. Service required!</span>")
if(!card.projector || !card.emitter)
if(prob(5))
close_up()
to_chat(src, "<span class ='warning'>ERROR: System malfunction. Service recommended!</span>")
handle_regular_hud_updates()
handle_vision()
+7 -3
View File
@@ -171,7 +171,8 @@
/mob/living/silicon/pai/emp_act(severity)
// Silence for 2 minutes
// 20% chance to kill
// 20% chance to damage critical components
// 50% chance to damage a non critical component
// 33% chance to unbind
// 33% chance to change prime directive (based on severity)
// 33% chance of no additional effect
@@ -180,10 +181,12 @@
to_chat(src, "<font color=green><b>Communication circuit overload. Shutting down and reloading communication circuits - speech and messaging functionality will be unavailable until the reboot is complete.</b></font>")
if(prob(20))
var/turf/T = get_turf_or_move(src.loc)
card.death_damage()
for (var/mob/M in viewers(T))
M.show_message("<font color='red'>A shower of sparks spray from [src]'s inner workings.</font>", 3, "<font color='red'>You hear and smell the ozone hiss of electrical sparks being expelled violently.</font>", 2)
return src.death(0)
return
if(prob(50))
card.damage_random_component(TRUE)
switch(pick(1,2,3))
if(1)
src.master = null
@@ -285,6 +288,7 @@
card.forceMove(src)
card.screen_loc = null
canmove = TRUE
var/turf/T = get_turf(src)
if(istype(T)) T.visible_message("<b>[src]</b> folds outwards, expanding into a mobile form.")
+20 -1
View File
@@ -67,8 +67,8 @@
/mob/living/silicon/pai/Login()
. = ..()
last_special = world.time + 100 //Let's give get_character_icon time to work
if(!holo_icon)
last_special = world.time + 100 //Let's give get_character_icon time to work
get_character_icon()
if(stat == DEAD)
healths.icon_state = "health7"
@@ -76,7 +76,14 @@
/mob/living/silicon/pai/proc/full_restore()
adjustBruteLoss(- bruteloss)
adjustFireLoss(- fireloss)
spawn(10)
card.cut_overlays()
card.setEmotion(16)
update_icon()
spawn(50)
stat = CONSCIOUS
canmove = TRUE
card.setEmotion(15)
/mob/living/silicon/pai/proc/pai_nom(var/mob/living/T in oview(1))
set name = "pAI Nom"
@@ -628,3 +635,15 @@
icon = holo_icon
else
icon = holo_icon_north
/mob/living/silicon/pai/adjustBruteLoss(amount, include_robo)
. = ..()
if(amount > 0 && health <= 90) //Something's probably attacking us!
if(prob(amount)) //The more damage it is doing, the more likely it is to damage something important!
card.damage_random_component()
/mob/living/silicon/pai/adjustFireLoss(amount, include_robo)
. = ..()
if(amount > 0 && health <= 90)
if(prob(amount))
card.damage_random_component()