From f6db5764e3fc3f32bf5d07219a8e1233d9fd64ae Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Mon, 6 Apr 2020 18:20:34 +0200 Subject: [PATCH] Bringing back accidentally reverted solar panel fixes. --- code/game/objects/items/stacks/sheets/glass.dm | 10 +++++----- code/modules/power/solar.dm | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 75db89f616..4e53f64d74 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -137,7 +137,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \ return ..() /obj/item/stack/sheet/plasmaglass/on_solar_construction(obj/machinery/power/solar/S) - S.obj_integrity *= 1.2 + S.max_integrity *= 1.2 S.efficiency *= 1.2 /* @@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \ ..() /obj/item/stack/sheet/rglass/on_solar_construction(obj/machinery/power/solar/S) - S.obj_integrity *= 2 + S.max_integrity *= 2 /obj/item/stack/sheet/rglass/cyborg custom_materials = null @@ -218,7 +218,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \ . += GLOB.prglass_recipes /obj/item/stack/sheet/plasmarglass/on_solar_construction(obj/machinery/power/solar/S) - S.obj_integrity *= 2.2 + S.max_integrity *= 2.2 S.efficiency *= 1.2 GLOBAL_LIST_INIT(titaniumglass_recipes, list( @@ -242,7 +242,7 @@ GLOBAL_LIST_INIT(titaniumglass_recipes, list( . += GLOB.titaniumglass_recipes /obj/item/stack/sheet/titaniumglass/on_solar_construction(obj/machinery/power/solar/S) - S.obj_integrity *= 2.5 + S.max_integrity *= 2.5 S.efficiency *= 1.5 GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( @@ -270,7 +270,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( . += GLOB.plastitaniumglass_recipes /obj/item/stack/sheet/titaniumglass/on_solar_construction(obj/machinery/power/solar/S) - S.obj_integrity *= 2 + S.max_integrity *= 2 S.efficiency *= 2 /obj/item/shard diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 6c5f97557d..73ea3ccd59 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -185,7 +185,7 @@ if(sunfrac <= 0) return - var/sgen = SOLAR_GEN_RATE * sunfrac + var/sgen = SOLAR_GEN_RATE * sunfrac * efficiency add_avail(sgen) if(control) control.gen += sgen @@ -253,6 +253,7 @@ var/obj/item/stack/sheet/G = S.change_stack(null, 2) if(G) glass_type = G + G.moveToNullspace() playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] places the glass on the solar assembly.", "You place the glass on the solar assembly.") if(tracker)