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

gateway spawner #6831

Merged
merged 1 commit into from
Nov 3, 2024
Merged
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
1 change: 1 addition & 0 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3317,6 +3317,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
Loading