[MIRROR] New Janicart (#11016)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-06-06 06:43:07 -07:00
committed by GitHub
parent 74ff3c7d7d
commit 66987cb756
7 changed files with 144 additions and 136 deletions

View File

@@ -608,3 +608,9 @@ GLOBAL_LIST_INIT(rnwords, list("ire","ego","nahlizet","certum","veri","jatkaa","
R.word3=GLOB.cultwords["technology"]
R.loc = user.loc
R.check_icon()
/obj/effect/rune/wash(clean_types)
. = ..()
if (. || (clean_types & CLEAN_TYPE_RUNES))
qdel(src)
return TRUE

View File

@@ -31,7 +31,6 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
if (. || (clean_types & clean_type))
qdel(src)
return TRUE
return .
/obj/effect/decal/cleanable/Destroy()
SSpersistence.forget_value(src, /datum/persistent/filth)

View File

@@ -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

View File

@@ -239,8 +239,10 @@ default behaviour is:
MB.runOver(src)
if(istype(AM, /obj/vehicle))
var/obj/vehicle/V = AM
V.RunOver(src)
if(!istype(buckled, /obj/vehicle)) // Don't run ourselves over, needed for going down stairs in vehicles!
// Checks if we are riding a vehicle instead of our buckled vehicle, so that our trailers don't flatten us either!
var/obj/vehicle/V = AM
V.RunOver(src)
// Almost all of this handles pulling movables behind us
/mob/living/Move(atom/newloc, direct, movetime)

View File

@@ -0,0 +1,133 @@
/datum/category_item/catalogue/technology/janicart
name = "Zoomboni Janipro"
desc = "A ridable station cleaning cart. A janitorial luxury afforded only to the most affluent supply departments back in the early 2100s. Comes with fuzzy dice on the key fob. Welcome back old friend."
value = CATALOGUER_REWARD_TRIVIAL
/obj/vehicle/train/engine/janicart
name = "janicart"
desc = "A ridable station cleaning cart. Has a large water tank to feed its floor scrubbers, the opening is big enough to fit a mop through to wet it. It also has a hook to hang a trashbag from. You're riding in style now!"
icon_state = "pussywagon"
on = 0
powered = 1
locked = 0
load_item_visible = 1
load_offset_x = 0
mob_offset_y = 7
flags = OPENCONTAINER
var/scrubbing = FALSE //Floor cleaning enabled
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 = "janitor cart" //how do people refer to it?
key_type = /obj/item/key/janicart
catalogue_data = list(/datum/category_item/catalogue/technology/janicart)
/obj/item/key/janicart
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
//-------------------------------------------
// Standard procs
//-------------------------------------------
/obj/vehicle/train/engine/janicart/Initialize(mapload)
. = ..()
// apply speed
move_delay = 0.5
cell = new /obj/item/cell/high(src)
key = new key_type(src)
turn_off() //so engine verbs are correctly set
create_reagents(600)
update_icon()
verbs -= /obj/vehicle/train/verb/unlatch_v // Nothing to unlatch
if(prob(20))
callme = pick(list("pimpin' ride","thang","pussy wagon","janihound deflector","raunchy love mobile","sanitation stallion","magic carpet","crime mobile","get away car"))
/obj/vehicle/train/engine/janicart/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/mop))
if(reagents.total_volume > 1)
reagents.trans_to_obj(W, 2)
to_chat(user, span_notice("You wet \the [W] in the [callme]."))
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
else
to_chat(user, span_notice("This [callme] is out of water!"))
return
if(istype(W, /obj/item/storage/bag/trash))
to_chat(user, span_notice("You hook the trashbag onto the [callme]."))
user.drop_item()
W.forceMove(src)
mybag = W
return
. = ..()
/obj/vehicle/train/engine/janicart/attack_hand(mob/user)
if(mybag)
mybag.forceMove(get_turf(user))
user.put_in_hands(mybag)
mybag = null
return
. = ..()
//-------------------------------------------
// Interaction procs
//-------------------------------------------
/obj/vehicle/train/engine/janicart/examine(mob/user)
. = ..()
if(Adjacent(user))
. += "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition."
. += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%"
. += "This [callme] contains [reagents.total_volume] unit\s of water!"
if(mybag)
. += "\A [mybag] is hanging on the [callme]."
/obj/vehicle/train/engine/janicart/verb/toggle_brush()
set name = "Toggle brushes"
set category = "Object.Vehicle"
set src in view(0)
if(!ishuman(usr))
return
scrubbing = !scrubbing
if (scrubbing)
to_chat(usr, span_notice("You turn the [callme]'s brushes on."))
else
to_chat(usr, span_notice("You turn the [callme]'s brushes off."))
/obj/vehicle/train/engine/janicart/latch(obj/vehicle/train/T, mob/user)
return // nothing latchs to this!
/obj/vehicle/train/engine/janicart/update_icon()
..()
cut_overlays()
if(!open)
var/image/O = image(icon = 'icons/obj/vehicles_vr.dmi', icon_state = "pussywagon_overlay", dir = src.dir)
O.layer = FLY_LAYER
O.plane = MOB_PLANE
add_overlay(O)
/obj/vehicle/train/engine/janicart/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
var/turf/tile = get_turf(src)
if(scrubbing)
if(tile && reagents.total_volume > 0)
if(reagents.has_reagent(REAGENT_ID_WATER) || reagents.has_reagent(REAGENT_ID_CLEANER))
tile.wash(CLEAN_SCRUB)
for(var/atom/movable/AM in tile.contents)
if(istype(AM, /mob/living))
var/mob/living/L = AM
if(L.is_incorporeal() || L.buckled == src) // Don't scrub shadekin our our rider
continue
reagents.splash(L,5) // only 5u so it's not gamebreaking
reagents.trans_to_turf(tile, 1, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
else
scrubbing = FALSE
if(ishuman(load))
var/mob/living/carbon/human/D = load
to_chat(D, span_notice("The [callme]'s brushes turn off, as it runs out of cleaner."))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -4631,6 +4631,7 @@
#include "code\modules\vehicles\boat.dm"
#include "code\modules\vehicles\cargo_train.dm"
#include "code\modules\vehicles\construction.dm"
#include "code\modules\vehicles\janicart.dm"
#include "code\modules\vehicles\quad.dm"
#include "code\modules\vehicles\rover_vr.dm"
#include "code\modules\vehicles\Securitrain_vr.dm"