diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index 4ff62ea4c89..c4478f62837 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -17,6 +17,8 @@
#define ismecha(A) (istype(A, /obj/mecha))
+#define iseffect(A) (istype(A, /obj/effect))
+
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable
#define is_pen(W) (istype(W, /obj/item/pen))
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 7b9d207e172..f7c5b670dc8 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1718,8 +1718,8 @@ var/mob/dview/dview_mob = new
/proc/turf_clear(turf/T)
for(var/atom/A in T)
if(A.simulated)
- return 0
- return 1
+ return FALSE
+ return TRUE
/proc/screen_loc2turf(scr_loc, turf/origin)
var/tX = splittext(scr_loc, ",")
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 32e6487ca57..c52df8c7912 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -12,7 +12,7 @@
var/last_bumped = 0
var/pass_flags = 0
var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom.
- var/simulated = 1 //filter for actions - used by lighting overlays
+ var/simulated = TRUE //filter for actions - used by lighting overlays
var/atom_say_verb = "says"
var/dont_save = 0 // For atoms that are temporary by necessity - like lighting overlays
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 525eb10e52f..bcaf21d5cde 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -380,23 +380,20 @@
//Overlays
/atom/movable/overlay
var/atom/master = null
- anchored = 1
+ anchored = TRUE
+ simulated = FALSE
/atom/movable/overlay/New()
verbs.Cut()
return
/atom/movable/overlay/attackby(a, b, c)
- if(src.master)
- return src.master.attackby(a, b, c)
- return
-
+ if(master)
+ return master.attackby(a, b, c)
/atom/movable/overlay/attack_hand(a, b, c)
- if(src.master)
- return src.master.attack_hand(a, b, c)
- return
-
+ if(master)
+ return master.attack_hand(a, b, c)
/atom/movable/proc/water_act(volume, temperature, source, method = TOUCH) //amount of water acting : temperature of water in kelvin : object that called it (for shennagins)
return TRUE
diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
index c5b47e1db17..e73474bad7d 100644
--- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
+++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
@@ -181,8 +181,10 @@
S.Integrate(src)
return FALSE
-/atom/movable/lighting_object/swarmer_act()
- return FALSE
+/atom/movable/swarmer_act()
+ if(!simulated)
+ return FALSE
+ return ..()
/obj/effect/swarmer_act()
return FALSE
diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm
index faaf623fa50..8a8606a4a5c 100644
--- a/code/game/objects/effects/portals.dm
+++ b/code/game/objects/effects/portals.dm
@@ -3,68 +3,116 @@
desc = "Looks unstable. Best to test it with the clown."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "portal"
- density = 1
- unacidable = 1//Can't destroy energy portals.
- var/failchance = 5
+ density = TRUE
+ unacidable = TRUE
+ anchored = TRUE
+
var/obj/item/target = null
var/creator = null
- anchored = 1
- var/precision = 1 // how close to the portal you will teleport. 0 = on the portal, 1 = adjacent
- var/can_multitool_to_remove = 0
+
+ var/failchance = 5
+ var/fail_icon = "portal1"
+
+ var/precision = TRUE // how close to the portal you will teleport. FALSE = on the portal, TRUE = adjacent
+ var/can_multitool_to_remove = FALSE
var/ignore_tele_proof_area_setting = FALSE
/obj/effect/portal/Bumped(mob/M as mob|obj)
teleport(M)
-/obj/effect/portal/New(loc, turf/target, creator=null, lifespan=300)
+/obj/effect/portal/New(loc, turf/target, creator = null, lifespan = 300)
+ ..()
+
GLOB.portals += src
- src.loc = loc
+
src.target = target
src.creator = creator
+
if(lifespan > 0)
spawn(lifespan)
qdel(src)
/obj/effect/portal/Destroy()
GLOB.portals -= src
- if(istype(creator, /obj))
+
+ if(isobj(creator))
var/obj/O = creator
O.portal_destroyed(src)
+
creator = null
target = null
return ..()
-/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
- if(istype(M, /obj/effect)) //sparks don't teleport
+/obj/effect/portal/singularity_pull()
+ return
+
+/obj/effect/portal/singularity_act()
+ return
+
+/obj/effect/portal/Crossed(atom/movable/AM)
+ if(isobserver(AM))
+ return ..()
+
+ if(!teleport(AM))
+ return ..()
+
+/obj/effect/portal/attack_tk(mob/user)
+ return
+
+/obj/effect/portal/attack_hand(mob/user)
+ . = ..()
+ if(.)
return
- if(M.anchored&&istype(M, /obj/mecha))
- return
- if(!( target ))
- qdel(src)
- return
- if(istype(M, /atom/movable))
- if(prob(failchance))
- src.icon_state = "portal1"
- if(!do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to deep space.
- invalid_teleport()
- else
- if(!do_teleport(M, target, precision, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to a turf adjacent to target.
- invalid_teleport()
+ if(get_turf(user) == get_turf(src))
+ teleport(user)
+ if(Adjacent(user))
+ user.forceMove(get_turf(src))
+
+/obj/effect/portal/attack_ghost(mob/dead/observer/O)
+ if(target)
+ O.forceMove(target)
/obj/effect/portal/attackby(obj/item/A, mob/user)
- if(istype(A, /obj/item/multitool) && can_multitool_to_remove)
+ if(ismultitool(A) && can_multitool_to_remove)
qdel(src)
+ else if(user && Adjacent(user))
+ user.forceMove(get_turf(src))
+ return TRUE
+
+/obj/effect/portal/proc/teleport(atom/movable/M, force = FALSE)
+ if(!istype(M))
+ return
+
+ if(iseffect(M) || !M.simulated)
+ return
+
+ if(M.anchored && ismecha(M))
+ return
+
+ if(!target)
+ qdel(src)
+ return
+
+ if(ismegafauna(M))
+ message_admins("[M] has used a portal at [ADMIN_VERBOSEJMP(src)] made by [key_name_admin(usr)].")
+
+ if(prob(failchance))
+ icon_state = fail_icon
+ if(!do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to deep space.
+ invalid_teleport()
+ else
+ if(!do_teleport(M, target, precision, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to a turf adjacent to target.
+ invalid_teleport()
/obj/effect/portal/proc/invalid_teleport()
visible_message("[src] flickers and fails due to bluespace interference!")
do_sparks(5, 0, loc)
qdel(src)
-
/obj/effect/portal/redspace
name = "redspace portal"
desc = "A portal capable of bypassing bluespace interference."
icon_state = "portal1"
failchance = 0
precision = 0
- ignore_tele_proof_area_setting = TRUE
\ No newline at end of file
+ ignore_tele_proof_area_setting = TRUE
diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm
index f3273c7786a..79b94faede5 100644
--- a/code/game/turfs/simulated/floor/chasm.dm
+++ b/code/game/turfs/simulated/floor/chasm.dm
@@ -8,7 +8,7 @@
canSmoothWith = list(/turf/simulated/floor/chasm)
density = TRUE //This will prevent hostile mobs from pathing into chasms, while the canpass override will still let it function like an open turf
var/static/list/falling_atoms = list() //Atoms currently falling into the chasm
- var/static/list/forbidden_types = typecacheof(list(/obj/effect/portal, /obj/singularity, /obj/structure/stone_tile, /obj/item/projectile, /obj/effect/temp_visual, /obj/effect/collapse, /obj/effect/collapse, /atom/movable/lighting_object))
+ var/static/list/forbidden_types = typecacheof(list(/obj/effect/portal, /obj/singularity, /obj/structure/stone_tile, /obj/item/projectile, /obj/effect/temp_visual, /obj/effect/collapse, /obj/effect/collapse))
var/drop_x = 1
var/drop_y = 1
var/drop_z = 1
@@ -75,7 +75,7 @@
return FALSE
if(!isliving(AM) && !isobj(AM))
return FALSE
- if(is_type_in_typecache(AM, forbidden_types) || AM.throwing)
+ if(is_type_in_typecache(AM, forbidden_types) || !AM.simulated || AM.throwing)
return FALSE
//Flies right over the chasm
if(isliving(AM))
diff --git a/code/game/turfs/simulated/floor/lava.dm b/code/game/turfs/simulated/floor/lava.dm
index c1a8bfd6fea..d1ee346b302 100644
--- a/code/game/turfs/simulated/floor/lava.dm
+++ b/code/game/turfs/simulated/floor/lava.dm
@@ -53,13 +53,13 @@
return FALSE
var/thing_to_check = src
- if (AM)
+ if(AM)
thing_to_check = list(AM)
for(var/thing in thing_to_check)
- if(istype(thing, /atom/movable/lighting_object) || istype(thing, /atom/movable/overlay))
- continue
if(isobj(thing))
var/obj/O = thing
+ if(!O.simulated)
+ continue
if((O.resistance_flags & (LAVA_PROOF|INDESTRUCTIBLE)) || O.throwing)
continue
. = 1
@@ -71,7 +71,7 @@
O.resistance_flags &= ~FIRE_PROOF
O.fire_act(10000, 1000)
- else if (isliving(thing))
+ else if(isliving(thing))
. = 1
var/mob/living/L = thing
if(L.flying)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 21b9f9b455a..53cf1917404 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -491,16 +491,14 @@
var/turf/T0 = src
for(var/X in T0.GetAllContents())
var/atom/A = X
+ if(!A.simulated)
+ continue
if(istype(A, /mob/dead))
continue
if(istype(A, /obj/effect/landmark))
continue
if(istype(A, /obj/docking_port))
continue
- if(istype(A, /atom/movable/lighting_object))
- continue
- if(!A.simulated)
- continue
qdel(A, force=TRUE)
T0.ChangeTurf(turf_type)
diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm
index e84df256f6b..65938f32e8e 100644
--- a/code/modules/awaymissions/mission_code/stationCollision.dm
+++ b/code/modules/awaymissions/mission_code/stationCollision.dm
@@ -161,7 +161,7 @@ var/sc_safecode5 = "[rand(0,9)]"
desc = "Your body becomes weak and your feel your mind slipping away as you try to comprehend what you know can't be possible."
move_self = 0 //Contianed narsie does not move!
grav_pull = 0 //Contained narsie does not pull stuff in!
- var/uneatable = list(/turf/space, /obj/effect/overlay, /atom/movable/lighting_object, /mob/living/simple_animal/hostile/construct)
+ var/uneatable = list(/turf/space, /obj/effect/overlay, /mob/living/simple_animal/hostile/construct)
//Override this to prevent no adminlog runtimes and admin warnings about a singularity without containment
/obj/singularity/narsie/sc_Narsie/admin_investigate_setup()
@@ -174,13 +174,15 @@ var/sc_safecode5 = "[rand(0,9)]"
/obj/singularity/narsie/sc_Narsie/consume(var/atom/A)
if(is_type_in_list(A, uneatable))
- return 0
+ return FALSE
+ if(!A.simulated)
+ return FALSE
if(istype(A,/mob/living))
var/mob/living/L = A
L.gib()
else if(istype(A,/obj/))
var/obj/O = A
- O.ex_act(1.0)
+ O.ex_act(1)
if(O) qdel(O)
else if(isturf(A))
var/turf/T = A
diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
index e623cda0de0..48b4453f6d4 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
@@ -157,6 +157,9 @@
pass_flags = PASSTABLE
visible_contents = FALSE
+/obj/machinery/smartfridge/disks/accept_check(obj/item/O)
+ return istype(O, /obj/item/disk)
+
// ----------------------------
// Virology Medical Smartfridge
// ----------------------------
diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm
index 4c4408e6219..10823051563 100644
--- a/code/modules/mining/equipment_locker.dm
+++ b/code/modules/mining/equipment_locker.dm
@@ -699,7 +699,7 @@
/obj/item/wormhole_jaunter
name = "wormhole jaunter"
- desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to blue space for more accurate teleportation. The wormholes it creates are unpleasant to travel through, to say the least."
+ desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to bluespace for more accurate teleportation. The wormholes it creates are unpleasant to travel through, to say the least.\nThanks to modifications provided by the Free Golems, this jaunter can be worn on the belt to provide protection from chasms."
icon = 'icons/obj/items.dmi'
icon_state = "Jaunter"
item_state = "electronic"
@@ -711,13 +711,13 @@
slot_flags = SLOT_BELT
/obj/item/wormhole_jaunter/attack_self(mob/user)
- user.visible_message("[user.name] activates the [src.name]!")
+ user.visible_message("[user.name] activates the [name]!")
activate(user, TRUE)
/obj/item/wormhole_jaunter/proc/turf_check(mob/user)
var/turf/device_turf = get_turf(user)
if(!device_turf || !is_teleport_allowed(device_turf.z))
- to_chat(user, "You're having difficulties getting the [src.name] to work.")
+ to_chat(user, "You're having difficulties getting the [name] to work.")
return FALSE
return TRUE
@@ -737,49 +737,42 @@
var/list/L = get_destinations(user)
if(!L.len)
- to_chat(user, "The [src.name] found no beacons in the world to anchor a wormhole to.")
+ to_chat(user, "The [name] found no beacons in the world to anchor a wormhole to.")
return
var/chosen_beacon = pick(L)
- var/obj/effect/portal/wormhole/jaunt_tunnel/J = new (get_turf(src), src, 100, null, FALSE, get_turf(chosen_beacon))
+ var/obj/effect/portal/jaunt_tunnel/J = new(get_turf(src), get_turf(chosen_beacon), src, 100)
if(adjacent)
try_move_adjacent(J)
+ else
+ J.teleport(user)
playsound(src,'sound/effects/sparks4.ogg',50,1)
qdel(src)
/obj/item/wormhole_jaunter/proc/chasm_react(mob/user)
- if(user.get_item_by_slot(SLOT_BELT) == src)
+ if(user.get_item_by_slot(slot_belt) == src)
to_chat(user, "Your [name] activates, saving you from the chasm!")
activate(user, FALSE)
else
to_chat(user, "[src] is not attached to your belt, preventing it from saving you from the chasm. RIP.")
-/obj/effect/portal/wormhole/jaunt_tunnel
+/obj/effect/portal/jaunt_tunnel
name = "jaunt tunnel"
icon = 'icons/effects/effects.dmi'
icon_state = "bhole3"
desc = "A stable hole in the universe made by a wormhole jaunter. Turbulent doesn't even begin to describe how rough passage through one of these is, but at least it will always get you somewhere near a beacon."
+ failchance = 0
-/obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M)
- if(istype(M, /obj/effect))
- return
- if(istype(M, /atom/movable))
- if(do_teleport(M, target, 6))
- if(isliving(M))
- var/mob/living/L = M
- L.Weaken(3)
- if(ishuman(L))
- shake_camera(L, 20, 1)
- var/mob/living/carbon/human/H = L
- spawn(20)
- if(H && H.check_has_mouth())
- H.visible_message("[L.name] vomits from travelling through the [src.name]!", "You throw up from travelling through the [src.name]!")
- H.nutrition -= 20
- H.adjustToxLoss(-3)
- var/turf/T = get_turf(H)
- T.add_vomit_floor()
- else
- visible_message("[src] flickers and fails, due to bluespace interference!")
- qdel(src)
+/obj/effect/portal/jaunt_tunnel/teleport(atom/movable/M)
+ . = ..()
+ if(.)
+ // KERPLUNK
+ playsound(M,'sound/weapons/resonator_blast.ogg', 50, 1)
+ if(iscarbon(M))
+ var/mob/living/carbon/L = M
+ L.Weaken(6)
+ if(ishuman(L))
+ shake_camera(L, 20, 1)
+ addtimer(CALLBACK(L, /mob/living/carbon.proc/vomit), 20)
/**********************Resonator**********************/
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index d412d604ec2..bb7bcfc94e1 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -245,6 +245,10 @@
/mob/proc/get_item_by_slot(slot_id)
switch(slot_id)
+ if(slot_wear_mask)
+ return wear_mask
+ if(slot_back)
+ return back
if(slot_l_hand)
return l_hand
if(slot_r_hand)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 31788ecc8cf..2c7a2d67c55 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -712,17 +712,18 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return back
if(slot_wear_mask)
return wear_mask
- if(slot_handcuffed)
- return handcuffed
- if(slot_legcuffed)
- return legcuffed
+ if(slot_wear_suit)
+ return wear_suit
if(slot_l_hand)
return l_hand
if(slot_r_hand)
return r_hand
+ if(slot_handcuffed)
+ return handcuffed
+ if(slot_legcuffed)
+ return legcuffed
return null
-
//generates realistic-ish pulse output based on preset levels
/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
var/temp = 0 //see setup.dm:694
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index d59948a2ed6..c74d7545473 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -1010,7 +1010,7 @@ var/list/slot_equipment_priority = list( \
var/atom/A = foo
if(A.invisibility > see_invisible)
continue
- if(is_type_in_list(A, shouldnt_see))
+ if(is_type_in_list(A, shouldnt_see) || !A.simulated)
continue
statpanel_things += A
statpanel(listed_turf.name, null, statpanel_things)
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 60a3637166a..b378705becb 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -176,7 +176,7 @@
var/player_ghosted = 0
var/turf/listed_turf = null //the current turf being examined in the stat panel
- var/list/shouldnt_see = list(/atom/movable/lighting_object) //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
+ var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
var/kills = 0
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index 20e2ba82b1e..fc79d0b336b 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -57,7 +57,7 @@
if(!(istype(B) && B.off_floor))
qdel(O)
else
- if(!istype(O, /atom/movable/lighting_object))
+ if(O.simulated)
O.color = initial(O.color)
O.clean_blood()
diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm
index 28cb96b128b..bd8d3e055b7 100644
--- a/code/modules/shuttle/supply.dm
+++ b/code/modules/shuttle/supply.dm
@@ -58,12 +58,10 @@
var/contcount
for(var/atom/A in T.contents)
- if(istype(A,/atom/movable/lighting_object))
+ if(!A.simulated)
continue
if(istype(A,/obj/machinery/light))
continue //hacky but whatever, shuttles need three spots each for this shit
- if(!A.simulated)
- continue
contcount++
if(contcount)
diff --git a/code/modules/tram/tram.dm b/code/modules/tram/tram.dm
index fed50355dde..1548e7eb5fa 100644
--- a/code/modules/tram/tram.dm
+++ b/code/modules/tram/tram.dm
@@ -22,7 +22,7 @@
var/delay_timer = null
- var/list/blacklist = list(/obj/tram/rail,/atom/movable/lighting_object)
+ var/list/blacklist = list(/obj/tram/rail)
var/list/ancwhitelist = list(/obj/tram, /obj/vehicle, /obj/structure/chair, /obj/structure/grille, /obj/structure/window)
/obj/tram/tram_controller/New()
@@ -135,14 +135,20 @@
tram += src
/obj/tram/tram_controller/proc/check_validity(var/atom/movable/AM)
- if(!AM) return 0
- if(is_type_in_list(AM, blacklist)) return 0
- if(!AM.simulated) return 0
+ if(!AM)
+ return FALSE
+
+ if(is_type_in_list(AM, blacklist))
+ return FALSE
+
+ if(!AM.simulated)
+ return FALSE
+
if(AM.anchored)
if(is_type_in_list(AM, ancwhitelist))
- return 1
- return 0
- return 1
+ return TRUE
+ return FALSE
+ return TRUE
/obj/tram/tram_controller/proc/init_controllers()
for(var/obj/tram/controlpad/CCP in tram)