diff --git a/code/game/machinery/dish_drive.dm b/code/game/machinery/dish_drive.dm index 48709456c89..00021f72484 100644 --- a/code/game/machinery/dish_drive.dm +++ b/code/game/machinery/dish_drive.dm @@ -39,10 +39,6 @@ COOLDOWN_DECLARE(time_since_dishes) -/obj/machinery/dish_drive/Initialize(mapload) - . = ..() - RefreshParts() - /obj/machinery/dish_drive/examine(mob/user) . = ..() if(user.Adjacent(src)) diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index c1c7cc40522..a10aff9f448 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -23,9 +23,7 @@ payment_department = ACCOUNT_MED var/obj/item/scanner_wand /// How much it costs to use the kiosk by default. - var/default_price = 15 //I'm defaulting to a low price on this, but in the future I wouldn't have an issue making it more or less expensive. - /// How much it currently costs to use the kiosk. - var/active_price = 15 //Change by using a multitool on the board. + var/default_price = 15 /// Makes the TGUI display gibberish and/or incorrect/erratic information. var/pandemonium = FALSE //AKA: Emag mode. @@ -42,7 +40,7 @@ /obj/machinery/medical_kiosk/Initialize(mapload) //loaded subtype for mapping use . = ..() - AddComponent(/datum/component/payment, active_price, SSeconomy.get_dep_account(ACCOUNT_MED), PAYMENT_FRIENDLY) + AddComponent(/datum/component/payment, get_cost(), SSeconomy.get_dep_account(ACCOUNT_MED), PAYMENT_FRIENDLY) register_context() scanner_wand = new/obj/item/scanner_wand(src) @@ -78,7 +76,6 @@ use_energy(active_power_usage) paying_customer = TRUE say("Hello, esteemed medical staff!") - RefreshParts() return var/bonus_fee = pandemonium ? rand(10,30) : 0 if(attempt_charge(src, paying, bonus_fee) & COMPONENT_OBJ_CANCEL_CHARGE ) @@ -87,7 +84,6 @@ paying_customer = TRUE icon_state = "[base_icon_state]_active" say("Thank you for your patronage!") - RefreshParts() return /obj/machinery/medical_kiosk/proc/clearScans() //Called it enough times to be it's own proc @@ -110,12 +106,13 @@ default_unfasten_wrench(user, tool, time = 0.1 SECONDS) return ITEM_INTERACT_SUCCESS -/obj/machinery/medical_kiosk/RefreshParts() - . = ..() +///Returns the active cost of the board +/obj/machinery/medical_kiosk/proc/get_cost() + PRIVATE_PROC(TRUE) + var/obj/item/circuitboard/machine/medical_kiosk/board = circuit - if(board) - active_price = board.custom_cost - return + + return board.custom_cost /obj/machinery/medical_kiosk/attackby(obj/item/O, mob/user, list/modifiers, list/attack_modifiers) if(default_deconstruction_screwdriver(user, "[base_icon_state]_open", "[base_icon_state]_off", O)) @@ -212,7 +209,6 @@ ui = new(user, src, "MedicalKiosk", name) ui.open() icon_state = "[base_icon_state]_active" - RefreshParts() var/mob/living/carbon/human/paying = user paying_ref = WEAKREF(paying) @@ -356,7 +352,7 @@ else if(user.has_status_effect(/datum/status_effect/hallucination)) chaos_modifier = 0.3 - data["kiosk_cost"] = active_price + (chaos_modifier * (rand(1,25))) + data["kiosk_cost"] = get_cost() + (chaos_modifier * (rand(1,25))) data["patient_name"] = patient_name data["patient_health"] = round(((total_health - (chaos_modifier * (rand(1,50)))) / max_health) * 100, 0.001) data["brute_health"] = round(brute_loss+(chaos_modifier * (rand(1,30))),0.001) //To break this down for easy reading, all health values are rounded to the .001 place diff --git a/code/game/machinery/medipen_refiller.dm b/code/game/machinery/medipen_refiller.dm index f1bb5a130aa..d31198749b8 100644 --- a/code/game/machinery/medipen_refiller.dm +++ b/code/game/machinery/medipen_refiller.dm @@ -26,7 +26,6 @@ AddComponent(/datum/component/plumbing/simple_demand) AddComponent(/datum/component/simple_rotation) register_context() - RefreshParts() /obj/machinery/medipen_refiller/add_context(atom/source, list/context, obj/item/held_item, mob/user) . = ..() diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 06a4220f004..3a9b435a70f 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -102,8 +102,7 @@ /obj/machinery/teleport/hub/syndicate/Initialize(mapload) . = ..() - var/obj/item/stock_parts/matter_bin/super/super_bin = new(src) - LAZYADD(component_parts, super_bin) + LAZYADD(component_parts, GLOB.stock_part_datums[/datum/stock_part/matter_bin/tier3]) RefreshParts() /obj/machinery/teleport/station diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index cd7655fef15..24674e2e10b 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -42,7 +42,6 @@ /obj/machinery/atmospherics/components/unary/thermomachine/Initialize(mapload) . = ..() - RefreshParts() update_appearance(UPDATE_ICON) register_context() diff --git a/code/modules/explorer_drone/scanner_array.dm b/code/modules/explorer_drone/scanner_array.dm index 0cbeb684a8c..7588eae233a 100644 --- a/code/modules/explorer_drone/scanner_array.dm +++ b/code/modules/explorer_drone/scanner_array.dm @@ -201,7 +201,6 @@ GLOBAL_LIST_INIT(scan_conditions,init_scan_conditions()) . = ..() RegisterSignals(GLOB.exoscanner_controller,list(COMSIG_EXOSCAN_STARTED,COMSIG_EXOSCAN_FINISHED), PROC_REF(scan_change)) update_readiness() - RefreshParts() /obj/machinery/exoscanner/RefreshParts() . = ..() diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index dfa2b36085f..604fd125ea2 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -1047,9 +1047,6 @@ set_seed(null) set_weedlevel(0) //Has a side effect of cleaning up those nasty weeds return - else if(istype(O, /obj/item/storage/part_replacer)) - RefreshParts() - return else if(istype(O, /obj/item/gun/energy/floragun)) var/obj/item/gun/energy/floragun/flowergun = O if(flowergun.cell.charge < flowergun.cell.maxcharge) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index cfdeeebe515..cd6ead98d68 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -124,7 +124,6 @@ GLOBAL_LIST_INIT(paper_blanks, init_paper_blanks()) /obj/machinery/photocopier/Initialize(mapload) . = ..() - RefreshParts() setup_components() AddElement(/datum/element/elevation, pixel_shift = 8) //enough to look like your bums are on the machine. if(starting_paper) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 42e85507073..522ee7c2697 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -62,7 +62,6 @@ . = ..() //Add to the early process queue to prioritize power draw SSmachines.processing_early += src - RefreshParts() set_wires(new /datum/wires/emitter(src)) if(welded) if(!anchored) diff --git a/code/modules/vehicles/mecha/mech_fabricator.dm b/code/modules/vehicles/mecha/mech_fabricator.dm index d66a573a2e8..d60f3befe54 100644 --- a/code/modules/vehicles/mecha/mech_fabricator.dm +++ b/code/modules/vehicles/mecha/mech_fabricator.dm @@ -64,7 +64,6 @@ rmat = AddComponent(/datum/component/remote_materials, mapload && link_on_init) cached_designs = list() illegal_local_designs = list() - RefreshParts() //Recalculating local material sizes if the fab isn't linked return ..() /obj/machinery/mecha_part_fabricator/Destroy()