mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Function overloads condensation (#18939)
Unified most of the procs into one definition, so there are no duplicate around the codebase. Marked some of the above as overridable if a good enough case can be made for them (eg. external dependency or unlikely to be used).
This commit is contained in:
@@ -51,25 +51,11 @@
|
||||
var/obj/item/device/electronic_assembly/clothing/IC = null
|
||||
var/obj/item/integrated_circuit/built_in/action_button/action_circuit = null // This gets pulsed when someone clicks the button on the hud, OR when certain interactions are performed (such as clicking on something with gloves worn)
|
||||
|
||||
/obj/item/clothing/emp_act(severity)
|
||||
if(IC)
|
||||
IC.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/examine(mob/user)
|
||||
if(IC)
|
||||
examinate(user, IC)
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/attackby(obj/item/attacking_item, mob/user)
|
||||
if(IC && (istype(attacking_item, /obj/item/integrated_circuit) || attacking_item.iswrench() || attacking_item.iscrowbar() || \
|
||||
istype(attacking_item, /obj/item/device/integrated_electronics/wirer) || istype(attacking_item, /obj/item/device/integrated_electronics/debugger) || \
|
||||
attacking_item.ismultitool() || attacking_item.isscrewdriver() || istype(attacking_item, /obj/item/cell/device)))
|
||||
|
||||
IC.attackby(attacking_item, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/clothing/attack_self(mob/user)
|
||||
if(IC?.opened)
|
||||
IC.attack_self(user)
|
||||
@@ -92,13 +78,6 @@
|
||||
icon = 'icons/obj/assemblies/wearable_electronic_setups.dmi'
|
||||
contained_sprite = TRUE
|
||||
|
||||
/obj/item/clothing/Destroy()
|
||||
if(IC)
|
||||
IC.clothing = null
|
||||
action_circuit = null // Will get deleted by qdel-ing the IC assembly.
|
||||
qdel(IC)
|
||||
return ..()
|
||||
|
||||
// Specific subtypes.
|
||||
|
||||
// Jumpsuit.
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
var/volume = 60
|
||||
var/list/fuel = list(/singleton/reagent/toxin/phoron = 50000, /singleton/reagent/slimejelly = 25000, /singleton/reagent/fuel = 15000, /singleton/reagent/carbon = 10000, /singleton/reagent/alcohol = 10000, /singleton/reagent/nutriment = 8000, /singleton/reagent/blood = 5000)
|
||||
var/list/fuel = list(/singleton/reagent/toxin/phoron = 50000, /singleton/reagent/slimejelly = 25000, /singleton/reagent/fuel = 15000, /singleton/reagent/carbon = 10000, /singleton/reagent/alcohol/ethanol = 10000, /singleton/reagent/nutriment = 8000, /singleton/reagent/blood = 5000)
|
||||
|
||||
/obj/item/integrated_circuit/passive/power/chemical_cell/New()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user