mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-29 00:00:19 +01:00
ic quick spawn revamped (#19)
This commit is contained in:
@@ -8,7 +8,9 @@
|
||||
// no_effects: disable the default effectin/effectout of sparks
|
||||
// forceMove: if false, teleport will use Move() proc (dense objects will prevent teleportation)
|
||||
// forced: whether or not to ignore no_teleport
|
||||
/proc/do_teleport(atom/movable/teleatom, atom/destination, precision=null, forceMove = TRUE, datum/effect_system/effectin=null, datum/effect_system/effectout=null, asoundin=null, asoundout=null, no_effects=FALSE, channel=TELEPORT_CHANNEL_BLUESPACE, forced = FALSE)
|
||||
|
||||
// Skyrat Change
|
||||
/proc/do_teleport(atom/movable/teleatom, atom/destination, precision=null, forceMove = TRUE, datum/effect_system/effectin=null, datum/effect_system/effectout=null, asoundin=null, asoundout=null, no_effects=FALSE, channel=TELEPORT_CHANNEL_BLUESPACE, forced = FALSE, effects_multiplier = 1)
|
||||
// teleporting most effects just deletes them
|
||||
var/static/list/delete_atoms = typecacheof(list(
|
||||
/obj/effect,
|
||||
@@ -42,7 +44,7 @@
|
||||
// if effects are not specified and not explicitly disabled, sparks
|
||||
if ((!effectin || !effectout) && !no_effects)
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(5, 1, teleatom)
|
||||
sparks.set_up(5 * effects_multiplier, 1, teleatom) // Skyrat change
|
||||
if (!effectin)
|
||||
effectin = sparks
|
||||
if (!effectout)
|
||||
@@ -51,7 +53,7 @@
|
||||
// if effects are not specified and not explicitly disabled, rainbow sparks
|
||||
if ((!effectin || !effectout) && !no_effects)
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new
|
||||
sparks.set_up(5, 1, teleatom)
|
||||
sparks.set_up(5 * effects_multiplier, 1, teleatom) // Skyrat change
|
||||
if (!effectin)
|
||||
effectin = sparks
|
||||
if (!effectout)
|
||||
|
||||
@@ -502,7 +502,7 @@
|
||||
dresscode = outfits[dresscode]
|
||||
|
||||
if(dresscode == "Cancel")
|
||||
return
|
||||
return FALSE // Skyrat change
|
||||
|
||||
if (dresscode == "As Job...")
|
||||
var/list/job_paths = subtypesof(/datum/outfit/job)
|
||||
|
||||
@@ -136,6 +136,11 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
show_data_huds()
|
||||
data_huds_on = 1
|
||||
|
||||
// Skyrat change START
|
||||
RegisterSignal(src, COMSIG_CLICK_CTRL_SHIFT, .proc/on_click_ctrl_shift)
|
||||
RegisterSignal(src, COMSIG_CLICK_CTRL, .proc/on_click_ctrl)
|
||||
// Skyrat change END
|
||||
|
||||
/mob/dead/observer/get_photo_description(obj/item/camera/camera)
|
||||
if(!invisibility || camera.see_ghosts)
|
||||
return "You can also see a g-g-g-g-ghooooost!"
|
||||
@@ -903,9 +908,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
else
|
||||
to_chat(usr, "Can't become a pAI candidate while not dead!")
|
||||
|
||||
// Skyrat change - moved to modular/signals.
|
||||
/*
|
||||
/mob/dead/observer/CtrlShiftClick(mob/user)
|
||||
if(isobserver(user) && check_rights(R_SPAWN))
|
||||
change_mob_type( /mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
|
||||
*/
|
||||
|
||||
/mob/dead/observer/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,53 @@
|
||||
/mob/dead/observer/proc/on_click_ctrl_shift(mob/user)
|
||||
if(isobserver(user) && check_rights(R_SPAWN))
|
||||
change_mob_type( /mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
|
||||
|
||||
/mob/dead/observer/proc/on_click_ctrl(mob/user)
|
||||
quickicspawn(user)
|
||||
|
||||
/mob/dead/observer/proc/quickicspawn(mob/user)
|
||||
if(isobserver(user) && check_rights(R_SPAWN))
|
||||
var/teleport_option = alert(src, "How would you like to be spawned in?","IC Quick Spawn","Bluespace","Droppod", "Cancel")
|
||||
if (teleport_option == "Cancel")
|
||||
return
|
||||
var/dresscode = client.robust_dress_shop()
|
||||
if (!dresscode)
|
||||
return
|
||||
var/grant_spell = alert(src, "Do you want to get the 'Return' spell?","IC Quick Spawn","Yes","No")
|
||||
|
||||
var/turf/current_turf = get_turf(src)
|
||||
var/mob/living/carbon/human/spawned_player = new(src)
|
||||
|
||||
if (teleport_option == "Bluespace")
|
||||
playsound(spawned_player, 'sound/magic/Disable_Tech.ogg', 100, 1)
|
||||
|
||||
if(mind && isliving(spawned_player))
|
||||
mind.transfer_to(spawned_player, 1) // second argument to force key move to new mob
|
||||
else
|
||||
transfer_ckey(spawned_player)
|
||||
|
||||
if(grant_spell != "No")
|
||||
spawned_player.mind.AddSpell(new /obj/effect/proc_holder/spell/self/return_back)
|
||||
|
||||
if(dresscode != "Naked")
|
||||
spawned_player.equipOutfit(dresscode)
|
||||
|
||||
switch(teleport_option)
|
||||
if("Bluespace")
|
||||
spawned_player.forceMove(current_turf)
|
||||
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new
|
||||
sparks.set_up(10, 1, spawned_player)
|
||||
sparks.attach(get_turf(spawned_player))
|
||||
sparks.start()
|
||||
if("Droppod")
|
||||
var/obj/structure/closet/supplypod/empty_pod = new()
|
||||
|
||||
empty_pod.style = STYLE_BLUESPACE
|
||||
empty_pod.bluespace = TRUE
|
||||
empty_pod.explosionSize = list(0,0,0,0)
|
||||
empty_pod.desc = "A sleek, and slightly worn bluespace pod - its probably seen many deliveries..."
|
||||
|
||||
spawned_player.forceMove(empty_pod)
|
||||
|
||||
new /obj/effect/abstract/DPtarget(current_turf, empty_pod)
|
||||
@@ -0,0 +1,31 @@
|
||||
/obj/effect/proc_holder/spell/self/return_back // Admin only spell, teleports and deletes the body, ghosting the user.
|
||||
name = "Return"
|
||||
desc = "Activates your return beacon."
|
||||
mobs_whitelist = list(/mob/living/carbon/human)
|
||||
clothes_req = NONE
|
||||
charge_max = 1
|
||||
cooldown_min = 1
|
||||
|
||||
invocation = "Return on!" // pls someone get reference <3
|
||||
invocation_type = "whisper"
|
||||
school = "evocation"
|
||||
action_icon_state = "exitstate"
|
||||
|
||||
/obj/effect/proc_holder/spell/self/return_back/cast(mob/living/carbon/human/user)
|
||||
user.mind.RemoveSpell(src)
|
||||
|
||||
playsound(get_turf(user.loc), 'sound/magic/Repulse.ogg', 100, 1)
|
||||
|
||||
var/mob/dead/observer/ghost = user.ghostize(1, voluntary = TRUE)
|
||||
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new
|
||||
sparks.set_up(10, 1, user)
|
||||
sparks.attach(user.loc)
|
||||
sparks.start()
|
||||
|
||||
qdel(user)
|
||||
|
||||
// Get them back to their regular name.
|
||||
ghost.set_ghost_appearance()
|
||||
if(ghost.client && ghost.client.prefs)
|
||||
ghost.deadchat_name = ghost.client.prefs.real_name
|
||||
@@ -3518,6 +3518,7 @@
|
||||
#include "sandcode\code\modules\language\language.dm"
|
||||
#include "sandcode\code\modules\misc\misc.dm"
|
||||
#include "sandcode\code\modules\mob\emote.dm"
|
||||
#include "sandcode\code\modules\mob\dead\observer\observer.dm"
|
||||
#include "sandcode\code\modules\mob\living\give.dm"
|
||||
#include "sandcode\code\modules\mob\living\simple_animal\hostile\megafauna\drake.dm"
|
||||
#include "sandcode\code\modules\mob\living\simple_animal\hostile\megafauna\sand.dm"
|
||||
@@ -3536,6 +3537,7 @@
|
||||
#include "sandcode\code\modules\research\techweb\all_nodes.dm"
|
||||
#include "sandcode\code\modules\research\techweb\bluespace_nodes.dm"
|
||||
#include "sandcode\code\modules\shuttle\spaceship_navigation_beacon.dm"
|
||||
#include "sandcode\code\modules\spells\spell.dm"
|
||||
#include "sandcode\code\modules\spells\spell_types\shapeshift.dm"
|
||||
#include "sandcode\code\modules\surgery\organs\augments_arms.dm"
|
||||
#include "sandcode\code\modules\telescience\telepad.dm"
|
||||
|
||||
Reference in New Issue
Block a user