Skip to content

Commit

Permalink
changes king goat arena to use the portal landmark system (#49735)
Browse files Browse the repository at this point in the history
About The Pull Request

Permanent portals no longer randomly select a portal to use as their exit, and instead stick with the first one they find, they're supposed to only have one linked portal anyways.

Adds a portal exit landmark, one-way portals use this to define their exit as opposed to the weird as hell and pointless portal deletion system I was using before, also nice for mapping since they have different icons so you can more easily tell which is which.

Adds One-Use portals, they're just one-way portals that delete after they're used, was requested for a reference off-station thing someone was making, probably also useful for things like mobs that die and spawn portals to an area, most likely will be used in ice moon.

Goat ruin was the only thing using the permanent portal system for ruins so far since VR hub got removed, so I just moved that over to use the landmarks.
Why It's Good For The Game

The old code is garbage I wrote like a year ago because it was packaged with VR hub, and someone added copy-pasta at some point, absolutely terrible. This cuts down on a lot.
Changelog

🆑
refactor: Permanent Portal fixes and One-Way Portal improvements for mapping.
/🆑
  • Loading branch information
Whoneedspacee authored Mar 16, 2020
1 parent 388269e commit 03bfbaa
Show file tree
Hide file tree
Showing 4 changed files with 237 additions and 262 deletions.
8 changes: 3 additions & 5 deletions _maps/RandomRuins/SpaceRuins/kinggoatarena.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
/turf/open/indestructible/diamond,
/area/ruin/powered/kinggoat_arena)
"e" = (
/obj/effect/portal/permanent/one_way/destroy{
id = "king goat arena";
name = "king goat arena portal";
teleport_channel = "free"
/obj/effect/landmark/portal_exit{
id = "king goat arena"
},
/turf/open/indestructible/diamond,
/area/ruin/powered/kinggoat_arena)
Expand Down Expand Up @@ -51,7 +49,7 @@
/turf/open/indestructible/gold,
/area/ruin/powered/kinggoat_arena)
"j" = (
/obj/effect/portal/permanent/one_way/keep{
/obj/effect/portal/permanent/one_way{
id = "king goat arena";
name = "king goat arena portal";
teleport_channel = "free"
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/effects/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -425,3 +425,9 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
GLOB.ruin_landmarks -= src
ruin_template = null
. = ..()

// handled in portals.dm, id connected to one-way portal
/obj/effect/landmark/portal_exit
name = "portal exit"
icon_state = "portal_exit"
var/id
Loading

0 comments on commit 03bfbaa

Please sign in to comment.