This commit is contained in:
Pinta
2023-02-13 19:09:17 -05:00
parent 0ce1a18083
commit 166752cdb0
12 changed files with 122 additions and 241 deletions
@@ -0,0 +1,94 @@
/obj/machinery/iv_drip/feeding_tube
name = "\improper Feeding tube"
desc = "something something test."
icon = 'icons/obj/feeding_tube.dmi'
icon_state = "feeding_tube"
var/static/list/food_containers = typecacheof(list(/obj/item/reagent_containers/food,
/obj/item/reagent_containers/glass,))
attachment_point = "tube"
/obj/machinery/iv_drip/feeding_tube/update_icon()
if(attached)
if(mode)
icon_state = "injecting"
else
if(mode)
icon_state = "injectidle"
cut_overlays()
if(beaker)
if(attached)
add_overlay("beakeractive")
else
add_overlay("beakeridle")
if(beaker.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/feeding_tube.dmi', "reagent")
var/percent = round((beaker.reagents.total_volume / beaker.volume) * 100)
switch(percent)
if(0 to 9)
filling_overlay.icon_state = "reagent0"
if(10 to 24)
filling_overlay.icon_state = "reagent10"
if(25 to 49)
filling_overlay.icon_state = "reagent25"
if(50 to 74)
filling_overlay.icon_state = "reagent50"
if(75 to 79)
filling_overlay.icon_state = "reagent75"
if(80 to 90)
filling_overlay.icon_state = "reagent80"
if(91 to INFINITY)
filling_overlay.icon_state = "reagent100"
filling_overlay.color = mix_color_from_reagents(beaker.reagents.reagent_list)
add_overlay(filling_overlay)
/obj/machinery/iv_drip/feeding_tube/process()
if(!attached)
return PROCESS_KILL
if(!(get_dist(src, attached) <= 1 && isturf(attached.loc)))
to_chat(attached, "<span class='userdanger'>The feeding hose is yanked out of you!</span>")
update_icon()
return PROCESS_KILL
if(beaker)
if(mode)
if(beaker.reagents.total_volume)
var/transfer_amount = 5
var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume
beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages
beaker.reagents.trans_to(attached, transfer_amount)
update_icon()
else if(!beaker.reagents.total_volume && istype(beaker, /obj/item/reagent_containers/food))
qdel(beaker)
beaker = null
if(attached)
attached = null
update_icon()
return PROCESS_KILL
/obj/machinery/iv_drip/feeding_tube/attackby(obj/item/W, mob/user, params)
if(is_type_in_typecache(W, food_containers))
if(beaker)
to_chat(user, "<span class='warning'>There is already a reagent container loaded!</span>")
return
if(!user.transferItemToLoc(W, src))
return
beaker = W
to_chat(user, "<span class='notice'>You attach [W] to [src].</span>")
user.log_message("attached a [W] to [src] at [AREACOORD(src)] containing ([beaker.reagents.log_list()])", LOG_ATTACK)
add_fingerprint(user)
update_icon()
return
else
return FALSE
//it sure is a solution.
/obj/machinery/iv_drip/feeding_tube/toggle_mode()
return FALSE
+1 -1
View File
@@ -135,7 +135,7 @@
"pJ" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 1},/turf/open/floor/plasteel/freezer,/area/ruin/space/has_grav/hotel/custodial{name = "Restaurant Employee Area"})
"pS" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 8},/turf/open/floor/plating,/area/ruin/space/has_grav/hotel/custodial{name = "Restaurant Employee Area"})
"qh" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 8},/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/custodial{name = "Restaurant Employee Area"})
"qj" = (/obj/structure/medkit_cabinet{pixel_y = 27},/obj/effect/turf_decal/bot,/obj/machinery/feeding_tube,/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/custodial{name = "Restaurant Employee Area"})
"qj" = (/obj/structure/medkit_cabinet{pixel_y = 27},/obj/effect/turf_decal/bot,/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/custodial{name = "Restaurant Employee Area"})
"qt" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 10},/obj/structure/disposalpipe/segment{dir = 4},/turf/open/floor/plasteel/checker,/area/ruin/space/has_grav/hotel/custodial{name = "Restaurant Employee Area"})
"qB" = (/obj/machinery/door/airlock/public{dir = 4},/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/bar)
"qI" = (/obj/machinery/computer/security/telescreen/entertainment,/turf/closed/wall,/area/ruin/space/has_grav/hotel/bar)
+4 -4
View File
@@ -46,7 +46,7 @@
"ie" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4; piping_layer = 3; pixel_x = 5; pixel_y = 5},/turf/closed/mineral/random,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"ik" = (/obj/structure/ore_box,/turf/open/floor/plating,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"iu" = (/obj/structure/curtain,/obj/effect/turf_decal/tile{dir = 1},/obj/effect/turf_decal/tile{dir = 4},/turf/open/floor/plasteel/freezer,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"iv" = (/obj/machinery/feeding_tube,/turf/open/floor/carpet/orange,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"iv" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/carpet/orange,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"iN" = (/obj/structure/table,/obj/item/reagent_containers/glass/beaker/large,/obj/item/reagent_containers/glass/beaker/large{pixel_y = -12},/obj/item/reagent_containers/glass/beaker/bluespace{pixel_y = 3},/obj/item/reagent_containers/glass/beaker{pixel_x = 9},/obj/item/reagent_containers/food/condiment/sugar{pixel_x = -7},/obj/machinery/light{dir = 1},/obj/effect/turf_decal/tile/bar,/obj/effect/turf_decal/tile/bar{dir = 1},/obj/structure/disposalpipe/segment,/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"iW" = (/obj/effect/turf_decal/tile/red{dir = 8},/obj/effect/turf_decal/tile/red,/obj/effect/turf_decal/tile/red{dir = 4},/turf/open/floor/wood,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"jh" = (/obj/structure/table,/obj/effect/turf_decal/tile/bar,/obj/effect/turf_decal/tile/bar{dir = 1},/obj/machinery/disposal/bin{pixel_y = -10},/obj/structure/disposalpipe/trunk{dir = 1},/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
@@ -59,7 +59,7 @@
"kK" = (/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"kM" = (/obj/item/bodybag/bluespace,/turf/open/floor/plating,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"ls" = (/turf/open/floor/plasteel,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"lR" = (/obj/machinery/feeding_tube,/obj/machinery/light/small{dir = 1},/turf/open/floor/carpet/black,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"lR" = (/obj/machinery/iv_drip/feeding_tube,/obj/machinery/light/small{dir = 1},/turf/open/floor/carpet/black,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"ma" = (/obj/structure/cable{icon_state = "4-8"},/turf/open/floor/plating,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"mf" = (/obj/structure/table/reinforced,/obj/item/reagent_containers/food/snacks/pizzaslice/margherita,/obj/item/reagent_containers/food/snacks/burger/superbite,/turf/open/floor/mineral/basaltstone_floor,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"mm" = (/obj/machinery/vending/mealdor{free = 1},/obj/machinery/light{dir = 4},/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
@@ -110,7 +110,7 @@
"tV" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 8},/obj/effect/turf_decal{dir = 8},/obj/machinery/door/airlock/hatch{name = "airlock"; req_access_txt = "150"},/turf/open/floor/plating,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"tZ" = (/obj/machinery/vending/mealdor{free = 1},/obj/machinery/light{dir = 8},/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"uc" = (/obj/structure/rack/shelf,/obj/item/storage/box/donkpockets,/obj/item/storage/box/donkpockets/donkpocketberry{pixel_y = 4},/turf/open/floor/plasteel,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"uy" = (/obj/machinery/feeding_tube,/turf/open/floor/carpet/black,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"uy" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/carpet/black,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"uA" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 8},/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{dir = 2; piping_layer = 3; pixel_x = 5; pixel_y = 5},/obj/effect/turf_decal/tile/red,/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"uF" = (/obj/structure/table,/obj/machinery/cell_charger,/obj/item/stock_parts/cell/high/plus,/obj/structure/cable{icon_state = "1-2"},/turf/open/floor/plating,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"uO" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 8},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4; piping_layer = 3; pixel_x = 5; pixel_y = 5},/obj/structure/disposalpipe/segment{dir = 4},/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
@@ -127,7 +127,7 @@
"wA" = (/obj/structure/table/wood,/obj/item/trash/tray,/turf/open/floor/wood,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"xg" = (/obj/structure/flora/junglebush/large,/obj/item/screwdriver,/turf/open/floor/plating/asteroid,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"xC" = (/obj/structure/closet/firecloset/full,/turf/open/floor/plasteel,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"xG" = (/obj/machinery/feeding_tube,/turf/open/floor/plating,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"xG" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"xJ" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 8},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 9; piping_layer = 3; pixel_x = 5; pixel_y = 5},/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
"xZ" = (/obj/structure/flora/rock/pile,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav)
"yb" = (/obj/machinery/atmospherics/pipe/manifold/supply{dir = 1},/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{dir = 1; piping_layer = 3; pixel_x = 5; pixel_y = 5},/obj/effect/turf_decal/tile/red,/obj/structure/disposalpipe/segment{dir = 10},/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/listeningstation{name = "Feeder Den"})
+1 -1
View File
@@ -32,7 +32,7 @@
"ke" = (/obj/item/stack/cable_coil/cut/yellow,/turf/open/space/basic,/area/space)
"lf" = (/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 1},/turf/open/floor/mineral/plastitanium/red,/area/space)
"lh" = (/obj/structure/chair/comfy/shuttle,/turf/open/floor/mineral/plastitanium/red,/area/space)
"lS" = (/obj/machinery/feeding_tube,/turf/open/floor/mineral/abductor,/area/space)
"lS" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/mineral/abductor,/area/space)
"mP" = (/obj/machinery/door/airlock/external{name = "Escape Airlock"},/obj/effect/mapping_helpers/airlock/cyclelink_helper,/obj/structure/fans/tiny,/turf/open/floor/plating,/area/space)
"mT" = (/mob/living/simple_animal/hostile/syndicate/ranged/smg/space,/turf/open/floor/mineral/plastitanium/red,/area/space)
"ou" = (/obj/machinery/light,/turf/open/floor/mineral/basaltstone_floor,/area/space)
+3 -3
View File
@@ -7246,9 +7246,9 @@
"fNx" = (/obj/structure/flora/junglebush/b,/turf/open/floor/grass,/area/crew_quarters/dorms{name = "Saunas"})
"fWD" = (/obj/structure/table/reinforced,/obj/item/reagent_containers/food/snacks/pizza/sassysage,/obj/item/ashtray{pixel_y = 10},/turf/open/floor/plasteel/grimy,/area/medical/medbay/central)
"gdL" = (/obj/structure/table,/obj/item/hand_labeler,/obj/item/clothing/glasses/science,/obj/item/clothing/glasses/science,/turf/open/floor/plasteel,/area/science/misc_lab)
"gwd" = (/obj/machinery/feeding_tube,/turf/open/floor/plating,/area/maintenance/port/aft)
"gwd" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating,/area/maintenance/port/aft)
"gzP" = (/obj/structure/table,/obj/item/book/manual/chef_recipes,/turf/open/floor/plasteel/cafeteria,/area/maintenance/port/fore)
"gWm" = (/obj/machinery/feeding_tube,/turf/open/floor/plating,/area/maintenance/starboard/aft)
"gWm" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating,/area/maintenance/starboard/aft)
"gYU" = (/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral{dir = 8},/obj/effect/landmark/start/assistant,/turf/open/floor/plasteel,/area/crew_quarters/fitness/pool)
"haV" = (/obj/structure/chair/bench/right{dir = 8},/turf/open/floor/plaswood,/area/crew_quarters/dorms{name = "Saunas"})
"hcS" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/machinery/washing_machine,/turf/open/floor/plasteel/freezer,/area/crew_quarters/locker)
@@ -7323,7 +7323,7 @@
"syv" = (/obj/structure/window/reinforced/spawner{dir = 4},/obj/machinery/shower{dir = 1},/turf/open/floor/plasteel/freezer,/area/crew_quarters/dorms{name = "Saunas"})
"sFH" = (/obj/structure/dresser,/obj/item/flashlight/lamp{pixel_y = 13; pixel_x = -5},/turf/open/floor/carpet,/area/maintenance/starboard/fore)
"sIo" = (/obj/structure/table,/obj/machinery/cell_charger{pixel_y = 5},/obj/item/stack/cable_coil,/obj/item/multitool,/obj/item/stock_parts/cell/high/plus,/turf/open/floor/plasteel,/area/science/misc_lab)
"sMl" = (/obj/machinery/feeding_tube,/turf/open/floor/plating,/area/maintenance/starboard/fore)
"sMl" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating,/area/maintenance/starboard/fore)
"sMN" = (/obj/effect/turf_decal/loading_area{icon_state = "drain"; name = "drain"},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 9},/turf/open/floor/plasteel,/area/hallway/secondary/entry)
"sVu" = (/obj/machinery/door/airlock/maintenance_hatch,/turf/open/floor/plating,/area/maintenance/starboard/aft)
"tbq" = (/obj/machinery/door/airlock{dir = 4; id_tag = "MaintDormShower"; name = "Maint Dorm"},/turf/open/floor/wood{icon_state = "wood-broken5"},/area/maintenance/port/fore)
+3 -3
View File
@@ -6098,7 +6098,7 @@
"cnY" = (/obj/machinery/light{dir = 4},/obj/machinery/quantumpad{map_pad_id = "station"; map_pad_link_id = "xenoarch"},/turf/open/floor/plasteel/white,/area/science/research)
"cnZ" = (/obj/structure/closet/firecloset,/obj/effect/turf_decal/delivery,/turf/open/floor/plasteel,/area/science/research)
"coa" = (/obj/structure/cable/yellow{icon_state = "1-2"},/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/item/flashlight,/obj/effect/landmark/blobstart,/turf/open/floor/plating,/area/maintenance/starboard/aft)
"cob" = (/obj/machinery/feeding_tube,/turf/open/floor/plating,/area/maintenance/fore)
"cob" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating,/area/maintenance/fore)
"coc" = (/obj/item/cigbutt,/obj/machinery/firealarm{dir = 4; pixel_x = -24},/obj/machinery/light{dir = 8},/obj/structure/chair/sofa/left{dir = 4},/turf/open/floor/carpet,/area/science/research)
"cod" = (/obj/structure/table/wood,/obj/item/reagent_containers/food/snacks/burger/soylent,/obj/item/ashtray{pixel_x = 9},/turf/open/floor/carpet,/area/science/research)
"coe" = (/obj/structure/chair/sofa/right{dir = 8},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 6},/turf/open/floor/carpet,/area/science/research)
@@ -8138,7 +8138,7 @@
"dLG" = (/obj/machinery/vending/cola/random,/turf/open/floor/plating,/area/maintenance/port/fore)
"eiG" = (/obj/structure/cable/yellow{icon_state = "4-8"},/obj/effect/turf_decal/tile/neutral{dir = 8},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 5},/turf/open/floor/plasteel,/area/crew_quarters/fitness/recreation)
"euY" = (/obj/structure/disposalpipe/segment{dir = 10},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 10},/obj/structure/cable/yellow{icon_state = "2-8"},/obj/structure/cable/yellow{icon_state = "1-2"},/turf/open/floor/plating,/area/maintenance/port/aft)
"eJq" = (/obj/machinery/feeding_tube,/turf/open/floor/plating,/area/maintenance/starboard/aft)
"eJq" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating,/area/maintenance/starboard/aft)
"faq" = (/obj/effect/turf_decal/stripes/line{dir = 1},/obj/machinery/vending/mealdor,/turf/open/floor/plasteel,/area/hallway/secondary/entry)
"fqe" = (/obj/structure/chair/sofa{dir = 8},/turf/open/floor/wood,/area/crew_quarters/bar)
"fCe" = (/obj/structure/scale,/turf/open/floor/plating,/area/maintenance/fore)
@@ -8166,7 +8166,7 @@
"lPS" = (/obj/effect/turf_decal/stripes/line{dir = 1},/obj/structure/cable/yellow{icon_state = "2-4"},/turf/open/floor/plating,/area/maintenance/port/aft)
"lQP" = (/obj/structure/table/wood,/obj/item/candle/infinite,/obj/item/restraints/handcuffs/fake/kinky,/turf/open/floor/plating,/area/maintenance/fore)
"mjI" = (/obj/machinery/vending/coffee,/turf/open/floor/plating,/area/maintenance/port/fore)
"mrA" = (/obj/machinery/feeding_tube,/turf/open/floor/plating,/area/maintenance/port/fore)
"mrA" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating,/area/maintenance/port/fore)
"mQs" = (/obj/machinery/door/airlock/research/glass{name = "Research Break Room"},/turf/open/floor/plasteel/cafeteria{dir = 5},/area/science/research)
"mSr" = (/obj/structure/chair/wood,/turf/open/floor/carpet/purple,/area/maintenance/port/fore)
"nbX" = (/obj/structure/dresser,/obj/item/flashlight/lamp/green{pixel_x = -4; pixel_y = 14},/turf/open/floor/wood{icon_state = "wood-broken3"},/area/maintenance/port/aft)
@@ -3574,7 +3574,7 @@
"rEx" = (/obj/machinery/atmospherics/pipe/simple/cyan/visible{dir = 4},/obj/structure/cable{icon_state = "4-8"},/obj/effect/turf_decal/stripes/line,/turf/open/floor/plasteel,/area/engine/atmos)
"rKl" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{dir = 4},/turf/open/floor/plating,/area/crew_quarters/dorms)
"rMX" = (/obj/structure/statue/calorite/fatty,/turf/open/floor/mineral/calorite,/area/asteroid/nearstation)
"rOq" = (/obj/machinery/feeding_tube,/turf/open/floor/plating,/area/maintenance/port)
"rOq" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating,/area/maintenance/port)
"rON" = (/obj/machinery/light{dir = 8},/turf/open/floor/plasteel/dark/side{dir = 8},/area/crew_quarters/dorms)
"rPz" = (/obj/machinery/atmospherics/components/unary/vent_pump/on{dir = 1},/turf/open/floor/plasteel/white,/area/medical/virology)
"rPE" = (/obj/structure/cable/white{icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/effect/landmark/event_spawn,/obj/structure/disposalpipe/segment,/turf/open/floor/plating,/area/maintenance/port)
@@ -3909,7 +3909,7 @@
"wbV" = (/obj/machinery/shower{dir = 4},/obj/structure/sign/warning/securearea{pixel_x = -32},/obj/effect/turf_decal/stripes/line{dir = 8},/turf/open/floor/plasteel/white,/area/medical/virology)
"wdt" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/structure/cable/white{icon_state = "4-8"},/obj/effect/turf_decal/bot,/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel/dark,/area/hallway/primary/aft)
"wdI" = (/obj/structure/disposalpipe/segment,/obj/effect/spawner/structure/window/plasma/reinforced,/turf/open/floor/plating,/area/crew_quarters/dorms)
"wfQ" = (/obj/machinery/feeding_tube,/turf/open/floor/plating/asteroid,/area/asteroid/nearstation)
"wfQ" = (/obj/machinery/iv_drip/feeding_tube,/turf/open/floor/plating/asteroid,/area/asteroid/nearstation)
"whc" = (/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{dir = 8},/obj/structure/cable/white{icon_state = "1-2"},/obj/effect/turf_decal/tile/neutral{dir = 8},/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/structure/chair/plaswood{dir = 4},/turf/open/floor/mineral/basaltstone_floor,/area/crew_quarters/bar/atrium)
"whA" = (/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/structure/table/plasmaglass,/turf/open/floor/mineral/basaltstone_floor,/area/crew_quarters/bar/atrium)
"whJ" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/structure/disposalpipe/segment{dir = 4},/turf/closed/wall/r_wall,/area/maintenance/disposal)
@@ -59037,7 +59037,7 @@
/turf/open/floor/plasteel/dark,
/area/science/xenobiology)
"iuj" = (
/obj/machinery/feeding_tube,
/obj/machinery/iv_drip/feeding_tube,
/turf/open/floor/plating,
/area/maintenance/department/crew_quarters/dorms)
"iuM" = (
@@ -64157,7 +64157,7 @@
/turf/open/floor/plasteel,
/area/engine/engineering)
"vjK" = (
/obj/machinery/feeding_tube,
/obj/machinery/iv_drip/feeding_tube,
/turf/open/floor/plating,
/area/maintenance/department/science)
"vlF" = (
@@ -65149,7 +65149,7 @@
/area/space/nearstation)
"xuZ" = (
/obj/effect/turf_decal/stripes/line,
/obj/machinery/feeding_tube,
/obj/machinery/iv_drip/feeding_tube,
/turf/open/floor/plating,
/area/maintenance/disposal)
"xvK" = (
-218
View File
@@ -1,218 +0,0 @@
//GS13!
#define FEEDTUBE_TAKING 0
#define FEEDTUBE_INJECTING 1
/obj/machinery/feeding_tube
name = "\improper Feeding tube"
desc = "something something test."
icon = 'icons/obj/feeding_tube.dmi'
icon_state = "feeding_tube"
anchored = FALSE
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
var/mob/living/carbon/attached
var/mode = FEEDTUBE_INJECTING
var/obj/item/reagent_containers/beaker
var/static/list/drip_containers = typecacheof(list(/obj/item/reagent_containers/food,
/obj/item/reagent_containers/glass,))
/obj/machinery/feeding_tube/Initialize(mapload)
. = ..()
update_icon()
/obj/machinery/feeding_tube/Destroy()
attached = null
QDEL_NULL(beaker)
return ..()
/obj/machinery/feeding_tube/update_icon()
if(attached)
if(mode)
icon_state = "injecting"
else
if(mode)
icon_state = "injectidle"
cut_overlays()
if(beaker)
if(attached)
add_overlay("beakeractive")
else
add_overlay("beakeridle")
if(beaker.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/feeding_tube.dmi', "reagent")
var/percent = round((beaker.reagents.total_volume / beaker.volume) * 100)
switch(percent)
if(0 to 9)
filling_overlay.icon_state = "reagent0"
if(10 to 24)
filling_overlay.icon_state = "reagent10"
if(25 to 49)
filling_overlay.icon_state = "reagent25"
if(50 to 74)
filling_overlay.icon_state = "reagent50"
if(75 to 79)
filling_overlay.icon_state = "reagent75"
if(80 to 90)
filling_overlay.icon_state = "reagent80"
if(91 to INFINITY)
filling_overlay.icon_state = "reagent100"
filling_overlay.color = mix_color_from_reagents(beaker.reagents.reagent_list)
add_overlay(filling_overlay)
/obj/machinery/feeding_tube/MouseDrop(mob/living/target)
. = ..()
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE) || !isliving(target))
return
if(attached)
visible_message("<span class='warning'>[attached] is detached from [src].</span>")
attached = null
update_icon()
return
if(!target.has_dna())
to_chat(usr, "<span class='danger'>The hose beeps: Warning, incompatible creature!</span>")
return
if(Adjacent(target) && usr.Adjacent(target))
if(beaker)
usr.visible_message("<span class='warning'>[usr] attaches [src] to [target].</span>", "<span class='notice'>You attach [src] to [target]'s mouth.</span>")
log_combat(usr, target, "attached", src, "containing: [beaker.name] - ([beaker.reagents.log_list()])")
add_fingerprint(usr)
attached = target
START_PROCESSING(SSmachines, src)
update_icon()
else
to_chat(usr, "<span class='warning'>There's nothing attached to the feeding hose!</span>")
/obj/machinery/feeding_tube/attackby(obj/item/W, mob/user, params)
if(is_type_in_typecache(W, drip_containers))
if(beaker)
to_chat(user, "<span class='warning'>There is already a reagent container loaded!</span>")
return
if(!user.transferItemToLoc(W, src))
return
beaker = W
to_chat(user, "<span class='notice'>You attach [W] to [src]'s mouth.</span>")
user.log_message("attached a [W] to [src] at [AREACOORD(src)] containing ([beaker.reagents.log_list()])", LOG_ATTACK)
add_fingerprint(user)
update_icon()
return
else
return ..()
/obj/machinery/feeding_tube/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal(loc)
qdel(src)
/obj/machinery/feeding_tube/process()
if(!attached)
return PROCESS_KILL
if(!(get_dist(src, attached) <= 1 && isturf(attached.loc)))
to_chat(attached, "<span class='userdanger'>The feeding hose is yanked out of you!</span>")
update_icon()
return PROCESS_KILL
if(beaker)
// Give blood
if(mode)
if(beaker.reagents.total_volume)
var/transfer_amount = 5
if(istype(beaker, /obj/item/reagent_containers/blood))
// speed up transfer on blood packs
transfer_amount = 10
var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume
beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages
beaker.reagents.trans_to(attached, transfer_amount)
update_icon()
// // Take blood
// else
// var/amount = beaker.reagents.maximum_volume - beaker.reagents.total_volume
// amount = min(amount, 4)
// // If the beaker is full, ping
// if(!amount)
// if(prob(5))
// visible_message("[src] pings.")
// playsound(loc, 'sound/machines/beep.ogg', 50, 1)
// return
// // If the human is losing too much blood, beep.
// if(attached.blood_volume < ((BLOOD_VOLUME_SAFE*attached.blood_ratio) && prob(5) && ishuman(attached))) //really couldn't care less about monkeys
// visible_message("[src] beeps loudly.")
// playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
// attached.transfer_blood_to(beaker, amount)
// update_icon()
/obj/machinery/feeding_tube/attack_hand(mob/user)
. = ..()
if(.)
return
if(!ishuman(user))
return
if(attached)
visible_message("[attached] is detached from the feeding tube.")
attached = null
update_icon()
return
else if(beaker)
eject_beaker(user)
// else
// toggle_mode()
/obj/machinery/feeding_tube/verb/eject_beaker()
set category = "Object"
set name = "Remove feeding container"
set src in view(1)
if(!isliving(usr))
to_chat(usr, "<span class='warning'>You can't do that!</span>")
return
if(usr.incapacitated())
return
if(beaker)
if(usr && Adjacent(usr) && !issiliconoradminghost(usr))
if(!usr.put_in_hands(beaker))
beaker.forceMove(drop_location())
beaker = null
update_icon()
// /obj/machinery/feeding_tube/verb/toggle_mode()
// set category = "Object"
// set name = "Toggle Mode"
// set src in view(1)
if(!isliving(usr))
to_chat(usr, "<span class='warning'>You can't do that!</span>")
return
if(usr.incapacitated())
return
update_icon()
/obj/machinery/feeding_tube/examine(mob/user)
. = ..()
if(get_dist(user, src) > 2)
return
. += "[src] is pumping liquid.\n"
if(beaker)
if(beaker.reagents && beaker.reagents.reagent_list.len)
. += "\t<span class='notice'>Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.</span>\n"
else
. += "\t<span class='notice'>Attached is an empty [beaker.name].</span>\n"
else
. += "\t<span class='notice'>No chemicals are attached.</span>\n"
. += "\t<span class='notice'>[attached ? attached : "No one"] is attached.</span>"
#undef FEEDTUBE_TAKING
#undef FEEDTUBE_INJECTING
+9 -4
View File
@@ -15,6 +15,11 @@
/obj/item/reagent_containers/food,
/obj/item/reagent_containers/glass,
/obj/item/reagent_containers/chem_pack))
//GS13 EDIT
///What kind of attachment point is used?
var/attachment_point = "needle"
//GS13 EDIT END
/obj/machinery/iv_drip/Initialize(mapload)
. = ..()
update_icon()
@@ -78,7 +83,7 @@
return
if(!target.has_dna())
to_chat(usr, "<span class='danger'>The drip beeps: Warning, incompatible creature!</span>")
to_chat(usr, "<span class='danger'>[src] beeps: Warning, incompatible creature!</span>")
return
if(Adjacent(target) && usr.Adjacent(target))
@@ -90,7 +95,7 @@
START_PROCESSING(SSmachines, src)
update_icon()
else
to_chat(usr, "<span class='warning'>There's nothing attached to the IV drip!</span>")
to_chat(usr, "<span class='warning'>There's nothing attached to [src]!</span>") //gs13 edit
/obj/machinery/iv_drip/attackby(obj/item/W, mob/user, params)
@@ -119,7 +124,7 @@
return PROCESS_KILL
if(!(get_dist(src, attached) <= 1 && isturf(attached.loc)))
to_chat(attached, "<span class='userdanger'>The IV drip needle is ripped out of you!</span>")
to_chat(attached, "<span class='userdanger'>[src] [attachment_point] is ripped out of you!</span>")
attached.apply_damage(3, BRUTE, pick(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM))
attached = null
update_icon()
@@ -174,7 +179,7 @@
/obj/machinery/iv_drip/verb/eject_beaker()
set category = "Object"
set name = "Remove IV Container"
set name = "Remove Container" //GS13 EDIT
set src in view(1)
if(!isliving(usr))
+1 -1
View File
@@ -264,7 +264,7 @@
name = "Feeding Tube Crate"
desc = "Contains a feeding tube machine, originally meant for supplying nutrition to farm animals. However, you could probably use it for your own, nefarious deeds..."
cost = 2000
contains = list(/obj/machinery/feeding_tube)
contains = list(/obj/machinery/iv_drip/feeding_tube)
crate_name = "feeding tube crate"
/datum/supply_pack/service/lightbulbs
+1 -1
View File
@@ -878,7 +878,6 @@
#include "code\game\machinery\doppler_array.dm"
#include "code\game\machinery\droneDispenser.dm"
#include "code\game\machinery\exp_cloner.dm"
#include "code\game\machinery\feeding_tube.dm"
#include "code\game\machinery\firealarm.dm"
#include "code\game\machinery\flasher.dm"
#include "code\game\machinery\gulag_item_reclaimer.dm"
@@ -3317,6 +3316,7 @@
#include "code\modules\zombie\items.dm"
#include "code\modules\zombie\organs.dm"
#include "GainStation13\code\clothing\calorite_collar.dm"
#include "GainStation13\code\machinery\feeding_tube.dm"
#include "GainStation13\code\mechanics\fatness.dm"
#include "GainStation13\code\mechanics\spells.dm"
#include "GainStation13\code\modules\client\preferences\preferences.dm"