mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
added get_cell() proc to remaining items using cells
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
var/obj/item/defibrillator/defib //this mount's defibrillator
|
||||
var/clamps_locked = FALSE //if true, and a defib is loaded, it can't be removed without unlocking the clamps
|
||||
|
||||
/obj/machinery/defibrillator_mount/get_cell()
|
||||
if(defib)
|
||||
return defib.get_cell()
|
||||
|
||||
/obj/machinery/defibrillator_mount/New(location, direction, building = 0)
|
||||
..()
|
||||
|
||||
@@ -28,7 +32,6 @@
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -30 : 30)
|
||||
pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
|
||||
|
||||
|
||||
/obj/machinery/defibrillator_mount/loaded/New() //loaded subtype for mapping use
|
||||
..()
|
||||
defib = new/obj/item/defibrillator/loaded(src)
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
var/open = FALSE
|
||||
var/brightness_on = 14
|
||||
|
||||
/obj/machinery/floodlight/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/machinery/floodlight/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
var/set_temperature = 50 // in celcius, add T0C for kelvin
|
||||
var/heating_power = 40000
|
||||
|
||||
/obj/machinery/space_heater/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/machinery/space_heater/New()
|
||||
..()
|
||||
cell = new(src)
|
||||
@@ -39,7 +42,6 @@
|
||||
else
|
||||
to_chat(user, "The charge meter reads [cell ? round(cell.percent(),1) : 0]%")
|
||||
|
||||
|
||||
/obj/machinery/space_heater/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
|
||||
@@ -137,6 +137,10 @@
|
||||
////////////////////////
|
||||
////// Helpers /////////
|
||||
////////////////////////
|
||||
|
||||
/obj/mecha/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/mecha/proc/add_airtank()
|
||||
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
|
||||
return internal_tank
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
var/obj/item/stock_parts/cell/high/bcell = null
|
||||
var/combat = 0 //can we revive through space suits?
|
||||
|
||||
/obj/item/defibrillator/get_cell()
|
||||
return bcell
|
||||
|
||||
/obj/item/defibrillator/New() //starts without a cell for rnd
|
||||
..()
|
||||
paddles = make_paddles()
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
item_state = "lgloves"
|
||||
flags = NODROP
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/stun
|
||||
name = "stun gloves"
|
||||
desc = "Horrendous and awful. It smells like cancer. The fact it has wires attached to it is incidental."
|
||||
@@ -72,6 +71,9 @@
|
||||
var/stun_strength = 5
|
||||
var/stun_cost = 2000
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/stun/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/stun/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
@@ -97,6 +97,9 @@
|
||||
to_chat(usr, "The maintenance panel is [open ? "open" : "closed"].")
|
||||
to_chat(usr, "Hardsuit systems are [offline ? "<font color='red'>offline</font>" : "<font color='green'>online</font>"].")
|
||||
|
||||
/obj/item/rig/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/rig/New()
|
||||
..()
|
||||
|
||||
|
||||
@@ -103,6 +103,9 @@ var/list/robot_verbs_default = list(
|
||||
var/datum/action/item_action/toggle_research_scanner/scanner = null
|
||||
var/list/module_actions = list()
|
||||
|
||||
/mob/living/silicon/robot/get_cell()
|
||||
return cell
|
||||
|
||||
/mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0, var/alien = 0)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
var/currentBloodColor = "#A10808"
|
||||
var/currentDNA = null
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/get_cell()
|
||||
return cell
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/New()
|
||||
..()
|
||||
wires = new /datum/wires/mulebot(src)
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
return battery_module.battery.give(amount)
|
||||
return 0
|
||||
|
||||
/obj/item/modular_computer/get_cell()
|
||||
var/obj/item/computer_hardware/battery/battery_module = all_components[MC_CELL]
|
||||
if(battery_module && battery_module.battery)
|
||||
return battery_module.battery
|
||||
|
||||
// Used in following function to reduce copypaste
|
||||
/obj/item/modular_computer/proc/power_failure()
|
||||
|
||||
@@ -27,6 +27,9 @@ Contents:
|
||||
var/obj/item/clothing/mask/gas/space_ninja/suitMask
|
||||
var/mob/living/carbon/human/suitOccupant
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/get_cell()
|
||||
return suitCell
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/toggle_suit_lock(mob/living/carbon/human/user)
|
||||
if(!suitActive)
|
||||
if(!istype(user.wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/attackby(obj/item/I, mob/U, params)
|
||||
if(U==suitOccupant)//Safety, in case you try doing this without wearing the suit/being the person with the suit.
|
||||
if(istype(I, /obj/item/stock_parts/cell))
|
||||
@@ -21,4 +19,4 @@
|
||||
else
|
||||
to_chat(U, "<span class='danger'>Procedure interrupted. Protocol terminated.</span>")
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -117,7 +117,6 @@
|
||||
lighting = 0
|
||||
operating = 0
|
||||
|
||||
|
||||
/obj/machinery/power/apc/noalarm
|
||||
report_power_alarm = 0
|
||||
|
||||
@@ -133,6 +132,9 @@
|
||||
usesound = 'sound/items/deconstruct.ogg'
|
||||
toolspeed = 1
|
||||
|
||||
/obj/machinery/power/apc/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/machinery/power/apc/connect_to_network()
|
||||
//Override because the APC does not directly connect to the network; it goes through a terminal.
|
||||
//The terminal is what the power computer looks for anyway.
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
var/obj/item/stock_parts/cell/cell = null // Used for firing superheated rods.
|
||||
var/list/possible_tensions = list(XBOW_TENSION_20, XBOW_TENSION_40, XBOW_TENSION_60, XBOW_TENSION_80, XBOW_TENSION_FULL)
|
||||
|
||||
/obj/item/gun/throw/crossbow/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/gun/throw/crossbow/emp_act(severity)
|
||||
if(cell && severity)
|
||||
emp_act(severity)
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
var/hack_message = "You disable the safety safeguards, enabling the \"Mad Scientist\" mode."
|
||||
var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode."
|
||||
|
||||
/obj/machinery/chem_dispenser/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/machinery/chem_dispenser/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
|
||||
@@ -92,6 +92,8 @@
|
||||
has_paint = 1
|
||||
update_icons()
|
||||
|
||||
/obj/spacepod/get_cell()
|
||||
return battery
|
||||
|
||||
/obj/spacepod/New()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user