mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-02 13:42:32 +00:00
* Get pants that match or else you gonna look silly yo
* Posters
* Fix other hud elements
* Rereviewed
* Update shotglass.dm
* Fix for new merged PRs
* Typo
* Coming across other stuff
* Update theblob.dm
* No takebacksies
* smh i forget to leave a comment
* Updated for the detgun and cards
* Should have rerun langserver again
* No longer plastic, more in scope
* Damn you bluespace
* Reverting turret logic, out of scope at this point
* Tweak that part
* Went over energy guns again, and fixed UI White's sprite sheet
* Welding masks, glasses, and JUSTICE
* Update portable_atmospherics.dm
* Cleaning up, clearing things up
* Review and suggestions
* Update valve.dm
* More tweaks
* Missing character
* Not distinct lightmasks, so they can be overlays
* Update generator.dm
* Add parameter so holodeck doesn't try to make a perfect copy
* Update unsorted.dm
* Spiders
* Better fix for spiders, fix vamps too
* Ghosts
* Update telekinesis.dm
* Cleaning up old procs
* It's set up to not copy datums... Unless they're in a list
* Donuts, duct tape, and detgun. D3VR coming to Early Access
* Update procs that interact with doors so they call update_state instead
* Forgot one spot, and actually might as well just force lock
* Cleaning up other things... Sigh, and kitty ears
* oops
* Getting used to how it works
* blinds
* Going back to the suit obscuring thing, so it doesn't update all the time
* Missed that from merging master
* I made this PR and forgot about it
* Fix runtimes in cards
* Make things a bit more unified
* Update update_icons.dm
* yarn, really?
* Update library_equipment.dm
* Update shieldgen.dm
* Every time Charlie merges something, I go back and see if I can improve things further
* what's this? more?
* Update misc_special.dm
* wow, paper
* Review
* More reviews
* To be sure, seems like being broken messed something sometimes
* Brought airlocks closer to how TG works to iron out some stuff
* Pizza and morgue
* Doesn't seem to hurt, tried with holodeck
* Revert "Doesn't seem to hurt, tried with holodeck"
This reverts commit 158529302b.
* Icon conflict
* Fix organ damage
* Don't ask how. Why. It's like that on prod too.
* Cutting down on things and updating from TG.
* More flexible. Just in case the thing you stuck it on didn't destroy.
* Hydro was one the things I touched earlier on, better rework it
* Reviews
* Cleaning up further, also bri'ish
* Undo a change I did, and switch over to a more recent implementation
* Update biogenerator.dm
* Rolling back to old airlocks, but with new duct taped note
* Functionally the same. I'd just rather not have the smoothing happen there
* Went over APCs again
* Fix welding helmet names in species files
* Update airlock.dm
* Update persistent_overlay.dm
* Oh, topic
185 lines
5.7 KiB
Plaintext
185 lines
5.7 KiB
Plaintext
/obj/structure/engineeringcart
|
|
name = "engineering cart"
|
|
desc = "A cart for storing engineering items."
|
|
icon = 'icons/obj/engicart.dmi'
|
|
icon_state = "cart"
|
|
face_while_pulling = FALSE
|
|
anchored = FALSE
|
|
density = TRUE
|
|
var/obj/item/stack/sheet/glass/myglass = null
|
|
var/obj/item/stack/sheet/metal/mymetal = null
|
|
var/obj/item/stack/sheet/plasteel/myplasteel = null
|
|
var/obj/item/flashlight/myflashlight = null
|
|
var/obj/item/storage/toolbox/mechanical/mybluetoolbox = null
|
|
var/obj/item/storage/toolbox/electrical/myyellowtoolbox = null
|
|
var/obj/item/storage/toolbox/emergency/myredtoolbox = null
|
|
|
|
/obj/structure/engineeringcart/Destroy()
|
|
QDEL_NULL(myglass)
|
|
QDEL_NULL(mymetal)
|
|
QDEL_NULL(myplasteel)
|
|
QDEL_NULL(myflashlight)
|
|
QDEL_NULL(mybluetoolbox)
|
|
QDEL_NULL(myyellowtoolbox)
|
|
QDEL_NULL(myredtoolbox)
|
|
return ..()
|
|
|
|
/obj/structure/engineeringcart/proc/put_in_cart(obj/item/I, mob/user)
|
|
user.drop_item()
|
|
I.loc = src
|
|
updateUsrDialog()
|
|
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
|
return
|
|
/obj/structure/engineeringcart/attackby(obj/item/I, mob/user, params)
|
|
var/fail_msg = "<span class='notice'>There is already one of those in [src].</span>"
|
|
if(!I.is_robot_module())
|
|
if(istype(I, /obj/item/stack/sheet/glass))
|
|
if(!myglass)
|
|
put_in_cart(I, user)
|
|
myglass=I
|
|
update_icon(UPDATE_OVERLAYS)
|
|
else
|
|
to_chat(user, fail_msg)
|
|
else if(istype(I, /obj/item/stack/sheet/metal))
|
|
if(!mymetal)
|
|
put_in_cart(I, user)
|
|
mymetal=I
|
|
update_icon(UPDATE_OVERLAYS)
|
|
else
|
|
to_chat(user, fail_msg)
|
|
else if(istype(I, /obj/item/stack/sheet/plasteel))
|
|
if(!myplasteel)
|
|
put_in_cart(I, user)
|
|
myplasteel=I
|
|
update_icon(UPDATE_OVERLAYS)
|
|
else
|
|
to_chat(user, fail_msg)
|
|
else if(istype(I, /obj/item/flashlight))
|
|
if(!myflashlight)
|
|
put_in_cart(I, user)
|
|
myflashlight=I
|
|
update_icon(UPDATE_OVERLAYS)
|
|
else
|
|
to_chat(user, fail_msg)
|
|
else if(istype(I, /obj/item/storage/toolbox/mechanical))
|
|
if(!mybluetoolbox)
|
|
put_in_cart(I, user)
|
|
mybluetoolbox=I
|
|
update_icon(UPDATE_OVERLAYS)
|
|
else
|
|
to_chat(user, fail_msg)
|
|
else if(istype(I, /obj/item/storage/toolbox/electrical))
|
|
if(!myyellowtoolbox)
|
|
put_in_cart(I, user)
|
|
myyellowtoolbox=I
|
|
update_icon(UPDATE_OVERLAYS)
|
|
else
|
|
to_chat(user, fail_msg)
|
|
else if(istype(I, /obj/item/storage/toolbox))
|
|
if(!myredtoolbox)
|
|
put_in_cart(I, user)
|
|
myredtoolbox=I
|
|
update_icon(UPDATE_OVERLAYS)
|
|
else
|
|
to_chat(user, fail_msg)
|
|
else if(istype(I, /obj/item/wrench))
|
|
if(!anchored && !isinspace())
|
|
playsound(src.loc, I.usesound, 50, 1)
|
|
user.visible_message( \
|
|
"[user] tightens \the [src]'s casters.", \
|
|
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
|
|
"You hear ratchet.")
|
|
anchored = TRUE
|
|
else if(anchored)
|
|
playsound(src.loc, I.usesound, 50, 1)
|
|
user.visible_message( \
|
|
"[user] loosens \the [src]'s casters.", \
|
|
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
|
|
"You hear ratchet.")
|
|
anchored = FALSE
|
|
else
|
|
to_chat(usr, "<span class='warning'>You cannot interface your modules [src]!</span>")
|
|
|
|
/obj/structure/engineeringcart/attack_hand(mob/user)
|
|
user.set_machine(src)
|
|
var/dat
|
|
if(myglass)
|
|
dat += "<a href='?src=[UID()];glass=1'>[myglass.name]</a><br>"
|
|
if(mymetal)
|
|
dat += "<a href='?src=[UID()];metal=1'>[mymetal.name]</a><br>"
|
|
if(myplasteel)
|
|
dat += "<a href='?src=[UID()];plasteel=1'>[myplasteel.name]</a><br>"
|
|
if(myflashlight)
|
|
dat += "<a href='?src=[UID()];flashlight=1'>[myflashlight.name]</a><br>"
|
|
if(mybluetoolbox)
|
|
dat += "<a href='?src=[UID()];bluetoolbox=1'>[mybluetoolbox.name]</a><br>"
|
|
if(myredtoolbox)
|
|
dat += "<a href='?src=[UID()];redtoolbox=1'>[myredtoolbox.name]</a><br>"
|
|
if(myyellowtoolbox)
|
|
dat += "<a href='?src=[UID()];yellowtoolbox=1'>[myyellowtoolbox.name]</a><br>"
|
|
var/datum/browser/popup = new(user, "engicart", name, 240, 160)
|
|
popup.set_content(dat)
|
|
popup.open()
|
|
|
|
/obj/structure/engineeringcart/Topic(href, href_list)
|
|
if(!in_range(src, usr))
|
|
return
|
|
if(!isliving(usr))
|
|
return
|
|
var/mob/living/user = usr
|
|
if(href_list["glass"])
|
|
if(myglass)
|
|
user.put_in_hands(myglass)
|
|
to_chat(user, "<span class='notice'>You take [myglass] from [src].</span>")
|
|
myglass = null
|
|
if(href_list["metal"])
|
|
if(mymetal)
|
|
user.put_in_hands(mymetal)
|
|
to_chat(user, "<span class='notice'>You take [mymetal] from [src].</span>")
|
|
mymetal = null
|
|
if(href_list["plasteel"])
|
|
if(myplasteel)
|
|
user.put_in_hands(myplasteel)
|
|
to_chat(user, "<span class='notice'>You take [myplasteel] from [src].</span>")
|
|
myplasteel = null
|
|
if(href_list["flashlight"])
|
|
if(myflashlight)
|
|
user.put_in_hands(myflashlight)
|
|
to_chat(user, "<span class='notice'>You take [myflashlight] from [src].</span>")
|
|
myflashlight = null
|
|
if(href_list["bluetoolbox"])
|
|
if(mybluetoolbox)
|
|
user.put_in_hands(mybluetoolbox)
|
|
to_chat(user, "<span class='notice'>You take [mybluetoolbox] from [src].</span>")
|
|
mybluetoolbox = null
|
|
if(href_list["redtoolbox"])
|
|
if(myredtoolbox)
|
|
user.put_in_hands(myredtoolbox)
|
|
to_chat(user, "<span class='notice'>You take [myredtoolbox] from [src].</span>")
|
|
myredtoolbox = null
|
|
if(href_list["yellowtoolbox"])
|
|
if(myyellowtoolbox)
|
|
user.put_in_hands(myyellowtoolbox)
|
|
to_chat(user, "<span class='notice'>You take [myyellowtoolbox] from [src].</span>")
|
|
myyellowtoolbox = null
|
|
|
|
update_icon(UPDATE_OVERLAYS)
|
|
updateUsrDialog()
|
|
|
|
/obj/structure/engineeringcart/update_overlays()
|
|
. = ..()
|
|
if(myglass)
|
|
. += "cart_glass"
|
|
if(mymetal)
|
|
. += "cart_metal"
|
|
if(myplasteel)
|
|
. += "cart_plasteel"
|
|
if(myflashlight)
|
|
. += "cart_flashlight"
|
|
if(mybluetoolbox)
|
|
. += "cart_bluetoolbox"
|
|
if(myredtoolbox)
|
|
. += "cart_redtoolbox"
|
|
if(myyellowtoolbox)
|
|
. += "cart_yellowtoolbox"
|