mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 22:12:38 +00:00
Makes some machines upgradeable (#3311)
Adds the ability to upgrade the following: - Sleepers - The ore processor - All cooking appliances (Minus the microwave) - Tesla Coil Also makes components not spawn in machines until they are needed (When they are being upgraded) to reduce the objects generated. Adds some new macro's and converts some istypes to use them. And moves stock parts into their own file.
This commit is contained in:
@@ -153,13 +153,16 @@
|
||||
var/cap_rating = 0
|
||||
var/manip_rating = 0
|
||||
var/bin_rating = 0
|
||||
|
||||
if(!component_parts)
|
||||
cap_rating = 2
|
||||
manip_rating = 1
|
||||
bin_rating = 1
|
||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||
if(iscapacitor(P))
|
||||
cap_rating += P.rating
|
||||
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
|
||||
else if(ismanipulator(P))
|
||||
manip_rating += P.rating
|
||||
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
||||
else if(ismatterbin(P))
|
||||
bin_rating += P.rating
|
||||
|
||||
power_rating = initial(power_rating) * cap_rating / 2 //more powerful
|
||||
|
||||
@@ -141,11 +141,13 @@
|
||||
..()
|
||||
var/cap_rating = 0
|
||||
var/bin_rating = 0
|
||||
|
||||
if(!component_parts)
|
||||
cap_rating = 2
|
||||
bin_rating = 1
|
||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||
if(iscapacitor(P))
|
||||
cap_rating += P.rating
|
||||
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
||||
else if(ismatterbin(P))
|
||||
bin_rating += P.rating
|
||||
|
||||
max_power_rating = initial(max_power_rating) * cap_rating / 2
|
||||
|
||||
Reference in New Issue
Block a user