Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit c99fe8a

Browse files
authored
Fixes the lavaland mainframe, once and for all (#22977)
1 parent cb01f40 commit c99fe8a

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

_maps/map_files/DonutStation/DonutStation.dmm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10160,6 +10160,7 @@
1016010160
dir = 1;
1016110161
network = list("ss13","Research")
1016210162
},
10163+
/obj/machinery/sci_bombardment,
1016310164
/turf/open/floor/plasteel,
1016410165
/area/science/research)
1016510166
"ecW" = (

_maps/map_files/MiniStation/MiniStation.dmm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16723,6 +16723,7 @@
1672316723
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer2{
1672416724
dir = 8
1672516725
},
16726+
/obj/machinery/sci_bombardment,
1672616727
/turf/open/floor/plasteel,
1672716728
/area/science/mixing)
1672816729
"fZr" = (

code/game/machinery/sci_bombardment.dm

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
if(!ui)
157157
ui = new(user, src, "Lam", name)
158158
ui.open()
159+
ui.set_autoupdate(TRUE)
159160

160161
/obj/machinery/sci_bombardment/ui_data(mob/user)
161162
var/list/data = list()
@@ -173,9 +174,14 @@
173174
var/list/signals = list()
174175
data["signals"] = list()
175176

176-
for(var/datum/component/gps/G in GLOB.GPS_list) //nulls on the list somehow
177-
var/turf/pos = get_turf_global(G) // yogs - get_turf_global instead of get_turf
178-
if(G.emped || !G.tracking || pos.z != lavaland)
177+
for(var/gps in GLOB.GPS_list)
178+
var/datum/component/gps/G = gps
179+
if(G.emped || !G.tracking)
180+
continue
181+
var/turf/pos = get_turf(G.parent)
182+
if(!pos)
183+
continue
184+
if(!is_mining_level(pos.z))
179185
continue
180186
var/list/signal = list()
181187
signal["entrytag"] = G.gpstag //GPS name
@@ -229,9 +235,13 @@
229235
if (!stopcount)
230236
radio.talk_into(src, "Beginning launch on coordinates [tcoords]. ETA: [countdown] seconds.",)
231237
tick = countdown + 1
238+
message_admins("Lavaland artillery mainframe at [ADMIN_VERBOSEJMP(src)] will launch a TTV at GPS signal [targetdest] [ADMIN_COORDJMP(dest)] in [countdown] seconds. Launch sequence started by [ADMIN_LOOKUPFLW(usr)]")
239+
log_bomber(usr, "started a launch sequence of a", src, "which will launch at GPS signal [targetdest] [ADMIN_COORDJMP(dest)] in [countdown] seconds", FALSE)
232240
countdown()
233241
else
234242
radio.talk_into(src, "Launch sequence aborted by [usr]. Adjusting mainframe...",)
243+
message_admins("Launch sequence of a TTV by the lavaland artillery mainframe at [ADMIN_VERBOSEJMP(src)] was aborted by [ADMIN_FLW(usr)].")
244+
log_bomber(usr, "aborted a launch sequence of a", src, null, FALSE)
235245
reset_lam()
236246
. = TRUE
237247
if("target")//Acknowledges GPS signal selected by user and saves it as place to send TTV
@@ -240,8 +250,10 @@
240250
targetdest = params["targetdest"]
241251
tcoords = params["tcoords"]
242252
for(var/gps in GLOB.GPS_list)
243-
var/obj/item/gps/T = gps
244-
var/turf/pos = get_turf_global(T) // yogs - get_turf_global instead of get_turf
253+
var/datum/component/gps/T = gps
254+
var/turf/pos = get_turf(T.parent)
255+
if(!pos)
256+
continue
245257
if(T.gpstag == targetdest && "[pos.x], [pos.y], [pos.z]" == tcoords)
246258
dest = pos
247259
break
@@ -250,7 +262,8 @@
250262
targetdest = initial(targetdest)
251263
tcoords = initial(tcoords)
252264
. = TRUE
253-
radio.talk_into(src, "Target set to [targetdest] at coordinates [tcoords]. [tcoords ? "Adjusting mainframe..." : ""]",)
265+
radio.talk_into(src, "Target set to [targetdest][tcoords ? " at coordinates [tcoords]." : "."][tcoords ? " Adjusting mainframe..." : ""]")
266+
log_bomber(usr, "set the target of a", src, "to fire at GPS signal [targetdest] [ADMIN_COORDJMP(dest)]", FALSE)
254267
playsound(src, 'sound/effects/servostep.ogg', 100, 1)
255268
reset_lam()
256269
. = TRUE

0 commit comments

Comments
 (0)