From 25c04df5bde6bc397e37146c692c06fc9c626621 Mon Sep 17 00:00:00 2001 From: Neerti Date: Wed, 6 Apr 2016 06:25:23 -0400 Subject: [PATCH] Polaris tweaks. Fixes mistake involving belts. Fixes mistake involving bags allowing w_class 5 items, which was from the manual merge. Polaris tweaks Makes inflatables w_class 3. Spacesuits and RIGs are now w_class 5. Both sniper weapons are now w_class 5. Makes more inventories able to use the volume based system. Cleans up the cig part of the port a bit. --- .../objects/items/weapons/storage/backpack.dm | 7 ++-- .../objects/items/weapons/storage/belt.dm | 2 +- .../objects/items/weapons/storage/boxes.dm | 15 ++++---- .../objects/items/weapons/storage/fancy.dm | 13 +++---- .../objects/items/weapons/storage/misc.dm | 2 +- .../objects/items/weapons/storage/storage.dm | 4 +- code/game/objects/structures/inflatable.dm | 3 +- code/modules/clothing/spacesuits/captain.dm | 2 +- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- .../modules/clothing/spacesuits/spacesuits.dm | 2 +- code/modules/clothing/suits/armor.dm | 1 + code/modules/clothing/suits/storage.dm | 2 - .../clothing/under/accessories/storage.dm | 3 +- code/modules/projectiles/guns/energy/laser.dm | 2 +- .../projectiles/guns/projectile/sniper.dm | 2 +- .../changelogs/Neerti-InventorySystemPort.yml | 38 +++++++++++++++++++ 16 files changed, 68 insertions(+), 32 deletions(-) create mode 100644 html/changelogs/Neerti-InventorySystemPort.yml diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index c26680797ad..85091725811 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -22,8 +22,8 @@ ) w_class = 4 slot_flags = SLOT_BACK - max_w_class = 5 - max_storage_space = 16 + max_w_class = 4 + max_storage_space = 28 /obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob) if (src.use_sound) @@ -155,8 +155,7 @@ slot_r_hand_str = "duffle", ) slowdown = 1 - max_storage_space = 38 - storage_slots = 12 + max_storage_space = 36 /obj/item/weapon/storage/backpack/dufflebag/syndie name = "black dufflebag" diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 7f4c22dea50..478272b8b25 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -5,6 +5,7 @@ icon_state = "utilitybelt" item_state = "utility" storage_slots = 7 + max_storage_space = 28 //This should ensure belts always have enough room to store whatever. max_w_class = 3 slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") @@ -124,7 +125,6 @@ icon_state = "securitybelt" item_state = "security" max_w_class = 3 - max_storage_space = 28 can_hold = list( /obj/item/weapon/grenade, /obj/item/weapon/reagent_containers/spray/pepper, diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index e7a1cd97cba..657d2f4f5a4 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -25,6 +25,7 @@ icon_state = "box" item_state = "syringe_kit" var/foldable = /obj/item/stack/material/cardboard // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard + max_w_class = 2 // BubbleWrap - A box can be folded up to make card /obj/item/weapon/storage/box/attack_self(mob/user as mob) @@ -502,7 +503,7 @@ New() ..() if(src.type == /obj/item/weapon/storage/box/monkeycubes) - for(var/i = 1; i <= 5; i++) + for(var/i = 1 to 5) new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src) /obj/item/weapon/storage/box/monkeycubes/farwacubes @@ -510,7 +511,7 @@ desc = "Drymate brand farwa cubes, shipped from Ahdomai. Just add water!" New() ..() - for(var/i = 1; i <= 5; i++) + for(var/i = 1 to 5) new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube(src) /obj/item/weapon/storage/box/monkeycubes/stokcubes @@ -518,7 +519,7 @@ desc = "Drymate brand stok cubes, shipped from Moghes. Just add water!" New() ..() - for(var/i = 1; i <= 5; i++) + for(var/i = 1 to 5) new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube(src) /obj/item/weapon/storage/box/monkeycubes/neaeracubes @@ -526,7 +527,7 @@ desc = "Drymate brand neaera cubes, shipped from Jargon 4. Just add water!" New() ..() - for(var/i = 1; i <= 5; i++) + for(var/i = 1 to 5) new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src) /obj/item/weapon/storage/box/ids @@ -614,7 +615,7 @@ can_hold = list(/obj/item/toy/snappop) New() ..() - for(var/i=1; i <= 8; i++) + for(var/i = 1 to 8) new /obj/item/toy/snappop(src) /obj/item/weapon/storage/box/matches @@ -629,7 +630,7 @@ New() ..() - for(var/i=1; i <= 10; i++) + for(var/i=1 to 10) new /obj/item/weapon/flame/match(src) attackby(obj/item/weapon/flame/match/W as obj, mob/user as mob) @@ -647,7 +648,7 @@ icon_state = "syringe" New() ..() - for (var/i; i <= 7; i++) + for (var/i = 1 to 7) new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src) /obj/item/weapon/storage/box/lights diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 1651ba6a686..758ac8dc39c 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -53,7 +53,7 @@ /obj/item/weapon/storage/fancy/egg_box/New() ..() - for(var/i=1; i <= storage_slots; i++) + for(var/i=1 to storage_slots) new /obj/item/weapon/reagent_containers/food/snacks/egg(src) return @@ -74,7 +74,7 @@ /obj/item/weapon/storage/fancy/candle_box/New() ..() - for(var/i=1; i <= 5; i++) + for(var/i=1 to 5) new /obj/item/weapon/flame/candle(src) return @@ -159,12 +159,9 @@ if(!istype(M, /mob)) return - if(M == user && user.zone_sel.selecting == "mouth") + if(M == user && user.zone_sel.selecting == O_MOUTH) // Find ourselves a cig. Note that we could be full of lighters. - var/obj/item/clothing/mask/smokable/cigarette/cig = null - for(var/obj/item/clothing/mask/smokable/cigarette/C in contents) - cig = C - break + var/obj/item/clothing/mask/smokable/cigarette/cig = locate() in src if(cig == null) user << "Looks like the packet is out of cigarettes." @@ -279,7 +276,7 @@ /obj/item/weapon/storage/fancy/vials/New() ..() - for(var/i=1; i <= storage_slots; i++) + for(var/i=1 to 6) new /obj/item/weapon/reagent_containers/glass/beaker/vial(src) return diff --git a/code/game/objects/items/weapons/storage/misc.dm b/code/game/objects/items/weapons/storage/misc.dm index e024e6ca5c8..8d954d53062 100644 --- a/code/game/objects/items/weapons/storage/misc.dm +++ b/code/game/objects/items/weapons/storage/misc.dm @@ -21,7 +21,7 @@ /obj/item/weapon/storage/box/donut/New() ..() - for(var/i=1; i <= startswith; i++) + for(var/i=1 to startswith) new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src) update_icon() return diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 472e1a6ef48..431b5ca4d7f 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -14,7 +14,7 @@ var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else) var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set) var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage - var/max_w_class = 3 //Max size of objects that this object can store (in effect only if can_hold isn't set) + var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set) var/max_storage_space = 8 //The sum of the storage costs of all the items in this storage item. var/storage_slots = null //The number of storage slots in this container. If null, it uses the volume-based storage instead. var/obj/screen/storage/boxes = null @@ -322,7 +322,7 @@ if (max_w_class != null && W.w_class > max_w_class) if(!stop_messages) - usr << "[W] is too long for this [src]." + usr << "[W] is too long for \the [src]." return 0 var/total_storage_space = W.get_storage_cost() diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 3d867111cce..20b326ebc9a 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -40,7 +40,7 @@ /obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj) var/proj_damage = Proj.get_structure_damage() if(!proj_damage) return - + health -= proj_damage ..() if(health <= 0) @@ -248,6 +248,7 @@ desc = "Contains inflatable walls and doors." icon_state = "inf_box" item_state = "syringe_kit" + w_class = 3 max_storage_space = 28 can_hold = list(/obj/item/inflatable) diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index 38cfc4a84b8..e99dc6d8ce6 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -15,7 +15,7 @@ desc = "A bulky, heavy-duty piece of exclusive corporate armor. YOU are in charge!" icon_state = "caparmor" item_state = "capspacesuit" - w_class = 4 + w_class = 5 gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 item_flags = STOPPRESSUREDAMAGE diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index f123f17b55c..7db3dd1dc11 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -14,7 +14,7 @@ slot_flags = SLOT_BACK req_one_access = list() req_access = list() - w_class = 4 + w_class = 5 // These values are passed on to all component pieces. armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20) diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index 7014e9cf418..ecac7222048 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -51,7 +51,7 @@ desc = "A suit that protects against low pressure environments. \"NORTHERN STAR\" is written in large block letters on the back." icon_state = "space" item_state = "s_suit" - w_class = 4//bulky item + w_class = 5 // So you can't fit this in your bag and be prepared at all times. gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index f98f222b937..5b5c706fa8a 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -143,6 +143,7 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) slowdown = 1 + w_class = 5 armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 100) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm index e0cbb20ced8..25348451738 100644 --- a/code/modules/clothing/suits/storage.dm +++ b/code/modules/clothing/suits/storage.dm @@ -4,7 +4,6 @@ /obj/item/clothing/suit/storage/New() ..() pockets = new/obj/item/weapon/storage/internal(src) - pockets.storage_slots = 2 //two slots pockets.max_w_class = 2 //fit only pocket sized items pockets.max_storage_space = 4 @@ -77,7 +76,6 @@ /obj/item/clothing/suit/storage/vest/heavy/New() ..() pockets = new/obj/item/weapon/storage/internal(src) - pockets.storage_slots = 4 pockets.max_w_class = 2 pockets.max_storage_space = 8 diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm index 1a181ac49ab..0e9a004a2ef 100644 --- a/code/modules/clothing/under/accessories/storage.dm +++ b/code/modules/clothing/under/accessories/storage.dm @@ -12,7 +12,8 @@ /obj/item/clothing/accessory/storage/New() ..() hold = new/obj/item/weapon/storage/internal(src) - hold.storage_slots = slots + hold.max_storage_space = slots * 2 + hold.max_w_class = 2 /obj/item/clothing/accessory/storage/attack_hand(mob/user as mob) if (has_suit) //if we are part of a suit diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index c21fc97bd8d..466170e52a4 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -89,7 +89,7 @@ obj/item/weapon/gun/energy/retro max_shots = 4 fire_delay = 35 force = 10 - w_class = 4 + w_class = 5 // So it can't fit in a backpack. accuracy = -3 //shooting at the hip scoped_accuracy = 0 diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index e38740e732f..e03ff739880 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -3,7 +3,7 @@ desc = "A portable anti-armour rifle fitted with a scope, the HI PTR-7 Rifle was originally designed to used against armoured exosuits. It is capable of punching through windows and non-reinforced walls with ease. Fires armor piercing 14.5mm shells." icon_state = "heavysniper" item_state = "l6closednomag" //placeholder - w_class = 4 + w_class = 5 // So it can't fit in a backpack. force = 10 slot_flags = SLOT_BACK origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) diff --git a/html/changelogs/Neerti-InventorySystemPort.yml b/html/changelogs/Neerti-InventorySystemPort.yml new file mode 100644 index 00000000000..db9dd5d2fca --- /dev/null +++ b/html/changelogs/Neerti-InventorySystemPort.yml @@ -0,0 +1,38 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Neerti + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Ports Bay's volume-based inventory system. It works off by weight classes instead of just slots, allowing you to hold more light items than you could previously." + - rscadd: "Bulky items can now go in your backpack, however it will require twice the space of a normal sized item." + - rscdel: "Spacesuits, RIGs, and sniper rifles made heavier."