@@ -1,35 +1,35 @@
|
||||
|
||||
/mob/living/silicon/robot/gib_animation()
|
||||
|
||||
/mob/living/silicon/robot/gib_animation()
|
||||
new /obj/effect/temp_visual/gib_animation(loc, "gibbed-r")
|
||||
|
||||
/mob/living/silicon/robot/dust()
|
||||
if(mmi)
|
||||
qdel(mmi)
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/spawn_dust()
|
||||
new /obj/effect/decal/remains/robot(loc)
|
||||
|
||||
/mob/living/silicon/robot/dust_animation()
|
||||
|
||||
/mob/living/silicon/robot/dust()
|
||||
if(mmi)
|
||||
qdel(mmi)
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/spawn_dust()
|
||||
new /obj/effect/decal/remains/robot(loc)
|
||||
|
||||
/mob/living/silicon/robot/dust_animation()
|
||||
new /obj/effect/temp_visual/dust_animation(loc, "dust-r")
|
||||
|
||||
/mob/living/silicon/robot/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
locked = 0 //unlock cover
|
||||
|
||||
update_canmove()
|
||||
if(camera && camera.status)
|
||||
camera.toggle_cam(src,0)
|
||||
update_headlamp(1) //So borg lights are disabled when killed.
|
||||
|
||||
uneq_all() // particularly to ensure sight modes are cleared
|
||||
|
||||
update_icons()
|
||||
|
||||
unbuckle_all_mobs(TRUE)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
locked = 0 //unlock cover
|
||||
|
||||
update_canmove()
|
||||
if(camera && camera.status)
|
||||
camera.toggle_cam(src,0)
|
||||
update_headlamp(1) //So borg lights are disabled when killed.
|
||||
|
||||
uneq_all() // particularly to ensure sight modes are cleared
|
||||
|
||||
update_icons()
|
||||
|
||||
unbuckle_all_mobs(TRUE)
|
||||
|
||||
SSblackbox.ReportDeath(src)
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
/mob/living/silicon/robot/examine(mob/user)
|
||||
/mob/living/silicon/robot/examine(mob/user)
|
||||
var/msg = "<span class='info'>*---------*\nThis is [bicon(src)] \a <EM>[src]</EM>!\n"
|
||||
if(desc)
|
||||
msg += "[desc]\n"
|
||||
|
||||
var/obj/act_module = get_active_held_item()
|
||||
if(act_module)
|
||||
if(desc)
|
||||
msg += "[desc]\n"
|
||||
|
||||
var/obj/act_module = get_active_held_item()
|
||||
if(act_module)
|
||||
msg += "It is holding [bicon(act_module)] \a [act_module].\n"
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < maxHealth*0.5)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < maxHealth*0.5)
|
||||
msg += "It looks slightly charred.\n"
|
||||
else
|
||||
msg += "<B>It looks severely burnt and heat-warped!</B>\n"
|
||||
if (src.health < -maxHealth*0.5)
|
||||
msg += "It looks barely operational.\n"
|
||||
if (src.fire_stacks < 0)
|
||||
msg += "It's covered in water.\n"
|
||||
else if (src.fire_stacks > 0)
|
||||
msg += "It's coated in something flammable.\n"
|
||||
msg += "</span>"
|
||||
|
||||
if(opened)
|
||||
msg += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>\n"
|
||||
else
|
||||
msg += "Its cover is closed[locked ? "" : ", and looks unlocked"].\n"
|
||||
|
||||
if(cell && cell.charge <= 0)
|
||||
msg += "<span class='warning'>Its battery indicator is blinking red!</span>\n"
|
||||
|
||||
if(is_servant_of_ratvar(src) && user.Adjacent(src) && !stat) //To counter pseudo-stealth by using headlamps
|
||||
msg += "<span class='warning'>Its eyes are glowing a blazing yellow!</span>\n"
|
||||
|
||||
switch(stat)
|
||||
if(CONSCIOUS)
|
||||
if(shell)
|
||||
msg += "It appears to be an [deployed ? "active" : "empty"] AI shell.\n"
|
||||
else if(!client)
|
||||
msg += "It appears to be in stand-by mode.\n" //afk
|
||||
if(UNCONSCIOUS)
|
||||
msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
|
||||
if(DEAD)
|
||||
msg += "<span class='deadsay'>It looks like its system is corrupted and requires a reset.</span>\n"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
to_chat(user, msg)
|
||||
|
||||
..()
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < maxHealth*0.5)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < maxHealth*0.5)
|
||||
msg += "It looks slightly charred.\n"
|
||||
else
|
||||
msg += "<B>It looks severely burnt and heat-warped!</B>\n"
|
||||
if (src.health < -maxHealth*0.5)
|
||||
msg += "It looks barely operational.\n"
|
||||
if (src.fire_stacks < 0)
|
||||
msg += "It's covered in water.\n"
|
||||
else if (src.fire_stacks > 0)
|
||||
msg += "It's coated in something flammable.\n"
|
||||
msg += "</span>"
|
||||
|
||||
if(opened)
|
||||
msg += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>\n"
|
||||
else
|
||||
msg += "Its cover is closed[locked ? "" : ", and looks unlocked"].\n"
|
||||
|
||||
if(cell && cell.charge <= 0)
|
||||
msg += "<span class='warning'>Its battery indicator is blinking red!</span>\n"
|
||||
|
||||
if(is_servant_of_ratvar(src) && user.Adjacent(src) && !stat) //To counter pseudo-stealth by using headlamps
|
||||
msg += "<span class='warning'>Its eyes are glowing a blazing yellow!</span>\n"
|
||||
|
||||
switch(stat)
|
||||
if(CONSCIOUS)
|
||||
if(shell)
|
||||
msg += "It appears to be an [deployed ? "active" : "empty"] AI shell.\n"
|
||||
else if(!client)
|
||||
msg += "It appears to be in stand-by mode.\n" //afk
|
||||
if(UNCONSCIOUS)
|
||||
msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
|
||||
if(DEAD)
|
||||
msg += "<span class='deadsay'>It looks like its system is corrupted and requires a reset.</span>\n"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
to_chat(user, msg)
|
||||
|
||||
..()
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
/mob/living/silicon/robot/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (src.notransform)
|
||||
return
|
||||
|
||||
..()
|
||||
handle_robot_hud_updates()
|
||||
handle_robot_cell()
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_robot_cell()
|
||||
if(stat != DEAD)
|
||||
if(low_power_mode)
|
||||
if(cell && cell.charge)
|
||||
low_power_mode = 0
|
||||
update_headlamp()
|
||||
else if(stat == CONSCIOUS)
|
||||
use_power()
|
||||
|
||||
/mob/living/silicon/robot/proc/use_power()
|
||||
if(cell && cell.charge)
|
||||
if(cell.charge <= 100)
|
||||
uneq_all()
|
||||
var/amt = Clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
|
||||
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
|
||||
else
|
||||
uneq_all()
|
||||
low_power_mode = 1
|
||||
update_headlamp()
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_robot_hud_updates()
|
||||
if(!client)
|
||||
return
|
||||
|
||||
update_cell_hud_icon()
|
||||
|
||||
if(syndicate)
|
||||
if(SSticker.mode.name == "traitor")
|
||||
for(var/datum/mind/tra in SSticker.mode.traitors)
|
||||
if(tra.current)
|
||||
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor") //no traitor sprite in that dmi!
|
||||
src.client.images += I
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots -= src
|
||||
connected_ai = null
|
||||
if(mind)
|
||||
if(!mind.special_role)
|
||||
mind.special_role = "traitor"
|
||||
SSticker.mode.traitors += mind
|
||||
|
||||
|
||||
/mob/living/silicon/robot/update_health_hud()
|
||||
if(!client || !hud_used)
|
||||
return
|
||||
if(hud_used.healths)
|
||||
if(stat != DEAD)
|
||||
if(health >= maxHealth)
|
||||
hud_used.healths.icon_state = "health0"
|
||||
else if(health > maxHealth*0.6)
|
||||
hud_used.healths.icon_state = "health2"
|
||||
else if(health > maxHealth*0.2)
|
||||
hud_used.healths.icon_state = "health3"
|
||||
else if(health > -maxHealth*0.2)
|
||||
hud_used.healths.icon_state = "health4"
|
||||
else if(health > -maxHealth*0.6)
|
||||
hud_used.healths.icon_state = "health5"
|
||||
else
|
||||
hud_used.healths.icon_state = "health6"
|
||||
else
|
||||
hud_used.healths.icon_state = "health7"
|
||||
|
||||
/mob/living/silicon/robot/proc/update_cell_hud_icon()
|
||||
if(cell)
|
||||
var/cellcharge = cell.charge/cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
clear_alert("charge")
|
||||
if(0.5 to 0.75)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 1)
|
||||
if(0.25 to 0.5)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 2)
|
||||
if(0.01 to 0.25)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 3)
|
||||
else
|
||||
throw_alert("charge", /obj/screen/alert/emptycell)
|
||||
else
|
||||
throw_alert("charge", /obj/screen/alert/nocell)
|
||||
|
||||
//Robots on fire
|
||||
/mob/living/silicon/robot/handle_fire()
|
||||
if(..())
|
||||
return
|
||||
if(fire_stacks > 0)
|
||||
fire_stacks--
|
||||
fire_stacks = max(0, fire_stacks)
|
||||
else
|
||||
ExtinguishMob()
|
||||
|
||||
//adjustFireLoss(3)
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/update_fire()
|
||||
/mob/living/silicon/robot/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (src.notransform)
|
||||
return
|
||||
|
||||
..()
|
||||
handle_robot_hud_updates()
|
||||
handle_robot_cell()
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_robot_cell()
|
||||
if(stat != DEAD)
|
||||
if(low_power_mode)
|
||||
if(cell && cell.charge)
|
||||
low_power_mode = 0
|
||||
update_headlamp()
|
||||
else if(stat == CONSCIOUS)
|
||||
use_power()
|
||||
|
||||
/mob/living/silicon/robot/proc/use_power()
|
||||
if(cell && cell.charge)
|
||||
if(cell.charge <= 100)
|
||||
uneq_all()
|
||||
var/amt = Clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
|
||||
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
|
||||
else
|
||||
uneq_all()
|
||||
low_power_mode = 1
|
||||
update_headlamp()
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_robot_hud_updates()
|
||||
if(!client)
|
||||
return
|
||||
|
||||
update_cell_hud_icon()
|
||||
|
||||
if(syndicate)
|
||||
if(SSticker.mode.name == "traitor")
|
||||
for(var/datum/mind/tra in SSticker.mode.traitors)
|
||||
if(tra.current)
|
||||
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor") //no traitor sprite in that dmi!
|
||||
src.client.images += I
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots -= src
|
||||
connected_ai = null
|
||||
if(mind)
|
||||
if(!mind.special_role)
|
||||
mind.special_role = "traitor"
|
||||
SSticker.mode.traitors += mind
|
||||
|
||||
|
||||
/mob/living/silicon/robot/update_health_hud()
|
||||
if(!client || !hud_used)
|
||||
return
|
||||
if(hud_used.healths)
|
||||
if(stat != DEAD)
|
||||
if(health >= maxHealth)
|
||||
hud_used.healths.icon_state = "health0"
|
||||
else if(health > maxHealth*0.6)
|
||||
hud_used.healths.icon_state = "health2"
|
||||
else if(health > maxHealth*0.2)
|
||||
hud_used.healths.icon_state = "health3"
|
||||
else if(health > -maxHealth*0.2)
|
||||
hud_used.healths.icon_state = "health4"
|
||||
else if(health > -maxHealth*0.6)
|
||||
hud_used.healths.icon_state = "health5"
|
||||
else
|
||||
hud_used.healths.icon_state = "health6"
|
||||
else
|
||||
hud_used.healths.icon_state = "health7"
|
||||
|
||||
/mob/living/silicon/robot/proc/update_cell_hud_icon()
|
||||
if(cell)
|
||||
var/cellcharge = cell.charge/cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
clear_alert("charge")
|
||||
if(0.5 to 0.75)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 1)
|
||||
if(0.25 to 0.5)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 2)
|
||||
if(0.01 to 0.25)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 3)
|
||||
else
|
||||
throw_alert("charge", /obj/screen/alert/emptycell)
|
||||
else
|
||||
throw_alert("charge", /obj/screen/alert/nocell)
|
||||
|
||||
//Robots on fire
|
||||
/mob/living/silicon/robot/handle_fire()
|
||||
if(..())
|
||||
return
|
||||
if(fire_stacks > 0)
|
||||
fire_stacks--
|
||||
fire_stacks = max(0, fire_stacks)
|
||||
else
|
||||
ExtinguishMob()
|
||||
|
||||
//adjustFireLoss(3)
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/update_fire()
|
||||
var/mutable_appearance/fire_overlay = mutable_appearance('icons/mob/OnFire.dmi', "Generic_mob_burning")
|
||||
if(on_fire)
|
||||
if(on_fire)
|
||||
add_overlay(fire_overlay)
|
||||
else
|
||||
else
|
||||
cut_overlay(fire_overlay)
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
if(stat || buckled || lockcharge)
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
if(stat || buckled || lockcharge)
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
@@ -566,7 +566,7 @@
|
||||
else if(ismonkey(M))
|
||||
var/mob/living/carbon/monkey/george = M
|
||||
//they can only hold things :(
|
||||
if(istype(george.get_active_held_item(), /obj/item))
|
||||
if(isitem(george.get_active_held_item()))
|
||||
return check_access(george.get_active_held_item())
|
||||
return 0
|
||||
|
||||
@@ -578,7 +578,7 @@
|
||||
if(!L.len) //no requirements
|
||||
return 1
|
||||
|
||||
if(!istype(I, /obj/item/weapon/card/id) && istype(I, /obj/item))
|
||||
if(!istype(I, /obj/item/weapon/card/id) && isitem(I))
|
||||
I = I.GetID()
|
||||
|
||||
if(!I || !I.access) //not ID or no access
|
||||
@@ -594,7 +594,6 @@
|
||||
/mob/living/silicon/robot/update_icons()
|
||||
cut_overlays()
|
||||
icon_state = module.cyborg_base_icon
|
||||
|
||||
if(module.cyborg_base_icon == "medihound")
|
||||
icon = 'icons/mob/widerobot.dmi'
|
||||
pixel_x = -16
|
||||
@@ -633,7 +632,7 @@
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
pixel_x = initial(pixel_x)
|
||||
|
||||
if(stat != DEAD && !(paralysis || stunned || weakened || low_power_mode)) //Not dead, not stunned.
|
||||
if(stat != DEAD && !(IsUnconscious() || IsStun() || IsKnockdown() || low_power_mode)) //Not dead, not stunned.
|
||||
if(!eye_lights)
|
||||
eye_lights = new()
|
||||
if(lamp_intensity > 2)
|
||||
@@ -959,7 +958,7 @@
|
||||
if(health <= -maxHealth) //die only once
|
||||
death()
|
||||
return
|
||||
if(paralysis || stunned || weakened || getOxyLoss() > maxHealth*0.5)
|
||||
if(IsUnconscious() || IsStun() || IsKnockdown() || getOxyLoss() > maxHealth*0.5)
|
||||
if(stat == CONSCIOUS)
|
||||
stat = UNCONSCIOUS
|
||||
blind_eyes(1)
|
||||
@@ -1127,7 +1126,8 @@
|
||||
camera.c_tag = real_name //update the camera name too
|
||||
diag_hud_set_aishell()
|
||||
mainframe.diag_hud_set_deployed()
|
||||
mainframe.show_laws() //Always remind the AI when switching
|
||||
if(mainframe.laws)
|
||||
mainframe.laws.show_laws(mainframe) //Always remind the AI when switching
|
||||
mainframe = null
|
||||
|
||||
/mob/living/silicon/robot/attack_ai(mob/user)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"<span class='userdanger'>[M] has disabled [src]'s active module!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
add_logs(M, src, "disarmed", "[I ? " removing \the [I]" : ""]")
|
||||
else
|
||||
Stun(2)
|
||||
Stun(40)
|
||||
step(src,get_dir(M,src))
|
||||
add_logs(M, src, "pushed")
|
||||
visible_message("<span class='danger'>[M] has forced back [src]!</span>", \
|
||||
@@ -80,9 +80,9 @@
|
||||
/mob/living/silicon/robot/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Stun(8)
|
||||
Stun(160)
|
||||
if(2)
|
||||
Stun(3)
|
||||
Stun(60)
|
||||
..()
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
return
|
||||
|
||||
SetEmagged(1)
|
||||
SetStunned(3) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown
|
||||
SetStun(60) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown
|
||||
lawupdate = 0
|
||||
connected_ai = null
|
||||
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
|
||||
|
||||
Reference in New Issue
Block a user