mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 16:13:49 +01:00
New Janicart (#17787)
* new janicart * better splash code, admin notice * fix * fuel id * already logged * shouldn't be changed * runes * small fixes * large cleanup * oop * removed return . * Farewell sweet prince
This commit is contained in:
@@ -367,136 +367,3 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
/obj/structure/janitorialcart/ex_act(severity)
|
||||
spill(100 / severity)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
//old style mischievio-cart
|
||||
/obj/structure/bed/chair/janicart
|
||||
name = "janicart"
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "pussywagon"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
flags = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/storage/bag/trash/mybag = null
|
||||
var/callme = "pimpin' ride" //how do people refer to it?
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/Initialize(mapload, new_material, new_padding_material)
|
||||
. = ..()
|
||||
create_reagents(300)
|
||||
|
||||
/obj/structure/bed/chair/janicart/examine(mob/user)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "This [callme] contains [reagents.total_volume] unit\s of water!"
|
||||
if(mybag)
|
||||
. += "\A [mybag] is hanging on the [callme]."
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/mop))
|
||||
if(reagents.total_volume > 1)
|
||||
reagents.trans_to_obj(I, 2)
|
||||
to_chat(user, span_notice("You wet [I] in the [callme]."))
|
||||
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else
|
||||
to_chat(user, span_notice("This [callme] is out of water!"))
|
||||
else if(istype(I, /obj/item/key))
|
||||
to_chat(user, "Hold [I] in one of your hands while you drive this [callme].")
|
||||
else if(istype(I, /obj/item/storage/bag/trash))
|
||||
to_chat(user, span_notice("You hook the trashbag onto the [callme]."))
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
mybag = I
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/attack_hand(mob/user)
|
||||
if(mybag)
|
||||
mybag.loc = get_turf(user)
|
||||
user.put_in_hands(mybag)
|
||||
mybag = null
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/relaymove(mob/living/user, direction)
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
||||
unbuckle_mob()
|
||||
if(user.get_type_in_hands(/obj/item/key))
|
||||
step(src, direction)
|
||||
update_mob()
|
||||
else
|
||||
to_chat(user, span_notice("You'll need the keys in one of your hands to drive this [callme]."))
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M)
|
||||
update_mob()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/update_layer()
|
||||
if(dir == SOUTH)
|
||||
layer = FLY_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/unbuckle_mob()
|
||||
var/mob/living/M = ..()
|
||||
if(M)
|
||||
M.pixel_x = 0
|
||||
M.pixel_y = 0
|
||||
return M
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/set_dir()
|
||||
..()
|
||||
update_layer()
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
if(L.loc != loc)
|
||||
L.buckled = null //Temporary, so Move() succeeds.
|
||||
L.buckled = src //Restoring
|
||||
|
||||
update_mob()
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/proc/update_mob()
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
L.set_dir(dir)
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
L.pixel_x = 0
|
||||
L.pixel_y = 7
|
||||
if(WEST)
|
||||
L.pixel_x = 13
|
||||
L.pixel_y = 7
|
||||
if(NORTH)
|
||||
L.pixel_x = 0
|
||||
L.pixel_y = 4
|
||||
if(EAST)
|
||||
L.pixel_x = -13
|
||||
L.pixel_y = 7
|
||||
|
||||
/obj/structure/bed/chair/janicart/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(has_buckled_mobs())
|
||||
if(prob(85))
|
||||
var/mob/living/L = pick(buckled_mobs)
|
||||
return L.bullet_act(Proj)
|
||||
visible_message(span_warning("[Proj] ricochets off the [callme]!"))
|
||||
|
||||
|
||||
/obj/item/key
|
||||
name = "key"
|
||||
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "keys"
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
Reference in New Issue
Block a user