Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modular Battery || MESS | SMES replacement #89

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 60 additions & 28 deletions _maps/map_files/ColonyStation/ColonyStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1015,12 +1015,6 @@
/obj/machinery/power/neutron_inj,
/turf/open/floor/plasteel/dark,
/area/engine/engineering)
"cG" = (
/obj/structure/cable{
icon_state = "2-4"
},
/turf/open/floor/plasteel/dark,
/area/engine/engineering)
"cH" = (
/obj/machinery/power/fusion_gen,
/obj/structure/cable{
Expand Down Expand Up @@ -1347,12 +1341,8 @@
/area/engine/engineering)
"dt" = (
/obj/structure/table/reinforced,
/obj/item/disk/fuel_mix/default{

},
/obj/item/disk/fuel_mix/default{

},
/obj/item/disk/fuel_mix/default,
/obj/item/disk/fuel_mix/default,
/turf/open/floor/plasteel,
/area/engine/engineering)
"du" = (
Expand Down Expand Up @@ -1385,9 +1375,7 @@
/turf/open/floor/wood,
/area/crew_quarters/lounge)
"dy" = (
/obj/structure/sink/kitchen{

},
/obj/structure/sink/kitchen,
/turf/open/floor/wood,
/area/crew_quarters/lounge)
"dz" = (
Expand Down Expand Up @@ -14687,9 +14675,7 @@
/turf/open/floor/wood,
/area/crew_quarters/bar)
"IZ" = (
/obj/item/instrument/eguitar{

},
/obj/item/instrument/eguitar,
/obj/item/instrument/guitar,
/obj/structure/table/wood,
/obj/machinery/light,
Expand Down Expand Up @@ -15153,6 +15139,52 @@
/obj/item/disk/fuel_mix/default,
/turf/open/floor/plasteel,
/area/storage/tech)
"OY" = (
/obj/machinery/power/battery_bank_section/right,
/turf/open/floor/plasteel/dark,
/area/engine/engineering)
"Rl" = (
/obj/structure/cable{
icon_state = "4-8"
},
/obj/structure/cable{
icon_state = "2-8"
},
/turf/open/floor/plating,
/area/maintenance/port)
"Ro" = (
/obj/structure/cable{
icon_state = "1-2"
},
/turf/closed/wall/r_wall,
/area/engine/engineering)
"Rp" = (
/obj/machinery/power/terminal{
dir = 1
},
/obj/structure/cable{
icon_state = "0-4"
},
/turf/open/floor/plasteel/dark,
/area/engine/engineering)
"Tk" = (
/obj/structure/cable{
icon_state = "4-8"
},
/turf/open/floor/plasteel/dark,
/area/engine/engineering)
"ZQ" = (
/obj/machinery/light{
dir = 1
},
/obj/machinery/power/battery_bank,
/obj/structure/cable,
/turf/open/floor/plasteel/dark,
/area/engine/engineering)
"ZV" = (
/obj/machinery/power/battery_bank_section/left,
/turf/open/floor/plasteel/dark,
/area/engine/engineering)

(1,1,1) = {"
ad
Expand Down Expand Up @@ -36355,7 +36387,7 @@ ax
aH
vy
cD
cE
ZV
cE
cE
cE
Expand Down Expand Up @@ -36610,10 +36642,10 @@ ad
ad
ax
aH
vy
cD
Fd
cE
Rl
Ro
ZQ
Rp
cE
cE
cE
Expand Down Expand Up @@ -36869,8 +36901,8 @@ ax
aH
vy
cD
cE
cE
OY
Tk
cE
cE
cE
Expand Down Expand Up @@ -37127,7 +37159,7 @@ aH
vy
cD
cE
cE
Tk
cE
cE
cE
Expand Down Expand Up @@ -37384,8 +37416,8 @@ aH
vy
cD
cE
cE
cG
cP
cL
cJ
cL
cJ
Expand Down
8 changes: 8 additions & 0 deletions code/game/gamemodes/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
S.output_attempt = FALSE
S.update_icon()
S.power_change()
for(var/obj/machinery/power/battery_bank/S in GLOB.machines)
if(istype(get_area(S), /area/ai_monitored/turret_protected) || !is_station_level(S.z))
continue
S.output_level = 0
S.output_on = FALSE
S.update_icon()
S.power_change()


for(var/area/A in GLOB.the_station_areas)
if(!A.requires_power || A.always_unpowered )
Expand Down
6 changes: 2 additions & 4 deletions code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@

/datum/gas_mixture/immutable/planet/populate()
if(!SSterraforming)
message_admins("no SS")
return
if(!SSterraforming.atmos)
message_admins("no atmos")
return
message_admins(SSterraforming.atmos.getSpecificAtmos("o2"))

set_moles(/datum/gas/oxygen, SSterraforming.atmos.getSpecificAtmos("o2"))
set_moles(/datum/gas/nitrogen, SSterraforming.atmos.getSpecificAtmos("n2"))
set_moles(/datum/gas/carbon_dioxide, SSterraforming.atmos.getSpecificAtmos("co2"))
set_moles(/datum/gas/nitrous_oxide, SSterraforming.atmos.getSpecificAtmos("n2o"))
set_moles(/datum/gas/plasma, SSterraforming.atmos.getSpecificAtmos("plasma"))
set_moles(/datum/gas/plasma, SSterraforming.atmos.getSpecificAtmos("plasma"))
2 changes: 2 additions & 0 deletions code/modules/power/powernet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
if(netexcess > 100 && nodes && nodes.len) // if there was excess power last cycle
for(var/obj/machinery/power/smes/S in nodes) // find the SMESes in the network
S.restore() // and restore some of the power that was used
for(var/obj/machinery/power/battery_bank/B in nodes) // find the SMESes in the network
B.restore() // and restore some of the power that was used

// update power consoles
viewavail = round(0.8 * viewavail + 0.2 * avail)
Expand Down
5 changes: 5 additions & 0 deletions code/modules/power/terminal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
if(panel_open)
. = TRUE

/obj/machinery/power/battery_bank/can_terminal_dismantle()
. = FALSE
if(panel_open)
. = TRUE


/obj/machinery/power/terminal/proc/dismantle(mob/living/user, obj/item/I)
if(isturf(loc))
Expand Down
Loading