mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
@@ -1,17 +1,7 @@
|
||||
// simple is_type and similar inline helpers
|
||||
|
||||
#if DM_VERSION < 513
|
||||
#define islist(L) (istype(L, /list))
|
||||
#endif
|
||||
|
||||
#define in_range(source, user) (get_dist(source, user) <= 1 && (get_step(source, 0)?:z) == (get_step(user, 0)?:z))
|
||||
|
||||
#if DM_VERSION < 513
|
||||
#define ismovableatom(A) (istype(A, /atom/movable))
|
||||
#else
|
||||
#define ismovableatom(A) ismovable(A)
|
||||
#endif
|
||||
|
||||
#define isatom(A) (isloc(A))
|
||||
|
||||
#define isweakref(D) (istype(D, /datum/weakref))
|
||||
|
||||
@@ -30,11 +30,7 @@
|
||||
// round() acts like floor(x, 1) by default but can't handle other values
|
||||
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
|
||||
|
||||
#if DM_VERSION < 513
|
||||
#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
|
||||
#else
|
||||
#define CLAMP(CLVALUE,CLMIN,CLMAX) clamp(CLVALUE, CLMIN, CLMAX)
|
||||
#endif
|
||||
|
||||
// Similar to clamp but the bottom rolls around to the top and vice versa. min is inclusive, max is exclusive
|
||||
#define WRAP(val, min, max) ( min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) )
|
||||
@@ -43,12 +39,7 @@
|
||||
#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )
|
||||
|
||||
// Tangent
|
||||
#if DM_VERSION < 513
|
||||
#define TAN(x) (sin(x) / cos(x))
|
||||
#else
|
||||
#define TAN(x) tan(x)
|
||||
#endif
|
||||
|
||||
// Cotangent
|
||||
#define COT(x) (1 / TAN(x))
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
var/adjacencies = 0
|
||||
|
||||
var/atom/movable/AM
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
AM = A
|
||||
if(AM.can_be_unanchored && !AM.anchored)
|
||||
return 0
|
||||
|
||||
@@ -445,15 +445,6 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
var/y = min(world.maxy, max(1, A.y + dy))
|
||||
return locate(x,y,A.z)
|
||||
|
||||
#if DM_VERSION > 513
|
||||
#warn 513 is definitely stable now, remove this
|
||||
#endif
|
||||
#if DM_VERSION < 513
|
||||
/proc/arctan(x)
|
||||
var/y=arcsin(x/sqrt(1+x*x))
|
||||
return y
|
||||
#endif
|
||||
|
||||
/*
|
||||
Gets all contents of contents and returns them all in a list.
|
||||
*/
|
||||
|
||||
@@ -32,31 +32,12 @@
|
||||
#endif
|
||||
|
||||
//Update this whenever you need to take advantage of more recent byond features
|
||||
#define MIN_COMPILER_VERSION 512
|
||||
#if DM_VERSION < MIN_COMPILER_VERSION
|
||||
#define MIN_COMPILER_VERSION 513
|
||||
#define MIN_COMPILER_BUILD 1493
|
||||
#if DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD
|
||||
//Don't forget to update this part
|
||||
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
|
||||
#error You need version 512 or higher
|
||||
#endif
|
||||
|
||||
//Compatability -- These procs were added in 513.1493, not 513.1490
|
||||
//Which really shoulda bumped us up to 514 right then and there but instead Lummox is a dumb dumb
|
||||
#if DM_BUILD < 1493
|
||||
#define length_char(args...) length(args)
|
||||
#define text2ascii_char(args...) text2ascii(args)
|
||||
#define copytext_char(args...) copytext(args)
|
||||
#define splittext_char(args...) splittext(args)
|
||||
#define spantext_char(args...) spantext(args)
|
||||
#define nonspantext_char(args...) nonspantext(args)
|
||||
#define findtext_char(args...) findtext(args)
|
||||
#define findtextEx_char(args...) findtextEx(args)
|
||||
#define findlasttext_char(args...) findlasttext(args)
|
||||
#define findlasttextEx_char(args...) findlasttextEx(args)
|
||||
#define replacetext_char(args...) replacetext(args)
|
||||
#define replacetextEx_char(args...) replacetextEx(args)
|
||||
// /regex procs
|
||||
#define Find_char(args...) Find(args)
|
||||
#define Replace_char(args...) Replace(args)
|
||||
#error You need version 513.1493 or higher
|
||||
#endif
|
||||
|
||||
//Additional code for the above flags.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
return // seems legit.
|
||||
|
||||
// Things you might plausibly want to follow
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
ManualFollow(A)
|
||||
|
||||
// Otherwise jump
|
||||
|
||||
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(profiler)
|
||||
init_order = INIT_ORDER_PROFILER
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
wait = 3000
|
||||
flags = SS_NO_TICK_CHECK
|
||||
flags = SS_NO_TICK_CHECK
|
||||
var/fetch_cost = 0
|
||||
var/write_cost = 0
|
||||
|
||||
@@ -31,7 +31,7 @@ SUBSYSTEM_DEF(profiler)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/profiler/proc/StartProfiling()
|
||||
#if DM_BUILD < 1506 || DM_VERSION < 513
|
||||
#if DM_BUILD < 1506
|
||||
stack_trace("Auto profiling unsupported on this byond version")
|
||||
CONFIG_SET(flag/auto_profile, FALSE)
|
||||
#else
|
||||
@@ -39,12 +39,12 @@ SUBSYSTEM_DEF(profiler)
|
||||
#endif
|
||||
|
||||
/datum/controller/subsystem/profiler/proc/StopProfiling()
|
||||
#if DM_BUILD >= 1506 && DM_VERSION >= 513
|
||||
#if DM_BUILD >= 1506
|
||||
world.Profile(PROFILE_STOP)
|
||||
#endif
|
||||
|
||||
/datum/controller/subsystem/profiler/proc/DumpFile()
|
||||
#if DM_BUILD < 1506 || DM_VERSION < 513
|
||||
#if DM_BUILD < 1506
|
||||
stack_trace("Auto profiling unsupported on this byond version")
|
||||
CONFIG_SET(flag/auto_profile, FALSE)
|
||||
#else
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/regex/R
|
||||
|
||||
/datum/component/beetlejuice/Initialize()
|
||||
if(!ismovableatom(parent))
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
first_heard = list()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
var/list/say_lines
|
||||
|
||||
/datum/component/edit_complainer/Initialize(list/text)
|
||||
if(!ismovableatom(parent))
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
var/static/list/default_lines = list(
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/explodable_attack)
|
||||
RegisterSignal(parent, COMSIG_TRY_STORAGE_INSERT, .proc/explodable_insert_item)
|
||||
RegisterSignal(parent, COMSIG_ATOM_EX_ACT, .proc/detonate)
|
||||
if(ismovableatom(parent))
|
||||
if(ismovable(parent))
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_IMPACT, .proc/explodable_impact)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/explodable_bump)
|
||||
if(isitem(parent))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
expire_time = world.time + expire_in
|
||||
QDEL_IN(src, expire_in)
|
||||
|
||||
if(!ismovableatom(parent))
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/try_infect_buckle)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
do_knockback(target, null, angle2dir(Angle))
|
||||
|
||||
/datum/component/knockback/proc/do_knockback(atom/target, mob/thrower, throw_dir)
|
||||
if(!ismovableatom(target) || throw_dir == null)
|
||||
if(!ismovable(target) || throw_dir == null)
|
||||
return
|
||||
var/atom/movable/throwee = target
|
||||
if(throwee.anchored && !throw_anchored)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
|
||||
if(ismovableatom(parent))
|
||||
if(ismovable(parent))
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/crossed_react)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/uncrossed_react)
|
||||
for(var/i in get_turf(parent))
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/atom/target = parent
|
||||
|
||||
target.orbiters = src
|
||||
if(ismovableatom(target))
|
||||
if(ismovable(target))
|
||||
tracker = new(target, CALLBACK(src, .proc/move_react))
|
||||
|
||||
/datum/component/orbiter/UnregisterFromParent()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/turn_connects = TRUE
|
||||
|
||||
/datum/component/plumbing/Initialize(start=TRUE, _turn_connects=TRUE) //turn_connects for wheter or not we spin with the object to change our pipes
|
||||
if(parent && !ismovableatom(parent))
|
||||
if(parent && !ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
var/atom/movable/AM = parent
|
||||
if(!AM.reagents)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/respect_mob_mobility = TRUE
|
||||
|
||||
/datum/component/riding/Initialize()
|
||||
if(!ismovableatom(parent))
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/vehicle_mob_buckle)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_UNBUCKLE, .proc/vehicle_mob_unbuckle)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/default_rotation_direction = ROTATION_CLOCKWISE
|
||||
|
||||
/datum/component/simple_rotation/Initialize(rotation_flags = NONE ,can_user_rotate,can_be_rotated,after_rotation)
|
||||
if(!ismovableatom(parent))
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
//throw if no rotation direction is specificed ?
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
|
||||
if(ismovableatom(parent))
|
||||
if(ismovable(parent))
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), .proc/play_squeak)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/play_squeak_crossed)
|
||||
RegisterSignal(parent, COMSIG_ITEM_WEARERCROSSED, .proc/play_squeak_crossed)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/allow_death = FALSE
|
||||
|
||||
/datum/component/stationloving/Initialize(inform_admins = FALSE, allow_death = FALSE)
|
||||
if(!ismovableatom(parent))
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds)
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_SECLUDED_LOCATION), .proc/relocate)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/list/swarm_members = list()
|
||||
|
||||
/datum/component/swarming/Initialize(max_x = 24, max_y = 24)
|
||||
if(!ismovableatom(parent))
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
offset_x = rand(-max_x, max_x)
|
||||
offset_y = rand(-max_y, max_y)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/element/cleaning/Attach(datum/target)
|
||||
. = ..()
|
||||
if(!ismovableatom(target))
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/Clean)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/datum/element/firestacker/Attach(datum/target, amount)
|
||||
. = ..()
|
||||
|
||||
if(!ismovableatom(target))
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
src.amount = amount
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/datum/element/snailcrawl/Attach(datum/target)
|
||||
. = ..()
|
||||
if(!ismovableatom(target))
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
var/P
|
||||
if(iscarbon(target))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/datum/element/waddling/Attach(datum/target)
|
||||
. = ..()
|
||||
if(!ismovableatom(target))
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
if(isliving(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/LivingWaddle)
|
||||
|
||||
@@ -98,7 +98,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
|
||||
/datum/material/plasma/on_applied(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
if(ismovableatom(source))
|
||||
if(ismovable(source))
|
||||
source.AddElement(/datum/element/firestacker, amount=1)
|
||||
source.AddComponent(/datum/component/explodable, 0, 0, amount / 2500, amount / 1250)
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
tracked = target
|
||||
src.listener = listener
|
||||
|
||||
while(ismovableatom(target))
|
||||
while(ismovable(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react)
|
||||
target = target.loc
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(!tracked)
|
||||
return
|
||||
var/atom/movable/target = tracked
|
||||
while(ismovableatom(target))
|
||||
while(ismovable(target))
|
||||
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
|
||||
target = target.loc
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
|
||||
if(oldloc && !isturf(oldloc))
|
||||
var/atom/target = oldloc
|
||||
while(ismovableatom(target))
|
||||
while(ismovable(target))
|
||||
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
|
||||
target = target.loc
|
||||
if(tracked.loc != newturf)
|
||||
var/atom/target = mover.loc
|
||||
while(ismovableatom(target))
|
||||
while(ismovable(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react, TRUE)
|
||||
target = target.loc
|
||||
|
||||
|
||||
+2
-2
@@ -337,7 +337,7 @@
|
||||
reagents = new()
|
||||
reagents.reagent_list.Add(A)
|
||||
reagents.conditional_update()
|
||||
else if(ismovableatom(A))
|
||||
else if(ismovable(A))
|
||||
var/atom/movable/M = A
|
||||
if(isliving(M.loc))
|
||||
var/mob/living/L = M.loc
|
||||
@@ -889,7 +889,7 @@
|
||||
/atom/vv_get_dropdown()
|
||||
. = ..()
|
||||
VV_DROPDOWN_OPTION("", "---------")
|
||||
if(!ismovableatom(src))
|
||||
if(!ismovable(src))
|
||||
var/turf/curturf = get_turf(src)
|
||||
if(curturf)
|
||||
. += "<option value='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]'>Jump To</option>"
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
com.target = null
|
||||
visible_message("<span class='alert'>Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.</span>")
|
||||
return
|
||||
if (ismovableatom(M))
|
||||
if (ismovable(M))
|
||||
if(do_teleport(M, com.target, channel = TELEPORT_CHANNEL_BLUESPACE))
|
||||
use_power(5000)
|
||||
if(!calibrated && prob(30 - ((accuracy) * 10))) //oh dear a problem
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
|
||||
/obj/item/punching_glove/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(!..())
|
||||
if(ismovableatom(hit_atom))
|
||||
if(ismovable(hit_atom))
|
||||
var/atom/movable/AM = hit_atom
|
||||
AM.safe_throw_at(get_edge_target_turf(AM,get_dir(src, AM)), 7, 2)
|
||||
qdel(src)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
var/list/affecting = list()
|
||||
|
||||
/obj/effect/step_trigger/thrower/Trigger(atom/A)
|
||||
if(!A || !ismovableatom(A))
|
||||
if(!A || !ismovable(A))
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
//Gets the topmost teleportable container
|
||||
/obj/item/swapper/proc/get_teleportable_container()
|
||||
var/atom/movable/teleportable = src
|
||||
while(ismovableatom(teleportable.loc))
|
||||
while(ismovable(teleportable.loc))
|
||||
var/atom/movable/AM = teleportable.loc
|
||||
if(AM.anchored)
|
||||
break
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
for(var/atom/X in orange(5,pull))
|
||||
if(ismovableatom(X))
|
||||
if(ismovable(X))
|
||||
var/atom/movable/A = X
|
||||
if(A == wielder)
|
||||
continue
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
. = ..()
|
||||
if(!sliver)
|
||||
return
|
||||
if(proximity && ismovableatom(O) && O != sliver)
|
||||
if(proximity && ismovable(O) && O != sliver)
|
||||
Consume(O, user)
|
||||
|
||||
/obj/item/hemostat/supermatter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) // no instakill supermatter javelins
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
/obj/structure/closet/container_resist(mob/living/user)
|
||||
if(opened)
|
||||
return
|
||||
if(ismovableatom(loc))
|
||||
if(ismovable(loc))
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
var/atom/movable/AM = loc
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
/obj/structure/girder/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSGRILLE)
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
/obj/structure/grille/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSGRILLE)
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
|
||||
|
||||
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
|
||||
if(!ismovableatom(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
return
|
||||
if(!ismob(O))
|
||||
if(!istype(O, /obj/structure/closet/body_bag))
|
||||
@@ -387,6 +387,6 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
|
||||
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
/obj/structure/table/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
|
||||
/obj/structure/rack/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@
|
||||
for(var/V in contents)
|
||||
var/atom/A = V
|
||||
if(!QDELETED(A) && A.level >= affecting_level)
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
var/atom/movable/AM = A
|
||||
if(!AM.ex_check(explosion_id))
|
||||
continue
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ GLOBAL_VAR(restart_counter)
|
||||
enable_debugger()
|
||||
|
||||
//Early profile for auto-profiler - will be stopped on profiler init if necessary.
|
||||
#if DM_VERSION >= 513 && DM_BUILD >= 1506
|
||||
#if DM_BUILD >= 1506
|
||||
world.Profile(PROFILE_START)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -482,14 +482,6 @@
|
||||
temp_expression_list = list()
|
||||
i = expression(i, temp_expression_list)
|
||||
|
||||
#if MIN_COMPILER_VERSION > 512
|
||||
#warn Remove this outdated workaround
|
||||
#elif DM_BUILD < 1467
|
||||
// http://www.byond.com/forum/post/2445083
|
||||
var/dummy = src.type
|
||||
dummy = dummy
|
||||
#endif
|
||||
|
||||
while(token(i) && token(i) != "]")
|
||||
|
||||
if (temp_expression_list)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/structure/blob/CanAStarPass(ID, dir, caller)
|
||||
. = 0
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSBLOB)
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
DuplicateObject(stored, perfectcopy=1, sameloc=0,newloc=T)
|
||||
log_admin("Build Mode: [key_name(c)] copied [stored] to [AREACOORD(object)]")
|
||||
else if(right_click)
|
||||
if(ismovableatom(object)) // No copying turfs for now.
|
||||
if(ismovable(object)) // No copying turfs for now.
|
||||
to_chat(c, "<span class='notice'>[object] set as template.</span>")
|
||||
stored = object
|
||||
|
||||
@@ -67,7 +67,7 @@ GLOBAL_LIST_EMPTY(all_wormholes) // So we can pick wormholes to teleport to
|
||||
if(!(ismecha(M) && mech_sized))
|
||||
return
|
||||
|
||||
if(ismovableatom(M))
|
||||
if(ismovable(M))
|
||||
if(GLOB.all_wormholes.len)
|
||||
var/obj/effect/portal/wormhole/P = pick(GLOB.all_wormholes)
|
||||
if(P && isturf(P.loc))
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if (!light_power || !light_range) // We won't emit light anyways, destroy the light source.
|
||||
QDEL_NULL(light)
|
||||
else
|
||||
if (!ismovableatom(loc)) // We choose what atom should be the top atom of the light here.
|
||||
if (!ismovable(loc)) // We choose what atom should be the top atom of the light here.
|
||||
. = src
|
||||
else
|
||||
. = loc
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
|
||||
/obj/projectile/hook/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(ismovableatom(target))
|
||||
if(ismovable(target))
|
||||
var/atom/movable/A = target
|
||||
if(A.anchored)
|
||||
return
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
var/obj/O = A
|
||||
if(ObjBump(O))
|
||||
return
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
var/atom/movable/AM = A
|
||||
if(PushAM(AM, move_force))
|
||||
return
|
||||
|
||||
@@ -200,11 +200,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
spans |= L.spans
|
||||
|
||||
if(message_mode == MODE_SING)
|
||||
#if DM_VERSION < 513
|
||||
var/randomnote = "~"
|
||||
#else
|
||||
var/randomnote = pick("\u2669", "\u266A", "\u266B")
|
||||
#endif
|
||||
spans |= SPAN_SINGING
|
||||
message = "[randomnote] [message] [randomnote]"
|
||||
|
||||
|
||||
@@ -901,7 +901,7 @@
|
||||
if(istype(A, /obj/machinery/camera))
|
||||
current = A
|
||||
if(client)
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
if(A != GLOB.ai_camera_room_landmark)
|
||||
end_multicam()
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
AddElement(/datum/element/cleaning)
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/maid/AttackingTarget()
|
||||
if(ismovableatom(target))
|
||||
if(ismovable(target))
|
||||
if(istype(target, /obj/effect/decal/cleanable))
|
||||
visible_message("<span class='notice'>[src] cleans up \the [target].</span>")
|
||||
qdel(target)
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
/mob/proc/reset_perspective(atom/A)
|
||||
if(client)
|
||||
if(A)
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
//Set the the thing unless it's us
|
||||
if(A != src)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
if(istype(A))
|
||||
appearance = A.appearance
|
||||
dir = A.dir
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
var/atom/movable/AM = A
|
||||
step_x = AM.step_x
|
||||
step_y = AM.step_y
|
||||
@@ -72,7 +72,7 @@
|
||||
for(var/atom/A in sorted)
|
||||
var/xo = (A.x - center.x) * world.icon_size + A.pixel_x + xcomp
|
||||
var/yo = (A.y - center.y) * world.icon_size + A.pixel_y + ycomp
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
var/atom/movable/AM = A
|
||||
xo += AM.step_x
|
||||
yo += AM.step_y
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
// if(defer_powernet_rebuild != 2)
|
||||
// defer_powernet_rebuild = 1
|
||||
for(var/atom/X in urange(consume_range,src,1))
|
||||
if(isturf(X) || ismovableatom(X))
|
||||
if(isturf(X) || ismovable(X))
|
||||
consume(X)
|
||||
// if(defer_powernet_rebuild != 2)
|
||||
// defer_powernet_rebuild = 0
|
||||
|
||||
@@ -26,10 +26,8 @@
|
||||
/obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S)
|
||||
. = ..()
|
||||
panel = new()
|
||||
#if DM_VERSION >= 513
|
||||
panel.vis_flags = VIS_INHERIT_ID|VIS_INHERIT_ICON|VIS_INHERIT_PLANE
|
||||
vis_contents += panel
|
||||
#endif
|
||||
panel.icon = icon
|
||||
panel.icon_state = "solar_panel"
|
||||
panel.layer = FLY_LAYER
|
||||
@@ -116,9 +114,6 @@
|
||||
panel.icon_state = "solar_panel-b"
|
||||
else
|
||||
panel.icon_state = "solar_panel"
|
||||
#if DM_VERSION <= 512
|
||||
. += new /mutable_appearance(panel)
|
||||
#endif
|
||||
|
||||
/obj/machinery/power/solar/proc/queue_turn(azimuth)
|
||||
needs_to_turn = TRUE
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
else
|
||||
target.ex_act(EXPLODE_HEAVY)
|
||||
return TRUE
|
||||
if(ismovableatom(target))
|
||||
if(ismovable(target))
|
||||
var/atom/movable/AM = target
|
||||
if(AM.density && !AM.CanPass(src, get_turf(target)) && !ismob(AM))
|
||||
if(structure_pierce < structure_pierce_amount)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/obj/projectile/bullet/shotgun_meteorslug/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(ismovableatom(target))
|
||||
if(ismovable(target))
|
||||
var/atom/movable/M = target
|
||||
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
|
||||
M.safe_throw_at(throw_target, 3, 2)
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
for(var/i in 1 to 4)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
if(prob(20))
|
||||
@@ -226,7 +226,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M)
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
for(var/i = 0, i < 4, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(15)
|
||||
@@ -236,7 +236,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(20)
|
||||
@@ -281,7 +281,7 @@
|
||||
M.adjustStaminaLoss(-5, 0)
|
||||
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4)
|
||||
M.hallucination += 5
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
step(M, pick(GLOB.cardinals))
|
||||
step(M, pick(GLOB.cardinals))
|
||||
..()
|
||||
@@ -289,7 +289,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/overdose_process(mob/living/M)
|
||||
M.hallucination += 5
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
for(var/i in 1 to 8)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
if(prob(20))
|
||||
@@ -300,7 +300,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
|
||||
M.hallucination += 10
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(5)
|
||||
@@ -311,7 +311,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage2(mob/living/M)
|
||||
M.hallucination += 20
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(10)
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage3(mob/living/M)
|
||||
M.hallucination += 30
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
for(var/i = 0, i < 12, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(15)
|
||||
@@ -335,7 +335,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
M.hallucination += 30
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc))
|
||||
if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc))
|
||||
for(var/i = 0, i < 16, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(50)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/bigDelivery/relay_container_resist(mob/living/user, obj/O)
|
||||
if(ismovableatom(loc))
|
||||
if(ismovable(loc))
|
||||
var/atom/movable/AM = loc //can't unwrap the wrapped container if it's inside something.
|
||||
AM.relay_container_resist(user, O)
|
||||
return
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
if(A.density && has_buckled_mobs())
|
||||
var/atom/throw_target = get_edge_target_turf(A, dir)
|
||||
if(crash_all)
|
||||
if(ismovableatom(A))
|
||||
if(ismovable(A))
|
||||
var/atom/movable/AM = A
|
||||
AM.throw_at(throw_target, 4, 3)
|
||||
visible_message("<span class='danger'>[src] crashes into [A]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user