Merge pull request #1368 from Neerti/4/6/2016_new_inventory_port

Ports Bay's new inventory system.
This commit is contained in:
EmperorJon
2016-04-16 02:58:07 +01:00
27 changed files with 240 additions and 92 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
@@ -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
+1
View File
@@ -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
-2
View File
@@ -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
@@ -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
+2 -2
View File
@@ -10,13 +10,13 @@
// Try put it in their backpack
if(istype(src.back,/obj/item/weapon/storage))
var/obj/item/weapon/storage/backpack = src.back
if(backpack.contents.len < backpack.storage_slots)
if(backpack.can_be_inserted(newitem, 1))
newitem.forceMove(src.back)
return 1
// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/weapon/storage/S in src.contents)
if (S.contents.len < S.storage_slots)
if (S.can_be_inserted(newitem, 1))
newitem.forceMove(S)
return 1
return 0
+1 -1
View File
@@ -590,7 +590,7 @@
icon = 'icons/obj/lighting.dmi'
force = 2
throwforce = 5
w_class = 2
w_class = 1
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
@@ -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
@@ -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)
+2 -2
View File
@@ -366,13 +366,13 @@
return
if(istype(O,/obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/bag/plants/bag = O
var/failed = 1
for(var/obj/item/G in O.contents)
if(!G.reagents || !G.reagents.total_volume)
continue
failed = 0
O.contents -= G
G.loc = src
bag.remove_from_storage(G, src)
holdingitems += G
if(holdingitems && holdingitems.len >= limit)
break
@@ -30,7 +30,6 @@
icon_state = "satchel"
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
max_storage_space = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_storage_space = 100
max_w_class = 3
can_hold = list(/obj/item/weapon/fossil)