Merge pull request #1762 from fleure/watertanktwo
Added watertank backpack and put on map
@@ -0,0 +1,95 @@
|
||||
/obj/item/weapon/watertank
|
||||
name = "backpack water tank"
|
||||
desc = "A S.U.N.S.H.I.N.E. brand watertank backpack with nozzle to water plants."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon_state = "waterbackpack"
|
||||
item_state = "waterbackpack"
|
||||
w_class = 4.0
|
||||
slot_flags = SLOT_BACK
|
||||
slowdown = 3
|
||||
action_button_name = "Toggle Mister"
|
||||
|
||||
var/obj/item/weapon/reagent_containers/glass/mister/noz
|
||||
var/on = 0
|
||||
var/volume = 500
|
||||
|
||||
/obj/item/weapon/watertank/New()
|
||||
..()
|
||||
create_reagents(volume)
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/ui_action_click()
|
||||
if (usr.get_item_by_slot(slot_back) == src)
|
||||
toggle_mister()
|
||||
else
|
||||
usr << "<span class='notice'>The watertank needs to be on your back to use!</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/verb/toggle_mister()
|
||||
set name = "Toggle Mister"
|
||||
set category = "Object"
|
||||
on = !on
|
||||
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(on)
|
||||
//Detach the nozzle into the user's hands
|
||||
noz = new(src)
|
||||
var/list/L = list("left hand" = slot_l_hand,"right hand" = slot_r_hand)
|
||||
if(!user.equip_in_one_of_slots(noz, L))
|
||||
on = 0
|
||||
user << "<span class='notice'>You need a free hand to hold the mister!</span>"
|
||||
else
|
||||
//Remove from their hands and put back "into" the tank
|
||||
remove_noz(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/equipped(mob/user, slot)
|
||||
if (slot != slot_back)
|
||||
remove_noz(user)
|
||||
|
||||
/obj/item/weapon/watertank/proc/remove_noz(mob/user)
|
||||
if (noz != null)
|
||||
var/mob/living/carbon/human/M = user
|
||||
M.u_equip(noz)
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/Del()
|
||||
if (noz)
|
||||
var/M = get(noz, /mob)
|
||||
remove_noz(M)
|
||||
..()
|
||||
return
|
||||
|
||||
// This mister item is intended as an extension of the watertank and always attached to it.
|
||||
// Therefore, it's designed to be "locked" to the player's hands or extended back onto
|
||||
// the watertank backpack. Allowing it to be placed elsewhere or created without a parent
|
||||
// watertank object will likely lead to weird behaviour or runtimes.
|
||||
/obj/item/weapon/reagent_containers/glass/mister
|
||||
name = "water mister"
|
||||
desc = "A mister nozzle attached to a water tank."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon_state = "mister"
|
||||
item_state = "mister"
|
||||
w_class = 4.0
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(25,50,100)
|
||||
volume = 500
|
||||
can_be_placed_into = list(/obj/structure/sink)
|
||||
|
||||
var/obj/item/weapon/watertank/tank
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/mister/New(parent_tank)
|
||||
..()
|
||||
if (!parent_tank || !istype(parent_tank, /obj/item/weapon/watertank)) //To avoid weird issues from admin spawns
|
||||
var/mob/living/carbon/human/M = usr
|
||||
M.u_equip(src)
|
||||
Del()
|
||||
else
|
||||
tank = parent_tank
|
||||
reagents = tank.reagents //This mister is really just a proxy for the tank's reagents
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/mister/dropped(mob/user as mob)
|
||||
user << "<span class='notice'>The mister snaps back onto the watertank!</span>"
|
||||
tank.on = 0
|
||||
Del()
|
||||
@@ -18,6 +18,9 @@
|
||||
|
||||
if(shoes)
|
||||
tally += shoes.slowdown
|
||||
|
||||
if(back)
|
||||
tally += back.slowdown
|
||||
|
||||
if(FAT in src.mutations)
|
||||
tally += 1.5
|
||||
|
||||
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 147 KiB |
@@ -1675,7 +1675,7 @@
|
||||
"aGk" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 5},/obj/machinery/firealarm{dir = 1; pixel_y = -24},/turf/simulated/floor{icon_state = "hydrofloor"},/area/hydroponics)
|
||||
"aGl" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{icon_state = "hydrofloor"},/area/hydroponics)
|
||||
"aGm" = (/obj/structure/disposalpipe/segment{dir = 2; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 10},/turf/simulated/floor{icon_state = "hydrofloor"},/area/hydroponics)
|
||||
"aGn" = (/obj/structure/table,/obj/item/weapon/reagent_containers/spray/plantbgone{pixel_x = 0; pixel_y = 3},/obj/item/weapon/reagent_containers/spray/plantbgone{pixel_x = 8; pixel_y = 8},/obj/item/weapon/reagent_containers/spray/plantbgone{pixel_x = 13; pixel_y = 5},/turf/simulated/floor{icon_state = "hydrofloor"},/area/hydroponics)
|
||||
"aGn" = (/obj/structure/table,/obj/item/weapon/reagent_containers/spray/plantbgone{pixel_x = 0; pixel_y = 3},/obj/item/weapon/reagent_containers/spray/plantbgone{pixel_x = 8; pixel_y = 8},/obj/item/weapon/reagent_containers/spray/plantbgone{pixel_x = 13; pixel_y = 5},/obj/item/weapon/watertank,/turf/simulated/floor{icon_state = "hydrofloor"},/area/hydroponics)
|
||||
"aGo" = (/obj/machinery/atmospherics/pipe/manifold{pipe_color = "blue"; dir = 8; icon_state = "manifold-b-f"; level = 1; name = "pipe manifold"},/turf/simulated/wall,/area/library)
|
||||
"aGp" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/floor/wood,/area/library)
|
||||
"aGq" = (/obj/structure/stool/bed/chair/office/dark{dir = 1},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/floor/wood,/area/library)
|
||||
|
||||
@@ -574,6 +574,7 @@
|
||||
#include "code\game\objects\items\weapons\tanks\jetpack.dm"
|
||||
#include "code\game\objects\items\weapons\tanks\tank_types.dm"
|
||||
#include "code\game\objects\items\weapons\tanks\tanks.dm"
|
||||
#include "code\game\objects\items\weapons\tanks\watertank.dm"
|
||||
#include "code\game\objects\structures\bedsheet_bin.dm"
|
||||
#include "code\game\objects\structures\displaycase.dm"
|
||||
#include "code\game\objects\structures\door_assembly.dm"
|
||||
|
||||