mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 15:02:56 +00:00
Power Cell Backpacks (#8642)
This commit is contained in:
53
code/game/objects/items/weapons/storage/cell_backpack.dm
Normal file
53
code/game/objects/items/weapons/storage/cell_backpack.dm
Normal file
@@ -0,0 +1,53 @@
|
||||
/obj/item/storage/backpack/cell
|
||||
name = "power cell backpack"
|
||||
desc = "A specially designed power cell rack backpack. Includes an interior holographic display that shows held cells' charge."
|
||||
description_fluff = "Designed by Nanotrasen Scientists in 2462, the power cell backpack, formally known as the 'NT-100 Zeus' or more informally, the 'ABT-DMN-TME'. Using sophisticated sensors first designed four centuries earlier, hooked up to screens designed three centuries earlier, it allows the user to hotswap batteries at a glance, without spending many eye-hours wasted counting charge and doing mental arithmetic."
|
||||
icon = 'icons/obj/cell_backpack.dmi'
|
||||
icon_state = "cell_rack"
|
||||
item_state = "cell_rack"
|
||||
contained_sprite = TRUE
|
||||
use_sound = 'sound/items/storage/toolbox.ogg'
|
||||
drop_sound = 'sound/items/drop/metalboots.ogg'
|
||||
can_hold = list(/obj/item/cell)
|
||||
max_storage_space = 40 // about 10 cells
|
||||
storage_slots = 10
|
||||
allow_quick_gather = TRUE
|
||||
allow_quick_empty = TRUE
|
||||
use_to_pickup = TRUE
|
||||
|
||||
/obj/item/storage/backpack/cell/Initialize()
|
||||
. = ..()
|
||||
set_light(2, 0.75, LIGHT_COLOR_FIRE)
|
||||
|
||||
/obj/item/storage/backpack/cell/slot_orient_objs(var/rows, var/cols, var/list/obj/item/display_contents)
|
||||
var/cx = 4
|
||||
var/cy = 2+rows
|
||||
src.boxes.screen_loc = "4:16,2:16 to [4+cols]:16,[2+rows]:16"
|
||||
|
||||
for(var/obj/item/cell/C in contents)
|
||||
C.screen_loc = "[cx]:16,[cy]:16"
|
||||
var/current_charge = round((C.charge / C.maxcharge) * 100)
|
||||
var/maptext_color = COLOR_BRIGHT_GREEN
|
||||
switch(current_charge)
|
||||
if(99 to INFINITY)
|
||||
maptext_color = COLOR_BRIGHT_GREEN
|
||||
if(80 to 99)
|
||||
maptext_color = COLOR_OLIVE
|
||||
if(60 to 80)
|
||||
maptext_color = COLOR_CIVIE_GREEN
|
||||
if(40 to 60)
|
||||
maptext_color = COLOR_YELLOW
|
||||
if(20 to 40)
|
||||
maptext_color = COLOR_ORANGE
|
||||
if(1 to 20)
|
||||
maptext_color = COLOR_RED_LIGHT
|
||||
if(-INFINITY to 1)
|
||||
maptext_color = COLOR_RED
|
||||
C.maptext = "<font color='[maptext_color]'>[current_charge]%</font>"
|
||||
C.layer = SCREEN_LAYER + 0.01
|
||||
cx++
|
||||
if (cx > (4+cols))
|
||||
cx = 4
|
||||
cy--
|
||||
closer.screen_loc = "[4+cols+1]:16,2:16"
|
||||
return
|
||||
@@ -52,6 +52,7 @@ var/global/list/minevendor_list = list( //keep in order of price
|
||||
new /datum/data/mining_equipment("Drone KA Upgrade", /obj/item/device/mine_bot_upgrade/ka, 10, 800),
|
||||
new /datum/data/mining_equipment("Ore Summoner", /obj/item/oreportal, 35, 800),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/lazarus_injector, 25, 1000),
|
||||
new /datum/data/mining_equipment("Power Cell Backpack", /obj/item/storage/backpack/cell, 5, 1000),
|
||||
new /datum/data/mining_equipment("Industrial Drill Head", /obj/machinery/mining/drill, -1, 1000, 1),
|
||||
new /datum/data/mining_equipment("Super Resonator", /obj/item/resonator/upgraded, 10, 1250),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/pickaxe/diamond, 10, 1500),
|
||||
|
||||
@@ -66,6 +66,13 @@ datum/design/item/tool/advanced_light_replacer
|
||||
materials = list(MATERIAL_GOLD = 3000, MATERIAL_DIAMOND = 1500, MATERIAL_URANIUM = 250)
|
||||
build_path = /obj/item/storage/backpack/holding
|
||||
|
||||
/datum/design/item/tool/power_cell_backpack
|
||||
name = "Power Cell Backpack"
|
||||
desc = "A backpack specially designed to hold power cells, includes a holographic display to show current charge."
|
||||
req_tech = list(TECH_MATERIAL = 4, TECH_MAGNET = 2, TECH_POWER = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 7500, MATERIAL_GLASS = 2500)
|
||||
build_path = /obj/item/storage/backpack/cell
|
||||
|
||||
/datum/design/item/tool/bluespace_crystal
|
||||
name = "Artificial Bluespace Crystal"
|
||||
desc = "An artificially made bluespace crystal."
|
||||
|
||||
Reference in New Issue
Block a user