diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index c564ebe466..10072cd4cc 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -47,22 +47,18 @@ max_storage_space = ITEMSIZE_COST_NORMAL * 14 // 56 storage_cost = INVENTORY_STANDARD_SPACE + 1 - New() - ..() +/obj/item/weapon/storage/backpack/holding/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/storage/backpack/holding)) + user << "The Bluespace interfaces of the two devices conflict and malfunction." + qdel(W) return + . = ..() - attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/storage/backpack/holding)) - user << "The Bluespace interfaces of the two devices conflict and malfunction." - qdel(W) - return - ..() - - //Please don't clutter the parent storage item with stupid hacks. - can_be_inserted(obj/item/W as obj, stop_messages = 0) - if(istype(W, /obj/item/weapon/storage/backpack/holding)) - return 1 - return ..() +//Please don't clutter the parent storage item with stupid hacks. +/obj/item/weapon/storage/backpack/holding/can_be_inserted(obj/item/W as obj, stop_messages = 0) + if(istype(W, /obj/item/weapon/storage/backpack/holding)) + return 1 + return ..() /obj/item/weapon/storage/backpack/santabag name = "\improper Santa's gift bag" @@ -197,9 +193,7 @@ item_state_slots = list(slot_r_hand_str = "briefcase", slot_l_hand_str = "briefcase") /obj/item/weapon/storage/backpack/satchel/withwallet - New() - ..() - new /obj/item/weapon/storage/wallet/random( src ) + starts_with = list(/obj/item/weapon/storage/wallet/random) /obj/item/weapon/storage/backpack/satchel/norm name = "satchel" diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 01ca1c7796..165855e50e 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -112,121 +112,116 @@ storage_slots = 7 allow_quick_empty = 1 // this function is superceded - New() - ..() - //verbs -= /obj/item/weapon/storage/verb/quick_empty - //verbs += /obj/item/weapon/storage/bag/sheetsnatcher/quick_empty - can_be_inserted(obj/item/W as obj, stop_messages = 0) - if(!istype(W,/obj/item/stack/material)) - if(!stop_messages) - usr << "The snatcher does not accept [W]." - return 0 - var/current = 0 - for(var/obj/item/stack/material/S in contents) - current += S.amount - if(capacity == current)//If it's full, you're done - if(!stop_messages) - usr << "The snatcher is full." - return 0 - return 1 +/obj/item/weapon/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W as obj, stop_messages = 0) + if(!istype(W,/obj/item/stack/material)) + if(!stop_messages) + usr << "The snatcher does not accept [W]." + return 0 + var/current = 0 + for(var/obj/item/stack/material/S in contents) + current += S.amount + if(capacity == current)//If it's full, you're done + if(!stop_messages) + usr << "The snatcher is full." + return 0 + return 1 // Modified handle_item_insertion. Would prefer not to, but... - handle_item_insertion(obj/item/W as obj, prevent_warning = 0) - var/obj/item/stack/material/S = W - if(!istype(S)) return 0 +/obj/item/weapon/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W as obj, prevent_warning = 0) + var/obj/item/stack/material/S = W + if(!istype(S)) return 0 - var/amount - var/inserted = 0 - var/current = 0 - for(var/obj/item/stack/material/S2 in contents) - current += S2.amount - if(capacity < current + S.amount)//If the stack will fill it up - amount = capacity - current + var/amount + var/inserted = 0 + var/current = 0 + for(var/obj/item/stack/material/S2 in contents) + current += S2.amount + if(capacity < current + S.amount)//If the stack will fill it up + amount = capacity - current + else + amount = S.amount + + for(var/obj/item/stack/material/sheet in contents) + if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects + sheet.amount += amount // they should only be removed through procs in this file, which split them up. + S.amount -= amount + inserted = 1 + break + + if(!inserted || !S.amount) + usr.remove_from_mob(S) + usr.update_icons() //update our overlays + if (usr.client && usr.s_active != src) + usr.client.screen -= S + S.dropped(usr) + if(!S.amount) + qdel(S) else - amount = S.amount + S.loc = src - for(var/obj/item/stack/material/sheet in contents) - if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects - sheet.amount += amount // they should only be removed through procs in this file, which split them up. - S.amount -= amount - inserted = 1 - break - - if(!inserted || !S.amount) - usr.remove_from_mob(S) - usr.update_icons() //update our overlays - if (usr.client && usr.s_active != src) - usr.client.screen -= S - S.dropped(usr) - if(!S.amount) - qdel(S) - else - S.loc = src - - orient2hud(usr) - if(usr.s_active) - usr.s_active.show_to(usr) - update_icon() - return 1 + orient2hud(usr) + if(usr.s_active) + usr.s_active.show_to(usr) + update_icon() + return 1 // Sets up numbered display to show the stack size of each stored mineral // NOTE: numbered display is turned off currently because it's broken - orient2hud(mob/user as mob) - var/adjusted_contents = contents.len +/obj/item/weapon/storage/bag/sheetsnatcher/orient2hud(mob/user as mob) + var/adjusted_contents = contents.len - //Numbered contents display - var/list/datum/numbered_display/numbered_contents - if(display_contents_with_number) - numbered_contents = list() - adjusted_contents = 0 - for(var/obj/item/stack/material/I in contents) - adjusted_contents++ - var/datum/numbered_display/D = new/datum/numbered_display(I) - D.number = I.amount - numbered_contents.Add( D ) - - var/row_num = 0 - var/col_count = min(7,storage_slots) -1 - if (adjusted_contents > 7) - row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width. - src.slot_orient_objs(row_num, col_count, numbered_contents) - return + //Numbered contents display + var/list/datum/numbered_display/numbered_contents + if(display_contents_with_number) + numbered_contents = list() + adjusted_contents = 0 + for(var/obj/item/stack/material/I in contents) + adjusted_contents++ + var/datum/numbered_display/D = new/datum/numbered_display(I) + D.number = I.amount + numbered_contents.Add( D ) + var/row_num = 0 + var/col_count = min(7,storage_slots) -1 + if (adjusted_contents > 7) + row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width. + src.slot_orient_objs(row_num, col_count, numbered_contents) + return // Modified quick_empty verb drops appropriate sized stacks - quick_empty() - var/location = get_turf(src) - for(var/obj/item/stack/material/S in contents) - while(S.amount) - var/obj/item/stack/material/N = new S.type(location) - var/stacksize = min(S.amount,N.max_amount) - N.amount = stacksize - S.amount -= stacksize - if(!S.amount) - qdel(S) // todo: there's probably something missing here - orient2hud(usr) - if(usr.s_active) - usr.s_active.show_to(usr) - update_icon() +/obj/item/weapon/storage/bag/sheetsnatcher/quick_empty() + var/location = get_turf(src) + for(var/obj/item/stack/material/S in contents) + while(S.amount) + var/obj/item/stack/material/N = new S.type(location) + var/stacksize = min(S.amount,N.max_amount) + N.amount = stacksize + S.amount -= stacksize + if(!S.amount) + qdel(S) // todo: there's probably something missing here + orient2hud(usr) + if(usr.s_active) + usr.s_active.show_to(usr) + update_icon() // Instead of removing - remove_from_storage(obj/item/W as obj, atom/new_location) - var/obj/item/stack/material/S = W - if(!istype(S)) return 0 +/obj/item/weapon/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W as obj, atom/new_location) + var/obj/item/stack/material/S = W + if(!istype(S)) return 0 - //I would prefer to drop a new stack, but the item/attack_hand code - // that calls this can't recieve a different object than you clicked on. - //Therefore, make a new stack internally that has the remainder. - // -Sayu + //I would prefer to drop a new stack, but the item/attack_hand code + // that calls this can't recieve a different object than you clicked on. + //Therefore, make a new stack internally that has the remainder. + // -Sayu - if(S.amount > S.max_amount) - var/obj/item/stack/material/temp = new S.type(src) - temp.amount = S.amount - S.max_amount - S.amount = S.max_amount + if(S.amount > S.max_amount) + var/obj/item/stack/material/temp = new S.type(src) + temp.amount = S.amount - S.max_amount + S.amount = S.max_amount - return ..(S,new_location) + return ..(S,new_location) // ----------------------------- // Sheet Snatcher (Cyborg) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 9e98fe58ec..23fccf51ac 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -59,23 +59,25 @@ /obj/item/device/integrated_electronics/wirer, ) -/obj/item/weapon/storage/belt/utility/full/New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange")) +/obj/item/weapon/storage/belt/utility/full + starts_with = list( + /obj/item/weapon/screwdriver, + /obj/item/weapon/wrench, + /obj/item/weapon/weldingtool, + /obj/item/weapon/crowbar, + /obj/item/weapon/wirecutters, + /obj/item/stack/cable_coil/random_belt + ) -/obj/item/weapon/storage/belt/utility/atmostech/New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/device/t_scanner(src) +/obj/item/weapon/storage/belt/utility/atmostech + starts_with = list( + /obj/item/weapon/screwdriver, + /obj/item/weapon/wrench, + /obj/item/weapon/weldingtool, + /obj/item/weapon/crowbar, + /obj/item/weapon/wirecutters, + /obj/item/device/t_scanner + ) /obj/item/weapon/storage/belt/utility/chief name = "chief engineer's toolbelt" @@ -83,15 +85,16 @@ icon_state = "utilitybelt_ce" item_state = "utility_ce" -/obj/item/weapon/storage/belt/utility/chief/full/New() - ..() - new /obj/item/weapon/screwdriver/power(src) - new /obj/item/weapon/crowbar/power(src) - new /obj/item/weapon/weldingtool/experimental(src) - new /obj/item/device/multitool(src) - new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange")) - new /obj/item/weapon/extinguisher/mini(src) - new /obj/item/device/analyzer(src) +/obj/item/weapon/storage/belt/utility/chief/full + starts_with = list( + /obj/item/weapon/screwdriver/power, + /obj/item/weapon/crowbar/power, + /obj/item/weapon/weldingtool/experimental, + /obj/item/device/multitool, + /obj/item/stack/cable_coil/random_belt, + /obj/item/weapon/extinguisher/mini, + /obj/item/device/analyzer + ) /obj/item/weapon/storage/belt/medical name = "medical belt" @@ -216,14 +219,8 @@ /obj/item/device/soulstone ) -/obj/item/weapon/storage/belt/soulstone/full/New() - ..() - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) +/obj/item/weapon/storage/belt/soulstone/full + starts_with = list(/obj/item/device/soulstone = 6) /obj/item/weapon/storage/belt/utility/alien name = "alien belt" @@ -232,15 +229,16 @@ icon_state = "belt" item_state = "security" -/obj/item/weapon/storage/belt/utility/alien/full/New() - ..() - new /obj/item/weapon/screwdriver/alien(src) - new /obj/item/weapon/wrench/alien(src) - new /obj/item/weapon/weldingtool/alien(src) - new /obj/item/weapon/crowbar/alien(src) - new /obj/item/weapon/wirecutters/alien(src) - new /obj/item/device/multitool/alien(src) - new /obj/item/stack/cable_coil/alien(src) +/obj/item/weapon/storage/belt/utility/alien/full + starts_with = list( + /obj/item/weapon/screwdriver/alien, + /obj/item/weapon/wrench/alien, + /obj/item/weapon/weldingtool/alien, + /obj/item/weapon/crowbar/alien, + /obj/item/weapon/wirecutters/alien, + /obj/item/device/multitool/alien, + /obj/item/stack/cable_coil/alien + ) /obj/item/weapon/storage/belt/medical/alien name = "alien belt" @@ -277,16 +275,17 @@ /obj/item/weapon/surgical ) -/obj/item/weapon/storage/belt/medical/alien/New() - ..() - new /obj/item/weapon/surgical/scalpel/alien(src) - new /obj/item/weapon/surgical/hemostat/alien(src) - new /obj/item/weapon/surgical/retractor/alien(src) - new /obj/item/weapon/surgical/circular_saw/alien(src) - new /obj/item/weapon/surgical/FixOVein/alien(src) - new /obj/item/weapon/surgical/bone_clamp/alien(src) - new /obj/item/weapon/surgical/cautery/alien(src) - new /obj/item/weapon/surgical/surgicaldrill/alien(src) +/obj/item/weapon/storage/belt/medical/alien + starts_with = list( + /obj/item/weapon/surgical/scalpel/alien, + /obj/item/weapon/surgical/hemostat/alien, + /obj/item/weapon/surgical/retractor/alien, + /obj/item/weapon/surgical/circular_saw/alien, + /obj/item/weapon/surgical/FixOVein/alien, + /obj/item/weapon/surgical/bone_clamp/alien, + /obj/item/weapon/surgical/cautery/alien, + /obj/item/weapon/surgical/surgicaldrill/alien + ) /obj/item/weapon/storage/belt/champion name = "championship belt" diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 933970b335..783d8cd74a 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -14,12 +14,13 @@ icon_state ="bible" /obj/item/weapon/storage/bible/booze/New() - ..() - new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src) - new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src) - new /obj/item/weapon/spacecash/c100(src) - new /obj/item/weapon/spacecash/c100(src) - new /obj/item/weapon/spacecash/c100(src) + starts_with = list( + /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer, + /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer, + /obj/item/weapon/spacecash/c100, + /obj/item/weapon/spacecash/c100, + /obj/item/weapon/spacecash/c100 + ) /obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity) if(!proximity) return diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 8e4fb5f6cf..5f3bbcc0c3 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -75,393 +75,250 @@ name = "box of latex gloves" desc = "Contains white gloves." icon_state = "latex" - -/obj/item/weapon/storage/box/gloves/New() - ..() - for(var/i = 1 to 7) - new /obj/item/clothing/gloves/sterile/latex(src) + starts_with = list(/obj/item/clothing/gloves/sterile/latex = 7) /obj/item/weapon/storage/box/masks name = "box of sterile masks" desc = "This box contains masks of sterility." icon_state = "sterile" - -/obj/item/weapon/storage/box/masks/New() - ..() - for(var/i = 1 to 7) - new /obj/item/clothing/mask/surgical(src) + starts_with = list(/obj/item/clothing/mask/surgical = 7) /obj/item/weapon/storage/box/syringes name = "box of syringes" desc = "A box full of syringes." icon_state = "syringe" - -/obj/item/weapon/storage/box/syringes/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/syringe(src) + starts_with = list(/obj/item/weapon/reagent_containers/syringe = 7) /obj/item/weapon/storage/box/syringegun name = "box of syringe gun cartridges" desc = "A box full of compressed gas cartridges." icon_state = "syringe" - -/obj/item/weapon/storage/box/syringegun/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/syringe_cartridge(src) + starts_with = list(/obj/item/weapon/syringe_cartridge = 7) /obj/item/weapon/storage/box/beakers name = "box of beakers" icon_state = "beaker" - -/obj/item/weapon/storage/box/beakers/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/glass/beaker(src) + starts_with = list(/obj/item/weapon/reagent_containers/glass/beaker = 7) /obj/item/weapon/storage/box/injectors name = "box of DNA injectors" desc = "This box contains injectors it seems." - -/obj/item/weapon/storage/box/injectors/New() - ..() - for(var/i = 1 to 3) - new /obj/item/weapon/dnainjector/h2m(src) - for(var/i = 1 to 3) - new /obj/item/weapon/dnainjector/m2h(src) + starts_with = list( + /obj/item/weapon/dnainjector/h2m = 3, + /obj/item/weapon/dnainjector/m2h = 3 + ) /obj/item/weapon/storage/box/blanks name = "box of blank shells" desc = "It has a picture of a gun and several warning symbols on the front." icon_state = "blankshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/blank = 8) -/obj/item/weapon/storage/box/blanks/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/blank(src) - -/obj/item/weapon/storage/box/blanks/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/blank(src) +/obj/item/weapon/storage/box/blanks/large + starts_with = list(/obj/item/ammo_casing/a12g/blank = 16) /obj/item/weapon/storage/box/beanbags name = "box of beanbag shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "beanshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") - -/obj/item/weapon/storage/box/beanbags/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/beanbag(src) + starts_with = list(/obj/item/ammo_casing/a12g/beanbag = 8) /obj/item/weapon/storage/box/beanbags/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/beanbag(src) + starts_with = list(/obj/item/ammo_casing/a12g/beanbag = 16) /obj/item/weapon/storage/box/shotgunammo name = "box of shotgun slugs" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "lethalshellshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g = 8) -/obj/item/weapon/storage/box/shotgunammo/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g(src) - -/obj/item/weapon/storage/box/shotgunammo/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g(src) +/obj/item/weapon/storage/box/shotgunammo/large + starts_with = list(/obj/item/ammo_casing/a12g = 16) /obj/item/weapon/storage/box/shotgunshells name = "box of shotgun shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "lethalslug_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/pellet = 8) -/obj/item/weapon/storage/box/shotgunshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/pellet(src) - -/obj/item/weapon/storage/box/shotgunshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/pellet(src) +/obj/item/weapon/storage/box/shotgunshells/large + starts_with = list(/obj/item/ammo_casing/a12g/pellet = 16) /obj/item/weapon/storage/box/flashshells name = "box of illumination shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "illumshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/flash = 8) -/obj/item/weapon/storage/box/flashshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/flash(src) - -/obj/item/weapon/storage/box/flashshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/flash(src) +/obj/item/weapon/storage/box/flashshells/large + starts_with = list(/obj/item/ammo_casing/a12g/flash = 16) /obj/item/weapon/storage/box/stunshells name = "box of stun shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "stunshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/stunshell = 8) -/obj/item/weapon/storage/box/stunshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/stunshell(src) - -/obj/item/weapon/storage/box/stunshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/stunshell(src) +/obj/item/weapon/storage/box/stunshells/large + starts_with = list(/obj/item/ammo_casing/a12g/stunshell = 16) /obj/item/weapon/storage/box/practiceshells name = "box of practice shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "blankshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/practice = 8) -/obj/item/weapon/storage/box/practiceshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/practice(src) - -/obj/item/weapon/storage/box/practiceshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/practice(src) +/obj/item/weapon/storage/box/practiceshells/large + starts_with = list(/obj/item/ammo_casing/a12g/practice = 16) /obj/item/weapon/storage/box/empshells name = "box of emp shells" desc = "It has a picture of a gun and several warning symbols on the front." icon_state = "empshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/emp = 8) -/obj/item/weapon/storage/box/empshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/emp(src) - -/obj/item/weapon/storage/box/empshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/emp(src) +/obj/item/weapon/storage/box/empshells/large + starts_with = list(/obj/item/ammo_casing/a12g/emp = 16) /obj/item/weapon/storage/box/sniperammo name = "box of 14.5mm shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." - -/obj/item/weapon/storage/box/sniperammo/New() - ..() - for(var/i = 1 to 7) - new /obj/item/ammo_casing/a145(src) + starts_with = list(/obj/item/ammo_casing/a145 = 7) /obj/item/weapon/storage/box/flashbangs name = "box of flashbangs (WARNING)" desc = "WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use." icon_state = "flashbang" - -/obj/item/weapon/storage/box/flashbangs/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/flashbang(src) + starts_with = list(/obj/item/weapon/grenade/flashbang = 7) /obj/item/weapon/storage/box/emps name = "box of emp grenades" desc = "A box containing 5 military grade EMP grenades.
WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur." icon_state = "emp" - -/obj/item/weapon/storage/box/emps/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/empgrenade(src) + starts_with = list(/obj/item/weapon/grenade/empgrenade = 7) /obj/item/weapon/storage/box/empslite name = "box of low yield emp grenades" desc = "A box containing 5 low yield EMP grenades.
WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur." icon_state = "emp" - -/obj/item/weapon/storage/box/empslite/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/empgrenade/low_yield(src) + starts_with = list(/obj/item/weapon/grenade/empgrenade/low_yield = 7) /obj/item/weapon/storage/box/smokes name = "box of smoke bombs" desc = "A box containing 7 smoke bombs." icon_state = "flashbang" - -/obj/item/weapon/storage/box/smokes/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/smokebomb(src) + starts_with = list(/obj/item/weapon/grenade/smokebomb = 7) /obj/item/weapon/storage/box/anti_photons name = "box of anti-photon grenades" desc = "A box containing 7 experimental photon disruption grenades." icon_state = "flashbang" - -/obj/item/weapon/storage/box/anti_photons/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/anti_photon(src) + starts_with = list(/obj/item/weapon/grenade/anti_photon = 7) /obj/item/weapon/storage/box/frags name = "box of fragmentation grenades (WARNING)" desc = "A box containing 7 military grade fragmentation grenades.
WARNING: These devices are extremely dangerous and can cause limb loss or death in repeated use." icon_state = "frag" - -/obj/item/weapon/storage/box/frags/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/explosive(src) + starts_with = list(/obj/item/weapon/grenade/explosive = 7) /obj/item/weapon/storage/box/frags_half_box name = "box of fragmentation grenades (WARNING)" desc = "A box containing 4 military grade fragmentation grenades.
WARNING: These devices are extremely dangerous and can cause limb loss or death in repeated use." icon_state = "frag" - -/obj/item/weapon/storage/box/frags_half_box/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/grenade/explosive(src) + starts_with = list(/obj/item/weapon/grenade/explosive = 4) /obj/item/weapon/storage/box/metalfoam name = "box of metal foam grenades." desc = "A box containing 7 metal foam grenades." icon_state = "flashbang" - -/obj/item/weapon/storage/box/metalfoam/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/chem_grenade/metalfoam(src) + starts_with = list(/obj/item/weapon/grenade/chem_grenade/metalfoam = 7) /obj/item/weapon/storage/box/teargas name = "box of teargas grenades" desc = "A box containing 7 teargas grenades." icon_state = "flashbang" - -/obj/item/weapon/storage/box/teargas/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/chem_grenade/teargas(src) + starts_with = list(/obj/item/weapon/grenade/chem_grenade/teargas = 7) /obj/item/weapon/storage/box/flare name = "box of flares" desc = "A box containing 4 flares." - -/obj/item/weapon/storage/box/flare/New() - ..() - for(var/i = 1 to 4) - new /obj/item/device/flashlight/flare(src) + starts_with = list(/obj/item/device/flashlight/flare = 4) /obj/item/weapon/storage/box/trackimp name = "boxed tracking implant kit" desc = "Box full of scum-bag tracking utensils." icon_state = "implant" - -/obj/item/weapon/storage/box/trackimp/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/implantcase/tracking(src) - new /obj/item/weapon/implanter(src) - new /obj/item/weapon/implantpad(src) - new /obj/item/weapon/locator(src) + starts_with = list( + /obj/item/weapon/implantcase/tracking = 4, + /obj/item/weapon/implanter, + /obj/item/weapon/implantpad, + /obj/item/weapon/locator + ) /obj/item/weapon/storage/box/chemimp name = "boxed chemical implant kit" desc = "Box of stuff used to implant chemicals." icon_state = "implant" - -/obj/item/weapon/storage/box/chemimp/New() - ..() - for(var/i = 1 to 5) - new /obj/item/weapon/implantcase/chem(src) - new /obj/item/weapon/implanter(src) - new /obj/item/weapon/implantpad(src) + starts_with = list( + /obj/item/weapon/implantcase/chem = 5, + /obj/item/weapon/implanter, + /obj/item/weapon/implantpad + ) /obj/item/weapon/storage/box/camerabug name = "mobile camera pod box" desc = "A box containing some mobile camera pods." icon_state = "pda" - -/obj/item/weapon/storage/box/camerabug/New() - ..() - for(var/i = 1 to 6) - new /obj/item/device/camerabug(src) - new /obj/item/device/bug_monitor(src) + starts_with = list( + /obj/item/device/camerabug = 6, + /obj/item/device/bug_monitor + ) /obj/item/weapon/storage/box/rxglasses name = "box of prescription glasses" desc = "This box contains nerd glasses." icon_state = "glasses" - -/obj/item/weapon/storage/box/rxglasses/New() - ..() - for(var/i = 1 to 7) - new /obj/item/clothing/glasses/regular(src) + starts_with = list(/obj/item/clothing/glasses/regular = 7) /obj/item/weapon/storage/box/cdeathalarm_kit name = "death alarm kit" desc = "Box of stuff used to implant death alarms." icon_state = "implant" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") - -/obj/item/weapon/storage/box/cdeathalarm_kit/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/implantcase/death_alarm(src) - new /obj/item/weapon/implanter(src) + starts_with = list( + /obj/item/weapon/implantcase/death_alarm = 7, + /obj/item/weapon/implanter + ) /obj/item/weapon/storage/box/condimentbottles name = "box of condiment bottles" desc = "It has a large ketchup smear on it." - -/obj/item/weapon/storage/box/condimentbottles/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/food/condiment(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/condiment = 7) /obj/item/weapon/storage/box/cups name = "box of paper cups" desc = "It has pictures of paper cups on the front." - -/obj/item/weapon/storage/box/cups/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/food/drinks/sillycup(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/sillycup = 7) /obj/item/weapon/storage/box/donkpockets name = "box of donk-pockets" desc = "Instructions: Heat in microwave. Product will cool if not eaten within seven minutes." icon_state = "donk_kit" - -/obj/item/weapon/storage/box/donkpockets/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/donkpocket = 7) /obj/item/weapon/storage/box/sinpockets name = "box of sin-pockets" desc = "Instructions: Crush bottom of package to initiate chemical heating. Wait for 20 seconds before consumption. Product will cool if not eaten within seven minutes." icon_state = "donk_kit" - -/obj/item/weapon/storage/box/sinpockets/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket = 7) /obj/item/weapon/storage/box/monkeycubes name = "monkey cube box" @@ -469,88 +326,51 @@ icon = 'icons/obj/food.dmi' icon_state = "monkeycubebox" can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube) - -/obj/item/weapon/storage/box/monkeycubes/New() - ..() - if(type == /obj/item/weapon/storage/box/monkeycubes) - for(var/i = 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped = 4) /obj/item/weapon/storage/box/monkeycubes/farwacubes name = "farwa cube box" desc = "Drymate brand farwa cubes, shipped from Meralar. Just add water!" - -/obj/item/weapon/storage/box/monkeycubes/farwacubes/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube = 4) /obj/item/weapon/storage/box/monkeycubes/stokcubes name = "stok cube box" desc = "Drymate brand stok cubes, shipped from Moghes. Just add water!" - -/obj/item/weapon/storage/box/monkeycubes/stokcubes/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube = 4) /obj/item/weapon/storage/box/monkeycubes/neaeracubes name = "neaera cube box" desc = "Drymate brand neaera cubes, shipped from Jargon 4. Just add water!" - -/obj/item/weapon/storage/box/monkeycubes/neaeracubes/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube = 4) /obj/item/weapon/storage/box/ids name = "box of spare IDs" desc = "Has so many empty IDs." icon_state = "id" - -/obj/item/weapon/storage/box/ids/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/card/id(src) + starts_with = list(/obj/item/weapon/card/id = 7) /obj/item/weapon/storage/box/seccarts name = "box of spare R.O.B.U.S.T. Cartridges" desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security." icon_state = "pda" - -/obj/item/weapon/storage/box/seccarts/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/cartridge/security(src) + starts_with = list(/obj/item/weapon/cartridge/security = 7) /obj/item/weapon/storage/box/handcuffs name = "box of spare handcuffs" desc = "A box full of handcuffs." icon_state = "handcuff" - -/obj/item/weapon/storage/box/handcuffs/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/handcuffs(src) + starts_with = list(/obj/item/weapon/handcuffs = 7) /obj/item/weapon/storage/box/mousetraps name = "box of Pest-B-Gon mousetraps" desc = "WARNING: Keep out of reach of children." icon_state = "mousetraps" - -/obj/item/weapon/storage/box/mousetraps/New() - ..() - for(var/i = 1 to 7) - new /obj/item/device/assembly/mousetrap(src) + starts_with = list(/obj/item/device/assembly/mousetrap = 7) /obj/item/weapon/storage/box/pillbottles name = "box of pill bottles" desc = "It has pictures of pill bottles on its front." - -/obj/item/weapon/storage/box/pillbottles/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/storage/pill_bottle(src) + starts_with = list(/obj/item/weapon/storage/pill_bottle = 7) /obj/item/weapon/storage/box/snappops name = "snap pop box" @@ -558,11 +378,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "spbox" can_hold = list(/obj/item/toy/snappop) - -/obj/item/weapon/storage/box/snappops/New() - ..() - for(var/i = 1 to 8) - new /obj/item/toy/snappop(src) + starts_with = list(/obj/item/toy/snappop = 8) /obj/item/weapon/storage/box/matches name = "matchbox" @@ -572,11 +388,7 @@ w_class = ITEMSIZE_TINY slot_flags = SLOT_BELT can_hold = list(/obj/item/weapon/flame/match) - -/obj/item/weapon/storage/box/matches/New() - ..() - for(var/i=1 to 10) - new /obj/item/weapon/flame/match(src) + starts_with = list(/obj/item/weapon/flame/match = 10) /obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/flame/match/W as obj, mob/user as mob) if(istype(W) && !W.lit && !W.burnt) @@ -591,11 +403,7 @@ name = "box of injectors" desc = "Contains autoinjectors." icon_state = "syringe" - -/obj/item/weapon/storage/box/autoinjectors/New() - ..() - for (var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src) + starts_with = list(/obj/item/weapon/reagent_containers/hypospray/autoinjector = 7) /obj/item/weapon/storage/box/lights name = "box of replacement bulbs" @@ -608,30 +416,21 @@ max_storage_space = ITEMSIZE_COST_SMALL * 24 //holds 24 items of w_class 2 use_to_pickup = 1 // for picking up broken bulbs, not that most people will try -/obj/item/weapon/storage/box/lights/bulbs/New() - ..() - for(var/i = 1 to 24) - new /obj/item/weapon/light/bulb(src) +/obj/item/weapon/storage/box/lights/bulbs + starts_with = list(/obj/item/weapon/light/bulb = 24) /obj/item/weapon/storage/box/lights/tubes name = "box of replacement tubes" icon_state = "lighttube" - -/obj/item/weapon/storage/box/lights/tubes/New() - ..() - for(var/i = 1 to 24) - new /obj/item/weapon/light/tube(src) + starts_with = list(/obj/item/weapon/light/tube = 24) /obj/item/weapon/storage/box/lights/mixed name = "box of replacement lights" icon_state = "lightmixed" - -/obj/item/weapon/storage/box/lights/mixed/New() - ..() - for(var/i = 1 to 16) - new /obj/item/weapon/light/tube(src) - for(var/i = 1 to 8) - new /obj/item/weapon/light/bulb(src) + starts_with = list( + /obj/item/weapon/light/tube = 16, + /obj/item/weapon/light/bulb = 8 + ) /obj/item/weapon/storage/box/freezer name = "portable freezer" @@ -664,17 +463,9 @@ /obj/item/weapon/storage/box/ambrosia name = "ambrosia seeds box" desc = "Contains the seeds you need to get a little high." - -/obj/item/weapon/storage/box/ambrosia/New() - ..() - for(var/i = 1 to 7) - new /obj/item/seeds/ambrosiavulgarisseed(src) + starts_with = list(/obj/item/seeds/ambrosiavulgarisseed = 7) /obj/item/weapon/storage/box/ambrosiadeus name = "ambrosia deus seeds box" desc = "Contains the seeds you need to get a proper healthy high." - -/obj/item/weapon/storage/box/ambrosiadeus/New() - ..() - for(var/i = 1 to 7) - new /obj/item/seeds/ambrosiadeusseed(src) + starts_with = list(/obj/item/seeds/ambrosiadeusseed = 7) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 8cc10444ef..251e5483e1 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -52,12 +52,7 @@ /obj/item/weapon/reagent_containers/food/snacks/egg, /obj/item/weapon/reagent_containers/food/snacks/boiledegg ) - -/obj/item/weapon/storage/fancy/egg_box/New() - ..() - for(var/i=1 to storage_slots) - new /obj/item/weapon/reagent_containers/food/snacks/egg(src) - return + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/egg = 12) /* * Candle Box @@ -72,12 +67,7 @@ item_state = "candlebox5" throwforce = 2 slot_flags = SLOT_BELT - -/obj/item/weapon/storage/fancy/candle_box/New() - ..() - for(var/i=1 to 5) - new /obj/item/weapon/flame/candle(src) - return + starts_with = list(/obj/item/weapon/flame/candle = 5) /* * Crayon Box @@ -93,31 +83,36 @@ can_hold = list( /obj/item/weapon/pen/crayon ) + starts_with = list( + /obj/item/weapon/pen/crayon/red, + /obj/item/weapon/pen/crayon/orange, + /obj/item/weapon/pen/crayon/yellow, + /obj/item/weapon/pen/crayon/green, + /obj/item/weapon/pen/crayon/blue, + /obj/item/weapon/pen/crayon/purple + ) -/obj/item/weapon/storage/fancy/crayons/New() - ..() - new /obj/item/weapon/pen/crayon/red(src) - new /obj/item/weapon/pen/crayon/orange(src) - new /obj/item/weapon/pen/crayon/yellow(src) - new /obj/item/weapon/pen/crayon/green(src) - new /obj/item/weapon/pen/crayon/blue(src) - new /obj/item/weapon/pen/crayon/purple(src) +/obj/item/weapon/storage/fancy/crayons/initialize() + . = ..() update_icon() /obj/item/weapon/storage/fancy/crayons/update_icon() - overlays = list() //resets list - overlays += image('icons/obj/crayons.dmi',"crayonbox") + var/mutable_appearance/ma = new(src) + ma.plane = plane + ma.layer = layer + ma.overlays = list() for(var/obj/item/weapon/pen/crayon/crayon in contents) - overlays += image('icons/obj/crayons.dmi',crayon.colourName) + ma.overlays += image('icons/obj/crayons.dmi',crayon.colourName) + appearance = ma /obj/item/weapon/storage/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/pen/crayon)) switch(W:colourName) if("mime") - usr << "This crayon is too sad to be contained in this box." + to_chat(usr,"This crayon is too sad to be contained in this box.") return if("rainbow") - usr << "This crayon is too powerful to be contained in this box." + to_chat(usr,"This crayon is too powerful to be contained in this box.") return ..() @@ -136,13 +131,12 @@ storage_slots = 6 can_hold = list(/obj/item/clothing/mask/smokable/cigarette, /obj/item/weapon/flame/lighter) icon_type = "cigarette" + starts_with = list(/obj/item/clothing/mask/smokable/cigarette = 6) var/brand = "\improper Trans-Stellar Duty-free" -/obj/item/weapon/storage/fancy/cigarettes/New() - ..() +/obj/item/weapon/storage/fancy/cigarettes/initialize() + . = ..() flags |= NOREACT - for(var/i = 1 to storage_slots) - new /obj/item/clothing/mask/smokable/cigarette(src) create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one flags |= OPENCONTAINER if(brand) @@ -201,10 +195,6 @@ icon_state = "Bpacket" brand = "\improper Acme Co. cigarette" -// New() -// ..() -// fill_cigarre_package(src,list("fuel" = 15)) - // New exciting ways to kill your lungs! - Earthcrusher // /obj/item/weapon/storage/fancy/cigarettes/luckystars @@ -248,12 +238,11 @@ storage_slots = 7 can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar) icon_type = "cigar" + starts_with = list(/obj/item/clothing/mask/smokable/cigarette/cigar = 7) -/obj/item/weapon/storage/fancy/cigar/New() - ..() +/obj/item/weapon/storage/fancy/cigar/initialize() + . = ..() flags |= NOREACT - for(var/i = 1 to storage_slots) - new /obj/item/clothing/mask/smokable/cigarette/cigar(src) create_reagents(15 * storage_slots) /obj/item/weapon/storage/fancy/cigar/update_icon() @@ -261,10 +250,10 @@ return /obj/item/weapon/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location) - var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W - if(!istype(C)) return - reagents.trans_to_obj(C, (reagents.total_volume/contents.len)) - ..() + var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W + if(!istype(C)) return + reagents.trans_to_obj(C, (reagents.total_volume/contents.len)) + ..() /* * Vial Box @@ -277,12 +266,7 @@ name = "vial storage box" storage_slots = 6 can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial) - -/obj/item/weapon/storage/fancy/vials/New() - ..() - for(var/i=1 to 6) - new /obj/item/weapon/reagent_containers/glass/beaker/vial(src) - return + starts_with = list(/obj/item/weapon/reagent_containers/glass/beaker/vial = 6) /obj/item/weapon/storage/lockbox/vials name = "secure vial storage box" @@ -296,8 +280,8 @@ storage_slots = 6 req_access = list(access_virology) -/obj/item/weapon/storage/lockbox/vials/New() - ..() +/obj/item/weapon/storage/lockbox/vials/initialize() + . = ..() update_icon() /obj/item/weapon/storage/lockbox/vials/update_icon(var/itemremoved = 0) @@ -330,19 +314,19 @@ /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white, /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle ) + starts_with = list( + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle + ) -/obj/item/weapon/storage/fancy/heartbox/New() - ..() - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle(src) +/obj/item/weapon/storage/fancy/heartbox/initialize() + . = ..() update_icon() - return /obj/item/weapon/storage/fancy/heartbox/update_icon(var/itemremoved = 0) if (contents.len == 0) icon_state = "heartbox_empty" - return \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 43b7c9e22b..929c55e561 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -13,158 +13,147 @@ icon_state = "firstaid" throw_speed = 2 throw_range = 8 - var/empty = 0 max_storage_space = ITEMSIZE_COST_SMALL * 7 // 14 + var/list/icon_variety +/obj/item/weapon/storage/firstaid/initialize() + . = ..() + if(icon_variety) + icon_state = pick(icon_variety) + icon_variety = null /obj/item/weapon/storage/firstaid/fire name = "fire first aid kit" desc = "It's an emergency medical kit for when the toxins lab spontaneously burns down." icon_state = "ointment" item_state_slots = list(slot_r_hand_str = "firstaid-ointment", slot_l_hand_str = "firstaid-ointment") - - New() - ..() - if (empty) return - - icon_state = pick("ointment","firefirstaid") - - new /obj/item/device/healthanalyzer( src ) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - new /obj/item/stack/medical/ointment( src ) - new /obj/item/stack/medical/ointment( src ) - new /obj/item/weapon/reagent_containers/pill/kelotane( src ) - new /obj/item/weapon/reagent_containers/pill/kelotane( src ) - new /obj/item/weapon/reagent_containers/pill/kelotane( src ) //Replaced ointment with these since they actually work --Errorage - return - + icon_variety = list("ointment","firefirstaid") + starts_with = list( + /obj/item/device/healthanalyzer, + /obj/item/weapon/reagent_containers/hypospray/autoinjector, + /obj/item/stack/medical/ointment, + /obj/item/stack/medical/ointment, + /obj/item/weapon/reagent_containers/pill/kelotane, + /obj/item/weapon/reagent_containers/pill/kelotane, + /obj/item/weapon/reagent_containers/pill/kelotane + ) /obj/item/weapon/storage/firstaid/regular icon_state = "firstaid" - - New() - ..() - if (empty) return - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/device/healthanalyzer(src) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - return + starts_with = list( + /obj/item/stack/medical/bruise_pack, + /obj/item/stack/medical/bruise_pack, + /obj/item/stack/medical/bruise_pack, + /obj/item/stack/medical/ointment, + /obj/item/stack/medical/ointment, + /obj/item/device/healthanalyzer, + /obj/item/weapon/reagent_containers/hypospray/autoinjector + ) /obj/item/weapon/storage/firstaid/toxin name = "poison first aid kit" //IRL the term used would be poison first aid kit. desc = "Used to treat when one has a high amount of toxins in their body." icon_state = "antitoxin" item_state_slots = list(slot_r_hand_str = "firstaid-toxin", slot_l_hand_str = "firstaid-toxin") - - New() - ..() - if (empty) return - - icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") - - new /obj/item/weapon/reagent_containers/syringe/antitoxin( src ) - new /obj/item/weapon/reagent_containers/syringe/antitoxin( src ) - new /obj/item/weapon/reagent_containers/syringe/antitoxin( src ) - new /obj/item/weapon/reagent_containers/pill/antitox( src ) - new /obj/item/weapon/reagent_containers/pill/antitox( src ) - new /obj/item/weapon/reagent_containers/pill/antitox( src ) - new /obj/item/device/healthanalyzer( src ) - return + icon_variety = list("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") + starts_with = list( + /obj/item/weapon/reagent_containers/syringe/antitoxin, + /obj/item/weapon/reagent_containers/syringe/antitoxin, + /obj/item/weapon/reagent_containers/syringe/antitoxin, + /obj/item/weapon/reagent_containers/pill/antitox, + /obj/item/weapon/reagent_containers/pill/antitox, + /obj/item/weapon/reagent_containers/pill/antitox, + /obj/item/device/healthanalyzer + ) /obj/item/weapon/storage/firstaid/o2 name = "oxygen deprivation first aid kit" desc = "A box full of oxygen goodies." icon_state = "o2" item_state_slots = list(slot_r_hand_str = "firstaid-o2", slot_l_hand_str = "firstaid-o2") - - New() - ..() - if (empty) return - new /obj/item/weapon/reagent_containers/pill/dexalin( src ) - new /obj/item/weapon/reagent_containers/pill/dexalin( src ) - new /obj/item/weapon/reagent_containers/pill/dexalin( src ) - new /obj/item/weapon/reagent_containers/pill/dexalin( src ) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - new /obj/item/weapon/reagent_containers/syringe/inaprovaline( src ) - new /obj/item/device/healthanalyzer( src ) - return + starts_with = list( + /obj/item/weapon/reagent_containers/pill/dexalin, + /obj/item/weapon/reagent_containers/pill/dexalin, + /obj/item/weapon/reagent_containers/pill/dexalin, + /obj/item/weapon/reagent_containers/pill/dexalin, + /obj/item/weapon/reagent_containers/hypospray/autoinjector, + /obj/item/weapon/reagent_containers/syringe/inaprovaline, + /obj/item/device/healthanalyzer + ) /obj/item/weapon/storage/firstaid/adv name = "advanced first aid kit" desc = "Contains advanced medical treatments, for serious boo-boos." icon_state = "advfirstaid" item_state_slots = list(slot_r_hand_str = "firstaid-advanced", slot_l_hand_str = "firstaid-advanced") - -/obj/item/weapon/storage/firstaid/adv/New() - ..() - if (empty) return - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - new /obj/item/stack/medical/advanced/bruise_pack(src) - new /obj/item/stack/medical/advanced/bruise_pack(src) - new /obj/item/stack/medical/advanced/bruise_pack(src) - new /obj/item/stack/medical/advanced/ointment(src) - new /obj/item/stack/medical/advanced/ointment(src) - new /obj/item/stack/medical/splint(src) - return + starts_with = list( + /obj/item/weapon/reagent_containers/hypospray/autoinjector, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/stack/medical/advanced/ointment, + /obj/item/stack/medical/advanced/ointment, + /obj/item/stack/medical/splint + ) /obj/item/weapon/storage/firstaid/combat name = "combat medical kit" desc = "Contains advanced medical treatments." icon_state = "bezerk" item_state_slots = list(slot_r_hand_str = "firstaid-advanced", slot_l_hand_str = "firstaid-advanced") - -/obj/item/weapon/storage/firstaid/combat/New() - ..() - if (empty) return - new /obj/item/weapon/storage/pill_bottle/bicaridine(src) - new /obj/item/weapon/storage/pill_bottle/dermaline(src) - new /obj/item/weapon/storage/pill_bottle/dexalin_plus(src) - new /obj/item/weapon/storage/pill_bottle/dylovene(src) - new /obj/item/weapon/storage/pill_bottle/tramadol(src) - new /obj/item/weapon/storage/pill_bottle/spaceacillin(src) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting(src) - new /obj/item/stack/medical/splint(src) - new /obj/item/device/healthanalyzer/advanced(src) - return + starts_with = list( + /obj/item/weapon/storage/pill_bottle/bicaridine, + /obj/item/weapon/storage/pill_bottle/dermaline, + /obj/item/weapon/storage/pill_bottle/dexalin_plus, + /obj/item/weapon/storage/pill_bottle/dylovene, + /obj/item/weapon/storage/pill_bottle/tramadol, + /obj/item/weapon/storage/pill_bottle/spaceacillin, + /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting, + /obj/item/stack/medical/splint, + /obj/item/device/healthanalyzer/advanced + ) /obj/item/weapon/storage/firstaid/surgery name = "surgery kit" - desc = "Contains tools for surgery." - max_storage_space = ITEMSIZE_COST_NORMAL * 6 // Formally 21. Odd numbers should be avoided for a system based on exponents of 2. + desc = "Contains tools for surgery. Has precise foam fitting for safe transport and automatically sterilizes the content between uses." + icon_state = "surgerykit" + item_state = "firstaid-surgery" max_w_class = ITEMSIZE_NORMAL -/obj/item/weapon/storage/firstaid/surgery/New() - ..() - if (empty) return - new /obj/item/weapon/surgical/bonesetter(src) - new /obj/item/weapon/surgical/cautery(src) - new /obj/item/weapon/surgical/circular_saw(src) - new /obj/item/weapon/surgical/hemostat(src) - new /obj/item/weapon/surgical/retractor(src) - new /obj/item/weapon/surgical/scalpel(src) - new /obj/item/weapon/surgical/surgicaldrill(src) - new /obj/item/weapon/surgical/bonegel(src) - new /obj/item/weapon/surgical/FixOVein(src) - new /obj/item/stack/medical/advanced/bruise_pack(src) - new /obj/item/device/healthanalyzer/enhanced(src) - return + can_hold = list( + /obj/item/weapon/surgical/bonesetter, + /obj/item/weapon/surgical/cautery, + /obj/item/weapon/surgical/circular_saw, + /obj/item/weapon/surgical/hemostat, + /obj/item/weapon/surgical/retractor, + /obj/item/weapon/surgical/scalpel, + /obj/item/weapon/surgical/surgicaldrill, + /obj/item/weapon/surgical/bonegel, + /obj/item/weapon/surgical/FixOVein, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/stack/nanopaste, + /obj/item/device/healthanalyzer/enhanced + ) + + starts_with = list( + /obj/item/weapon/surgical/bonesetter, + /obj/item/weapon/surgical/cautery, + /obj/item/weapon/surgical/circular_saw, + /obj/item/weapon/surgical/hemostat, + /obj/item/weapon/surgical/retractor, + /obj/item/weapon/surgical/scalpel, + /obj/item/weapon/surgical/surgicaldrill, + /obj/item/weapon/surgical/bonegel, + /obj/item/weapon/surgical/FixOVein, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/device/healthanalyzer/enhanced + ) /obj/item/weapon/storage/firstaid/clotting name = "clotting kit" desc = "Contains chemicals to stop bleeding." max_storage_space = ITEMSIZE_COST_SMALL * 7 - -/obj/item/weapon/storage/firstaid/clotting/New() - ..() - if (empty) - return - for(var/i = 1 to 8) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting(src) - return + starts_with = list(/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting = 8) /* * Pill Bottles @@ -187,167 +176,59 @@ /obj/item/weapon/storage/pill_bottle/antitox name = "bottle of Dylovene pills" desc = "Contains pills used to counter toxins." - -/obj/item/weapon/storage/pill_bottle/antitox/New() //25u each - ..() - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/antitox = 7) /obj/item/weapon/storage/pill_bottle/bicaridine name = "bottle of Bicaridine pills" desc = "Contains pills used to stabilize the severely injured." - -/obj/item/weapon/storage/pill_bottle/bicaridine/New() - ..() - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/bicaridine = 7) /obj/item/weapon/storage/pill_bottle/dexalin_plus name = "bottle of Dexalin Plus pills" desc = "Contains pills used to treat extreme cases of oxygen deprivation." - -/obj/item/weapon/storage/pill_bottle/dexalin_plus/New() - ..() - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/dexalin_plus = 7) /obj/item/weapon/storage/pill_bottle/dermaline name = "bottle of Dermaline pills" desc = "Contains pills used to treat burn wounds." - -/obj/item/weapon/storage/pill_bottle/dermaline/New() - ..() - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/dermaline = 7) /obj/item/weapon/storage/pill_bottle/dylovene name = "bottle of Dylovene pills" desc = "Contains pills used to treat toxic substances in the blood." - -/obj/item/weapon/storage/pill_bottle/dylovene/New() //15u each - ..() - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/dylovene = 7) /obj/item/weapon/storage/pill_bottle/inaprovaline name = "bottle of Inaprovaline pills" desc = "Contains pills used to stabilize patients." - -/obj/item/weapon/storage/pill_bottle/inaprovaline/New() - ..() - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/inaprovaline = 7) /obj/item/weapon/storage/pill_bottle/kelotane name = "bottle of kelotane pills" desc = "Contains pills used to treat burns." - -/obj/item/weapon/storage/pill_bottle/kelotane/New() - ..() - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/kelotane = 7) /obj/item/weapon/storage/pill_bottle/spaceacillin name = "bottle of Spaceacillin pills" desc = "A theta-lactam antibiotic. Effective against many diseases likely to be encountered in space." - -/obj/item/weapon/storage/pill_bottle/spaceacillin/New() - ..() - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/spaceacillin = 7) /obj/item/weapon/storage/pill_bottle/tramadol name = "bottle of Tramadol pills" desc = "Contains pills used to relieve pain." - -/obj/item/weapon/storage/pill_bottle/tramadol/New() - ..() - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/tramadol = 7) /obj/item/weapon/storage/pill_bottle/citalopram name = "bottle of Citalopram pills" desc = "Contains pills used to stabilize a patient's mood." - -/obj/item/weapon/storage/pill_bottle/citalopram/New() - ..() - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/citalopram = 7) /obj/item/weapon/storage/pill_bottle/carbon name = "bottle of Carbon pills" desc = "Contains pills used to neutralise chemicals in the stomach." - -/obj/item/weapon/storage/pill_bottle/carbon/New() - ..() - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/carbon = 7) /obj/item/weapon/storage/pill_bottle/iron name = "bottle of Iron pills" desc = "Contains pills used to aid in blood regeneration." - -/obj/item/weapon/storage/pill_bottle/iron/New() - ..() - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) \ No newline at end of file + starts_with = list(/obj/item/weapon/reagent_containers/pill/iron = 7) diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index e52ad4d812..e9527b2313 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -77,36 +77,28 @@ /obj/item/weapon/storage/lockbox/loyalty name = "lockbox of loyalty implants" req_access = list(access_security) - - New() - ..() - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implanter/loyalty(src) - + starts_with = list( + /obj/item/weapon/implantcase/loyalty = 3, + /obj/item/weapon/implanter/loyalty + ) /obj/item/weapon/storage/lockbox/clusterbang name = "lockbox of clusterbangs" desc = "You have a bad feeling about opening this." req_access = list(access_security) - - New() - ..() - new /obj/item/weapon/grenade/flashbang/clusterbang(src) + starts_with = list(/obj/item/weapon/grenade/flashbang/clusterbang) /obj/item/weapon/storage/lockbox/medal name = "lockbox of medals" desc = "A lockbox filled with commemorative medals, it has the NanoTrasen logo stamped on it." req_access = list(access_heads) storage_slots = 7 - - New() - ..() - new /obj/item/clothing/accessory/medal/conduct(src) - new /obj/item/clothing/accessory/medal/bronze_heart(src) - new /obj/item/clothing/accessory/medal/nobel_science(src) - new /obj/item/clothing/accessory/medal/silver/valor(src) - new /obj/item/clothing/accessory/medal/silver/security(src) - new /obj/item/clothing/accessory/medal/gold/captain(src) - new /obj/item/clothing/accessory/medal/gold/heroism(src) \ No newline at end of file + starts_with = list( + /obj/item/clothing/accessory/medal/conduct, + /obj/item/clothing/accessory/medal/bronze_heart, + /obj/item/clothing/accessory/medal/nobel_science, + /obj/item/clothing/accessory/medal/silver/valor, + /obj/item/clothing/accessory/medal/silver/security, + /obj/item/clothing/accessory/medal/gold/captain, + /obj/item/clothing/accessory/medal/gold/heroism + ) diff --git a/code/game/objects/items/weapons/storage/misc.dm b/code/game/objects/items/weapons/storage/misc.dm index 64952046a5..d103fbc6ef 100644 --- a/code/game/objects/items/weapons/storage/misc.dm +++ b/code/game/objects/items/weapons/storage/misc.dm @@ -6,17 +6,14 @@ icon = 'icons/obj/food.dmi' icon_state = "donutbox" name = "donut box" - var/startswith = 6 max_storage_space = ITEMSIZE_COST_SMALL * 6 can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut) foldable = /obj/item/stack/material/cardboard + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/donut/normal = 6) -/obj/item/weapon/storage/box/donut/New() - ..() - for(var/i=1 to startswith) - new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src) +/obj/item/weapon/storage/box/donut/initialize() + . = ..() update_icon() - return /obj/item/weapon/storage/box/donut/update_icon() overlays.Cut() @@ -26,4 +23,4 @@ i++ /obj/item/weapon/storage/box/donut/empty - startswith = 0 + empty = TRUE diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 4d9be129f7..78a2d940ad 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -184,15 +184,10 @@ anchored = 1.0 density = 0 cant_hold = list(/obj/item/weapon/storage/secure/briefcase) + starts_with = list( + /obj/item/weapon/paper, + /obj/item/weapon/pen + ) - New() - ..() - new /obj/item/weapon/paper(src) - new /obj/item/weapon/pen(src) - - attack_hand(mob/user as mob) - return attack_self(user) - -/obj/item/weapon/storage/secure/safe/HoS/New() - ..() - //new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool) +/obj/item/weapon/storage/secure/safe/attack_hand(mob/user as mob) + return attack_self(user) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 6309a0a3f3..2dd5116546 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -36,6 +36,7 @@ var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile var/use_sound = "rustle" //sound played when used. null for no sound. var/list/starts_with //Things to spawn on the box on spawn + var/empty //Mapper override to spawn an empty version of a container that usually has stuff /obj/item/weapon/storage/Destroy() close_all() @@ -576,12 +577,13 @@ src.closer.hud_layerise() orient2hud() - if(LAZYLEN(starts_with)) + if(LAZYLEN(starts_with) && !empty) for(var/newtype in starts_with) var/count = starts_with[newtype] || 1 //Could have left it blank. while(count) count-- new newtype(src) + starts_with = null //Reduce list count. calibrate_size() diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 21bebfa399..c4174eb4c0 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -19,48 +19,50 @@ name = "emergency toolbox" icon_state = "red" item_state_slots = list(slot_r_hand_str = "toolbox_red", slot_l_hand_str = "toolbox_red") - -/obj/item/weapon/storage/toolbox/emergency/New() - ..() - new /obj/item/weapon/crowbar/red(src) - new /obj/item/weapon/extinguisher/mini(src) + starts_with = list( + /obj/item/weapon/crowbar/red, + /obj/item/weapon/extinguisher/mini, + /obj/item/device/radio + ) +/obj/item/weapon/storage/toolbox/emergency/initialize() if(prob(50)) new /obj/item/device/flashlight(src) else new /obj/item/device/flashlight/flare(src) - new /obj/item/device/radio(src) + . = ..() /obj/item/weapon/storage/toolbox/mechanical name = "mechanical toolbox" icon_state = "blue" item_state_slots = list(slot_r_hand_str = "toolbox_blue", slot_l_hand_str = "toolbox_blue") - -/obj/item/weapon/storage/toolbox/mechanical/New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/device/analyzer(src) - new /obj/item/weapon/wirecutters(src) + starts_with = list( + /obj/item/weapon/screwdriver, + /obj/item/weapon/wrench, + /obj/item/weapon/weldingtool, + /obj/item/weapon/crowbar, + /obj/item/device/analyzer, + /obj/item/weapon/wirecutters + ) /obj/item/weapon/storage/toolbox/electrical name = "electrical toolbox" icon_state = "yellow" item_state_slots = list(slot_r_hand_str = "toolbox_yellow", slot_l_hand_str = "toolbox_yellow") - -/obj/item/weapon/storage/toolbox/electrical/New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/device/t_scanner(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/stack/cable_coil/random(src,30) - new /obj/item/stack/cable_coil/random(src,30) + starts_with = list( + /obj/item/weapon/screwdriver, + /obj/item/weapon/wirecutters, + /obj/item/device/t_scanner, + /obj/item/weapon/crowbar, + /obj/item/stack/cable_coil/random_belt, + /obj/item/stack/cable_coil/random_belt + ) +/obj/item/weapon/storage/toolbox/electrical/initialize() + . = ..() if(prob(5)) new /obj/item/clothing/gloves/yellow(src) else new /obj/item/stack/cable_coil/random(src,30) + calibrate_size() /obj/item/weapon/storage/toolbox/syndicate name = "black and red toolbox" @@ -68,29 +70,26 @@ item_state_slots = list(slot_r_hand_str = "toolbox_syndi", slot_l_hand_str = "toolbox_syndi") origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1) force = 14 - var/powertools = FALSE + starts_with = list( + /obj/item/clothing/gloves/yellow, + /obj/item/weapon/screwdriver, + /obj/item/weapon/wrench, + /obj/item/weapon/weldingtool, + /obj/item/weapon/crowbar, + /obj/item/weapon/wirecutters, + /obj/item/device/multitool + ) /obj/item/weapon/storage/toolbox/syndicate/powertools - powertools = TRUE - -/obj/item/weapon/storage/toolbox/syndicate/New() // This is found in maint, so it should have the basics, plus some gloves. - ..() //all storage items need this to work properly! - if(powertools) - new /obj/item/clothing/gloves/yellow(src) - new /obj/item/weapon/screwdriver/power(src) - new /obj/item/weapon/weldingtool/experimental(src) - new /obj/item/weapon/crowbar/power(src) - new /obj/item/device/multitool(src) - new /obj/item/stack/cable_coil/random(src,30) - new /obj/item/device/analyzer(src) - else - new /obj/item/clothing/gloves/yellow(src) - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/device/multitool(src) + starts_with = list( + /obj/item/clothing/gloves/yellow, + /obj/item/weapon/screwdriver/power, + /obj/item/weapon/weldingtool/experimental, + /obj/item/weapon/crowbar/power, + /obj/item/device/multitool, + /obj/item/stack/cable_coil/random_belt, + /obj/item/device/analyzer + ) /obj/item/weapon/storage/toolbox/lunchbox max_storage_space = ITEMSIZE_COST_SMALL * 4 //slightly smaller than a toolbox @@ -103,8 +102,7 @@ var/filled = FALSE attack_verb = list("lunched") -/obj/item/weapon/storage/toolbox/lunchbox/New() - ..() +/obj/item/weapon/storage/toolbox/lunchbox/initialize() if(filled) var/list/lunches = lunchables_lunches() var/lunch = lunches[pick(lunches)] @@ -117,6 +115,7 @@ var/list/drinks = lunchables_drinks() var/drink = drinks[pick(drinks)] new drink(src) + . = ..() /obj/item/weapon/storage/toolbox/lunchbox/filled filled = TRUE diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index f82feb91dd..5c0f837340 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -1,76 +1,66 @@ -/obj/item/weapon/storage/box/syndicate/ - New() - ..() - switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "freedom" = 1, "hacker" = 1, "lordsingulo" = 1, "smoothoperator" = 1))) - if("bloodyspai") - new /obj/item/clothing/under/chameleon(src) - new /obj/item/clothing/mask/gas/voice(src) - new /obj/item/weapon/card/id/syndicate(src) - new /obj/item/clothing/shoes/syndigaloshes(src) - return +/obj/item/weapon/storage/box/syndicate/initialize() + switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "freedom" = 1, "hacker" = 1, "lordsingulo" = 1, "smoothoperator" = 1))) + if("bloodyspai") + new /obj/item/clothing/under/chameleon(src) + new /obj/item/clothing/mask/gas/voice(src) + new /obj/item/weapon/card/id/syndicate(src) + new /obj/item/clothing/shoes/syndigaloshes(src) - if("stealth") - new /obj/item/weapon/gun/energy/crossbow(src) - new /obj/item/weapon/pen/reagent/paralysis(src) - new /obj/item/device/chameleon(src) - return + if("stealth") + new /obj/item/weapon/gun/energy/crossbow(src) + new /obj/item/weapon/pen/reagent/paralysis(src) + new /obj/item/device/chameleon(src) - if("screwed") - new /obj/effect/spawner/newbomb/timer/syndicate(src) - new /obj/effect/spawner/newbomb/timer/syndicate(src) - new /obj/item/device/powersink(src) - new /obj/item/clothing/suit/space/syndicate(src) - new /obj/item/clothing/head/helmet/space/syndicate(src) - new /obj/item/clothing/mask/gas/syndicate(src) - new /obj/item/weapon/tank/emergency/oxygen/double(src) - return + if("screwed") + new /obj/effect/spawner/newbomb/timer/syndicate(src) + new /obj/effect/spawner/newbomb/timer/syndicate(src) + new /obj/item/device/powersink(src) + new /obj/item/clothing/suit/space/syndicate(src) + new /obj/item/clothing/head/helmet/space/syndicate(src) + new /obj/item/clothing/mask/gas/syndicate(src) + new /obj/item/weapon/tank/emergency/oxygen/double(src) - if("guns") - new /obj/item/weapon/gun/projectile/revolver(src) - new /obj/item/ammo_magazine/s357(src) - new /obj/item/weapon/card/emag(src) - new /obj/item/weapon/plastique(src) - new /obj/item/weapon/plastique(src) - return + if("guns") + new /obj/item/weapon/gun/projectile/revolver(src) + new /obj/item/ammo_magazine/s357(src) + new /obj/item/weapon/card/emag(src) + new /obj/item/weapon/plastique(src) + new /obj/item/weapon/plastique(src) - if("murder") - new /obj/item/weapon/melee/energy/sword(src) - new /obj/item/clothing/glasses/thermal/syndi(src) - new /obj/item/weapon/card/emag(src) - new /obj/item/clothing/shoes/syndigaloshes(src) - return + if("murder") + new /obj/item/weapon/melee/energy/sword(src) + new /obj/item/clothing/glasses/thermal/syndi(src) + new /obj/item/weapon/card/emag(src) + new /obj/item/clothing/shoes/syndigaloshes(src) - if("freedom") - var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src) - O.imp = new /obj/item/weapon/implant/freedom(O) - var/obj/item/weapon/implanter/U = new /obj/item/weapon/implanter(src) - U.imp = new /obj/item/weapon/implant/uplink(U) - return + if("freedom") + var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src) + O.imp = new /obj/item/weapon/implant/freedom(O) + var/obj/item/weapon/implanter/U = new /obj/item/weapon/implanter(src) + U.imp = new /obj/item/weapon/implant/uplink(U) - if("hacker") - new /obj/item/device/encryptionkey/syndicate(src) - new /obj/item/weapon/aiModule/syndicate(src) - new /obj/item/weapon/card/emag(src) - new /obj/item/device/encryptionkey/binary(src) - return + if("hacker") + new /obj/item/device/encryptionkey/syndicate(src) + new /obj/item/weapon/aiModule/syndicate(src) + new /obj/item/weapon/card/emag(src) + new /obj/item/device/encryptionkey/binary(src) - if("lordsingulo") - new /obj/item/device/radio/beacon/syndicate(src) - new /obj/item/clothing/suit/space/syndicate(src) - new /obj/item/clothing/head/helmet/space/syndicate(src) - new /obj/item/clothing/mask/gas/syndicate(src) - new /obj/item/weapon/tank/emergency/oxygen/double(src) - new /obj/item/weapon/card/emag(src) - return + if("lordsingulo") + new /obj/item/device/radio/beacon/syndicate(src) + new /obj/item/clothing/suit/space/syndicate(src) + new /obj/item/clothing/head/helmet/space/syndicate(src) + new /obj/item/clothing/mask/gas/syndicate(src) + new /obj/item/weapon/tank/emergency/oxygen/double(src) + new /obj/item/weapon/card/emag(src) - if("smoothoperator") - new /obj/item/weapon/storage/box/syndie_kit/g9mm(src) - new /obj/item/weapon/storage/bag/trash(src) - new /obj/item/weapon/soap/syndie(src) - new /obj/item/bodybag(src) - new /obj/item/clothing/under/suit_jacket(src) - new /obj/item/clothing/shoes/laceup(src) - return + if("smoothoperator") + new /obj/item/weapon/storage/box/syndie_kit/g9mm(src) + new /obj/item/weapon/storage/bag/trash(src) + new /obj/item/weapon/soap/syndie(src) + new /obj/item/bodybag(src) + new /obj/item/clothing/under/suit_jacket(src) + new /obj/item/clothing/shoes/laceup(src) + . = ..() /obj/item/weapon/storage/box/syndie_kit name = "box" @@ -80,118 +70,97 @@ /obj/item/weapon/storage/box/syndie_kit/imp_freedom name = "boxed freedom implant (with injector)" -/obj/item/weapon/storage/box/syndie_kit/imp_freedom/New() - ..() +/obj/item/weapon/storage/box/syndie_kit/imp_freedom/initialize() var/obj/item/weapon/implanter/O = new(src) O.imp = new /obj/item/weapon/implant/freedom(O) O.update() - return + . = ..() /obj/item/weapon/storage/box/syndie_kit/imp_compress name = "box (C)" - -/obj/item/weapon/storage/box/syndie_kit/imp_compress/New() - new /obj/item/weapon/implanter/compressed(src) - ..() - return + starts_with = list(/obj/item/weapon/implanter/compressed) /obj/item/weapon/storage/box/syndie_kit/imp_explosive name = "box (E)" - -/obj/item/weapon/storage/box/syndie_kit/imp_explosive/New() - new /obj/item/weapon/implanter/explosive(src) - ..() - return + starts_with = list(/obj/item/weapon/implanter/explosive) /obj/item/weapon/storage/box/syndie_kit/imp_uplink name = "boxed uplink implant (with injector)" -/obj/item/weapon/storage/box/syndie_kit/imp_uplink/New() - ..() +/obj/item/weapon/storage/box/syndie_kit/imp_uplink/initialize() var/obj/item/weapon/implanter/O = new(src) O.imp = new /obj/item/weapon/implant/uplink(O) O.update() - return + . = ..() /obj/item/weapon/storage/box/syndie_kit/space name = "boxed space suit and helmet" - -/obj/item/weapon/storage/box/syndie_kit/space/New() - ..() - new /obj/item/clothing/suit/space/syndicate(src) - new /obj/item/clothing/head/helmet/space/syndicate(src) - new /obj/item/clothing/mask/gas/syndicate(src) - new /obj/item/weapon/tank/emergency/oxygen/double(src) - return + starts_with = list( + /obj/item/clothing/suit/space/syndicate, + /obj/item/clothing/head/helmet/space/syndicate, + /obj/item/clothing/mask/gas/syndicate, + /obj/item/weapon/tank/emergency/oxygen/double + ) /obj/item/weapon/storage/box/syndie_kit/chameleon name = "chameleon kit" desc = "Comes with all the clothes you need to impersonate most people. Acting lessons sold seperately." - -/obj/item/weapon/storage/box/syndie_kit/chameleon/New() - ..() - new /obj/item/clothing/under/chameleon(src) - new /obj/item/clothing/head/chameleon(src) - new /obj/item/clothing/suit/chameleon(src) - new /obj/item/clothing/shoes/chameleon(src) - new /obj/item/weapon/storage/backpack/chameleon(src) - new /obj/item/clothing/gloves/chameleon(src) - new /obj/item/clothing/mask/chameleon(src) - new /obj/item/clothing/glasses/chameleon(src) - new /obj/item/clothing/accessory/chameleon(src) - new /obj/item/weapon/gun/energy/chameleon(src) + starts_with = list( + /obj/item/clothing/under/chameleon, + /obj/item/clothing/head/chameleon, + /obj/item/clothing/suit/chameleon, + /obj/item/clothing/shoes/chameleon, + /obj/item/weapon/storage/backpack/chameleon, + /obj/item/clothing/gloves/chameleon, + /obj/item/clothing/mask/chameleon, + /obj/item/clothing/glasses/chameleon, + /obj/item/clothing/accessory/chameleon, + /obj/item/weapon/gun/energy/chameleon + ) /obj/item/weapon/storage/box/syndie_kit/clerical name = "clerical kit" desc = "Comes with all you need to fake paperwork. Assumes you have passed basic writing lessons." - -/obj/item/weapon/storage/box/syndie_kit/clerical/New() - ..() - new /obj/item/weapon/stamp/chameleon(src) - new /obj/item/weapon/pen/chameleon(src) - new /obj/item/device/destTagger(src) - new /obj/item/weapon/packageWrap(src) - new /obj/item/weapon/hand_labeler(src) + starts_with = list( + /obj/item/weapon/stamp/chameleon, + /obj/item/weapon/pen/chameleon, + /obj/item/device/destTagger, + /obj/item/weapon/packageWrap, + /obj/item/weapon/hand_labeler + ) /obj/item/weapon/storage/box/syndie_kit/spy name = "spy kit" desc = "For when you want to conduct voyeurism from afar." - -/obj/item/weapon/storage/box/syndie_kit/spy/New() - ..() - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/bug_monitor/spy(src) + starts_with = list( + /obj/item/device/camerabug/spy = 6, + /obj/item/device/bug_monitor/spy + ) /obj/item/weapon/storage/box/syndie_kit/g9mm name = "\improper Smooth operator" desc = "Compact 9mm with silencer kit." - -/obj/item/weapon/storage/box/syndie_kit/g9mm/New() - ..() - new /obj/item/weapon/gun/projectile/pistol(src) - new /obj/item/weapon/silencer(src) + starts_with = list( + /obj/item/weapon/gun/projectile/pistol, + /obj/item/weapon/silencer + ) /obj/item/weapon/storage/box/syndie_kit/toxin name = "toxin kit" desc = "An apple will not be enough to keep the doctor away after this." - -/obj/item/weapon/storage/box/syndie_kit/toxin/New() - ..() - new /obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin(src) - new /obj/item/weapon/reagent_containers/syringe(src) + starts_with = list( + /obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin, + /obj/item/weapon/reagent_containers/syringe + ) /obj/item/weapon/storage/box/syndie_kit/cigarette name = "\improper Tricky smokes" desc = "Comes with the following brands of cigarettes, in this order: 2xFlash, 2xSmoke, 1xMindBreaker, 1xTricordrazine. Avoid mixing them up." -/obj/item/weapon/storage/box/syndie_kit/cigarette/New() - ..() +/obj/item/weapon/storage/box/syndie_kit/cigarette/initialize() + . = ..() var/obj/item/weapon/storage/fancy/cigarettes/pack + pack = new /obj/item/weapon/storage/fancy/cigarettes(src) fill_cigarre_package(pack, list("aluminum" = 5, "potassium" = 5, "sulfur" = 5)) pack.desc += " 'F' has been scribbled on it." @@ -222,6 +191,8 @@ new /obj/item/weapon/flame/lighter/zippo(src) + calibrate_size() + /proc/fill_cigarre_package(var/obj/item/weapon/storage/fancy/cigarettes/C, var/list/reagents) for(var/reagent in reagents) C.reagents.add_reagent(reagent, reagents[reagent] * C.storage_slots) @@ -229,72 +200,52 @@ /obj/item/weapon/storage/box/syndie_kit/ewar_voice name = "Electrowarfare and Voice Synthesiser kit" desc = "Kit for confounding organic and synthetic entities alike." - -/obj/item/weapon/storage/box/syndie_kit/ewar_voice/New() - ..() - new /obj/item/rig_module/electrowarfare_suite(src) - new /obj/item/rig_module/voice(src) - + starts_with = list( + /obj/item/rig_module/electrowarfare_suite, + /obj/item/rig_module/voice + ) /obj/item/weapon/storage/secure/briefcase/money name = "suspicious briefcase" desc = "An ominous briefcase that has the unmistakeable smell of old, stale, cigarette smoke, and gives those who look at it a bad feeling." - - - - -/obj/item/weapon/storage/secure/briefcase/money/New() - ..() - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) + starts_with = list(/obj/item/weapon/spacecash/c1000 = 10) /obj/item/weapon/storage/box/syndie_kit/combat_armor name = "combat armor kit" desc = "Contains a full set of combat armor." + starts_with = list( + /obj/item/clothing/head/helmet/combat, + /obj/item/clothing/suit/armor/combat, + /obj/item/clothing/gloves/arm_guard/combat, + /obj/item/clothing/shoes/leg_guard/combat + ) -/obj/item/weapon/storage/box/syndie_kit/combat_armor/New() - ..() - new /obj/item/clothing/head/helmet/combat(src) - new /obj/item/clothing/suit/armor/combat(src) - new /obj/item/clothing/gloves/arm_guard/combat(src) - new /obj/item/clothing/shoes/leg_guard/combat(src) - return +/obj/item/weapon/storage/box/syndie_kit/demolitions + starts_with = list( + /obj/item/weapon/syndie/c4explosive, + /obj/item/weapon/screwdriver + ) -/obj/item/weapon/storage/box/syndie_kit/demolitions/New() - ..() - new /obj/item/weapon/syndie/c4explosive(src) - new /obj/item/weapon/screwdriver(src) - -/obj/item/weapon/storage/box/syndie_kit/demolitions_heavy/New() - ..() - new /obj/item/weapon/syndie/c4explosive/heavy(src) - new /obj/item/weapon/screwdriver(src) - -/obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy/New() - ..() - new /obj/item/weapon/syndie/c4explosive/heavy/super_heavy(src) - new /obj/item/weapon/screwdriver(src) +/obj/item/weapon/storage/box/syndie_kit/demolitions_heavy + starts_with = list( + /obj/item/weapon/syndie/c4explosive/heavy, + /obj/item/weapon/screwdriver + ) +/obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy + starts_with = list( + /obj/item/weapon/syndie/c4explosive/heavy/super_heavy, + /obj/item/weapon/screwdriver + ) /obj/item/weapon/storage/secure/briefcase/rifle name = "secure briefcase" - -/obj/item/weapon/storage/secure/briefcase/rifle/New() - ..() - new /obj/item/sniper_rifle_part/barrel(src) - new /obj/item/sniper_rifle_part/stock(src) - new /obj/item/sniper_rifle_part/trigger_group(src) - - for(var/i = 1 to 4) - new /obj/item/ammo_casing/a145(src) + starts_with = list( + /obj/item/sniper_rifle_part/barrel, + /obj/item/sniper_rifle_part/stock, + /obj/item/sniper_rifle_part/trigger_group, + /obj/item/ammo_casing/a145 = 4 + ) /obj/item/weapon/storage/secure/briefcase/fuelrod name = "heavy briefcase" @@ -303,14 +254,12 @@ description_antag = "This case will likely contain a charged fuel rod gun, and a few fuel rods to go with it. It can only hold the fuel rod gun, fuel rods, batteries, a screwdriver, and stock machine parts." force = 12 //Anti-rad lined i.e. Lead, probably gonna hurt a bit if you get bashed with it. can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/screwdriver) - - -/obj/item/weapon/storage/secure/briefcase/fuelrod/New() - ..() - new /obj/item/weapon/gun/magnetic/fuelrod(src) - new /obj/item/weapon/fuel_assembly/deuterium(src) - new /obj/item/weapon/fuel_assembly/deuterium(src) - new /obj/item/weapon/fuel_assembly/tritium(src) - new /obj/item/weapon/fuel_assembly/tritium(src) - new /obj/item/weapon/fuel_assembly/phoron(src) - new /obj/item/weapon/screwdriver(src) + starts_with = list( + /obj/item/weapon/gun/magnetic/fuelrod, + /obj/item/weapon/fuel_assembly/deuterium, + /obj/item/weapon/fuel_assembly/deuterium, + /obj/item/weapon/fuel_assembly/tritium, + /obj/item/weapon/fuel_assembly/tritium, + /obj/item/weapon/fuel_assembly/phoron, + /obj/item/weapon/screwdriver + ) diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 30d81e1ba9..02be9fdfaf 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -118,4 +118,4 @@ name = "women's wallet" desc = "A stylish wallet typically used by women." icon_state = "girl_wallet" - item_state_slots = list(slot_r_hand_str = "wowallet", slot_l_hand_str = "wowallet") \ No newline at end of file + item_state_slots = list(slot_r_hand_str = "wowallet", slot_l_hand_str = "wowallet") diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index fadd699c84..853705abed 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -882,6 +882,12 @@ obj/structure/cable/proc/cableColor(var/colorC) color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN, COLOR_SILVER, COLOR_GRAY, COLOR_BLACK, COLOR_MAROON, COLOR_OLIVE, COLOR_LIME, COLOR_TEAL, COLOR_NAVY, COLOR_PURPLE, COLOR_BEIGE, COLOR_BROWN) ..() +/obj/item/stack/cable_coil/random_belt/New() + stacktype = /obj/item/stack/cable_coil + color = pick(COLOR_RED, COLOR_YELLOW, COLOR_ORANGE) + amount = 30 + ..() + //Endless alien cable coil /obj/item/stack/cable_coil/alien diff --git a/icons/mob/items/lefthand_storage.dmi b/icons/mob/items/lefthand_storage.dmi index c4518a59ec..530823eb77 100644 Binary files a/icons/mob/items/lefthand_storage.dmi and b/icons/mob/items/lefthand_storage.dmi differ diff --git a/icons/mob/items/righthand_storage.dmi b/icons/mob/items/righthand_storage.dmi index 9a34f3b89c..2d6ff6d601 100644 Binary files a/icons/mob/items/righthand_storage.dmi and b/icons/mob/items/righthand_storage.dmi differ