Files
vgstation13/code/unused/asteroiddevice.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

105 lines
2.7 KiB
Plaintext

/obj/item/device/gps
name = "GPS"
icon = 'icons/obj/device.dmi'
icon_state = "pinoff"
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0
item_state = "electronic"
throw_speed = 4
throw_range = 20
m_amt = 500
var/obj/effect/ship_landing_beacon/beacon = null
var/active = 0
attack_self()
if(!active)
active = 1
work()
usr << "\blue You activate the GPS"
else
active = 0
icon_state = "pinoff"
usr << "\blue You deactivate the GPS"
proc/work()
while(active)
if(!beacon)
for(var/obj/effect/ship_landing_beacon/B in world)
if(B.name == "Beacon - SS13")
beacon = B
break
if(!beacon)
usr << "\red Unable to detect beacon signal."
active = 0
icon_state = "pinonnull"
return
if(!istype(src.loc, /turf) && !istype(src.loc, /mob))
usr << "\red Too much interference. Please hold the device in hand or place it on belt."
active = 0
icon_state = "pinonnull"
return
src.icon_state = "pinonfar"
var/atom/cur_loc = src.loc
if(cur_loc.z == beacon.z)
src.dir = get_dir(cur_loc,beacon)
else
var/list/beacon_global_loc = beacon.get_global_map_pos()
var/list/src_global_loc = cur_loc.get_global_map_pos()
if(beacon_global_loc && src_global_loc)
var/hor_dir = 0
var/ver_dir = 0
if(beacon_global_loc["x"]>src_global_loc["x"])
hor_dir = EAST
else if(beacon_global_loc["x"]<src_global_loc["x"])
hor_dir = WEST
if(beacon_global_loc["y"]>src_global_loc["y"])
ver_dir = NORTH
else if(beacon_global_loc["y"]<src_global_loc["y"])
ver_dir = SOUTH
src.dir = hor_dir|ver_dir
sleep(5)
/obj/item/weapon/storage/explorers_box
name = "SpaceFriend(tm)"
icon_state = "box"
desc = "Everything a dashing space explorer would want to have near in the grim darkness of... whatever."
/obj/item/weapon/storage/explorers_box/New()
..()
new /obj/item/device/radio/beacon(src)
new /obj/item/device/gps(src)
new /obj/item/device/flashlight(src)
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
new /obj/item/weapon/reagent_containers/food/snacks/chips(src)
new /obj/item/weapon/storage/fancy/cigarettes(src)
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src)
P.reagents.add_reagent("nutriment", 500)
P.name = "Cyanide pill"
return
/obj/effect/ship_landing_beacon
icon = 'craft.dmi'
icon_state = "beacon"
name = "Beacon"
var/active = 0
proc
deploy()
if(active)
return
src.active = 1
src.anchored = 1
deactivate()
if(!active)
return
src.active = 0
src.anchored = 0