Skip to content

Commit

Permalink
TGS Test Merge (#6831)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinz authored and Kevinz committed Nov 3, 2024
2 parents 3b00765 + f07c5bc commit b96ffeb
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 5 deletions.
1 change: 1 addition & 0 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3319,6 +3319,7 @@
#include "code\modules\mapping\map_injection\map_injection.dm"
#include "code\modules\mapping\map_injection\starting_gear.dm"
#include "code\modules\mapping\spawner\_spawner.dm"
#include "code\modules\mapping\spawner\gateway.dm"
#include "code\modules\mapping\spawner\tcomms_relay.dm"
#include "code\modules\mapping\spawner\window.dm"
#include "code\modules\mapping\templates\engine.dm"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/vv.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@
/// used on /mob as well as /obj/item/organ
#define VV_HK_REMOVE_PHYSIOLOGY_MODIFIER "remove_physiology_mod"

// gateways
#define VV_HK_SETUP_GATEWAY "setup_gateway"

/*
// /obj
#define VV_HK_OSAY "osay"
Expand Down
25 changes: 25 additions & 0 deletions code/modules/gateway/stargate/stargate-station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,28 @@
else
to_chat(user, "<font color='black'>The gate is already calibrated, there is no work for you to do here.</font>")
return

/obj/machinery/gateway/centerstation/proc/admin_setup(/mob/usr)
detect()

awaygate = locate(/obj/machinery/gateway/centeraway)
if(!awaygate) // We still can't find the damn thing because there is no destination.
to_chat(usr, "Unable to locate awaygate (type: /obj/machinery/gateway/centeraway)")
return

awaygate.stationgate = src
awaygate.detect()

wait = 0

toggleon(usr)
awaygate.toggleon(usr)

/obj/machinery/gateway/centerstation/vv_get_dropdown()
. = ..()
VV_DROPDOWN_OPTION(VV_HK_SETUP_GATEWAY, "Setup Gateway")

/obj/machinery/gateway/centerstation/vv_do_topic(list/href_list)
if(href_list[VV_HK_SETUP_GATEWAY] && check_rights(R_FUN))
admin_setup(usr)
. = ..()
12 changes: 12 additions & 0 deletions code/modules/mapping/spawner/gateway.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/obj/spawner/gateway
name = "Gateway map helper"
var/obj/machinery/gateway/centeraway/gw

/obj/spawner/gateway/Spawn()
..()
gw = new(src.loc)
for(var/direction in GLOB.alldirs)
var/obj/machinery/gateway/new_gateway_part = new(get_step(src, direction))
new_gateway_part.dir = direction
gw.detect()
qdel(src)
6 changes: 1 addition & 5 deletions code/modules/mapping/spawner/tcomms_relay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
/obj/spawner/tcomms_relay/autoconnect/Spawn()
..()
var/obj/machinery/telecomms/hub/preset/station_hub
station_hub = locate(/obj/machinery/telecomms/hub/preset/rift) in world
if(!station_hub)
station_hub = locate(/obj/machinery/telecomms/hub/preset/triumph) in world
if(!station_hub)
station_hub = locate(/obj/machinery/telecomms/hub/preset/tether) in world
station_hub = locate(/obj/machinery/telecomms/hub/preset) in world
if(!station_hub)
log_and_message_admins("[src] failed to locate telecoms hub, no autoconnection possible.")
else
Expand Down

0 comments on commit b96ffeb

Please sign in to comment.