mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
[MIRROR] You can look into the gateway now (#2516)
* You can look into the gateway now (#55624) Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com> * You can look into the gateway now Co-authored-by: Qustinnus <Floydje123@hotmail.com> Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
This commit is contained in:
co-authored by
Jared-Fogle
Qustinnus
parent
8e435523db
commit
7882d911c0
@@ -53,6 +53,7 @@
|
||||
#define DOOR_HELPER_LAYER 2.71 //keep this above OPEN_DOOR_LAYER
|
||||
#define PROJECTILE_HIT_THRESHHOLD_LAYER 2.75 //projectiles won't hit objects at or below this layer if possible
|
||||
#define TABLE_LAYER 2.8
|
||||
#define GATEWAY_UNDERLAY_LAYER 2.85
|
||||
#define BELOW_OBJ_LAYER 2.9
|
||||
#define LOW_ITEM_LAYER 2.95
|
||||
//#define OBJ_LAYER 3 //For easy recordkeeping; this is a byond define
|
||||
|
||||
@@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
|
||||
name = "gateway"
|
||||
desc = "A mysterious gateway built by unknown hands, it allows for faster than light travel to far-flung locations."
|
||||
icon = 'icons/obj/machines/gateway.dmi'
|
||||
icon_state = "off"
|
||||
icon_state = "portal_frame"
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
// 3x2 offset by one row
|
||||
@@ -171,14 +171,14 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
|
||||
var/datum/gateway_destination/target
|
||||
/// bumper object, the thing that starts actual teleport
|
||||
var/obj/effect/gateway_portal_bumper/portal
|
||||
/// icon when off
|
||||
var/icon_off = "off"
|
||||
/// icon when on
|
||||
var/icon_on = "on"
|
||||
/// Visual object for handling the viscontents
|
||||
var/obj/effect/gateway_portal_effect/portal_visuals
|
||||
|
||||
/obj/machinery/gateway/Initialize()
|
||||
generate_destination()
|
||||
update_icon()
|
||||
portal_visuals = new
|
||||
vis_contents += portal_visuals
|
||||
return ..()
|
||||
|
||||
/obj/machinery/gateway/proc/generate_destination()
|
||||
@@ -194,19 +194,13 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
|
||||
QDEL_NULL(portal)
|
||||
use_power = IDLE_POWER_USE
|
||||
update_icon()
|
||||
portal_visuals.reset_visuals()
|
||||
|
||||
/obj/machinery/gateway/process()
|
||||
if((machine_stat & (NOPOWER)) && use_power)
|
||||
if(target)
|
||||
deactivate()
|
||||
return
|
||||
|
||||
/obj/machinery/gateway/update_icon_state()
|
||||
if(target)
|
||||
icon_state = icon_on
|
||||
else
|
||||
icon_state = icon_off
|
||||
|
||||
/obj/machinery/gateway/safe_throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE)
|
||||
return
|
||||
|
||||
@@ -219,6 +213,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
|
||||
return
|
||||
target = D
|
||||
target.activate(destination)
|
||||
portal_visuals.setup_visuals(target)
|
||||
generate_bumper()
|
||||
use_power = ACTIVE_POWER_USE
|
||||
update_icon()
|
||||
@@ -327,3 +322,39 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
|
||||
/obj/item/paper/fluff/gateway
|
||||
info = "Congratulations,<br><br>Your station has been selected to carry out the Gateway Project.<br><br>The equipment will be shipped to you at the start of the next quarter.<br> You are to prepare a secure location to house the equipment as outlined in the attached documents.<br><br>--Nanotrasen Bluespace Research"
|
||||
name = "Confidential Correspondence, Pg 1"
|
||||
|
||||
/obj/effect/gateway_portal_effect
|
||||
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
vis_flags = VIS_INHERIT_ID
|
||||
layer = GATEWAY_UNDERLAY_LAYER //Slightly lower than gateway itself
|
||||
var/alpha_icon = 'icons/obj/machines/gateway.dmi'
|
||||
var/alpha_icon_state = "portal_mask"
|
||||
var/datum/gateway_destination/our_destination
|
||||
|
||||
|
||||
/obj/effect/gateway_portal_effect/proc/setup_visuals(datum/gateway_destination/D)
|
||||
our_destination = D
|
||||
update_portal_filters()
|
||||
|
||||
/obj/effect/gateway_portal_effect/proc/reset_visuals()
|
||||
our_destination = null
|
||||
update_portal_filters()
|
||||
|
||||
/obj/effect/gateway_portal_effect/proc/update_portal_filters()
|
||||
clear_filters()
|
||||
vis_contents = null
|
||||
|
||||
if(!our_destination)
|
||||
return
|
||||
|
||||
|
||||
add_filter("portal_alpha", 1, list("type" = "alpha", "icon" = icon(alpha_icon, alpha_icon_state), "x" = 32, "y" = 32))
|
||||
add_filter("portal_blur", 1, list("type" = "blur", "size" = 0.5))
|
||||
add_filter("portal_ripple", 1, list("type" = "ripple", "size" = 2, "radius" = 1, "falloff" = 1, "y" = 7))
|
||||
|
||||
animate(get_filter("portal_ripple"), time = 1.3 SECONDS, loop = -1, easing = LINEAR_EASING, radius = 32)
|
||||
|
||||
var/turf/center_turf = our_destination.get_target_turf()
|
||||
|
||||
vis_contents += block(locate(center_turf.x - 1, center_turf.y - 1, center_turf.z), locate(center_turf.x + 1, center_turf.y + 1, center_turf.z))
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
layer = LIGHTING_LAYER
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
vis_flags = VIS_HIDE
|
||||
|
||||
var/needs_update = FALSE
|
||||
var/turf/myturf
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user