mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Refactors how circuit size is calculated. Fixed module circuit size not taking up capacity equal to the amount of circuit components inside of it. (#61554)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
This commit is contained in:
co-authored by
Watermelon914
parent
f109d9d654
commit
1a507d23ed
@@ -46,6 +46,16 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/integrated_circuit/module/add_component(obj/item/circuit_component/to_add, mob/living/user)
|
||||
. = ..()
|
||||
if(attached_module)
|
||||
attached_module.circuit_size += to_add.circuit_size
|
||||
|
||||
/obj/item/integrated_circuit/module/remove_component(obj/item/circuit_component/to_remove)
|
||||
if(attached_module)
|
||||
attached_module.circuit_size -= to_remove.circuit_size
|
||||
return ..()
|
||||
|
||||
/obj/item/integrated_circuit/module/Destroy()
|
||||
attached_module = null
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user