Life Support Enabled Operating Table - Final Update

* Adds the boards to RnD
* Fixes a few icon glitches
* Actually gives them icons.
This commit is contained in:
skull132
2015-11-04 16:33:20 +02:00
parent 376ac177e3
commit 7b8efc9115
5 changed files with 45 additions and 30 deletions
+17 -12
View File
@@ -81,7 +81,6 @@
else
return 0
/obj/machinery/optable/MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
@@ -91,19 +90,26 @@
step(O, get_dir(O, src))
return
/obj/machinery/optable/update_icon()
if (opened)
icon_state = "[modify_state]-open"
else if (victim)
icon_state = victim.pulse ? "[modify_state]-active" : "[modify_state]-idle"
else
icon_state = "[modify_state]-idle"
/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(locate(/mob/living/carbon/human, loc))
var/mob/living/carbon/human/M = locate(/mob/living/carbon/human, loc)
if(M.lying)
src.victim = M
icon_state = M.pulse ? "[initial(modify_state)]-active" : "[initial(modify_state)]-idle"
victim = M
return 1
src.victim = null
icon_state = "[initial(modify_state)]-idle"
victim = null
return 0
/obj/machinery/optable/process()
check_victim()
update_icon()
/obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob)
if (C == user)
@@ -116,9 +122,9 @@
if(ishuman(C))
var/mob/living/carbon/human/H = C
src.victim = H
icon_state = H.pulse ? "[initial(modify_state)]-active" : "[initial(modify_state)]-idle"
icon_state = H.pulse ? "[modify_state]-active" : "[modify_state]-idle"
else
icon_state = "[initial(modify_state)]-idle"
icon_state = "[modify_state]-idle"
/obj/machinery/optable/verb/climb_on()
set name = "Climb On Table"
@@ -141,7 +147,6 @@
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
msg_scopes("Why are we in this loop?")
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
reagents.trans_to(I, reagents.total_volume)
if(I.reliability != 100 && crit_fail)
@@ -165,7 +170,7 @@
if (computer)
computer.table = null
computer = null
icon_state = "[initial(modify_state)]-open"
icon_state = "[modify_state]-open"
user << "You open the maintenance hatch of [src]."
return 1
if (1)
@@ -175,7 +180,7 @@
if (computer)
computer.table = src
break
icon_state = "[initial(modify_state)]-idle"
icon_state = "[modify_state]-idle"
user << "You close the maintenance hatch of [src]."
return 1
+10 -17
View File
@@ -20,7 +20,6 @@
var/buckled = 0 //Is the patient hooked up to the machine properly?
var/active = 0 //Is the machine active, and providing lifesupport?
var/expired = 0 //Have we alerted the folks about a dead patient yet?
var/activeoverlay //Stores an overlay to be added/removed, depending on that machine's status.
var/program = 0 //Bitfield for containing the programmable settings.
var/obj/item/weapon/reagent_containers/blood/bloodbag //Stores the bloodbag that you can add to the machine, for IV dripping shenanigans.
var/obj/item/weapon/tank/airsupply //Stores the airtank used for anesthesia.
@@ -44,10 +43,6 @@
component_parts += new /obj/item/clothing/mask/breath/medical(src)
RefreshParts()
var/image/i = image('icons/obj/surgery.dmi', icon_state = "table3-disabledoverlay")
activeoverlay = i
overlays += activeoverlay
/obj/machinery/optable/lifesupport/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
. = ..()
if (.)
@@ -140,6 +135,16 @@
if (program & VAMPIRE)
victim.vessel.remove_reagent("blood", 5)
/obj/machinery/optable/lifesupport/update_icon()
if (opened)
icon_state = "[modify_state]-open"
else if (victim && active)
icon_state = victim.pulse ? "[modify_state]-lifeactive" : "[modify_state]-lifeidle"
else if (victim)
icon_state = victim.pulse ? "[modify_state]-active" : "[modify_state]-idle"
else
icon_state = "[modify_state]-idle"
/obj/machinery/optable/lifesupport/check_table(mob/living/carbon/patient as mob)
if (victim)
usr << "\blue <B>The table is already occupied!</B>"
@@ -292,12 +297,6 @@
return
if (checkrequiredchems())
if (activeoverlay)
overlays -= activeoverlay
activeoverlay = null
var/image/i = image('icons/obj/surgery.dmi', icon_state = "table3-activeoverlay")
activeoverlay = i
overlays += activeoverlay
active = 1
broadcastalert("Patient detected. Life support systems enabled.")
addtolog("Life support systems enabled.")
@@ -324,12 +323,6 @@
else
toggleprogram(AIR_ACTIVE)
if (activeoverlay)
overlays -= activeoverlay
activeoverlay = null
var/image/i = image('icons/obj/surgery.dmi', icon_state = "table3-disabledoverlay")
activeoverlay = i
overlays += activeoverlay
active = 0
if (override)
+1 -1
View File
@@ -129,7 +129,7 @@
new_machine.RefreshParts()
del(src)
else
if(istype(P, /obj/item/weapon))
if(istype(P, /obj/item))
for(var/I in req_components)
if(istype(P, text2path(I)) && (req_components[I] > 0))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+17
View File
@@ -1295,6 +1295,23 @@ datum/design/mechfab
materials = list("$glass" = 2000, "sacid" = 20)
build_path = "/obj/item/weapon/circuitboard/mechfab"
datum/design/optable
name = "Operating Table"
desc = "The circuit board for an Operating Table"
id = "optable"
req_tech = list("programming" = 1, "biotech" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = "/obj/item/weapon/circuitboard/optable"
datum/design/optable_lifesupport
name = "Life Support Enabled Operating Table"
desc = "The circuit board for an advanced Operating Table"
id = "adv_optable"
req_tech = list("programming" = 3, "biotech" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = "/obj/item/weapon/circuitboard/optable_lifesupport"
/////////////////////////////////////////
////////////Power Stuff//////////////////
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 20 KiB