diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 562e30d834d..a88d1c49bad 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -9,9 +9,6 @@ idle_power_usage = 20 active_power_usage = 5000 var/time_coeff = 1 - var/resource_coeff = 1 - var/time_coeff_tech = 1 - var/resource_coeff_tech = 1 var/list/resources = list( MAT_METAL=0, MAT_GLASS=0, @@ -80,12 +77,6 @@ T += M.rating res_max_amount = (187000+(T * 37500)) - //ressources adjustment coefficient (1 -> 0.88 -> 0.75) - T = -1 - for(var/obj/item/weapon/stock_parts/micro_laser/Ma in component_parts) - T += Ma.rating - resource_coeff = round(initial(resource_coeff) - (initial(resource_coeff)*(T))/8,0.01) - //building time adjustment coefficient (1 -> 0.8 -> 0.6) T = -1 for(var/obj/item/weapon/stock_parts/manipulator/Ml in component_parts) @@ -230,29 +221,6 @@ output += "\[Process queue | Clear queue\]" return output -/obj/machinery/mecha_part_fabricator/proc/update_tech() - if(!files) - return - var/output - for(var/datum/tech/T in files.known_tech) - if(T && T.level > 1) - var/diff - switch(T.id) - if("materials") - //one materials level is 1/32, so that max level is 0.75 coefficient - diff = round(initial(resource_coeff_tech) - (initial(resource_coeff_tech)*(T.level-1))/32,0.01) - if(resource_coeff_tech>diff) - resource_coeff_tech = diff - output+="Production efficiency increased.
" - if("programming") - //one materials level is 1/40, so that max level is 0.8 coefficient - diff = round(initial(time_coeff_tech) - (initial(time_coeff_tech)*(T.level-1))/40,0.1) - if(time_coeff_tech>diff) - time_coeff_tech = diff - output+="Production routines updated.
" - return output - - /obj/machinery/mecha_part_fabricator/proc/sync() temp = "Updating local R&D database..." updateUsrDialog() @@ -269,7 +237,6 @@ files.RefreshResearch() temp = "Processed equipment designs.
" //check if the tech coefficients have changed - temp += update_tech() temp += "Return" updateUsrDialog() @@ -281,10 +248,10 @@ return /obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1) - return round(D.materials[resource]*resource_coeff*resource_coeff_tech, roundto) + return round(D.materials[resource], roundto) /obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran - return round(initial(D.construction_time)*time_coeff*time_coeff_tech, roundto) + return round(initial(D.construction_time)*time_coeff, roundto) /obj/machinery/mecha_part_fabricator/attack_ghost(mob/user) interact(user) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index c94bfcd0ce8..7414dc6f52b 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -49,11 +49,11 @@ var/point_upgrade_temp = 1 var/sheet_per_ore_temp = 1 for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts) - sheet_per_ore_temp = B.rating + sheet_per_ore_temp = 0.65 + (0.35 * B.rating) for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) ore_pickup_rate_temp = 15 * M.rating for(var/obj/item/weapon/stock_parts/micro_laser/L in component_parts) - point_upgrade_temp = L.rating + point_upgrade_temp = 0.65 + (0.35 * L.rating) ore_pickup_rate = ore_pickup_rate_temp point_upgrade = point_upgrade_temp sheet_per_ore = sheet_per_ore_temp @@ -225,7 +225,7 @@ var/obj/item/stack/sheet/inp = stack_list[text2path(href_list["release"])] var/obj/item/stack/sheet/out = new inp.type() var/desired = input("How much?", "How much to eject?", 1) as num - out.amount = min(desired,50,inp.amount) + out.amount = round(min(desired,50,inp.amount)) if(out.amount >= 1) inp.amount -= out.amount unload_mineral(out) @@ -242,7 +242,7 @@ var/desired = input("How much?", "How much would you like to smelt?", 1) as num var/obj/item/stack/sheet/plasteel/plasteelout = new - plasteelout.amount = min(desired,50,metalstack.amount,plasmastack.amount) + plasteelout.amount = round(min(desired,50,metalstack.amount,plasmastack.amount)) if(plasteelout.amount >= 1) metalstack.amount -= plasteelout.amount plasmastack.amount -= plasteelout.amount @@ -258,7 +258,7 @@ var/desired = input("How much?", "How much would you like to smelt?", 1) as num var/obj/item/stack/sheet/plasmaglass/plasglassout = new - plasglassout.amount = min(desired, 50, glassstack.amount, plasmastack.amount) + plasglassout.amount = round(min(desired, 50, glassstack.amount, plasmastack.amount)) if(plasglassout.amount >= 1) glassstack.amount -= plasglassout.amount plasmastack.amount -= plasglassout.amount diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 16748fbb46b..3c8b89ea2a0 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -81,9 +81,9 @@ Note: Must be placed west/left of and R&D console to function. var/A = materials.amount(M) if(!A) A = reagents.get_reagent_amount(M) - A = A / max(1, (being_built.reagents[M]/efficiency_coeff)) + A = A / max(1, (being_built.reagents[M])) else - A = A / max(1, (being_built.materials[M]/efficiency_coeff)) + A = A / max(1, (being_built.materials[M])) return A /obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob, params) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 58c1cf7fe6f..9e8b29f94c1 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -171,7 +171,7 @@ proc/CallMaterialName(ID) return D.loc = src to_chat(user, "You add the disk to the machine!") - else + else if(!(linked_destroy && linked_destroy.busy) && !(linked_lathe && linked_lathe.busy) && !(linked_imprinter && linked_imprinter.busy)) ..() src.updateUsrDialog() return @@ -411,7 +411,7 @@ proc/CallMaterialName(ID) var/list/efficient_mats = list() for(var/MAT in being_built.materials) - efficient_mats[MAT] = being_built.materials[MAT] / coeff + efficient_mats[MAT] = being_built.materials[MAT] if(!linked_lathe.materials.has_materials(efficient_mats, amount)) src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") @@ -419,7 +419,7 @@ proc/CallMaterialName(ID) g2g = 0 else for(var/R in being_built.reagents) - if(!linked_lathe.reagents.has_reagent(R, being_built.reagents[R]/coeff)) + if(!linked_lathe.reagents.has_reagent(R, being_built.reagents[R])) src.visible_message("The [src.name] beeps, \"Not enough reagents to complete prototype.\"") enough_materials = 0 g2g = 0 @@ -427,7 +427,7 @@ proc/CallMaterialName(ID) if(enough_materials) linked_lathe.materials.use_amount(efficient_mats, amount) for(var/R in being_built.reagents) - linked_lathe.reagents.remove_reagent(R, being_built.reagents[R]/coeff) + linked_lathe.reagents.remove_reagent(R, being_built.reagents[R]) var/P = being_built.build_path //lets save these values before the spawn() just in case. Nobody likes runtimes. var/O = being_built.locked @@ -439,8 +439,7 @@ proc/CallMaterialName(ID) new_item.investigate_log("built by [key]","singulo") new_item.reliability = 100 if(!istype(new_item, /obj/item/stack/sheet)) // To avoid materials dupe glitches - new_item.materials[MAT_METAL] /= coeff - new_item.materials[MAT_GLASS] /= coeff + new_item.materials = efficient_mats.Copy() if(O) var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(linked_lathe.loc) new_item.loc = L @@ -873,7 +872,6 @@ proc/CallMaterialName(ID) dat += "Material Amount: [linked_lathe.materials.total_amount] / [linked_lathe.materials.max_amount]
" dat += "Chemical Volume: [linked_lathe.reagents.total_volume] / [linked_lathe.reagents.maximum_volume]
" - var/coeff = linked_lathe.efficiency_coeff for(var/datum/design/D in files.known_designs) if(!(selected_category in D.category)|| !(D.build_type & PROTOLATHE)) continue @@ -884,9 +882,9 @@ proc/CallMaterialName(ID) t = linked_lathe.check_mat(D, M) temp_material += " | " if (t < 1) - temp_material += "[D.materials[M]/coeff] [CallMaterialName(M)]" + temp_material += "[D.materials[M]] [CallMaterialName(M)]" else - temp_material += " [D.materials[M]/coeff] [CallMaterialName(M)]" + temp_material += " [D.materials[M]] [CallMaterialName(M)]" c = min(c,t) @@ -894,9 +892,9 @@ proc/CallMaterialName(ID) t = linked_lathe.check_mat(D, R) temp_material += " | " if (t < 1) - temp_material += "[D.reagents[R]/coeff] [CallMaterialName(R)]" + temp_material += "[D.reagents[R]] [CallMaterialName(R)]" else - temp_material += " [D.reagents[R]/coeff] [CallMaterialName(R)]" + temp_material += " [D.reagents[R]] [CallMaterialName(R)]" c = min(c,t) if (c >= 1) @@ -920,7 +918,6 @@ proc/CallMaterialName(ID) dat += "Material Amount: [linked_lathe.materials.total_amount] / [linked_lathe.materials.max_amount]
" dat += "Chemical Volume: [linked_lathe.reagents.total_volume] / [linked_lathe.reagents.maximum_volume]
" - var/coeff = linked_lathe.efficiency_coeff for(var/datum/design/D in matching_designs) var/temp_material var/c = 50 @@ -929,18 +926,18 @@ proc/CallMaterialName(ID) t = linked_lathe.check_mat(D, M) temp_material += " | " if (t < 1) - temp_material += "[D.materials[M]/coeff] [CallMaterialName(M)]" + temp_material += "[D.materials[M]] [CallMaterialName(M)]" else - temp_material += " [D.materials[M]/coeff] [CallMaterialName(M)]" + temp_material += " [D.materials[M]] [CallMaterialName(M)]" c = min(c,t) for(var/R in D.reagents) t = linked_lathe.check_mat(D, R) temp_material += " | " if (t < 1) - temp_material += "[D.reagents[R]/coeff] [CallMaterialName(R)]" + temp_material += "[D.reagents[R]] [CallMaterialName(R)]" else - temp_material += " [D.reagents[R]/coeff] [CallMaterialName(R)]" + temp_material += " [D.reagents[R]] [CallMaterialName(R)]" c = min(c,t) if (c >= 1)