mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
vrooom
This commit is contained in:
@@ -1,219 +1,3 @@
|
||||
//old style PIMP-CART
|
||||
/obj/structure/stool/bed/chair/janicart
|
||||
name = "janicart"
|
||||
desc = "A brave janitor cyborg gave its life to produce such an amazing combination of speed and utility."
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "pussywagon"
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/obj/item/weapon/storage/bag/trash/mybag = null
|
||||
var/callme = "pimpin' ride" //how do people refer to it?
|
||||
var/move_delay = 0
|
||||
var/floorbuffer = 0
|
||||
var/keytype = /obj/item/key/janitor
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/New()
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/Move(a, b, flag)
|
||||
..()
|
||||
if(floorbuffer)
|
||||
var/turf/tile = loc
|
||||
if(isturf(tile))
|
||||
tile.clean_blood()
|
||||
if (istype(tile, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = tile
|
||||
F.dirt = 0
|
||||
for(var/A in tile)
|
||||
if(istype(A, /obj/effect))
|
||||
if(is_cleanable(A))
|
||||
qdel(A)
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
|
||||
..()
|
||||
if(floorbuffer)
|
||||
to_chat(user, "It has been upgraded with a floor buffer.")
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, keytype))
|
||||
to_chat(user, "Hold [I] in one of your hands while you drive this [callme].")
|
||||
else if(istype(I, /obj/item/weapon/storage/bag/trash))
|
||||
if(keytype == /obj/item/key/janitor)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You hook the trashbag onto the [callme].</span>")
|
||||
I.loc = src
|
||||
mybag = I
|
||||
else if(istype(I, /obj/item/janiupgrade))
|
||||
if(keytype == /obj/item/key/janitor)
|
||||
floorbuffer = 1
|
||||
qdel(I)
|
||||
to_chat(user, "<span class='notice'>You upgrade the [callme] with the floor buffer.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/update_icon()
|
||||
overlays.Cut()
|
||||
if(mybag)
|
||||
overlays += "cart_garbage"
|
||||
if(floorbuffer)
|
||||
overlays += "cart_buffer"
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
|
||||
if(mybag)
|
||||
mybag.loc = get_turf(user)
|
||||
user.put_in_hands(mybag)
|
||||
mybag = null
|
||||
update_icon()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
||||
unbuckle_mob()
|
||||
if(istype(user.l_hand, keytype) || istype(user.r_hand, keytype))
|
||||
if(!Process_Spacemove(direction) || !has_gravity(src.loc) || move_delay || !isturf(loc))
|
||||
return
|
||||
step(src, direction)
|
||||
update_mob()
|
||||
handle_rotation()
|
||||
if(istype(src.loc, /turf/simulated))
|
||||
var/turf/simulated/T = src.loc
|
||||
if(T.wet == TURF_WET_LUBE) //Lube! Fall off!
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
buckled_mob.Stun(7)
|
||||
buckled_mob.Weaken(7)
|
||||
unbuckle_mob()
|
||||
step(src, dir)
|
||||
move_delay = 1
|
||||
spawn(2)
|
||||
move_delay = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>")
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/Bump(atom/A)
|
||||
if(buckled_mob && istype(A, /obj/machinery/door))
|
||||
A.Bumped(buckled_mob)
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/user_buckle_mob(mob/living/M, mob/user)
|
||||
if(user.incapacitated()) //user can't move the mob on the janicart's turf if incapacitated
|
||||
return
|
||||
for(var/atom/movable/A in get_turf(src)) //we check for obstacles on the turf.
|
||||
if(A.density)
|
||||
if(A != src && A != M)
|
||||
return
|
||||
M.loc = loc //we move the mob on the janicart's turf before checking if we can buckle.
|
||||
..()
|
||||
update_mob()
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/unbuckle_mob()
|
||||
if(buckled_mob)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 0
|
||||
..()
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/handle_rotation()
|
||||
if((dir == SOUTH) || (dir == WEST) || (dir == EAST))
|
||||
layer = FLY_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.loc != loc)
|
||||
buckled_mob.buckled = null //Temporary, so Move() succeeds.
|
||||
buckled_mob.buckled = src //Restoring
|
||||
|
||||
update_mob()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 7
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 12
|
||||
buckled_mob.pixel_y = 7
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 4
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = -12
|
||||
buckled_mob.pixel_y = 7
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/bullet_act(obj/item/projectile/Proj)
|
||||
if(buckled_mob)
|
||||
buckled_mob.bullet_act(Proj)
|
||||
|
||||
/obj/item/key
|
||||
name = "key"
|
||||
desc = "A small grey key."
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "key"
|
||||
w_class = 1
|
||||
|
||||
/obj/item/key/janitor
|
||||
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
|
||||
icon_state = "keyjanitor"
|
||||
|
||||
/obj/item/key/security
|
||||
desc = "A keyring with a small steel key, and a rubber stun baton accessory."
|
||||
icon_state = "keysec"
|
||||
|
||||
/obj/item/key/ambulance
|
||||
name = "ambulance key"
|
||||
desc = "A keyring with a small steel key, and tag with a red cross on it."
|
||||
icon_state = "keydoc"
|
||||
|
||||
/obj/item/key/snowmobile
|
||||
name = "snowmobile key"
|
||||
desc = "A keyring with a small steel key, and tag with a red cross on it; clearly it's not implying you're going to the hospital for this..."
|
||||
icon_state = "keydoc" //get a better icon, sometime.
|
||||
|
||||
/obj/item/janiupgrade
|
||||
name = "floor buffer upgrade"
|
||||
desc = "An upgrade for mobile janicarts."
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "upgrade"
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/secway
|
||||
name = "secway"
|
||||
desc = "A brave security cyborg gave its life to help you look like a complete tool."
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "secway"
|
||||
callme = "secway"
|
||||
keytype = /obj/item/key/security
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/secway/update_mob()
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
buckled_mob.pixel_y = 4
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/ambulance
|
||||
name = "ambulance"
|
||||
desc = "For getting to patients in a hurry--or running them over."
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "docwagon"
|
||||
callme = "ambulance"
|
||||
keytype = /obj/item/key/ambulance
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/secway/snowmobile
|
||||
name = "red snowmobile"
|
||||
desc = "Wheeeeeeeeeeee."
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "snowmobile"
|
||||
callme = "snowmobile"
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/secway/snowmobile/blue
|
||||
name = "blue snowmobile"
|
||||
icon_state = "bluesnowmobile"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//TG style Janicart
|
||||
|
||||
/obj/structure/janitorialcart
|
||||
|
||||
Reference in New Issue
Block a user