Files
Paradise/code/game/objects/items/weapons/RSF.dm
petethegoat@gmail.com 11b17c4442 Committing suomynonAyletamitlU's storage item standardisation commit: http://forums.nanotrasen.com/viewtopic.php?f=16&t=11746
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
2013-01-08 19:11:56 +00:00

234 lines
8.0 KiB
Plaintext

/*
CONTAINS:
RSF
*/
/obj/item/weapon/rsf
name = "\improper Rapid-Service-Fabricator"
desc = "A device used to rapidly deploy service items."
icon = 'icons/obj/items.dmi'
icon_state = "rcd"
opacity = 0
density = 0
anchored = 0.0
var/matter = 0
var/mode = 1
flags = TABLEPASS
w_class = 3.0
/obj/item/weapon/rsf/New()
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/rcd_ammo))
if ((matter + 10) > 30)
user << "The RSF cant hold any more matter."
return
del(W)
matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attack_self(mob/user as mob)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if (mode == 1)
mode = 2
user << "Changed dispensing mode to 'Drinking Glass'"
return
if (mode == 2)
mode = 3
user << "Changed dispensing mode to 'Paper'"
return
if (mode == 3)
mode = 4
user << "Changed dispensing mode to 'Pen'"
return
if (mode == 4)
mode = 5
user << "Changed dispensing mode to 'Dice Pack'"
return
if (mode == 5)
mode = 6
user << "Changed dispensing mode to 'Cigarette'"
return
if (mode == 6)
mode = 1
user << "Changed dispensing mode to 'Dosh'"
return
// Change mode
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob)
if (!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
return
if (istype(A, /obj/structure/table) && mode == 1)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Dosh..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 1)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Dosh..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 2)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Drinking Glass..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 2)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Drinking Glass..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 3)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Paper Sheet..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 3)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Paper Sheet..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 4)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Pen..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 4)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Pen..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 5)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Dice Pack..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/pill_bottle/dice( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 5)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Dice Pack..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/pill_bottle/dice( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 6)
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Cigarette..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 6)
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Cigarette..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return