From d79e0d0241b22f35dd2ff73e31285b79f03403d3 Mon Sep 17 00:00:00 2001 From: Zenith <109559450+Zenith00000@users.noreply.github.com> Date: Thu, 23 May 2024 02:38:34 +0100 Subject: [PATCH] more fixes --- code/game/machinery/hybrsia_lights.dm | 86 ++++++++++--------- code/game/objects/structures/hybrisa_props.dm | 52 ++++------- code/game/turfs/walls/wall_types.dm | 20 ----- 3 files changed, 63 insertions(+), 95 deletions(-) diff --git a/code/game/machinery/hybrsia_lights.dm b/code/game/machinery/hybrsia_lights.dm index 0fd1855f1d82..33ea0fad48b2 100644 --- a/code/game/machinery/hybrsia_lights.dm +++ b/code/game/machinery/hybrsia_lights.dm @@ -5,14 +5,14 @@ desc = "A thermoelectric generator sitting atop a plasma-filled borehole. This one is heavily damaged. Use a blowtorch, wirecutters, then wrench to repair it." anchored = TRUE density = TRUE - directwired = 0 //Requires a cable directly underneath + directwired = FALSE //Requires a cable directly underneath unslashable = TRUE unacidable = TRUE //NOPE.jpg var/power_gen_percent = 0 //100,000W at full capacity var/power_generation_max = 100000 //Full capacity var/powernet_connection_failed = 0 //Logic checking for powernets var/buildstate = 1 //What state of building it are we on, 0-3, 1 is "broken", the default - var/is_on = 0 //Is this damn thing on or what? + var/is_on = FALSE //Is this damn thing on or what? var/fail_rate = 10 //% chance of failure each fail_tick check var/fail_check_ticks = 100 //Check for failure every this many ticks var/cur_tick = 0 //Tick updater @@ -24,10 +24,14 @@ if(!buildstate && is_on) desc = "A thermoelectric generator sitting atop a borehole dug deep in the planet's surface. It generates energy by boiling the plasma steam that rises from the well.\nIt is old technology and has a large failure rate, and must be repaired frequently.\nIt is currently on, and beeping randomly amid faint hisses of steam." switch(power_gen_percent) - if(25) icon_state = "on[power_gen_percent]" - if(50) icon_state = "on[power_gen_percent]" - if(75) icon_state = "on[power_gen_percent]" - if(100) icon_state = "on[power_gen_percent]" + if(25) + icon_state = "on[power_gen_percent]" + if(50) + icon_state = "on[power_gen_percent]" + if(75) + icon_state = "on[power_gen_percent]" + if(100) + icon_state = "on[power_gen_percent]" else if (!buildstate && !is_on) @@ -54,12 +58,12 @@ /obj/structure/machinery/power/geothermal/process() if(!is_on || buildstate || !anchored) //Default logic checking - return 0 + return if(!powernet && !powernet_connection_failed) //Powernet checking, make sure there's valid cables & powernets if(!connect_to_network()) - powernet_connection_failed = 1 //God damn it, where'd our network go - is_on = 0 + powernet_connection_failed = TRUE //God damn it, where'd our network go + is_on = FALSE stop_processing() // Error! Check again in 15 seconds. Someone could have blown/acided or snipped a cable addtimer(VARSET_CALLBACK(src, powernet_connection_failed, FALSE), 15 SECONDS) @@ -68,15 +72,18 @@ update_icon() if(power_gen_percent < 100) power_gen_percent++ switch(power_gen_percent) - if(10) visible_message("[icon2html(src, viewers(src))] [SPAN_NOTICE("[src] begins to whirr as it powers up.")]") - if(50) visible_message("[icon2html(src, viewers(src))] [SPAN_NOTICE("[src] begins to hum loudly as it reaches half capacity.")]") - if(99) visible_message("[icon2html(src, viewers(src))] [SPAN_NOTICE("[src] rumbles loudly as the combustion and thermal chambers reach full strength.")]") + if(10) + visible_message("[icon2html(src, viewers(src))] [SPAN_NOTICE("[src] begins to whirr as it powers up.")]") + if(50) + visible_message("[icon2html(src, viewers(src))] [SPAN_NOTICE("[src] begins to hum loudly as it reaches half capacity.")]") + if(99) + visible_message("[icon2html(src, viewers(src))] [SPAN_NOTICE("[src] rumbles loudly as the combustion and thermal chambers reach full strength.")]") add_avail(power_generation_max * (power_gen_percent / 100) ) //Nope, all good, just add the power /obj/structure/machinery/power/geothermal/proc/check_failure() cur_tick++ if(cur_tick < fail_check_ticks) //Nope, not time for it yet - return 0 + return FALSE else if(cur_tick > fail_check_ticks) //Went past with no fail, reset the timer cur_tick = 0 if(rand(1,100) < fail_rate) //Oh snap, we failed! Shut it down! @@ -88,50 +95,53 @@ visible_message("[icon2html(src, viewers(src))] [SPAN_NOTICE("[src] beeps wildly and sprays random pieces everywhere! Use a wrench to repair it.")]") buildstate = 3 icon_state = "wrench" - is_on = 0 + is_on = FALSE power_gen_percent = 0 update_icon() cur_tick = 0 stop_processing() - return 1 - return 0 //Nope, all fine + return TRUE + return FALSE //Nope, all fine /obj/structure/machinery/power/geothermal/attack_hand(mob/user as mob) - if(!anchored) return 0 //Shouldn't actually be possible - if(user.is_mob_incapacitated()) return 0 + if(!anchored) + return FALSE //Shouldn't actually be possible + if(user.is_mob_incapacitated()) + return FALSE if(!ishuman(user)) to_chat(user, SPAN_DANGER("You have no idea how to use that.")) //No xenos or mankeys - return 0 + return FALSE add_fingerprint(user) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) to_chat(user, SPAN_WARNING("You have no clue how this thing works...")) - return 0 + return FALSE if(buildstate == 1) to_chat(usr, SPAN_INFO("Use a blowtorch, then wirecutters, then wrench to repair it.")) - return 0 + return FALSE else if (buildstate == 2) to_chat(usr, SPAN_INFO("Use a wirecutters, then wrench to repair it.")) - return 0 + return FALSE else if (buildstate == 3) to_chat(usr, SPAN_INFO("Use a wrench to repair it.")) - return 0 + return FALSE if(is_on) visible_message("[icon2html(src, viewers(src))] [SPAN_WARNING("[src] beeps softly and the humming stops as [usr] shuts off the turbines.")]") - is_on = 0 + is_on = FALSE power_gen_percent = 0 cur_tick = 0 icon_state = "off" stop_processing() - return 1 + return TRUE + visible_message("[icon2html(src, viewers(src))] [SPAN_WARNING("[src] beeps loudly as [usr] turns on the turbines and the generator begins spinning up.")]") icon_state = "on10" - is_on = 1 + is_on = TRUE cur_tick = 0 start_processing() - return 1 + return TRUE /obj/structure/machinery/power/geothermal/attackby(obj/item/O as obj, mob/user as mob) if(iswelder(O)) @@ -141,7 +151,7 @@ if(buildstate == 1 && !is_on) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) to_chat(user, SPAN_WARNING("You have no clue how to repair this thing.")) - return 0 + return FALSE var/obj/item/tool/weldingtool/WT = O if(WT.remove_fuel(1, user)) @@ -164,7 +174,7 @@ if(buildstate == 2 && !is_on) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) to_chat(user, SPAN_WARNING("You have no clue how to repair this thing.")) - return 0 + return FALSE playsound(loc, 'sound/items/Wirecutter.ogg', 25, 1) user.visible_message(SPAN_NOTICE("[user] starts securing [src]'s wiring."), SPAN_NOTICE("You start securing [src]'s wiring.")) @@ -181,7 +191,7 @@ if(buildstate == 3 && !is_on) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) to_chat(user, SPAN_WARNING("You have no clue how to repair this thing.")) - return 0 + return FALSE playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) user.visible_message(SPAN_NOTICE("[user] starts repairing [src]'s tubing and plating."), SPAN_NOTICE("You start repairing [src]'s tubing and plating.")) @@ -211,7 +221,7 @@ density = FALSE anchored = TRUE var/ispowered = FALSE - var/turned_on = 0 //has to be toggled in SOMEWHERE + var/turned_on = FALSE //has to be toggled in SOMEWHERE use_power = USE_POWER_IDLE unslashable = TRUE unacidable = TRUE @@ -370,15 +380,6 @@ floodlist = null return ..() - -/obj/structure/machinery/engineerconsole_switch/update_icon() - if(!ispowered) - icon_state = "engineerconsole" - else if(turned_on) - icon_state = "engineerconsole" - else - icon_state = "engineerconsole" - /obj/structure/machinery/engineerconsole_switch/process() var/lightpower = 0 for(var/obj/structure/machinery/colony_floodlight/engineer_circular/C in floodlist) @@ -402,7 +403,7 @@ /obj/structure/machinery/engineerconsole_switch/proc/toggle_lights() for(var/obj/structure/machinery/colony_floodlight/engineer_circular/F in floodlist) spawn(rand(10,60)) - F.is_lit = !F.is_lit + turned_on = FALSE if(!F.damaged) if(F.is_lit) //Shut it down F.set_light(l_range = F.lum_value,l_power = F.light_power , l_color = F.light_color) @@ -418,7 +419,7 @@ if(!ispowered) to_chat(user, "Nothing happens.") return FALSE - playsound(src,'sound/items/Deconstruct.ogg', 30, 1) + return FALSE toggle_lights() turned_on = !turned_on update_icon() @@ -439,6 +440,7 @@ GLOBAL_LIST_INIT(ship_floodlights, list()) light_color = "#00ffa0" lum_value = 14 light_power = 6 + /obj/structure/machinery/colony_floodlight/engineer_circular/update_icon() if(damaged) icon_state = "engineerlight_off" diff --git a/code/game/objects/structures/hybrisa_props.dm b/code/game/objects/structures/hybrisa_props.dm index efdf64fdcb38..e6ef6c5322b1 100644 --- a/code/game/objects/structures/hybrisa_props.dm +++ b/code/game/objects/structures/hybrisa_props.dm @@ -1277,7 +1277,7 @@ unslashable = TRUE unacidable = TRUE indestructible = TRUE - layer = 2.1 + layer = ABOVE_TURF_LAYER /obj/structure/prop/hybrisa/misc/floorprops/floorglass3 name = "reinforced glass floor" @@ -1405,7 +1405,7 @@ bound_height = 32 anchored = TRUE density = TRUE - layer = 3.2 + layer = WINDOW_LAYER /obj/structure/prop/hybrisa/misc/slotmachine_broken name = "slot machine" @@ -1416,7 +1416,7 @@ bound_height = 32 anchored = TRUE density = TRUE - layer = 3.2 + layer = WINDOW_LAYER /obj/structure/prop/hybrisa/misc/coffeestuff/coffeemachine1 name = "coffee machine" @@ -1544,61 +1544,61 @@ name = "disposal pipe" /obj/structure/prop/hybrisa/misc/fake/pipes/pipe1 - layer = 2 + layer = TURF_LAYER icon_state = "pipe-s" /obj/structure/prop/hybrisa/misc/fake/pipes/pipe2 - layer = 2 + layer = TURF_LAYER icon_state = "pipe-c" /obj/structure/prop/hybrisa/misc/fake/pipes/pipe3 - layer = 2 + layer = TURF_LAYER icon_state = "pipe-j1" /obj/structure/prop/hybrisa/misc/fake/pipes/pipe4 - layer = 2 + layer = TURF_LAYER icon_state = "pipe-y" /obj/structure/prop/hybrisa/misc/fake/pipes/pipe5 - layer = 2 + layer = TURF_LAYER icon_state = "pipe-b" /obj/structure/prop/hybrisa/misc/fake/wire name = "power cable" /obj/structure/prop/hybrisa/misc/fake/wire/red - layer = 2 + layer = TURF_LAYER icon_state = "intactred" /obj/structure/prop/hybrisa/misc/fake/wire/yellow - layer = 2 + layer = TURF_LAYER icon_state = "intactyellow" /obj/structure/prop/hybrisa/misc/fake/wire/blue - layer = 2 + layer = TURF_LAYER icon_state = "intactblue" /obj/structure/prop/hybrisa/misc/fake/heavydutywire name = "heavy duty wire" /obj/structure/prop/hybrisa/misc/fake/heavydutywire/heavy1 - layer = 2 + layer = TURF_LAYER icon_state = "0-1" /obj/structure/prop/hybrisa/misc/fake/heavydutywire/heavy2 - layer = 2 + layer = TURF_LAYER icon_state = "1-2" /obj/structure/prop/hybrisa/misc/fake/heavydutywire/heavy3 - layer = 2 + layer = TURF_LAYER icon_state = "1-4" /obj/structure/prop/hybrisa/misc/fake/heavydutywire/heavy4 - layer = 2 + layer = TURF_LAYER icon_state = "1-2-4" /obj/structure/prop/hybrisa/misc/fake/heavydutywire/heavy5 - layer = 2 + layer = TURF_LAYER icon_state = "1-2-4-8" /obj/structure/prop/hybrisa/misc/fake/lattice @@ -1606,7 +1606,7 @@ /obj/structure/prop/hybrisa/misc/fake/lattice/full icon_state = "latticefull" - layer = 2 + layer = TURF_LAYER // Cargo Containers extended @@ -1615,16 +1615,6 @@ desc = "a cargo container." icon = 'icons/obj/structures/props/containersextended.dmi' icon_state = "blackwyleft" - bound_width = 32 - bound_height = 32 - density = TRUE - health = 200 - opacity = TRUE - anchored = TRUE - unslashable = TRUE - unacidable = TRUE - layer = 5 - /obj/structure/cargo_container/hybrisa/containersextended/blueleft name = "cargo container" icon_state = "blueleft" @@ -1767,11 +1757,6 @@ unacidable = TRUE indestructible = TRUE -// Grille - -/obj/structure/prop/hybrisa/misc/highvoltagegrille - icon_state = "highvoltagegrille" - // Greeblies /obj/structure/prop/hybrisa/misc/buildinggreeblies name = "machinery" @@ -1782,7 +1767,7 @@ density = TRUE health = 200 anchored = TRUE - layer = 5 + layer = LATTICE_LAYER /obj/structure/prop/hybrisa/misc/buildinggreeblies/greeble1 icon_state = "buildingventbig2" @@ -1907,6 +1892,7 @@ density = TRUE anchored = TRUE +// Phonebox Prop (Doesn't actually work a locker) /obj/structure/prop/hybrisa/misc/phonebox name = "phonebox" desc = "A phone-box, it doesn't seem to be working, the line must be down." diff --git a/code/game/turfs/walls/wall_types.dm b/code/game/turfs/walls/wall_types.dm index 207d1c21d7fc..8dd7e54bab3b 100644 --- a/code/game/turfs/walls/wall_types.dm +++ b/code/game/turfs/walls/wall_types.dm @@ -1333,7 +1333,6 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) desc = "Ancient beyond measure, these walls make up the hull of a vessel of non human origin. Despite this, they can be felled with plastic explosives like any other opaque blocker." hull = 0 - // Hybrisa Wall Types // Derelict Ship @@ -1365,7 +1364,6 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) icon = 'icons/turf/walls/hybrisa_marshalls.dmi' icon_state = "rwall" walltype = WALL_REINFORCED - /turf/closed/wall/hybrisa/marhsalls_unmeltable name = "heavy reinforced wall" desc = "A huge chunk of ultra-reinforced metal used to separate rooms. Looks virtually indestructible." @@ -1375,7 +1373,6 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) hull = TRUE // Research - /turf/closed/wall/hybrisa/research/ribbed //this guy is our reinforced replacement name = "ribbed facility walls" icon = 'icons/turf/walls/hybrisaresearchbrownwall.dmi' @@ -1383,21 +1380,18 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/research name = "bare facility walls" icon = 'icons/turf/walls/hybrisaresearchbrownwall.dmi' icon_state = "strata_bare_outpost_" desc = "A thick and chunky metal wall. The surface is barren and imposing." walltype = WALL_STRATA_OUTPOST_BARE - /turf/closed/wall/hybrisa/research/reinforced name = "ribbed facility walls" icon_state = "strata_ribbed_outpost_" desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/research/reinforced/hull hull = TRUE icon_state = "strata_hull" @@ -1411,28 +1405,24 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/colony name = "bare metal walls" icon = 'icons/turf/walls/hybrisa_colonywall.dmi' icon_state = "strata_bare_outpost_" desc = "A thick and chunky metal wall. The surface is barren and imposing." walltype = WALL_STRATA_OUTPOST_BARE - /turf/closed/wall/hybrisa/colony/reinforced name = "ribbed metal walls" icon_state = "strata_ribbed_outpost_" desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/colony/reinforced/hull hull = TRUE icon_state = "strata_hull" desc = "A thick and chunky metal wall that is, just by virtue of its placement and imposing presence, entirely indestructible." // Hospital - /turf/closed/wall/hybrisa/colony/hospital/ribbed //this guy is our reinforced replacement name = "ribbed metal walls" icon = 'icons/turf/walls/hybrisa_colonywall_hospital.dmi' @@ -1440,21 +1430,18 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/colony/hospital name = "bare metal walls" icon = 'icons/turf/walls/hybrisa_colonywall_hospital.dmi' icon_state = "strata_bare_outpost_" desc = "A thick and chunky metal wall. The surface is barren and imposing." walltype = WALL_STRATA_OUTPOST_BARE - /turf/closed/wall/hybrisa/colony/hospital/reinforced name = "ribbed metal walls" icon_state = "strata_ribbed_outpost_" desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/colony/hospital/reinforced/hull hull = TRUE icon_state = "strata_hull" @@ -1468,21 +1455,18 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/colony/office name = "bare metal walls" icon = 'icons/turf/walls/hybrisa_offices_colonywall.dmi' icon_state = "strata_bare_outpost_" desc = "A thick and chunky metal wall. The surface is barren and imposing." walltype = WALL_STRATA_OUTPOST_BARE - /turf/closed/wall/hybrisa/colony/office/reinforced name = "ribbed metal walls" icon_state = "strata_ribbed_outpost_" desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/colony/office/reinforced/hull hull = 1 icon_state = "strata_hull" @@ -1496,21 +1480,18 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/colony/engineering name = "bare metal walls" icon = 'icons/turf/walls/hybrisa_engineering_wall.dmi' icon_state = "strata_bare_outpost_" desc = "A thick and chunky metal wall. The surface is barren and imposing." walltype = WALL_STRATA_OUTPOST_BARE - /turf/closed/wall/hybrisa/colony/engineering/reinforced name = "ribbed metal walls" icon_state = "strata_ribbed_outpost_" desc = "A thick and chunky metal wall covered in jagged ribs." walltype = WALL_STRATA_OUTPOST_RIBBED damage_cap = HEALTH_WALL_REINFORCED - /turf/closed/wall/hybrisa/colony/engineering/reinforced/hull hull = TRUE icon_state = "strata_hull" @@ -1527,7 +1508,6 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) icon = 'icons/turf/walls/hybrisa_spaceport_walls.dmi' icon_state = "rwall" walltype = WALL_REINFORCED - /turf/closed/wall/hybrisa/spaceport_unmeltable name = "heavy reinforced wall" desc = "A huge chunk of ultra-reinforced metal used to separate rooms. Looks virtually indestructible."