mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 17:42:26 +00:00
Merge pull request #4838 from VOREStation/pol-emerboxes
Port Bay's survival boxes
This commit is contained in:
@@ -52,20 +52,24 @@
|
||||
new foldable(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/storage/box/survival/New()
|
||||
..()
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/emergency/oxygen(src)
|
||||
/obj/item/weapon/storage/box/survival
|
||||
name = "emergency supply box"
|
||||
desc = "A survival box issued to crew members for use in emergency situations."
|
||||
starts_with = list(
|
||||
/obj/item/clothing/mask/breath
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/box/vox/New()
|
||||
..()
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/emergency/phoron(src)
|
||||
|
||||
/obj/item/weapon/storage/box/engineer/New()
|
||||
..()
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/emergency/oxygen/engi(src)
|
||||
/obj/item/weapon/storage/box/survival/comp
|
||||
name = "emergency supply box"
|
||||
desc = "A comprehensive survival box issued to crew members for use in emergency situations. Contains additional supplies."
|
||||
icon_state = "survival"
|
||||
starts_with = list(
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector,
|
||||
/obj/item/stack/medical/bruise_pack,
|
||||
/obj/item/device/flashlight/glowstick,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar,
|
||||
/obj/item/clothing/mask/breath
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/box/gloves
|
||||
name = "box of latex gloves"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
|
||||
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
|
||||
|
||||
/obj/item/weapon/storage/Destroy()
|
||||
close_all()
|
||||
@@ -523,7 +524,8 @@
|
||||
for(var/obj/item/I in contents)
|
||||
remove_from_storage(I, T)
|
||||
|
||||
/obj/item/weapon/storage/New()
|
||||
/obj/item/weapon/storage/initialize()
|
||||
. = ..()
|
||||
|
||||
if(allow_quick_empty)
|
||||
verbs += /obj/item/weapon/storage/verb/quick_empty
|
||||
@@ -535,12 +537,6 @@
|
||||
else
|
||||
verbs -= /obj/item/weapon/storage/verb/toggle_gathering_mode
|
||||
|
||||
spawn(5)
|
||||
var/total_storage_space = 0
|
||||
for(var/obj/item/I in contents)
|
||||
total_storage_space += I.get_storage_cost()
|
||||
max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents.
|
||||
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
@@ -579,7 +575,21 @@
|
||||
src.closer.icon_state = "storage_close"
|
||||
src.closer.hud_layerise()
|
||||
orient2hud()
|
||||
return
|
||||
|
||||
if(LAZYLEN(starts_with))
|
||||
for(var/newtype in starts_with)
|
||||
var/count = starts_with[newtype] || 1 //Could have left it blank.
|
||||
while(count)
|
||||
count--
|
||||
new newtype(src)
|
||||
|
||||
calibrate_size()
|
||||
|
||||
/obj/item/weapon/storage/proc/calibrate_size()
|
||||
var/total_storage_space = 0
|
||||
for(var/obj/item/I in contents)
|
||||
total_storage_space += I.get_storage_cost()
|
||||
max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents.
|
||||
|
||||
/obj/item/weapon/storage/emp_act(severity)
|
||||
if(!istype(src.loc, /mob/living))
|
||||
|
||||
@@ -186,8 +186,8 @@
|
||||
src.air_contents.adjust_gas("phoron", (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
|
||||
/obj/item/weapon/tank/emergency/phoron/double
|
||||
name = "double emergency nitrogen tank"
|
||||
icon_state = "emergency_double_nitrogen"
|
||||
name = "double emergency phoron tank"
|
||||
icon_state = "emergency_double_nitro"
|
||||
gauge_icon = "indicator_emergency_double"
|
||||
volume = 10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user