mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Gateway fixes (#6270)
* AAAAAAAAAAA * Whoops, forgot a few things * Update black_mesa.dm * Update black_mesa.dm
This commit is contained in:
@@ -174,6 +174,19 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
|
||||
/// Visual object for handling the viscontents
|
||||
var/obj/effect/gateway_portal_effect/portal_visuals
|
||||
|
||||
//SKYRAT EDIT ADDITION
|
||||
var/requires_key = FALSE
|
||||
var/key_used = FALSE
|
||||
|
||||
/obj/machinery/gateway/attacked_by(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
if(istype(I, /obj/item/key/gateway) && requires_key)
|
||||
to_chat(user, "<span class='notice'>You insert [src] into the keyway, unlocking the gateway!</span>")
|
||||
key_used = TRUE
|
||||
qdel(I)
|
||||
return
|
||||
//SKYRAT EDIT END
|
||||
|
||||
/obj/machinery/gateway/Initialize()
|
||||
generate_destination()
|
||||
update_appearance()
|
||||
@@ -218,6 +231,10 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
|
||||
/obj/machinery/gateway/proc/activate(datum/gateway_destination/D)
|
||||
if(!powered() || target)
|
||||
return
|
||||
//SKYRAT EDIT ADDITION
|
||||
if(requires_key && !key_used)
|
||||
return
|
||||
//SKYRAT EDIT END
|
||||
target = D
|
||||
target.activate(destination)
|
||||
portal_visuals.setup_visuals(target)
|
||||
@@ -261,6 +278,10 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
|
||||
|
||||
/obj/machinery/gateway/away/interact(mob/user, special_state)
|
||||
. = ..()
|
||||
//SKYRAT EDIT ADDITION
|
||||
if(!ishuman(user))
|
||||
return
|
||||
//SKYRAT EDIT END
|
||||
if(!target)
|
||||
if(!GLOB.the_gateway)
|
||||
to_chat(user,"<span class='warning'>Home gateway is not responding!</span>")
|
||||
|
||||
@@ -242,6 +242,8 @@
|
||||
base_pixel_y = -154
|
||||
speed = 3
|
||||
pixel_y = -154
|
||||
bound_height = 64
|
||||
bound_width = 64
|
||||
icon_dead = "bullsquid_dead"
|
||||
maxHealth = 3000
|
||||
health = 3000
|
||||
@@ -259,7 +261,7 @@
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
status_flags = NONE
|
||||
del_on_death = TRUE
|
||||
loot = list(/obj/effect/gibspawner/xeno, /obj/item/stack/sheet/bluespace_crystal/fifty, /obj/item/key/gateway/home)
|
||||
loot = list(/obj/effect/gibspawner/xeno, /obj/item/stack/sheet/bluespace_crystal/fifty, /obj/item/key/gateway)
|
||||
|
||||
/obj/item/stack/sheet/bluespace_crystal/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -1,33 +1,8 @@
|
||||
/obj/item/key/gateway
|
||||
name = "\improper gateway key"
|
||||
desc = "description"
|
||||
icon = 'modular_skyrat/modules/awaymissions_skyrat/icons/abductorkey.dmi'
|
||||
icon_state = "gateway_key"
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
var/datum/gateway_destination/target
|
||||
var/use_once = TRUE
|
||||
var/used = FALSE
|
||||
var/inactive_gateway_only = TRUE
|
||||
|
||||
/obj/item/key/gateway/home
|
||||
name = "\improper Global Recall Key"
|
||||
desc = "Recall to the Global Gateway."
|
||||
icon = 'modular_skyrat/modules/awaymissions_skyrat/icons/abductorkey.dmi'
|
||||
icon_state = "gateway_key"
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
|
||||
/obj/item/key/gateway/home/Initialize()
|
||||
. = ..()
|
||||
target = GLOB.the_gateway.destination
|
||||
|
||||
/obj/item/key/gateway/pre_attack(atom/A, mob/living/user, params)
|
||||
if(src.used && src.use_once)
|
||||
return
|
||||
if(istype(A,/obj/machinery/gateway))
|
||||
var/obj/machinery/gateway/gate = A
|
||||
if(gate.target)
|
||||
if(src.inactive_gateway_only)
|
||||
return
|
||||
gate.deactivate()
|
||||
gate.activate(src.target)
|
||||
src.used = TRUE
|
||||
else return ..()
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
desc = "A seemingly complicated gun, that isn't so complicated after all."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
|
||||
|
||||
/obj/item/gun/energy/alien/zeta
|
||||
name = "Zeta Blaster"
|
||||
@@ -347,6 +347,6 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/hierophant/astrum/death(gibbed)
|
||||
spawn_gibs()
|
||||
spawn_gibs()
|
||||
new /obj/item/key/gateway/home(src.loc)
|
||||
new /obj/item/key/gateway(src.loc)
|
||||
new/obj/item/gun/energy/alien/zeta(src.loc)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user