mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Revert "Atoms can now be stationloving" (#24903)
* Revert "Bulletproof(Tactical) Armour + Vest Defence Tweak (#24816)" This reverts commit6ab7ba871f. * Revert "Automatic changelog generation for PR #24810 [ci skip]" This reverts commit1cd117afd6. * Revert "Stacks automatically merge on Initialize (#24810)" This reverts commit6e39f5cf00. * Revert "Automatic changelog generation for PR #24794 [ci skip]" This reverts commit62a2ef30dd. * Revert "Wizards can now Summon Ghosts (#24794)" This reverts commit473561c0be. * Revert "Automatic changelog generation for PR #24791 [ci skip]" This reverts commitb2aeef06d0. * Revert "Compiles in Lavaland (#24791)" This reverts commit272cc34008. * Revert "Forcefield Projector (#24790)" This reverts commit4b2ffcffe8. * Revert "Atoms can now be stationloving (#24748)" This reverts commit60f7c1df3f.
This commit is contained in:
committed by
oranges
parent
6ab7ba871f
commit
d3b5f0e97c
@@ -35,8 +35,6 @@
|
||||
#define NO_EMP_WIRES "no_emp_wires"
|
||||
#define HOLOGRAM "hologram"
|
||||
#define FROZEN "frozen"
|
||||
#define STATIONLOVING "stationloving"
|
||||
#define INFORM_ADMINS_ON_RELOCATE "inform_admins_on_relocate"
|
||||
|
||||
//turf-only flags
|
||||
#define NOJAUNT 1
|
||||
|
||||
@@ -392,4 +392,4 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define TURF_DECAL_DIRT "dirt"
|
||||
|
||||
//Error handler defines
|
||||
#define ERROR_USEFUL_LEN 2
|
||||
#define ERROR_USEFUL_LEN 2
|
||||
@@ -1,32 +0,0 @@
|
||||
var/datum/controller/subsystem/objects/SSinbounds
|
||||
/datum/controller/subsystem/inbounds
|
||||
name = "Inbounds"
|
||||
priority = 40
|
||||
flags = SS_NO_INIT
|
||||
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/inbounds/New()
|
||||
NEW_SS_GLOBAL(SSinbounds)
|
||||
/datum/controller/subsystem/inbounds/stat_entry()
|
||||
..("P:[processing.len]")
|
||||
|
||||
/datum/controller/subsystem/inbounds/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = processing.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
while(currentrun.len)
|
||||
var/atom/movable/thing = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(thing)
|
||||
thing.check_in_bounds(wait)
|
||||
else
|
||||
SSinbounds.processing -= thing
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/inbounds/Recover()
|
||||
processing = SSinbounds.processing
|
||||
@@ -101,26 +101,7 @@
|
||||
orbiting.Check()
|
||||
return 1
|
||||
|
||||
/atom/movable/Destroy(force)
|
||||
var/inform_admins = HAS_SECONDARY_FLAG(src, INFORM_ADMINS_ON_RELOCATE)
|
||||
var/stationloving = HAS_SECONDARY_FLAG(src, STATIONLOVING)
|
||||
|
||||
if(inform_admins && force)
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[src] has been !!force deleted!! in [ADMIN_COORDJMP(T)].")
|
||||
log_game("[src] has been !!force deleted!! in [COORD(T)].")
|
||||
|
||||
if(stationloving && !force)
|
||||
var/turf/currentturf = get_turf(src)
|
||||
var/turf/targetturf = relocate()
|
||||
log_game("[src] has been destroyed in [COORD(currentturf)]. Moving it to [COORD(targetturf)].")
|
||||
if(inform_admins)
|
||||
message_admins("[src] has been destroyed in [ADMIN_COORDJMP(currentturf)]. Moving it to [ADMIN_COORDJMP(targetturf)].")
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
if(stationloving && force)
|
||||
STOP_PROCESSING(SSinbounds, src)
|
||||
|
||||
/atom/movable/Destroy()
|
||||
. = ..()
|
||||
if(loc)
|
||||
loc.handle_atom_del(src)
|
||||
@@ -439,78 +420,3 @@
|
||||
else if (!on && floating)
|
||||
animate(src, pixel_y = initial(pixel_y), time = 10)
|
||||
floating = FALSE
|
||||
|
||||
/* Stationloving
|
||||
*
|
||||
* A stationloving atom will always teleport back to the station
|
||||
* if it ever leaves the station z-levels or Centcom. It will also,
|
||||
* when Destroy() is called, will teleport to a random turf on the
|
||||
* station.
|
||||
*
|
||||
* The turf is guaranteed to be "safe" for normal humans, probably.
|
||||
* If the station is SUPER SMASHED UP, it might not work.
|
||||
*
|
||||
* Here are some important procs:
|
||||
* relocate()
|
||||
* moves the atom to a safe turf on the station
|
||||
*
|
||||
* check_in_bounds()
|
||||
* regularly called and checks if `in_bounds()` returns true. If false, it
|
||||
* triggers a `relocate()`.
|
||||
*
|
||||
* in_bounds()
|
||||
* By default, checks that the atom's z is the station z or centcom.
|
||||
*/
|
||||
|
||||
/atom/movable/proc/set_stationloving(state, inform_admins=FALSE)
|
||||
var/currently = HAS_SECONDARY_FLAG(src, STATIONLOVING)
|
||||
|
||||
if(inform_admins)
|
||||
SET_SECONDARY_FLAG(src, INFORM_ADMINS_ON_RELOCATE)
|
||||
else
|
||||
CLEAR_SECONDARY_FLAG(src, INFORM_ADMINS_ON_RELOCATE)
|
||||
|
||||
if(state == currently)
|
||||
return
|
||||
else if(!state)
|
||||
STOP_PROCESSING(SSinbounds, src)
|
||||
CLEAR_SECONDARY_FLAG(src, STATIONLOVING)
|
||||
else
|
||||
START_PROCESSING(SSinbounds, src)
|
||||
SET_SECONDARY_FLAG(src, STATIONLOVING)
|
||||
|
||||
/atom/movable/proc/relocate()
|
||||
var/targetturf = find_safe_turf(ZLEVEL_STATION)
|
||||
if(!targetturf)
|
||||
if(blobstart.len > 0)
|
||||
targetturf = get_turf(pick(blobstart))
|
||||
else
|
||||
throw EXCEPTION("Unable to find a blobstart landmark")
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.transferItemToLoc(src, targetturf, TRUE) //nodrops disks when?
|
||||
else if(istype(loc, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = loc
|
||||
S.remove_from_storage(src, targetturf)
|
||||
else
|
||||
forceMove(targetturf)
|
||||
// move the disc, so ghosts remain orbiting it even if it's "destroyed"
|
||||
return targetturf
|
||||
|
||||
/atom/movable/proc/check_in_bounds()
|
||||
if(in_bounds())
|
||||
return
|
||||
else
|
||||
var/turf/currentturf = get_turf(src)
|
||||
get(src, /mob) << "<span class='danger'>You can't help but feel that you just lost something back there...</span>"
|
||||
var/turf/targetturf = relocate()
|
||||
log_game("[src] has been moved out of bounds in [COORD(currentturf)]. Moving it to [COORD(targetturf)].")
|
||||
if(HAS_SECONDARY_FLAG(src, INFORM_ADMINS_ON_RELOCATE))
|
||||
message_admins("[src] has been moved out of bounds in [ADMIN_COORDJMP(currentturf)]. Moving it to [ADMIN_COORDJMP(targetturf)].")
|
||||
|
||||
/atom/movable/proc/in_bounds()
|
||||
. = FALSE
|
||||
var/turf/currentturf = get_turf(src)
|
||||
if(currentturf && (currentturf.z == ZLEVEL_CENTCOM || currentturf.z == ZLEVEL_STATION))
|
||||
. = TRUE
|
||||
|
||||
@@ -502,7 +502,7 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
/obj/item/weapon/disk/nuclear/New()
|
||||
..()
|
||||
poi_list |= src
|
||||
set_stationloving(TRUE, inform_admins=TRUE)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/disk/nuclear/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/claymore/highlander))
|
||||
@@ -518,12 +518,6 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/disk/nuclear/Destroy(force=FALSE)
|
||||
// respawning is handled in /obj/Destroy()
|
||||
if(force)
|
||||
poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/disk/nuclear/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is going delta! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(user.loc, 'sound/machines/Alarm.ogg', 50, -1, 1)
|
||||
@@ -542,6 +536,56 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
user.visible_message("<span class='suicide'>[user] was destroyed by the nuclear blast!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/weapon/disk/nuclear/process()
|
||||
var/turf/diskturf = get_turf(src)
|
||||
if(diskturf && (diskturf.z == ZLEVEL_CENTCOM || diskturf.z == ZLEVEL_STATION))
|
||||
return
|
||||
else
|
||||
get(src, /mob) << "<span class='danger'>You can't help but feel that you just lost something back there...</span>"
|
||||
var/turf/targetturf = relocate()
|
||||
message_admins("[src] has been moved out of bounds in \
|
||||
[ADMIN_COORDJMP(diskturf)]. Moving it to \
|
||||
[ADMIN_COORDJMP(targetturf)].")
|
||||
log_game("[src] has been moved out of bounds in [COORD(diskturf)]. \
|
||||
Moving it to [COORD(targetturf)].")
|
||||
|
||||
/obj/item/weapon/disk/nuclear/proc/relocate()
|
||||
var/targetturf = find_safe_turf(ZLEVEL_STATION)
|
||||
if(!targetturf)
|
||||
if(blobstart.len > 0)
|
||||
targetturf = get_turf(pick(blobstart))
|
||||
else
|
||||
throw EXCEPTION("Unable to find a blobstart landmark")
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.transferItemToLoc(src, targetturf, TRUE) //nodrops disks when?
|
||||
else if(istype(loc, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = loc
|
||||
S.remove_from_storage(src, targetturf)
|
||||
else
|
||||
forceMove(targetturf)
|
||||
// move the disc, so ghosts remain orbiting it even if it's "destroyed"
|
||||
return targetturf
|
||||
|
||||
/obj/item/weapon/disk/nuclear/Destroy(force)
|
||||
var/turf/diskturf = get_turf(src)
|
||||
|
||||
if(force)
|
||||
message_admins("[src] has been !!force deleted!! in \
|
||||
[ADMIN_COORDJMP(diskturf)].")
|
||||
log_game("[src] has been !!force deleted!! in [COORD(diskturf)].")
|
||||
poi_list -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
var/turf/targetturf = relocate()
|
||||
message_admins("[src] has been destroyed in [ADMIN_COORDJMP(diskturf)]. \
|
||||
Moving it to [ADMIN_COORDJMP(targetturf)].")
|
||||
log_game("[src] has been destroyed in [COORD(diskturf)]. Moving it to \
|
||||
[COORD(targetturf)].")
|
||||
return QDEL_HINT_LETMELIVE //Cancel destruction unless forced
|
||||
|
||||
/obj/item/weapon/disk/fakenucleardisk
|
||||
name = "cheap plastic imitation of the nuclear authentication disk"
|
||||
desc = "Broken dreams and a faint odor of cheese."
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
else
|
||||
T.add_blueprints_preround(src)
|
||||
|
||||
/obj/Destroy(force=FALSE)
|
||||
/obj/Destroy()
|
||||
if(!istype(src, /obj/machinery))
|
||||
STOP_PROCESSING(SSobj, src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
|
||||
SStgui.close_uis(src)
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
..()
|
||||
|
||||
@@ -189,7 +189,6 @@
|
||||
#include "code\controllers\subsystem\weather.dm"
|
||||
#include "code\controllers\subsystem\processing\fastprocess.dm"
|
||||
#include "code\controllers\subsystem\processing\flightpacks.dm"
|
||||
#include "code\controllers\subsystem\processing\inbounds.dm"
|
||||
#include "code\controllers\subsystem\processing\objects.dm"
|
||||
#include "code\controllers\subsystem\processing\overlays.dm"
|
||||
#include "code\controllers\subsystem\processing\processing.dm"
|
||||
|
||||
Reference in New Issue
Block a user