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
This commit is contained in:
petethegoat@gmail.com
2013-01-08 19:11:56 +00:00
parent ef8369409e
commit 11b17c4442
67 changed files with 1353 additions and 1058 deletions

View File

@@ -31,7 +31,7 @@
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/device/analyzer(src)
new /obj/item/weapon/storage/satchel(src)
new /obj/item/weapon/storage/bag/ore(src)
new /obj/item/device/flashlight/lantern(src)
new /obj/item/weapon/shovel(src)
new /obj/item/weapon/pickaxe(src)

View File

@@ -382,8 +382,8 @@ commented out in r5061, I left it because of the shroom thingies
user << "\blue You dug a hole."
gets_dug()
if(istype(W,/obj/item/weapon/storage/satchel))
var/obj/item/weapon/storage/satchel/S = W
if(istype(W,/obj/item/weapon/storage/bag/ore))
var/obj/item/weapon/storage/bag/ore/S = W
if(S.collection_mode)
for(var/obj/item/weapon/ore/O in src.contents)
O.attackby(W,user)
@@ -453,11 +453,11 @@ commented out in r5061, I left it because of the shroom thingies
if(istype(M,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
if(istype(R.module, /obj/item/weapon/robot_module/miner))
if(istype(R.module_state_1,/obj/item/weapon/storage/satchel))
if(istype(R.module_state_1,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_1,R)
else if(istype(R.module_state_2,/obj/item/weapon/storage/satchel))
else if(istype(R.module_state_2,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_2,R)
else if(istype(R.module_state_3,/obj/item/weapon/storage/satchel))
else if(istype(R.module_state_3,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_3,R)
else
return

View File

@@ -81,174 +81,3 @@
usr << "\blue You empty the box"
src.updateUsrDialog()
return
/**********************Sheet Snatcher**************************/
//Stolen satchel code, making it a box just wouldn't work well for this -Sieve
/obj/item/weapon/sheetsnatcher
icon = 'icons/obj/mining.dmi'
icon_state = "sheetsnatcher"
name = "Sheet Snatcher"
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 300; //the number of sheets it can carry.
flags = FPRINT | TABLEPASS
w_class = 3
var/metal = 0//Holder values, to have a count of how much of each type is in the snatcher
var/glass = 0
var/gold = 0
var/silver = 0
var/diamond = 0
var/plasma = 0
var/uranium = 0
var/clown = 0
var/euranium = 0
var/plasteel = 0
var/rglass = 0
/obj/item/weapon/sheetsnatcher/attack_self(mob/user as mob)//Credit goes to carn on this one
var/location = get_turf(src) //fetches the turf containing the object. (so stuff spawns on the floor)
while(metal)
var/obj/item/stack/sheet/metal/S = new (location)
var/stacksize = min(metal,50) //maximum stack size is 50!
S.amount = stacksize
metal -= stacksize
while(glass)
var/obj/item/stack/sheet/glass/S = new (location)
var/stacksize = min(glass,50)
S.amount = stacksize
glass -= stacksize
while(gold)
var/obj/item/stack/sheet/mineral/gold/S = new (location)
var/stacksize = min(gold,50)
S.amount = stacksize
gold -= stacksize
while(silver)
var/obj/item/stack/sheet/mineral/silver/S = new (location)
var/stacksize = min(silver,50)
S.amount = stacksize
silver -= stacksize
while(diamond)
var/obj/item/stack/sheet/mineral/diamond/S = new (location)
var/stacksize = min(diamond,50)
S.amount = stacksize
diamond -= stacksize
while(plasma)
var/obj/item/stack/sheet/mineral/plasma/S = new (location)
var/stacksize = min(plasma,50)
S.amount = stacksize
plasma -= stacksize
while(uranium)
var/obj/item/stack/sheet/mineral/uranium/S = new (location)
var/stacksize = min(uranium,50)
S.amount = stacksize
uranium -= stacksize
while(clown)
var/obj/item/stack/sheet/mineral/clown/S = new (location)
var/stacksize = min(clown,50)
S.amount = stacksize
clown -= stacksize
while(euranium)
var/obj/item/stack/sheet/mineral/enruranium/S = new (location)
var/stacksize = min(euranium,50)
S.amount = stacksize
euranium -= stacksize
while(plasteel)
var/obj/item/stack/sheet/plasteel/S = new (location)
var/stacksize = min(plasteel,50)
S.amount = stacksize
plasteel -= stacksize
while(rglass)
var/obj/item/stack/sheet/rglass/S = new (location)
var/stacksize = min(rglass,50)
S.amount = stacksize
rglass -= stacksize
if(!metal && !glass && !gold && !silver && !diamond && !plasma && !uranium && !clown && !euranium && !plasteel && !rglass)
user << "\blue You empty the snatch."
return
/obj/item/weapon/sheetsnatcher/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/stack/sheet))
var/obj/item/stack/sheet/O = W
src.add(O,user)
return
/obj/item/weapon/sheetsnatcher/verb/toggle_mode()
set name = "Switch Sheet Snatcher Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The snatcher now picks up all sheets on a tile at once."
if(0)
usr << "The snatcher now picks up one sheet at a time."
/obj/item/weapon/sheetsnatcher/proc/add(var/obj/item/stack/sheet/S as obj, mob/user as mob)//Handles sheets, adds them to the holder values
if((S.name == "Sandstone Bricks") || (S.name == "Wood Planks"))//Does not pick up sandstone or wood, as they are not true sheets
return
var/current = metal+glass+gold+silver+diamond+plasma+uranium+clown+euranium+plasteel+rglass
if(capacity == current)//If it's full, you're done
user << "\red The snatcher is full."
return
if(capacity < current + S.amount)//If the stack will fill it up
var/diff = capacity - current
switch(S.name)
if("metal")
metal += diff
if("glass")
glass += diff
if("silver")
silver += diff
if("gold")
gold += diff
if("diamond")
diamond += diff
if("solid plasma")
plasma += diff
if("uranium")
uranium += diff
if("bananium")
clown += diff
if("enriched uranium")
euranium += diff
if("plasteel")
plasteel += diff
if("reinforced glass")
rglass += diff
S.amount -= diff
user << "\blue You add the [S.name] to the [name]"
else
switch(S.name)
if("metal")
metal += S.amount
if("glass")
glass += S.amount
if("silver")
silver += S.amount
if("gold")
gold += S.amount
if("diamond")
diamond += S.amount
if("solid plasma")
plasma += S.amount
if("uranium")
uranium += S.amount
if("bananium")
clown += S.amount
if("enriched uranium")
euranium += S.amount
if("plasteel")
plasteel += S.amount
if("reinforced glass")
rglass += S.amount
user << "\blue You add the [S.name] to the [name]"
del (S)
return
/obj/item/weapon/sheetsnatcher/borg
name = "Sheet Snatcher 9000"
desc = ""
capacity = 500//Borgs get more because >specialization