Merge pull request #43 from Markolie/master

HUD fixes, Vox naming change, Beepsky ID fix, IPC fixes
This commit is contained in:
Fox-McCloud
2014-12-06 03:04:27 -05:00
40 changed files with 1977 additions and 1942 deletions
+8
View File
@@ -40,6 +40,14 @@
face_atom(A) // change direction to face what you clicked on
if(aiCamera.in_camera_mode)
aiCamera.camera_mode_off()
if(is_component_functioning("camera"))
aiCamera.captureimage(A, usr)
else
src << "<span class='userdanger'>Your camera isn't functional.</span>"
return
/*
cyborg restrained() currently does nothing
if(restrained())
+1
View File
@@ -60,6 +60,7 @@
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens
#define ui_borg_sensor "5:16,1:5" //borgs
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
+1 -5
View File
@@ -132,7 +132,7 @@
//Medical/Security sensors
using = new /obj/screen()
using.name = "Toggle Sensors"
using.name = "Set Sensor Augmentation"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "ai_sensor"
using.screen_loc = ui_ai_sensor
@@ -140,8 +140,4 @@
adding += using
mymob.client.screen += adding + other
return
mymob.client.screen += adding + other
return
+9
View File
@@ -50,6 +50,15 @@
//End of module select
//Sec/Med HUDs
using = new /obj/screen()
using.name = "Toggle Sensor Augmentation"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "ai_sensor"
using.screen_loc = ui_borg_sensor
using.layer = 20
adding += using
//Intent
using = new /obj/screen()
using.name = "act_intent"
+6 -1
View File
@@ -406,6 +406,11 @@
R.uneq_active()
R.hud_used.update_robot_modules_display()
if("Toggle Sensor Augmentation")
if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
R.control_hud()
if("module1")
if(istype(usr, /mob/living/silicon/robot))
usr:toggle_module(1)
@@ -549,7 +554,7 @@
var/mob/living/silicon/ai/AI = usr
AI.aiCamera.viewpictures()
if("Toggle Sensors")
if("Set Sensor Augmentation")
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.control_hud()
+82
View File
@@ -0,0 +1,82 @@
/* Using the HUD procs is simple. Call these procs in the life.dm of the intended mob.
Use the regular_hud_updates() proc before process_med_hud(mob) or process_sec_hud(mob) so
the HUD updates properly! */
//Medical HUD outputs. Called by the Life() proc of the mob using it, usually.
proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
if(!can_process_hud(M))
return
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, med_hud_users)
for(var/mob/living/carbon/human/patient in P.Mob.in_view(P.Turf))
if(P.Mob.see_invisible < patient.invisibility)
continue
if(!local_scanner)
if(istype(patient.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = patient.w_uniform
if(U.sensor_mode < 2)
continue
else
continue
P.Client.images += patient.hud_list[HEALTH_HUD]
if(local_scanner)
P.Client.images += patient.hud_list[STATUS_HUD]
//Security HUDs. Pass a value for the second argument to enable implant viewing or other special features.
proc/process_sec_hud(var/mob/M, var/advanced_mode, var/mob/Alt)
if(!can_process_hud(M))
return
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, sec_hud_users)
for(var/mob/living/carbon/human/perp in P.Mob.in_view(P.Turf))
if(P.Mob.see_invisible < perp.invisibility)
continue
P.Client.images += perp.hud_list[ID_HUD]
if(advanced_mode)
P.Client.images += perp.hud_list[WANTED_HUD]
P.Client.images += perp.hud_list[IMPTRACK_HUD]
P.Client.images += perp.hud_list[IMPLOYAL_HUD]
P.Client.images += perp.hud_list[IMPCHEM_HUD]
datum/arranged_hud_process
var/client/Client
var/mob/Mob
var/turf/Turf
proc/arrange_hud_process(var/mob/M, var/mob/Alt, var/list/hud_list)
hud_list |= M
var/datum/arranged_hud_process/P = new
P.Client = M.client
P.Mob = Alt ? Alt : M
P.Turf = get_turf(P.Mob)
return P
proc/can_process_hud(var/mob/M)
if(!M)
return 0
if(!M.client)
return 0
if(M.stat != CONSCIOUS)
return 0
return 1
//Deletes the current HUD images so they can be refreshed with new ones.
mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs.
if(client)
for(var/image/hud in client.images)
if(copytext(hud.icon_state,1,4) == "hud")
client.images -= hud
med_hud_users -= src
sec_hud_users -= src
mob/proc/in_view(var/turf/T)
return view(T)
/mob/aiEye/in_view(var/turf/T)
var/list/viewed = new
for(var/mob/living/carbon/human/H in mob_list)
if(get_dist(H, T) <= 7)
viewed += H
return viewed
+16 -38
View File
@@ -20,11 +20,8 @@
if (computer)
computer.table = src
break
// spawn(100) //Wont the MC just call this process() before and at the 10 second mark anyway?
// process()
/obj/machinery/optable/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
@@ -76,41 +73,17 @@
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(O.loc == user) //no you can't pull things out of your ass
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
return
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
return
if(!ismob(O)) //humans only
return
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit
return
if(!ishuman(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
return
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
return
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr))
return
var/mob/living/L = O
if(!istype(L) || L.buckled)
return
for(var/mob/living/carbon/slime/M in range(1,L))
if(M.Victim == L)
usr << "[L.name] cannot be operated on while they have \a [M] attached to their head!"
return
if(src.victim)
usr << "\blue <B>The table is already occupied!</B>"
return
take_victim(L, user)
take_victim(L,usr)
return
/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
@@ -146,11 +119,7 @@
set category = "Object"
set src in oview(1)
if(usr.stat || !ishuman(usr) || usr.buckled || usr.restrained())
return
if(src.victim)
usr << "\blue <B>The table is already occupied!</B>"
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr))
return
take_victim(usr,usr)
@@ -162,5 +131,14 @@
del(W)
return
/obj/machinery/optable/slime
icon_state = "table-slime"
/obj/machinery/optable/proc/check_table(mob/living/carbon/patient as mob)
if(src.victim)
usr << "\blue <B>The table is already occupied!</B>"
return 0
if(patient.buckled)
usr << "\blue <B>Unbuckle first!</B>"
return 0
return 1
+2 -3
View File
@@ -602,6 +602,5 @@
if((robot.z == src.z) && !robot.blinded)
if((skin == "bezerk") && (!("syndicate" in robot.faction)))
continue
for(var/obj/I in robot.contents)
if(istype(I, /obj/item/borg/sight/hud/med))
robot << "<span class='info'>\icon[I] Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!"
if(robot.sensor_mode == 2)
robot << "<span class='info'>Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!"
+3 -5
View File
@@ -264,7 +264,7 @@ Auto Patrol: []"},
playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
target.visible_message("<span class='danger'>[src] is trying to put handcuffs on [target]!</span>",\
"<span class='userdanger'>[src] is trying to put handcuffs on [target]!</span>")
spawn(80)
spawn(60)
if( !Adjacent(target) || !isturf(target.loc) ) //if he's in a closet or not adjacent, we cancel cuffing.
return
if(!target.handcuffed)
@@ -483,7 +483,5 @@ Auto Patrol: []"},
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/security) || istype(human.glasses, /obj/item/clothing/glasses/sunglasses/sechud) && !human.blinded)
human << "<span class='info'>\icon[human.glasses] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
for(var/mob/living/silicon/robot in world)
if((robot.z == src.z) && !robot.blinded)
for(var/obj/I in robot.contents)
if(istype(I, /obj/item/borg/sight/hud/sec))
robot << "<span class='info'>\icon[I] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
if((robot.z == src.z) && !robot.blinded && robot.sensor_mode == 1)
robot << "<span class='info'>[src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
+1 -1
View File
@@ -398,7 +398,7 @@
//user << browse(t, "window=turretid;size=500x250")
//onclose(user, "turretid")
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])")
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])", 500, 250)
popup.set_content(t)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
+19 -7
View File
@@ -463,7 +463,6 @@
item_state = "crowbar_red"
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
@@ -480,14 +479,27 @@
return
if(S.brute_dam)
S.heal_damage(15,0,0,1)
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src].")
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
H.updatehealth()
return
var/obj/item/weapon/weldingtool/WT = src
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
S.heal_damage(15,0,0,1)
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src].")
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
H.updatehealth()
if(istype(M,/mob/living/carbon/human/machine) && M.stat == 0) // If an IPC is brought back to life by welding it, which is possible, update the mob list
if(M in dead_mob_list)
dead_mob_list -= M
respawnable_list -= M
living_mob_list += M
mob_list += M
return
else
user << "\red You need more welding fuel to complete this task."
return
else
user << "Nothing to fix!"
return
else
return ..()
+2
View File
@@ -12,6 +12,8 @@ var/global/list/machines = list()
var/global/list/processing_objects = list()
var/global/list/active_diseases = list()
var/global/list/events = list()
var/global/list/med_hud_users = list()
var/global/list/sec_hud_users = list()
//items that ask to be called every cycle
var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
-3
View File
@@ -1618,9 +1618,6 @@
var/obj/pageobj = B.contents[page]
data += "<A href='?src=\ref[src];AdminFaxViewPage=[page];paper_bundle=\ref[B]'>Page [page] - [pageobj.name]</A><BR>"
world << data
world << "Sent by: [usr]"
usr << browse(data, "window=[B.name]")
else
usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]"
+2 -16
View File
@@ -28,24 +28,10 @@
darkness_view = 8
/obj/item/clothing/glasses/hud/health/process_hud(var/mob/M)
if(!M) return
if(!M.client) return
var/client/C = M.client
for(var/mob/living/carbon/human/patient in view(get_turf(M)))
if(M.see_invisible < patient.invisibility)
continue
C.images += patient.hud_list[HEALTH_HUD]
C.images += patient.hud_list[STATUS_HUD]
process_med_hud(M,1)
/obj/item/clothing/glasses/hud/health_advanced/process_hud(var/mob/M)
if(!M) return
if(!M.client) return
var/client/C = M.client
for(var/mob/living/carbon/human/patient in view(get_turf(M)))
if(M.see_invisible < patient.invisibility)
continue
C.images += patient.hud_list[HEALTH_HUD]
C.images += patient.hud_list[STATUS_HUD]
process_sec_hud(M,1)
/obj/item/clothing/glasses/hud/security
+1 -1
View File
@@ -8,7 +8,7 @@
if (M.internals)
M.internals.icon_state = "internal1"
M.generate_name()
//M.generate_name()
if( M.species.name=="Tajaran" || M.species.name=="Unathi" )
if(M.mind.assigned_role == "Cyborg" || M.mind.assigned_role == "Clown")
@@ -1,6 +1,9 @@
/mob/living/carbon/brain/say(var/message)
if (silent)
return
if (stat == 2) // Dead.
return say_dead(message)
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
return //No MMI, can't speak, bucko./N
+15 -9
View File
@@ -5,13 +5,13 @@
canmove = 0
icon = null
invisibility = 101
if(!(species.flags & IS_SYNTHETIC))
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
playsound(src.loc, 'sound/effects/gib.ogg', 100, 1, 10)
playsound(src.loc, 'sound/effects/gib.ogg', 100, 1, 10)
for(var/datum/organ/external/E in src.organs)
if(istype(E, /datum/organ/external/chest))
@@ -20,9 +20,15 @@
if(prob(100 - E.get_damage()))
// Override the current limb status and don't cause an explosion
E.droplimb(1,1)
flick("gibbed-h", animation)
hgibs(loc, viruses, dna)
if(!(species.flags & IS_SYNTHETIC))
flick("gibbed-h", animation)
hgibs(loc, viruses, dna)
else
new /obj/effect/decal/cleanable/robot_debris(src.loc)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
spawn(15)
if(animation) del(animation)
@@ -474,30 +474,15 @@
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.glasses, /obj/item/clothing/glasses/hud/health_advanced)
else
return 0
else if(istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
else if(istype(M, /mob/living/silicon))
var/mob/living/silicon/R = M
switch(hudtype)
if("security")
for(var/obj/I in R.contents)
if(istype(I, /obj/item/borg/sight/hud/sec))
return 1
if(R.sensor_mode == 1)
return 1
if("medical")
for(var/obj/I in R.contents)
if(istype(I, /obj/item/borg/sight/hud/med))
return 1
else
return 0
else if(istype(M, /mob/living/silicon/ai))
var/mob/living/silicon/ai/A = M
switch(hudtype)
if("security")
for(var/obj/I in A.contents)
if(istype(I, /obj/item/borg/sight/hud/sec))
return 1
if("medical")
for(var/obj/I in A.contents)
if(istype(I, /obj/item/borg/sight/hud/med))
return 1
if(R.sensor_mode == 2)
return 1
else
return 0
else
@@ -1555,7 +1555,7 @@
//Check for ID
var/obj/item/weapon/card/id/idcard = get_idcard()
if(judgebot.idcheck && !idcard && name=="Unknown")
if(judgebot.idcheck && !idcard)
threatcount += 4
//Check for weapons
@@ -1672,6 +1672,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
proc/handle_decay()
var/decaytime = world.time - timeofdeath
if(species.flags & IS_SYNTHETIC)
return
if(decaytime <= 6000) //10 minutes for decaylevel1 -- stinky
return
@@ -1,2 +1,2 @@
/mob/living/carbon/slime/proc/regular_hud_updates()
/mob/living/carbon/slime/regular_hud_updates()
return
+3 -16
View File
@@ -830,23 +830,10 @@ var/list/ai_list = list()
lightNearbyCamera()
/mob/living/silicon/ai/proc/control_hud()
set name = "Toggle Sensors"
set desc = "Toggles your sensors to display security records, medical records or nothing."
set name = "Set Sensor Augmentation"
set desc = "Augment visual feed with internal sensor overlays."
set category = "AI Commands"
if(stat != 0)
return
var/hud = input("Please select a sensor module!", "Toggle Sensors", "None", null) in list("None","Security","Medical")
for(var/obj/item/borg/sight/hud/H in contents)
del(H)
switch(hud)
if("Security")
sechud = new/obj/item/borg/sight/hud/sec(src)
if("Medical")
healthhud = new/obj/item/borg/sight/hud/med(src)
else
return
toggle_sensor_mode()
// Handled camera lighting, when toggled.
// It will get the nearest camera from the eyeobj, lighting it.
+8 -12
View File
@@ -1,7 +1,4 @@
/mob/living/silicon/ai/Life()
if(client)
handle_regular_hud_updates()
if (src.stat == 2)
return
else //I'm not removing that shitton of tabs, unneeded as they are. -- Urist
@@ -176,6 +173,13 @@
sleep(50)
theAPC = null
regular_hud_updates()
switch(src.sensor_mode)
if (SEC_HUD)
process_sec_hud(src,1,src.eyeobj)
if (MED_HUD)
process_med_hud(src,1,src.eyeobj)
/mob/living/silicon/ai/updatehealth()
if(status_flags & GODMODE)
health = 100
@@ -184,12 +188,4 @@
if(fire_res_on_core)
health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss()
else
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
/mob/living/silicon/ai/proc/handle_regular_hud_updates()
for(var/image/hud in client.images) //COPIED FROM the human handle_regular_hud_updates() proc
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
client.images.Remove(hud)
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
if(hud && hud.hud) hud.hud.process_hud(src)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
-110
View File
@@ -1,110 +0,0 @@
/mob/living/silicon/pai/proc/regular_hud_updates()
if(client)
for(var/image/hud in client.images)
if(copytext(hud.icon_state,1,4) == "hud")
client.images -= hud
/mob/living/silicon/pai/proc/securityHUD()
if(client)
var/image/holder
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/perp in view(T))
if(src.see_invisible < perp.invisibility)
continue
var/perpname = "wot"
holder = perp.hud_list[ID_HUD]
if(perp.wear_id)
var/obj/item/weapon/card/id/I = perp.wear_id.GetID()
if(I)
perpname = I.registered_name
holder.icon_state = "hud[ckey(perp:wear_id:GetJobName())]"
client.images += holder
else
perpname = perp.name
holder.icon_state = "hudunknown"
client.images += holder
else
holder.icon_state = "hudunknown"
client.images += holder
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
holder = perp.hud_list[WANTED_HUD]
for(var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
holder.icon_state = "hudwanted"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
holder.icon_state = "hudprisoner"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled"))
holder.icon_state = "hudparolled"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released"))
holder.icon_state = "hudreleased"
client.images += holder
break
/mob/living/silicon/pai/proc/medicalHUD()
if(client)
var/image/holder
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/patient in view(T))
if(src.see_invisible < patient.invisibility)
continue
var/foundVirus = 0
for (var/ID in patient.virus2)
if (ID in virusDB)
foundVirus = 1
break
holder = patient.hud_list[HEALTH_HUD]
if(patient.stat == 2)
holder.icon_state = "hudhealth-100"
client.images += holder
else
holder.icon_state = "hud[RoundHealth(patient.health)]"
client.images += holder
holder = patient.hud_list[STATUS_HUD]
if(patient.stat == 2)
holder.icon_state = "huddead"
else if(patient.status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
else if(foundVirus)
holder.icon_state = "hudill"
else if(patient.has_brain_worms())
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
if(B.controlling)
holder.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
else
holder.icon_state = "hudhealthy"
client.images += holder
/mob/living/silicon/pai/proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
return "health100"
if(70 to 100)
return "health80"
if(50 to 70)
return "health60"
if(30 to 50)
return "health40"
if(20 to 30)
return "health25"
if(5 to 15)
return "health10"
if(1 to 5)
return "health1"
if(-99 to 0)
return "health0"
else
return "health-100"
return "0"
+2 -2
View File
@@ -10,9 +10,9 @@
regular_hud_updates()
if(src.secHUD == 1)
src.securityHUD()
process_sec_hud(src, 1)
if(src.medHUD == 1)
src.medicalHUD()
process_med_hud(src, 1)
if(silence_time)
if(world.timeofday >= silence_time)
silence_time = null
@@ -177,12 +177,17 @@
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
for(var/image/hud in client.images) //COPIED FROM the human handle_regular_hud_updates() proc
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
client.images.Remove(hud)
regular_hud_updates()
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
if(hud && hud.hud) hud.hud.process_hud(src)
if(hud && hud.hud)
hud.hud.process_hud(src)
else
switch(src.sensor_mode)
if (SEC_HUD)
process_sec_hud(src,1)
if (MED_HUD)
process_med_hud(src,1)
if (src.healths)
if (src.stat != 2)
+3 -16
View File
@@ -461,23 +461,10 @@
src << "\red You enable [C.name]."
/mob/living/silicon/robot/verb/control_hud()
set name = "Toggle Sensors"
set desc = "Toggles your sensors to display security records, medical records or nothing."
set name = "Set Sensor Augmentation"
set desc = "Augment visual feed with internal sensor overlays."
set category = "Robot Commands"
if(stat != 0)
return
var/hud = input("Please select a sensor module!", "Toggle Sensors", "None", null) in list("None","Security","Medical")
for(var/obj/item/borg/sight/hud/H in contents)
del(H)
switch(hud)
if("Security")
sechud = new/obj/item/borg/sight/hud/sec(src)
if("Medical")
healthhud = new/obj/item/borg/sight/hud/med(src)
else
return
toggle_sensor_mode()
/mob/living/silicon/robot/blob_act()
if (stat != 2)
@@ -12,6 +12,10 @@
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
var/designation = ""
var/obj/item/device/camera/siliconcam/aiCamera = null //photography
var/sensor_mode = 0 //Determines the current HUD.
#define SEC_HUD 1 //Security HUD mode
#define MED_HUD 2 //Medical HUD mode
/mob/living/silicon/proc/cancelAlarm()
return
@@ -235,3 +239,16 @@
/mob/living/silicon/assess_threat() //Secbots won't hunt silicon units
return -10
/mob/living/silicon/proc/toggle_sensor_mode()
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
switch(sensor_type)
if ("Security")
sensor_mode = SEC_HUD
src << "<span class='notice'>Security records overlay enabled.</span>"
if ("Medical")
sensor_mode = MED_HUD
src << "<span class='notice'>Life signs monitor overlay enabled.</span>"
if ("Disable")
sensor_mode = 0
src << "Sensor augmentations disabled."
+6
View File
@@ -633,6 +633,12 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
H.updatehealth()
if(istype(M,/mob/living/carbon/human/machine) && M.stat == 0) // If an IPC is brought back to life by welding it, which is possible, update the mob list
if(M in dead_mob_list)
dead_mob_list -= M
respawnable_list -= M
living_mob_list += M
mob_list += M
return
else
user << "Nothing to fix!"
@@ -251,6 +251,7 @@
icon_state = "virusfoodtank"
amount_per_transfer_from_this = 10
anchored = 1
density = 0
New()
..()
+10
View File
@@ -1579,6 +1579,16 @@ datum/design/adv_reagent_scanner
reliability_base = 74
build_path = "/obj/item/device/reagent_scanner/adv"
datum/design/cyborg_analyzer
name = "Cyborg Analyzer"
desc = "A hand-held scanner able to diagnose robotic injuries."
id = "cyborg_analyzer"
req_tech = list("programming" = 2, "biotech" = 2, "magnets" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 30, "$glass" = 20)
reliability_base = 74
build_path = "/obj/item/device/robotanalyzer"
datum/design/mmi
name = "Man-Machine Interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."
@@ -44,6 +44,25 @@
/obj/structure/boulder/New()
icon_state = "boulder[rand(1,4)]"
excavation_level = rand(5,50)
/obj/structure/boulder/Bumped(AM)
. = ..()
if(istype(AM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
attackby(H.l_hand,H)
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
attackby(H.r_hand,H)
else if(istype(AM,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM
if(istype(R.module_active,/obj/item/weapon/pickaxe))
attackby(R.module_active,R)
else if(istype(AM,/obj/mecha))
var/obj/mecha/M = AM
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
M.selected.action(src)
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/device/core_sampler))
+2
View File
@@ -128,6 +128,8 @@
if (target.op_stage.face == 3)
var/datum/organ/external/head/h = affected
h.disfigured = 0
h.update_icon()
target.regenerate_icons()
target.op_stage.face = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+37 -12
View File
@@ -26,20 +26,28 @@
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && !(affected.status & ORGAN_CUT_AWAY)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts peeling back tattered flesh where [target]'s head used to be with \the [tool].", \
"You start peeling back tattered flesh where [target]'s head used to be with \the [tool].")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("[user] starts peeling back tattered flesh where [target]'s head used to be with \the [tool].", \
"You start peeling back tattered flesh where [target]'s head used to be with \the [tool].")
else
user.visible_message("[user] starts peeling back metal where [target]'s head used to be with \the [tool].", \
"You start peeling back metal where [target]'s head used to be with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] peels back tattered flesh where [target]'s head used to be with \the [tool].", \
"\blue You peel back tattered flesh where [target]'s head used to be with \the [tool].")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("\blue [user] peels back tattered flesh where [target]'s head used to be with \the [tool].", \
"\blue You peel back tattered flesh where [target]'s head used to be with \the [tool].")
else
user.visible_message("\blue [user] peels back metal where [target]'s head used to be with \the [tool].", \
"\blue You peel back metal where [target]'s head used to be with \the [tool].")
affected.status |= ORGAN_CUT_AWAY
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -47,7 +55,7 @@
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, ripping [target]'s [affected.display_name] open!", \
"\red Your hand slips, ripping [target]'s [affected.display_name] open!")
"\red Your hand slips, ripping [target]'s [affected.display_name] open!")
affected.createwound(CUT, 10)
@@ -72,16 +80,25 @@
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].", \
"\blue You have finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("\blue [user] has finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].", \
"\blue You have finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].")
else
user.visible_message("\blue [user] has finished repositioning metal to something recognizable where [target]'s head used to be with \the [tool].", \
"\blue You have finished repositioning metal to something anatomically recognizable where [target]'s head used to be with \the [tool].")
target.op_stage.head_reattach = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("\red [user]'s hand slips, further rending flesh on [target]'s neck!", \
"\red Your hand slips, further rending flesh on [target]'s neck!")
else
user.visible_message("\red [user]'s hand slips, further rending metal on [target]'s neck!", \
"\red Your hand slips, further rending metal on [target]'s neck!")
target.apply_damage(10, BRUTE, affected)
/datum/surgery_step/head/suture
@@ -99,8 +116,12 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
// var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is stapling and suturing flesh into place in [target]'s esophagal and vocal region with \the [tool].", \
"You start to staple and suture flesh into place in [target]'s esophagal and vocal region with \the [tool].")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("[user] is stapling and suturing flesh into place in [target]'s esophagal and vocal region with \the [tool].", \
"You start to staple and suture flesh into place in [target]'s esophagal and vocal region with \the [tool].")
else
user.visible_message("[user] is stapling and suturing metal into place in [target]'s esophagal and vocal region with \the [tool].", \
"You start to staple and suture metal into place in [target]'s esophagal and vocal region with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -175,15 +196,19 @@
user.visible_message("\blue [user] has attached [target]'s head to the body.", \
"\blue You have attached [target]'s head to the body.")
affected.status = 0
if(istype(target,/mob/living/carbon/human/machine))
affected.status = 128
affected.amputated = 0
affected.destspawn = 0
var/obj/item/weapon/organ/head/B = tool
if (B.brainmob.mind)
B.brainmob.mind.transfer_to(target)
affected.setAmputatedTree()
target.handle_organs()
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
target.regenerate_icons()
target.updatehealth()
del(B)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+32 -12
View File
@@ -37,14 +37,22 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
"You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
"You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
else
user.visible_message("[user] starts cutting away metal where [target]'s [affected.display_name] used to be with \the [tool].", \
"You start cutting away metal where [target]'s [affected.display_name] used to be with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
"\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
"\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
else
user.visible_message("\blue [user] cuts away metal where [target]'s [affected.display_name] used to be with \the [tool].", \
"\blue You cut away metal where [target]'s [affected.display_name] used to be with \the [tool].")
affected.status |= ORGAN_CUT_AWAY
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -52,7 +60,7 @@
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.display_name] open!", \
"\red Your hand slips, cutting [target]'s [affected.display_name] open!")
"\red Your hand slips, cutting [target]'s [affected.display_name] open!")
affected.createwound(CUT, 10)
@@ -71,22 +79,34 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
"You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("[user] is beginning to reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
"You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
else
user.visible_message("[user] is beginning to reposition metal and wire endings where where [target]'s [affected.display_name] used to be with [tool].", \
"You start repositioning metal and wire endings where where [target]'s [affected.display_name] used to be with [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \
"\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \
"\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
else
user.visible_message("\blue [user] has finished repositioning metal and wire endings where [target]'s [affected.display_name] used to be with [tool].", \
"\blue You have finished repositioning metal and wire endings where [target]'s [affected.display_name] used to be with [tool].")
affected.open = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \
"\red Your hand slips, tearing flesh on [target]'s [affected.display_name]!")
if(!(target.species.flags & IS_SYNTHETIC))
user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \
"\red Your hand slips, tearing flesh on [target]'s [affected.display_name]!")
else
user.visible_message("\red [user]'s hand slips, tearing metal on [target]'s [affected.display_name]!", \
"\red Your hand slips, tearing metal on [target]'s [affected.display_name]!")
target.apply_damage(10, BRUTE, affected, sharp=1)
@@ -108,7 +128,7 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts adjusting area around [target]'s [affected.display_name] with \the [tool].", \
"You start adjusting area around [target]'s [affected.display_name] with \the [tool]..")
"You start adjusting area around [target]'s [affected.display_name] with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)