Makes APC cell_type actually pick a cell (#2747)

* Ports TG#30327

* Update apc.dm

* maybe delta can be fully copies over, yes?
This commit is contained in:
Poojawa
2017-09-13 19:57:21 -05:00
committed by GitHub
parent e1d2d3d36d
commit 8406baebbe
17 changed files with 161 additions and 303 deletions
+11 -3
View File
@@ -55,7 +55,7 @@
var/areastring = null
var/obj/item/stock_parts/cell/cell
var/start_charge = 90 // initial cell charge %
var/cell_type = 2500 // 0=no cell, 1=regular, 2=high-cap (x5) <- old, now it's just 0=no cell, otherwise dictate cellcapacity by changing this value. 1 used to be 1000, 2 was 2500
var/cell_type = /obj/item/stock_parts/cell/upgraded //Base cell has 2500 capacity. Enter the path of a different cell you want to use. cell determines charge rates, max capacity, ect. These can also be changed with other APC vars, but isn't recommended to minimize the risk of accidental usage of dirty editted APCs
var/opened = 0 //0=closed, 1=opened, 2=cover removed
var/shorted = 0
var/lighting = 3
@@ -92,6 +92,15 @@
var/update_overlay = -1
var/icon_update_needed = FALSE
/obj/machinery/power/apc/highcap/five_k
cell_type = /obj/item/stock_parts/cell/upgraded/plus
/obj/machinery/power/apc/highcap/ten_k
cell_type = /obj/item/stock_parts/cell/high
/obj/machinery/power/apc/highcap/fifteen_k
cell_type = /obj/item/stock_parts/cell/high/plus
/obj/machinery/power/apc/get_cell()
return cell
@@ -177,8 +186,7 @@
has_electronics = 2 //installed and secured
// is starting with a power cell installed, create it and set its charge level
if(cell_type)
src.cell = new/obj/item/stock_parts/cell(src)
cell.maxcharge = cell_type // cell_type is maximum charge (old default was 1000 or 2500 (values one and two respectively)
cell = new cell_type
cell.charge = start_charge * cell.maxcharge / 100 // (convert percentage to actual value)
var/area/A = src.loc.loc
-13
View File
@@ -1,13 +0,0 @@
diff a/code/modules/power/apc.dm b/code/modules/power/apc.dm (rejected hunks)
@@ -867,9 +867,9 @@
occupier.loc = src.loc
occupier.death()
occupier.gib()
- for(var/obj/item/weapon/pinpointer/P in GLOB.pinpointer_list)
+ for(var/obj/item/weapon/pinpointer/nuke/P in GLOB.pinpointer_list)
P.switch_mode_to(TRACK_NUKE_DISK) //Pinpointers go back to tracking the nuke disk
- P.nuke_warning = FALSE
+ P.alert = FALSE
/obj/machinery/power/apc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
if(card.AI)
+1 -1
View File
@@ -348,4 +348,4 @@
return
/obj/item/stock_parts/cell/beam_rifle/emp_act(severity)
charge = Clamp((charge-(10000/severity)),0,maxcharge)
charge = Clamp((charge-(10000/severity)),0,maxcharge)