mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-02 13:42:32 +00:00
Standardization of the object tree and some modified functionality. Moved a lot of storage/*_kit and similar boxes to storage/box/* ; most of these can now be found in boxes.dm. First aid kits remain a separate item type. Replacement Light boxes pick up lights (for example broken ones) when used on them Moved weapon/secstorage to storage/secure Moved plant bags, ore satchel, trash bag, and sheet snatcher to storage/bag, in bags.dm Fixed reagent_containers and snacks to pass through attackby() so the use_to_pickup code works. This affects plant bags, trash bags, and pill bottles. Dice packs are now pill bottles, and all pill bottles can pick up dice. Added error handling to uplink/generate_menu() so that one mistyped string doesn't bork the whole syndie uplink menu, since strings cannot be type-checked at compile time. Cigarette packs and crayon boxes are now storage/fancy, however they retain existing update_icon() code. Added a comment to storage.dm so that future people know where to look for use_to_pickup and allow_quick_gather code. Updated all maps. I've tried to test this thoroughly but I wouldn't be surprised if there were a few lingering issues. Try not to panic if you encounter any. Full (i think) list of changed paths: /obj/item/weapon/storage/flashbang_kit > /obj/item/weapon/storage/box/flashbangs /obj/item/weapon/storage/body_bag_box > /obj/item/weapon/storage/box/bodybags /obj/item/weapon/storage/chemimp_kit > /obj/item/weapon/storage/box/chemimp /obj/item/weapon/storage/trackimp_kit > /obj/item/weapon/storage/box/trackimp /obj/item/weapon/storage/seccart_kit > /obj/item/weapon/storage/box/seccarts /obj/item/weapon/storage/handcuff_kit > /obj/item/weapon/storage/box/handcuffs /obj/item/weapon/cigpacket > /obj/item/weapon/storage/fancy/cigarettes /obj/item/weapon/storage/mousetraps > /obj/item/weapon/storage/box/mousetraps /obj/item/weapon/storage/PDAbox > /obj/item/weapon/storage/box/PDAs /obj/item/weapon/storage/id_kit > /obj/item/weapon/storage/box/ids /obj/item/weapon/storage/lightbox/mixed > /obj/item/weapon/storage/box/lights/mixed /obj/item/weapon/storage/donkpocket_kit > /obj/item/weapon/storage/box/donkpockets /obj/item/weapon/storage/beakerbox > /obj/item/weapon/storage/box/beakers /obj/item/weapon/storage/syringes > /obj/item/weapon/storage/box/syringes /obj/item/weapon/storage/gl_kit > /obj/item/weapon/storage/box/rxglasses /obj/item/weapon/storage/diskbox > /obj/item/weapon/storage/box/disks /obj/item/weapon/storage/stma_kit > /obj/item/weapon/storage/box/masks /obj/item/weapon/storage/lglo_kit > /obj/item/weapon/storage/box/gloves /obj/item/weapon/storage/lightbox/bulbs > /obj/item/weapon/storage/box/lights/bulbs /obj/item/weapon/plantbag > /obj/item/weapon/storage/bag/plants /obj/item/weapon/storage/satchel > /obj/item/weapon/storage/bag/ore /obj/item/weapon/trashbag > /obj/item/weapon/storage/bag/trash git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5494 316c924e-a436-60f5-8080-3fe189b3f50e
133 lines
3.9 KiB
Plaintext
133 lines
3.9 KiB
Plaintext
/obj/structure/stool/bed/chair/janicart
|
|
name = "janicart"
|
|
icon = 'icons/obj/vehicles.dmi'
|
|
icon_state = "pussywagon"
|
|
anchored = 1
|
|
density = 1
|
|
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/weapon/storage/bag/trash/mybag = null
|
|
|
|
/obj/structure/stool/bed/chair/janicart/New()
|
|
handle_rotation()
|
|
|
|
var/datum/reagents/R = new/datum/reagents(100)
|
|
reagents = R
|
|
R.my_atom = src
|
|
|
|
|
|
/obj/structure/stool/bed/chair/janicart/examine()
|
|
set src in usr
|
|
usr << "\icon[src] This pimpin' ride contains [reagents.total_volume] unit\s of water!"
|
|
if(mybag)
|
|
usr << "\A [mybag] is hanging on the pimpin' ride."
|
|
|
|
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/W, mob/user)
|
|
if(istype(W, /obj/item/weapon/mop))
|
|
if(reagents.total_volume >= 2)
|
|
reagents.trans_to(W, 2)
|
|
user << "<span class='notice'>You wet the mop in the pimpin' ride.</span>"
|
|
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
|
|
if(reagents.total_volume < 1)
|
|
user << "<span class='notice'>This pimpin' ride is out of water!</span>"
|
|
else if(istype(W, /obj/item/key))
|
|
user << "Hold [W] in one of your hands while you drive this pimpin' ride."
|
|
else if(istype(W, /obj/item/weapon/storage/bag/trash))
|
|
user << "<span class='notice'>You hook the trashbag onto the pimpin' ride.</span>"
|
|
user.drop_item()
|
|
W.loc = src
|
|
mybag = W
|
|
|
|
|
|
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
|
|
if(mybag)
|
|
mybag.loc = get_turf(user)
|
|
user.put_in_hands(mybag)
|
|
mybag = null
|
|
else
|
|
..()
|
|
|
|
|
|
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
|
|
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
|
unbuckle()
|
|
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
|
|
step(src, direction)
|
|
update_mob()
|
|
handle_rotation()
|
|
else
|
|
user << "<span class='notice'>You'll need the keys in one of your hands to drive this pimpin' ride.</span>"
|
|
|
|
/obj/structure/stool/bed/chair/janicart/Move()
|
|
..()
|
|
if(buckled_mob)
|
|
if(buckled_mob.buckled == src)
|
|
buckled_mob.loc = loc
|
|
|
|
/obj/structure/stool/bed/chair/janicart/buckle_mob(mob/M, mob/user)
|
|
if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon))
|
|
return
|
|
|
|
unbuckle()
|
|
|
|
M.visible_message(\
|
|
"<span class='notice'>[M] climbs onto the pimpin' ride!</span>",\
|
|
"<span class='notice'>You climb onto the pimpin' ride!</span>")
|
|
M.buckled = src
|
|
M.loc = loc
|
|
M.dir = dir
|
|
M.update_canmove()
|
|
buckled_mob = M
|
|
update_mob()
|
|
add_fingerprint(user)
|
|
return
|
|
|
|
/obj/structure/stool/bed/chair/janicart/unbuckle()
|
|
if(buckled_mob)
|
|
buckled_mob.pixel_x = 0
|
|
buckled_mob.pixel_y = 0
|
|
..()
|
|
|
|
/obj/structure/stool/bed/chair/janicart/handle_rotation()
|
|
if(dir == SOUTH)
|
|
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 = 13
|
|
buckled_mob.pixel_y = 7
|
|
if(NORTH)
|
|
buckled_mob.pixel_x = 0
|
|
buckled_mob.pixel_y = 4
|
|
if(EAST)
|
|
buckled_mob.pixel_x = -13
|
|
buckled_mob.pixel_y = 7
|
|
|
|
/obj/structure/stool/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
|
|
if(buckled_mob)
|
|
if(prob(65))
|
|
return buckled_mob.bullet_act(Proj)
|
|
visible_message("<span class='warning'>[Proj] ricochets off the pimpin' ride!</span>")
|
|
|
|
/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 = 1 |