Merge branch 'master' into nova-ert

This commit is contained in:
Novacat
2020-04-29 14:29:09 -04:00
committed by GitHub
168 changed files with 10709 additions and 8709 deletions

View File

@@ -5,7 +5,7 @@ env:
global: global:
- BASENAME="vorestation" # $BASENAME.dmb, $BASENAME.dme, etc. - BASENAME="vorestation" # $BASENAME.dmb, $BASENAME.dme, etc.
- BYOND_MAJOR="513" - BYOND_MAJOR="513"
- BYOND_MINOR="1513" - BYOND_MINOR="1520"
- MACRO_COUNT=4 - MACRO_COUNT=4
cache: cache:

View File

@@ -74,7 +74,8 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
#define INIT_ORDER_XENOARCH -20 #define INIT_ORDER_XENOARCH -20
#define INIT_ORDER_CIRCUIT -21 #define INIT_ORDER_CIRCUIT -21
#define INIT_ORDER_AI -22 #define INIT_ORDER_AI -22
#define INIT_ORDER_GAME_MASTER -24 #define INIT_ORDER_AI_FAST -23
#define INIT_ORDER_GAME_MASTER -24
#define INIT_ORDER_TICKER -50 #define INIT_ORDER_TICKER -50
#define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init. #define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init.

View File

@@ -272,17 +272,17 @@
var/list/hearturfs = list() var/list/hearturfs = list()
for(var/thing in hear) for(var/thing in hear)
if(istype(thing,/obj)) if(istype(thing, /obj)) //Can't use isobj() because /atom/movable returns true in that, and so lighting overlays would be included
objs += thing objs += thing
hearturfs |= get_turf(thing) hearturfs |= get_turf(thing)
else if(istype(thing,/mob)) if(ismob(thing))
mobs += thing mobs += thing
hearturfs |= get_turf(thing) hearturfs |= get_turf(thing)
//A list of every mob with a client //A list of every mob with a client
for(var/mob in player_list) for(var/mob in player_list)
//VOREStation Edit - Trying to fix some vorestation bug. //VOREStation Edit - Trying to fix some vorestation bug.
if(!istype(mob, /mob)) if(!ismob(mob))
player_list -= mob player_list -= mob
crash_with("There is a null or non-mob reference inside player_list ([mob]).") crash_with("There is a null or non-mob reference inside player_list ([mob]).")
continue continue

View File

@@ -1273,14 +1273,8 @@ var/mob/dview/dview_mob = new
if(!center) if(!center)
return return
//VOREStation Add - Emergency Backup
if(!dview_mob)
dview_mob = new()
WARNING("dview mob was lost, and had to be recreated!")
//VOREStation Add End
dview_mob.loc = center dview_mob.loc = center
dview_mob.see_invisible = invis_flags dview_mob.see_invisible = invis_flags
. = view(range, dview_mob) . = view(range, dview_mob)

View File

@@ -2,8 +2,8 @@ SUBSYSTEM_DEF(ai)
name = "AI" name = "AI"
init_order = INIT_ORDER_AI init_order = INIT_ORDER_AI
priority = FIRE_PRIORITY_AI priority = FIRE_PRIORITY_AI
wait = 5 // This gets run twice a second, however this is technically two loops in one, with the second loop being run every four iterations. wait = 2 SECONDS
flags = SS_NO_INIT|SS_TICKER flags = SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/processing = list() var/list/processing = list()
@@ -22,15 +22,11 @@ SUBSYSTEM_DEF(ai)
var/list/currentrun = src.currentrun var/list/currentrun = src.currentrun
while(currentrun.len) while(currentrun.len)
// var/mob/living/L = currentrun[currentrun.len]
var/datum/ai_holder/A = currentrun[currentrun.len] var/datum/ai_holder/A = currentrun[currentrun.len]
--currentrun.len --currentrun.len
if(!A || QDELETED(A) || A.busy) // Doesn't exist or won't exist soon or not doing it this tick if(!A || QDELETED(A) || A.busy) // Doesn't exist or won't exist soon or not doing it this tick
continue continue
if(times_fired % 4 == 0 && A.holder.stat != DEAD) A.handle_strategicals()
A.handle_strategicals()
if(A.holder.stat != DEAD) // The /TG/ version checks stat twice, presumably in-case processing somehow got the mob killed in that instant.
A.handle_tactics()
if(MC_TICK_CHECK) if(MC_TICK_CHECK)
return return

View File

@@ -0,0 +1,32 @@
SUBSYSTEM_DEF(aifast)
name = "AI (Fast)"
init_order = INIT_ORDER_AI_FAST
priority = FIRE_PRIORITY_AI
wait = 0.25 SECONDS // Every quarter second
flags = SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/processing = list()
var/list/currentrun = list()
/datum/controller/subsystem/aifast/stat_entry(msg_prefix)
var/list/msg = list(msg_prefix)
msg += "P:[processing.len]"
..(msg.Join())
/datum/controller/subsystem/aifast/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/datum/ai_holder/A = currentrun[currentrun.len]
--currentrun.len
if(!A || QDELETED(A) || A.busy) // Doesn't exist or won't exist soon or not doing it this tick
continue
A.handle_tactics()
if(MC_TICK_CHECK)
return

View File

@@ -98,7 +98,6 @@
var/turf/destturf var/turf/destturf
var/turf/curturf = get_turf(teleatom) var/turf/curturf = get_turf(teleatom)
var/area/destarea = get_area(destination)
if(precision) if(precision)
var/list/posturfs = circlerangeturfs(destination,precision) var/list/posturfs = circlerangeturfs(destination,precision)
destturf = safepick(posturfs) destturf = safepick(posturfs)
@@ -125,8 +124,6 @@
if(C) if(C)
C.forceMove(destturf) C.forceMove(destturf)
destarea.Entered(teleatom)
return 1 return 1
/datum/teleport/proc/teleport() /datum/teleport/proc/teleport()

View File

@@ -5,6 +5,7 @@
/decl/hierarchy/outfit/job/cargo/qm /decl/hierarchy/outfit/job/cargo/qm
name = OUTFIT_JOB_NAME("Cargo") name = OUTFIT_JOB_NAME("Cargo")
uniform = /obj/item/clothing/under/rank/cargo uniform = /obj/item/clothing/under/rank/cargo
l_ear = /obj/item/device/radio/headset/headset_qm //VOREStation Add
shoes = /obj/item/clothing/shoes/brown shoes = /obj/item/clothing/shoes/brown
glasses = /obj/item/clothing/glasses/sunglasses glasses = /obj/item/clothing/glasses/sunglasses
l_hand = /obj/item/weapon/clipboard l_hand = /obj/item/weapon/clipboard

View File

@@ -101,3 +101,76 @@
r_hand = /obj/item/weapon/melee/energy/sword/imperial r_hand = /obj/item/weapon/melee/energy/sword/imperial
l_hand = /obj/item/weapon/shield/energy/imperial l_hand = /obj/item/weapon/shield/energy/imperial
suit_store = /obj/item/weapon/gun/energy/imperial suit_store = /obj/item/weapon/gun/energy/imperial
/*
SOUTHERN CROSS OUTFITS
Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead goes in lockers. Keep this in mind if editing.
*/
/decl/hierarchy/outfit/job/explorer2
name = OUTFIT_JOB_NAME("Explorer")
shoes = /obj/item/clothing/shoes/boots/winter/explorer
uniform = /obj/item/clothing/under/explorer
l_ear = /obj/item/device/radio/headset/explorer
id_slot = slot_wear_id
pda_slot = slot_l_store
pda_type = /obj/item/device/pda/explorer //VORESTation Edit - Better Brown
id_type = /obj/item/weapon/card/id/explorer //VOREStation Edit
id_pda_assignment = "Explorer"
flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL
backpack_contents = list(/obj/item/clothing/accessory/permit/gun/planetside = 1)
/decl/hierarchy/outfit/job/explorer2/post_equip(mob/living/carbon/human/H)
..()
for(var/obj/item/clothing/accessory/permit/gun/planetside/permit in H.back.contents)
permit.set_name(H.real_name)
/decl/hierarchy/outfit/job/pilot
name = OUTFIT_JOB_NAME("Pilot")
shoes = /obj/item/clothing/shoes/black
uniform = /obj/item/clothing/under/rank/pilot1
suit = /obj/item/clothing/suit/storage/toggle/bomber/pilot
gloves = /obj/item/clothing/gloves/fingerless
glasses = /obj/item/clothing/glasses/fakesunglasses/aviator
l_ear = /obj/item/device/radio/headset/pilot/alt
id_slot = slot_wear_id
pda_slot = slot_belt
pda_type = /obj/item/device/pda //VOREStation Edit - Civilian
id_pda_assignment = "Pilot"
flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL
/decl/hierarchy/outfit/job/medical/sar
name = OUTFIT_JOB_NAME("Field Medic") //VOREStation Edit
uniform = /obj/item/clothing/under/utility/blue
//suit = /obj/item/clothing/suit/storage/hooded/wintercoat/medical/sar //VOREStation Edit
shoes = /obj/item/clothing/shoes/boots/winter/explorer
l_ear = /obj/item/device/radio/headset/sar
l_hand = /obj/item/weapon/storage/firstaid/regular
belt = /obj/item/weapon/storage/belt/medical/emt
pda_slot = slot_l_store
pda_type = /obj/item/device/pda/sar //VOREStation Add
id_pda_assignment = "Field Medic" //VOREStation Edit
flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL
/decl/hierarchy/outfit/job/pathfinder
name = OUTFIT_JOB_NAME("Pathfinder")
shoes = /obj/item/clothing/shoes/boots/winter/explorer
uniform = /obj/item/clothing/under/explorer //TODO: Uniforms.
l_ear = /obj/item/device/radio/headset/explorer
id_slot = slot_wear_id
pda_slot = slot_l_store
pda_type = /obj/item/device/pda/pathfinder
id_type = /obj/item/weapon/card/id/explorer/head
id_pda_assignment = "Pathfinder"
flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL
backpack_contents = list(/obj/item/clothing/accessory/permit/gun/planetside = 1)
/decl/hierarchy/outfit/job/pathfinder/post_equip(mob/living/carbon/human/H)
..()
for(var/obj/item/clothing/accessory/permit/gun/planetside/permit in H.back.contents)
permit.set_name(H.real_name)
/decl/hierarchy/outfit/job/assistant/explorer
id_type = /obj/item/weapon/card/id/explorer
flags = OUTFIT_HAS_BACKPACK|OUTFIT_COMPREHENSIVE_SURVIVAL

View File

@@ -32,7 +32,7 @@
title = "Security Announcement" title = "Security Announcement"
announcement_type = "Security Announcement" announcement_type = "Security Announcement"
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, zlevel) /datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, var/zlevel)
if(!message) if(!message)
return return
var/message_title = new_title ? new_title : title var/message_title = new_title ? new_title : title
@@ -52,11 +52,38 @@
Sound(message_sound, zlevels) Sound(message_sound, zlevels)
Log(message, message_title) Log(message, message_title)
datum/announcement/proc/Message(var/message as text, var/message_title as text, var/list/zlevels) datum/announcement/proc/Message(message as text, message_title as text, var/list/zlevels)
global_announcer.autosay("<span class='alert'>[message_title]:</span> [message]", announcer ? announcer : ANNOUNCER_NAME, zlevels) for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
to_chat(M, "<h2 class='alert'>[title]</h2>")
to_chat(M, "<span class='alert'>[message]</span>")
if (announcer)
to_chat(M, "<span class='alert'> -[html_encode(announcer)]</span>")
datum/announcement/minor/Message(var/message as text, var/message_title as text, var/list/zlevels) // You'll need to update these to_world usages if you want to make these z-level specific ~Aro
global_announcer.autosay(message, announcer ? announcer : ANNOUNCER_NAME, zlevels) datum/announcement/minor/Message(message as text, message_title as text)
to_world("<b>[message]</b>")
datum/announcement/priority/Message(message as text, message_title as text)
to_world("<h1 class='alert'>[message_title]</h1>")
to_world("<span class='alert'>[message]</span>")
if(announcer)
to_world("<span class='alert'> -[html_encode(announcer)]</span>")
to_world("<br>")
datum/announcement/priority/command/Message(message as text, message_title as text, var/list/zlevels)
var/command
command += "<h1 class='alert'>[command_name()] Update</h1>"
if (message_title)
command += "<br><h2 class='alert'>[message_title]</h2>"
command += "<br><span class='alert'>[message]</span><br>"
command += "<br>"
for(var/mob/M in player_list)
if(zlevels && !(get_z(M) in zlevels))
continue
if(!istype(M,/mob/new_player) && !isdeaf(M))
to_chat(M, command)
datum/announcement/priority/Message(var/message as text, var/message_title as text, var/list/zlevels) datum/announcement/priority/Message(var/message as text, var/message_title as text, var/list/zlevels)
global_announcer.autosay("<span class='alert'>[message_title]:</span> [message]", announcer ? announcer : ANNOUNCER_NAME, zlevels) global_announcer.autosay("<span class='alert'>[message_title]:</span> [message]", announcer ? announcer : ANNOUNCER_NAME, zlevels)

View File

@@ -4,10 +4,10 @@
/area/Entered(var/atom/movable/AM, oldLoc) /area/Entered(var/atom/movable/AM, oldLoc)
. = ..() . = ..()
if(enter_message && ismob(AM)) if(enter_message && isliving(AM))
to_chat(AM, enter_message) to_chat(AM, enter_message)
/area/Exited(var/atom/movable/AM, newLoc) /area/Exited(var/atom/movable/AM, newLoc)
. = ..() . = ..()
if(exit_message && ismob(AM)) if(exit_message && isliving(AM))
to_chat(AM, exit_message) to_chat(AM, exit_message)

View File

@@ -7,7 +7,6 @@
var/moving_diagonally var/moving_diagonally
var/move_speed = 10 var/move_speed = 10
var/l_move_time = 1 var/l_move_time = 1
var/m_flag = 1
var/throwing = 0 var/throwing = 0
var/thrower var/thrower
var/turf/throw_source = null var/turf/throw_source = null
@@ -65,71 +64,80 @@
return ..() return ..()
//////////////////////////////////////// ////////////////////////////////////////
// Here's where we rewrite how byond handles movement except slightly different
// To be removed on step_ conversion
// All this work to prevent a second bump
/atom/movable/Move(atom/newloc, direct=0)
. = FALSE
if(!newloc || newloc == loc)
return
if(!direct)
direct = get_dir(src, newloc)
set_dir(direct)
if(!loc.Exit(src, newloc))
return
if(!newloc.Enter(src, src.loc))
return
if(!check_multi_tile_move_density_dir(direct, locs)) // We're big, and we can't move that way.
return
// Past this is the point of no return
if(!locs || locs.len <= 1) // We're not a multi-tile object.
var/atom/oldloc = loc
var/area/oldarea = get_area(oldloc)
var/area/newarea = get_area(newloc)
loc = newloc
. = TRUE
oldloc.Exited(src, newloc)
if(oldarea != newarea)
oldarea.Exited(src, newloc)
for(var/i in oldloc)
if(i == src) // Multi tile objects
continue
var/atom/movable/thing = i
thing.Uncrossed(src)
newloc.Entered(src, oldloc)
if(oldarea != newarea)
newarea.Entered(src, oldloc)
for(var/i in loc)
if(i == src) // Multi tile objects
continue
var/atom/movable/thing = i
thing.Crossed(src)
else if(newloc) // We're a multi-tile object.
. = doMove(newloc)
//
////////////////////////////////////////
/atom/movable/Move(atom/newloc, direct = 0) /atom/movable/Move(atom/newloc, direct = 0)
// Didn't pass enough info
if(!loc || !newloc) if(!loc || !newloc)
return FALSE return FALSE
// Store this early before we might move, it's used several places
var/atom/oldloc = loc var/atom/oldloc = loc
// If we're not moving to the same spot (why? does that even happen?)
if(loc != newloc) if(loc != newloc)
if(!direct) if(!direct)
direct = get_dir(oldloc, newloc) direct = get_dir(oldloc, newloc)
if (!(direct & (direct - 1))) //Cardinal move if (IS_CARDINAL(direct)) //Cardinal move
. = ..() // Track our failure if any in this value
else //Diagonal move, split it into cardinal moves . = TRUE
// Face the direction of movement
set_dir(direct)
// Check to make sure we can leave
if(!loc.Exit(src, newloc))
. = FALSE
// Check to make sure we can enter, if we haven't already failed
if(. && !newloc.Enter(src, src.loc))
. = FALSE
// Check to make sure if we're multi-tile we can move, if we haven't already failed
if(. && !check_multi_tile_move_density_dir(direct, locs))
. = FALSE
// Definitely moving if you enter this, no failures so far
if(. && locs.len <= 1) // We're not a multi-tile object.
var/area/oldarea = get_area(oldloc)
var/area/newarea = get_area(newloc)
var/old_z = get_z(oldloc)
var/dest_z = get_z(newloc)
// Do The Move
loc = newloc
. = TRUE
// So objects can be informed of z-level changes
if (old_z != dest_z)
onTransitZ(old_z, dest_z)
// We don't call parent so we are calling this for byond
oldloc.Exited(src, newloc)
if(oldarea != newarea)
oldarea.Exited(src, newloc)
// Multi-tile objects can't reach here, otherwise you'd need to avoid uncrossing yourself
for(var/i in oldloc)
var/atom/movable/thing = i
// We don't call parent so we are calling this for byond
thing.Uncrossed(src)
// We don't call parent so we are calling this for byond
newloc.Entered(src, oldloc)
if(oldarea != newarea)
newarea.Entered(src, oldloc)
// Multi-tile objects can't reach here, otherwise you'd need to avoid uncrossing yourself
for(var/i in loc)
var/atom/movable/thing = i
// We don't call parent so we are calling this for byond
thing.Crossed(src)
// We're a multi-tile object (multiple locs)
else if(. && newloc)
. = doMove(newloc)
//Diagonal move, split it into cardinal moves
else
moving_diagonally = FIRST_DIAG_STEP moving_diagonally = FIRST_DIAG_STEP
var/first_step_dir var/first_step_dir
// The `&& moving_diagonally` checks are so that a forceMove taking // The `&& moving_diagonally` checks are so that a forceMove taking
@@ -174,32 +182,32 @@
first_step_dir = WEST first_step_dir = WEST
moving_diagonally = SECOND_DIAG_STEP moving_diagonally = SECOND_DIAG_STEP
. = step(src, SOUTH) . = step(src, SOUTH)
if(moving_diagonally == SECOND_DIAG_STEP) // If we failed, turn to face the direction of the first step at least
if(!.) if(!. && moving_diagonally == SECOND_DIAG_STEP)
set_dir(first_step_dir) set_dir(first_step_dir)
//else if (!inertia_moving) // Done, regardless!
// inertia_next_move = world.time + inertia_move_delay
// newtonian_move(direct)
moving_diagonally = 0 moving_diagonally = 0
// We return because step above will call Move() and we don't want to do shenanigans back in here again
return return
if(!loc || (loc == oldloc && oldloc != newloc)) else if(!loc || (loc == oldloc))
last_move = 0 last_move = 0
return return
// If we moved, call Moved() on ourselves
if(.) if(.)
Moved(oldloc, direct) Moved(oldloc, direct, FALSE)
//Polaris stuff // Update timers/cooldown stuff
move_speed = world.time - l_move_time move_speed = world.time - l_move_time
l_move_time = world.time l_move_time = world.time
m_flag = 1 last_move = direct // The direction you last moved
//End // set_dir(direct) //Don't think this is necessary
last_move = direct // Handle any buckled mobs on this movable
set_dir(direct) if(has_buckled_mobs())
if(. && has_buckled_mobs() && !handle_buckled_mob_movement(loc,direct)) //movement failed due to buckled mob(s) handle_buckled_mob_movement(oldloc,direct)
return FALSE
//VOREStation Add //VOREStation Add
else if(. && riding_datum) else if(. && riding_datum)
riding_datum.handle_vehicle_layer() riding_datum.handle_vehicle_layer()
@@ -207,19 +215,12 @@
//VOREStation Add End //VOREStation Add End
//Called after a successful Move(). By this point, we've already moved //Called after a successful Move(). By this point, we've already moved
/atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE) /atom/movable/proc/Moved(atom/old_loc, direction, forced = FALSE)
//if (!inertia_moving)
// inertia_next_move = world.time + inertia_move_delay
// newtonian_move(Dir)
//if (length(client_mobs_in_contents))
// update_parallax_contents()
return TRUE return TRUE
// Make sure you know what you're doing if you call this, this is intended to only be called by byond directly. // Make sure you know what you're doing if you call this, this is intended to only be called by byond directly.
// You probably want CanPass() // You probably want CanPass()
/atom/movable/Cross(atom/movable/AM) /atom/movable/Cross(atom/movable/AM)
. = TRUE
return CanPass(AM, loc) return CanPass(AM, loc)
/atom/movable/CanPass(atom/movable/mover, turf/target) /atom/movable/CanPass(atom/movable/mover, turf/target)
@@ -261,56 +262,87 @@
return doMove(null) return doMove(null)
/atom/movable/proc/doMove(atom/destination) /atom/movable/proc/doMove(atom/destination)
. = FALSE var/atom/oldloc = loc
var/area/old_area = get_area(oldloc)
var/same_loc = oldloc == destination
if(destination) if(destination)
var/atom/oldloc = loc
var/same_loc = oldloc == destination
var/area/old_area = get_area(oldloc)
var/area/destarea = get_area(destination) var/area/destarea = get_area(destination)
// Do The Move
last_move = 0
loc = destination loc = destination
// Unset this in case it was set in some other proc. We're no longer moving diagonally for sure.
moving_diagonally = 0 moving_diagonally = 0
// We are moving to a different loc
if(!same_loc) if(!same_loc)
// Not moving out of nullspace
if(oldloc) if(oldloc)
oldloc.Exited(src, destination) oldloc.Exited(src, destination)
// If it's not the same area, Exited() it
if(old_area && old_area != destarea) if(old_area && old_area != destarea)
old_area.Exited(src, destination) old_area.Exited(src, destination)
for(var/atom/movable/AM in oldloc)
// Uncross everything where we left
for(var/i in oldloc)
var/atom/movable/AM = i
if(AM == src)
continue
AM.Uncrossed(src) AM.Uncrossed(src)
// Information about turf and z-levels for source and dest collected
var/turf/oldturf = get_turf(oldloc) var/turf/oldturf = get_turf(oldloc)
var/turf/destturf = get_turf(destination) var/turf/destturf = get_turf(destination)
var/old_z = (oldturf ? oldturf.z : null) var/old_z = (oldturf ? oldturf.z : null)
var/dest_z = (destturf ? destturf.z : null) var/dest_z = (destturf ? destturf.z : null)
// So objects can be informed of z-level changes
if (old_z != dest_z) if (old_z != dest_z)
onTransitZ(old_z, dest_z) onTransitZ(old_z, dest_z)
// Destination atom Entered
destination.Entered(src, oldloc) destination.Entered(src, oldloc)
// Entered() the new area if it's not the same area
if(destarea && old_area != destarea) if(destarea && old_area != destarea)
destarea.Entered(src, oldloc) destarea.Entered(src, oldloc)
for(var/atom/movable/AM in destination) // We ignore ourselves because if we're multi-tile we might be in both old and new locs
for(var/i in destination)
var/atom/movable/AM = i
if(AM == src) if(AM == src)
continue continue
AM.Crossed(src, oldloc) AM.Crossed(src, oldloc)
// Call our thingy to inform everyone we moved
Moved(oldloc, NONE, TRUE)
// Break pulling if we are too far to pull now. // Break pulling if we are too far to pull now.
if(pulledby && (pulledby.z != src.z || get_dist(pulledby, src) > 1)) if(pulledby && (pulledby.z != src.z || get_dist(pulledby, src) > 1))
pulledby.stop_pulling() pulledby.stop_pulling()
Moved(oldloc, NONE, TRUE) // We moved
. = TRUE return TRUE
//If no destination, move the atom into nullspace (don't do this unless you know what you're doing) //If no destination, move the atom into nullspace (don't do this unless you know what you're doing)
else else if(oldloc)
. = TRUE
if (loc)
var/atom/oldloc = loc
var/area/old_area = get_area(oldloc)
oldloc.Exited(src, null)
if(old_area)
old_area.Exited(src, null)
loc = null loc = null
// Uncross everything where we left (no multitile safety like above because we are definitely not still there)
for(var/i in oldloc)
var/atom/movable/AM = i
AM.Uncrossed(src)
// Exited() our loc and area
oldloc.Exited(src, null)
if(old_area)
old_area.Exited(src, null)
// We moved
return TRUE
/atom/movable/proc/onTransitZ(old_z,new_z) /atom/movable/proc/onTransitZ(old_z,new_z)
GLOB.z_moved_event.raise_event(src, old_z, new_z) GLOB.z_moved_event.raise_event(src, old_z, new_z)
for(var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care. for(var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.

View File

@@ -138,14 +138,13 @@
. = ..() //process movement... . = ..() //process movement...
if(.)//.. if did move, ram the turf we get in /obj/effect/meteor/Moved(atom/old_loc, direction, forced = FALSE)
var/turf/T = get_turf(loc) . = ..()
ram_turf(T) var/turf/T = get_turf(loc)
ram_turf(T)
if(prob(10) && !istype(T, /turf/space))//randomly takes a 'hit' from ramming if(prob(10) && !istype(T, /turf/space)) //randomly takes a 'hit' from ramming
get_hit() get_hit()
return .
/obj/effect/meteor/Destroy() /obj/effect/meteor/Destroy()
walk(src,0) //this cancels the walk_towards() proc walk(src,0) //this cancels the walk_towards() proc

View File

@@ -5,6 +5,8 @@
/datum/job/hop /datum/job/hop
disallow_jobhop = TRUE disallow_jobhop = TRUE
pto_type = PTO_CIVILIAN pto_type = PTO_CIVILIAN
departments = list(DEPARTMENT_COMMAND, DEPARTMENT_CIVILIAN)
departments_managed = list(DEPARTMENT_CIVILIAN, DEPARTMENT_CARGO, DEPARTMENT_PLANET)
alt_titles = list("Crew Resources Officer" = /datum/alt_title/cro, alt_titles = list("Crew Resources Officer" = /datum/alt_title/cro,
"Deputy Director" = /datum/alt_title/deputy_director) "Deputy Director" = /datum/alt_title/deputy_director)

View File

@@ -39,16 +39,16 @@ var/const/SAR =(1<<14)
faction = "Station" faction = "Station"
total_positions = 1 total_positions = 1
spawn_positions = 1 spawn_positions = 1
supervisors = "the research director" supervisors = "the Head of Personnel"
selection_color = "#d6d05c" selection_color = "#d6d05c"
economic_modifier = 7 economic_modifier = 8
minimal_player_age = 7 minimal_player_age = 7
pto_type = PTO_EXPLORATION pto_type = PTO_EXPLORATION
access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_research, access_gateway) access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway)
minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_research, access_gateway) minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway)
outfit_type = /decl/hierarchy/outfit/job/pathfinder outfit_type = /decl/hierarchy/outfit/job/pathfinder
job_description = " The Pathfinder's job is to lead and manage expeditions, and is the primary authority on all off-station expeditions." job_description = "The Pathfinder's job is to lead and manage expeditions, and is the primary authority on all off-station expeditions."
/datum/alt_title/pathfinder /datum/alt_title/pathfinder
title = "Pathfinder" title = "Pathfinder"
@@ -59,9 +59,9 @@ var/const/SAR =(1<<14)
departments = list(DEPARTMENT_PLANET) departments = list(DEPARTMENT_PLANET)
department_flag = MEDSCI department_flag = MEDSCI
faction = "Station" faction = "Station"
total_positions = 2 total_positions = 4
spawn_positions = 2 spawn_positions = 4
supervisors = "the pathfinder and the head of personnel" supervisors = "the Pathfinder and the Head of Personnel"
selection_color = "#999440" selection_color = "#999440"
economic_modifier = 5 economic_modifier = 5
minimal_player_age = 3 minimal_player_age = 3
@@ -82,12 +82,12 @@ var/const/SAR =(1<<14)
faction = "Station" faction = "Station"
total_positions = 3 total_positions = 3
spawn_positions = 3 spawn_positions = 3
supervisors = "the pathfinder and the research director" supervisors = "the Pathfinder and the Head of Personnel"
selection_color = "#999440" selection_color = "#999440"
economic_modifier = 6 economic_modifier = 6
pto_type = PTO_EXPLORATION pto_type = PTO_EXPLORATION
access = list(access_explorer, access_research) access = list(access_explorer, access_external_airlocks, access_eva)
minimal_access = list(access_explorer, access_research) minimal_access = list(access_explorer, access_external_airlocks, access_eva)
outfit_type = /decl/hierarchy/outfit/job/explorer2 outfit_type = /decl/hierarchy/outfit/job/explorer2
job_description = "An Explorer searches for interesting things, and returns them to the station." job_description = "An Explorer searches for interesting things, and returns them to the station."
@@ -97,12 +97,12 @@ var/const/SAR =(1<<14)
/datum/job/sar /datum/job/sar
title = "Field Medic" title = "Field Medic"
flag = SAR flag = SAR
departments = list(DEPARTMENT_PLANET) departments = list(DEPARTMENT_PLANET, DEPARTMENT_MEDICAL)
department_flag = MEDSCI department_flag = MEDSCI
faction = "Station" faction = "Station"
total_positions = 2 total_positions = 2
spawn_positions = 2 spawn_positions = 2
supervisors = "the pathfinder and the chief medical officer" supervisors = "the Pathfinder and the Chief Medical Officer"
selection_color = "#999440" selection_color = "#999440"
economic_modifier = 6 economic_modifier = 6
minimal_player_age = 3 minimal_player_age = 3

View File

@@ -5,11 +5,11 @@
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors, access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage, access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network) access_RC_announce, access_keycard_auth, access_tcomsat, access_xenoarch, access_eva, access_network)
minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors, access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage, access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network) access_RC_announce, access_keycard_auth, access_tcomsat, access_xenoarch, access_eva, access_network)
/datum/job/scientist /datum/job/scientist
spawn_positions = 5 spawn_positions = 5

View File

@@ -5,11 +5,11 @@
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_construction, access_mailsorting, access_research, access_engine, access_mining, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) access_heads, access_hos, access_RC_announce, access_keycard_auth, access_external_airlocks)
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_construction, access_mailsorting, access_research, access_engine, access_mining, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) access_heads, access_hos, access_RC_announce, access_keycard_auth, access_external_airlocks)
/datum/job/warden /datum/job/warden
pto_type = PTO_SECURITY pto_type = PTO_SECURITY

View File

@@ -13,9 +13,9 @@
cable.amount = 100 cable.amount = 100
..() ..()
/obj/machinery/cablelayer/Move(new_turf,M_Dir) /obj/machinery/cablelayer/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
layCable(new_turf,M_Dir) layCable(loc,direction)
/obj/machinery/cablelayer/attack_hand(mob/user as mob) /obj/machinery/cablelayer/attack_hand(mob/user as mob)
if(!cable&&!on) if(!cable&&!on)

View File

@@ -4,7 +4,7 @@
/obj/machinery/organ_printer /obj/machinery/organ_printer
name = "organ printer" name = "organ printer"
desc = "It's a machine that prints organs." desc = "It's a machine that prints organs."
icon = 'icons/obj/surgery.dmi' icon = 'icons/obj/surgery_vr.dmi' //VOREStation Edit
icon_state = "bioprinter" icon_state = "bioprinter"
anchored = 1 anchored = 1
@@ -69,11 +69,13 @@
return ..() return ..()
/obj/machinery/organ_printer/update_icon() /obj/machinery/organ_printer/update_icon()
overlays.Cut() //VOREStation Edit
cut_overlays()
if(panel_open) if(panel_open)
overlays += "bioprinter_panel_open" add_overlay("bioprinter_panel_open")
if(printing) if(printing)
overlays += "bioprinter_working" add_overlay("bioprinter_working")
//VOREStation Edit End
/obj/machinery/organ_printer/New() /obj/machinery/organ_printer/New()
..() ..()

View File

@@ -119,6 +119,12 @@
check_eye(user) check_eye(user)
return 1 return 1
/obj/machinery/computer/security/relaymove(mob/user,direct)
var/turf/T = get_turf(current_camera)
for(var/i; i < 10; i++)
T = get_step(T, direct)
jump_on_click(user, T)
//Camera control: moving. //Camera control: moving.
/obj/machinery/computer/security/proc/jump_on_click(var/mob/user,var/A) /obj/machinery/computer/security/proc/jump_on_click(var/mob/user,var/A)
if(user.machine != src) if(user.machine != src)
@@ -185,22 +191,15 @@
update_use_power(USE_POWER_IDLE) update_use_power(USE_POWER_IDLE)
//Camera control: mouse. //Camera control: mouse.
/* Oh my god
/atom/DblClick() /atom/DblClick()
..() ..()
if(istype(usr.machine,/obj/machinery/computer/security)) if(istype(usr.machine,/obj/machinery/computer/security))
var/obj/machinery/computer/security/console = usr.machine var/obj/machinery/computer/security/console = usr.machine
console.jump_on_click(usr,src) console.jump_on_click(usr,src)
//Camera control: arrow keys. */
/mob/Move(n,direct)
if(istype(machine,/obj/machinery/computer/security))
var/obj/machinery/computer/security/console = machine
var/turf/T = get_turf(console.current_camera)
for(var/i;i<10;i++)
T = get_step(T,direct)
console.jump_on_click(src,T)
return
return ..(n,direct)
//Camera control: arrow keys.
/obj/machinery/computer/security/telescreen /obj/machinery/computer/security/telescreen
name = "Telescreen" name = "Telescreen"
desc = "Used for watching an empty arena." desc = "Used for watching an empty arena."

View File

@@ -5,66 +5,27 @@
icon_screen = "power:0" icon_screen = "power:0"
light_color = "#a97faa" light_color = "#a97faa"
circuit = /obj/item/weapon/circuitboard/shutoff_monitor circuit = /obj/item/weapon/circuitboard/shutoff_monitor
var/datum/nano_module/shutoff_monitor/monitor
/obj/machinery/computer/shutoff_monitor/attack_hand(var/mob/user) /obj/machinery/computer/shutoff_monitor/New()
..()
monitor = new(src)
/obj/machinery/computer/shutoff_monitor/Destroy()
qdel(monitor)
monitor = null
..()
/obj/machinery/computer/shutoff_monitor/attack_hand(var/mob/user as mob)
..() ..()
ui_interact(user) ui_interact(user)
/obj/machinery/computer/shutoff_monitor/attack_robot(var/mob/user) // Borgs and AI will want to see this too /obj/machinery/computer/shutoff_monitor/ui_interact(mob/user, ui_key = "shutoff_monitor", var/datum/nanoui/ui = null, var/force_open = 1)
..() monitor.ui_interact(user, ui_key, ui, force_open)
ui_interact(user)
/obj/machinery/computer/shutoff_monitor/attack_ai(var/mob/user)
ui_interact(user)
/obj/machinery/computer/shutoff_monitor/ui_interact(mob/user, ui_key = "shutoff_monitor", var/datum/nanoui/ui = null, var/force_open = 1, var/key_state = null)
var/data[0]
data["valves"] = list()
for(var/obj/machinery/atmospherics/valve/shutoff/S in GLOB.shutoff_valves)
data["valves"][++data["valves"].len] = list("name" = S.name, "enable" = S.close_on_leaks, "open" = S.open, "x" = S.x, "y" = S.y, "z" = S.z, "ref" = "\ref[S]")
// update the ui if it exists, returns null if no ui is passed/found
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "shutoff_monitor.tmpl", "Automated Shutoff Valve Monitor", 625, 700, state = key_state)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every 20 Master Controller tick
ui.set_auto_update(20) // Longer term to reduce the rate of data collection and processing
/obj/machinery/computer/shutoff_monitor/Topic(href, href_list)
if(..())
return 1
if(href_list["toggle_enable"])
var/obj/machinery/atmospherics/valve/shutoff/S = locate(href_list["toggle_enable"])
// Invalid ref
if(!istype(S))
return 0
S.close_on_leaks = !S.close_on_leaks
if(href_list["toggle_open"])
var/obj/machinery/atmospherics/valve/shutoff/S = locate(href_list["toggle_open"])
// Invalid ref
if(!istype(S))
return 0
if(S.open)
S.close()
else
S.open()
return
/obj/machinery/computer/shutoff_monitor/update_icon() /obj/machinery/computer/shutoff_monitor/update_icon()
..() ..()
if(!(stat & (NOPOWER|BROKEN))) if(!(stat & (NOPOWER|BROKEN)))
add_overlay("ai-fixer-empty") add_overlay("ai-fixer-empty")
else
cut_overlay("ai-fixer-empty")

View File

@@ -209,8 +209,9 @@
/obj/machinery/computer/timeclock/proc/checkCardCooldown() /obj/machinery/computer/timeclock/proc/checkCardCooldown()
if(!card) if(!card)
return FALSE return FALSE
if((world.time - card.last_job_switch) < 15 MINUTES) var/time_left = 10 MINUTES - (world.time - card.last_job_switch)
to_chat(usr, "You need to wait at least 15 minutes after last duty switch.") if(time_left > 0)
to_chat(usr, "You need to wait another [round((time_left/10)/60, 1)] minute\s before you can switch.")
return FALSE return FALSE
return TRUE return TRUE
@@ -270,4 +271,4 @@
/obj/machinery/computer/timeclock/premade/west /obj/machinery/computer/timeclock/premade/west
dir = 4 dir = 4
pixel_x = -26 pixel_x = -26

View File

@@ -490,8 +490,7 @@
else else
source.thermal_conductivity = initial(source.thermal_conductivity) source.thermal_conductivity = initial(source.thermal_conductivity)
/obj/machinery/door/Move(new_loc, new_dir) /obj/machinery/door/Moved(atom/old_loc, direction, forced = FALSE)
//update_nearby_tiles()
. = ..() . = ..()
if(width > 1) if(width > 1)
if(dir in list(EAST, WEST)) if(dir in list(EAST, WEST))

View File

@@ -16,7 +16,7 @@
QDEL_NULL(filler2) QDEL_NULL(filler2)
return ..() return ..()
/obj/machinery/door/airlock/multi_tile/Move() /obj/machinery/door/airlock/multi_tile/Moved(atom/old_loc, direction, forced = FALSE)
. = ..() . = ..()
SetBounds() SetBounds()

View File

@@ -12,8 +12,8 @@
T = new/obj/item/stack/tile/floor(src) T = new/obj/item/stack/tile/floor(src)
..() ..()
/obj/machinery/floorlayer/Move(new_turf,M_Dir) /obj/machinery/floorlayer/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
if(on) if(on)
if(mode["dismantle"]) if(mode["dismantle"])
@@ -26,7 +26,7 @@
CollectTiles(old_turf) CollectTiles(old_turf)
old_turf = new_turf old_turf = loc
/obj/machinery/floorlayer/attack_hand(mob/user as mob) /obj/machinery/floorlayer/attack_hand(mob/user as mob)
on=!on on=!on

View File

@@ -88,23 +88,13 @@
// Registering moved_event observers for all machines is too expensive. Instead we do it ourselves. // Registering moved_event observers for all machines is too expensive. Instead we do it ourselves.
// 99% of machines are always on a turf anyway, very few need recursive move handling. // 99% of machines are always on a turf anyway, very few need recursive move handling.
/obj/machinery/Move() /obj/machinery/Moved(atom/old_loc, direction, forced = FALSE)
var/old_loc = loc . = ..()
if((. = ..())) update_power_on_move(src, old_loc, loc)
update_power_on_move(src, old_loc, loc) if(ismovable(loc)) // Register for recursive movement (if the thing we're inside moves)
if(ismovable(loc)) // Register for recursive movement (if the thing we're inside moves) GLOB.moved_event.register(loc, src, .proc/update_power_on_move)
GLOB.moved_event.register(loc, src, .proc/update_power_on_move) if(ismovable(old_loc)) // Unregister recursive movement.
if(ismovable(old_loc)) // Unregister recursive movement. GLOB.moved_event.unregister(old_loc, src, .proc/update_power_on_move)
GLOB.moved_event.unregister(old_loc, src, .proc/update_power_on_move)
/obj/machinery/forceMove(atom/destination)
var/old_loc = loc
if((. = ..()))
update_power_on_move(src, old_loc, loc)
if(ismovable(loc)) // Register for recursive movement (if the thing we're inside moves)
GLOB.moved_event.register(loc, src, .proc/update_power_on_move)
if(ismovable(old_loc)) // Unregister recursive movement.
GLOB.moved_event.unregister(old_loc, src, .proc/update_power_on_move)
/obj/machinery/proc/update_power_on_move(atom/movable/mover, atom/old_loc, atom/new_loc) /obj/machinery/proc/update_power_on_move(atom/movable/mover, atom/old_loc, atom/new_loc)
var/area/old_area = get_area(old_loc) var/area/old_area = get_area(old_loc)

View File

@@ -132,12 +132,6 @@ Buildable meters
src.set_dir(turn(src.dir, 270)) src.set_dir(turn(src.dir, 270))
fixdir() fixdir()
// If you want to disable pipe dir changing when pulled, uncomment this
// /obj/item/pipe/Move()
// var/old_dir = dir
// . = ..()
// set_dir(old_dir) //pipes changing direction when moved is just annoying and buggy
// Don't let pulling a pipe straighten it out. // Don't let pulling a pipe straighten it out.
/obj/item/pipe/binary/bendable/Move() /obj/item/pipe/binary/bendable/Move()
var/old_bent = !IS_CARDINAL(dir) var/old_bent = !IS_CARDINAL(dir)

View File

@@ -42,15 +42,15 @@
..() ..()
// Whenever we move, if enabled try and lay pipe // Whenever we move, if enabled try and lay pipe
/obj/machinery/pipelayer/Move(new_turf,M_Dir) /obj/machinery/pipelayer/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
if(on && a_dis) if(on && a_dis)
dismantleFloor(old_turf) dismantleFloor(old_turf)
layPipe(old_turf, M_Dir, old_dir) layPipe(old_turf, direction, old_dir)
old_turf = new_turf old_turf = loc
old_dir = turn(M_Dir, 180) old_dir = turn(direction, 180)
/obj/machinery/pipelayer/attack_hand(mob/user as mob) /obj/machinery/pipelayer/attack_hand(mob/user as mob)
if(..()) if(..())

View File

@@ -1,7 +1,7 @@
/obj/machinery/seed_extractor /obj/machinery/seed_extractor
name = "seed extractor" name = "seed extractor"
desc = "Extracts and bags seeds from produce." desc = "Extracts and bags seeds from produce."
icon = 'icons/obj/hydroponics_machines.dmi' icon = 'icons/obj/hydroponics_machines_vr.dmi' //VOREStation Edit
icon_state = "sextractor" icon_state = "sextractor"
density = 1 density = 1
anchored = 1 anchored = 1

View File

@@ -88,7 +88,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
signal.data["compression"], signal.data["level"], signal.frequency, signal.data["compression"], signal.data["level"], signal.frequency,
signal.data["verb"], forced_radios) signal.data["verb"], forced_radios)
/** #### - Simple Broadcast - #### **/ /** #### - Simple Broadcast - #### **/
if(signal.data["type"] == SIGNAL_SIMPLE) if(signal.data["type"] == SIGNAL_SIMPLE)
@@ -346,7 +345,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
var/data, var/compression, var/list/level, var/freq, var/verbage = "says", var/data, var/compression, var/list/level, var/freq, var/verbage = "says",
var/list/forced_radios) var/list/forced_radios)
/* ###### Prepare the radio connection ###### */ /* ###### Prepare the radio connection ###### */
var/display_freq = freq var/display_freq = freq

View File

@@ -352,11 +352,9 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
circuit = /obj/item/weapon/circuitboard/telecomms/hub circuit = /obj/item/weapon/circuitboard/telecomms/hub
long_range_link = 1 long_range_link = 1
netspeed = 40 netspeed = 40
var/list/telecomms_map
/obj/machinery/telecomms/hub/Initialize() /obj/machinery/telecomms/hub/Initialize()
. = ..() . = ..()
LAZYINITLIST(telecomms_map)
component_parts = list() component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/subspace/sub_filter(src) component_parts += new /obj/item/weapon/stock_parts/subspace/sub_filter(src)
component_parts += new /obj/item/weapon/stock_parts/subspace/sub_filter(src) component_parts += new /obj/item/weapon/stock_parts/subspace/sub_filter(src)
@@ -365,20 +363,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
component_parts += new /obj/item/stack/cable_coil(src, 2) component_parts += new /obj/item/stack/cable_coil(src, 2)
RefreshParts() RefreshParts()
/obj/machinery/telecomms/hub/process()
. = ..()
telecomms_map.Cut()
if(!on)
return
for(var/M in links)
if(istype(M,/obj/machinery/telecomms/receiver) || istype(M,/obj/machinery/telecomms/relay))
var/obj/machinery/telecomms/R = M
if(!R.on)
continue
telecomms_map |= R.listening_level
/obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from) /obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
if(is_freq_listening(signal)) if(is_freq_listening(signal))
if(istype(machine_from, /obj/machinery/telecomms/receiver)) if(istype(machine_from, /obj/machinery/telecomms/receiver))
@@ -751,17 +735,10 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
return FALSE return FALSE
//Items don't have a Z when inside an object or mob //Items don't have a Z when inside an object or mob
var/turf/src_turf = get_turf(A) var/turf/src_z = get_z(A)
var/turf/dst_turf = get_turf(B) var/turf/dst_z = get_z(B)
//Nullspace, probably. //Nullspace, probably.
if(!src_turf || !dst_turf)
return FALSE
var/src_z = src_turf.z
var/dst_z = dst_turf.z
//Mysterious!
if(!src_z || !dst_z) if(!src_z || !dst_z)
return FALSE return FALSE
@@ -769,11 +746,4 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(ad_hoc && src_z == dst_z) if(ad_hoc && src_z == dst_z)
return TRUE return TRUE
//Let's look at hubs and see what we got. return src_z in using_map.get_map_levels(dst_z)
var/can_comm = FALSE
for(var/obj/machinery/telecomms/hub/H in telecomms_list)
if((src_z in H.telecomms_map) && (dst_z in H.telecomms_map))
can_comm = TRUE
break
return can_comm

View File

@@ -382,11 +382,9 @@
//////// Movement procs //////// //////// Movement procs ////////
////////////////////////////////// //////////////////////////////////
/obj/mecha/Move() /obj/mecha/Moved(atom/old_loc, direction, forced = FALSE)
. = ..() . = ..()
if(.) MoveAction()
MoveAction()
return
/obj/mecha/proc/MoveAction() //Allows mech equipment to do an action once the mech moves /obj/mecha/proc/MoveAction() //Allows mech equipment to do an action once the mech moves
if(!equipment.len) if(!equipment.len)

View File

@@ -176,19 +176,15 @@
add_fingerprint(user) add_fingerprint(user)
return M return M
/atom/movable/proc/handle_buckled_mob_movement(newloc,direct) /atom/movable/proc/handle_buckled_mob_movement(atom/old_loc, direct)
if(has_buckled_mobs()) for(var/A in buckled_mobs)
for(var/A in buckled_mobs) var/mob/living/L = A
var/mob/living/L = A L.forceMove(loc, direct)
// if(!L.Move(newloc, direct)) L.last_move = last_move
if(!L.forceMove(newloc, direct)) L.inertia_dir = last_move
loc = L.loc
last_move = L.last_move if(!buckle_dir)
L.inertia_dir = last_move L.set_dir(dir)
return FALSE
else
L.set_dir(dir)
return TRUE
/atom/movable/proc/can_buckle_check(mob/living/M, forced = FALSE) /atom/movable/proc/can_buckle_check(mob/living/M, forced = FALSE)
if(!buckled_mobs) if(!buckled_mobs)

View File

@@ -113,12 +113,11 @@ steam.start() -- spawns the effect
T.hotspot_expose(1000,100) T.hotspot_expose(1000,100)
return ..() return ..()
/obj/effect/effect/sparks/Move() /obj/effect/effect/sparks/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
var/turf/T = src.loc if(isturf(loc))
if (istype(T, /turf)) var/turf/T = loc
T.hotspot_expose(1000,100) T.hotspot_expose(1000,100)
return
/datum/effect/effect/system/spark_spread /datum/effect/effect/system/spark_spread
var/total_sparks = 0 // To stop it being spammed and lagging! var/total_sparks = 0 // To stop it being spammed and lagging!
@@ -225,8 +224,8 @@ steam.start() -- spawns the effect
time_to_live = 600 time_to_live = 600
//var/list/projectiles //var/list/projectiles
/obj/effect/effect/smoke/bad/Move() /obj/effect/effect/smoke/bad/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
for(var/mob/living/L in get_turf(src)) for(var/mob/living/L in get_turf(src))
affect(L) affect(L)
@@ -281,8 +280,8 @@ steam.start() -- spawns the effect
STOP_PROCESSING(SSobj, src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/effect/effect/smoke/elemental/Move() /obj/effect/effect/smoke/elemental/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
for(var/mob/living/L in range(1, src)) for(var/mob/living/L in range(1, src))
affect(L) affect(L)

View File

@@ -12,10 +12,6 @@
qdel(src) qdel(src)
return return
/obj/effect/expl_particles/Move()
..()
return
/datum/effect/system/expl_particles /datum/effect/system/expl_particles
var/number = 10 var/number = 10
var/turf/location var/turf/location

View File

@@ -17,10 +17,38 @@
/obj/item/device/encryptionkey/heads/rd /obj/item/device/encryptionkey/heads/rd
name = "research director's encryption key" name = "research director's encryption key"
icon_state = "rd_cypherkey" icon_state = "rd_cypherkey"
channels = list("Command" = 1, "Science" = 1, "Explorer" = 1) channels = list("Command" = 1, "Science" = 1)
/obj/item/device/encryptionkey/ert /obj/item/device/encryptionkey/ert
channels = list("Response Team" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1, "Explorer" = 1) channels = list("Response Team" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1, "Explorer" = 1)
/obj/item/device/encryptionkey/omni //Literally only for the admin intercoms /obj/item/device/encryptionkey/omni //Literally only for the admin intercoms
channels = list("Mercenary" = 1, "Raider" = 1, "Response Team" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1, "Explorer" = 1) channels = list("Mercenary" = 1, "Raider" = 1, "Response Team" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1, "Explorer" = 1)
/obj/item/device/encryptionkey/pathfinder
name = "pathfinder's encryption key"
icon_state = "com_cypherkey"
channels = list("Command" = 1, "Explorer" = 1)
/obj/item/device/encryptionkey/qm
name = "quartermaster's encryption key"
icon_state = "qm_cypherkey"
channels = list("Command" = 1, "Supply" = 1)
/obj/item/device/encryptionkey/pilot
name = "pilot's encryption key"
icon_state = "cypherkey"
channels = list("Explorer" = 1)
/obj/item/device/encryptionkey/explorer
name = "explorer's encryption key"
icon_state = "rob_cypherkey"
channels = list("Explorer" = 1)
/obj/item/device/encryptionkey/sar
name = "fm's encryption key"
icon_state = "med_cypherkey"
channels = list("Medical" = 1, "Explorer" = 1)
/obj/item/device/encryptionkey/talon
channels = list("Talon" = 1)

View File

@@ -48,4 +48,83 @@
M.mob_radio.forceMove(M.loc) M.mob_radio.forceMove(M.loc)
M.mob_radio = null M.mob_radio = null
return return
..() ..()
/obj/item/device/radio/headset/headset_cargo
desc = "A headset used by the QM's slaves."
/obj/item/device/radio/headset/headset_cargo/alt
desc = "A bowman headset used by the QM's slaves."
/obj/item/device/radio/headset/headset_qm
name = "qm radio headset"
desc = "A headset used by the QM."
icon_state = "cargo_headset"
ks2type = /obj/item/device/encryptionkey/qm
/obj/item/device/radio/headset/headset_qm/alt
name = "qm bowman headset"
desc = "A bowman headset used by the QM."
icon_state = "cargo_headset_alt"
/obj/item/device/radio/headset/pathfinder
name = "pathfinder's headset"
desc = "Headset used by pathfinders for exploring. Access to the explorer and command channels."
icon_state = "exp_headset"
adhoc_fallback = TRUE
ks2type = /obj/item/device/encryptionkey/pathfinder
/obj/item/device/radio/headset/pathfinder/alt
name = "pathfinder's bowman headset"
desc = "Bowman headset used by pathfinders for exploring. Access to the explorer and command channels."
icon_state = "exp_headset_alt"
/obj/item/device/radio/headset/pilot
name = "pilot's headset"
desc = "A headset used by pilots, has access to the explorer channel."
icon_state = "pilot_headset"
adhoc_fallback = TRUE
ks2type = /obj/item/device/encryptionkey/pilot
/obj/item/device/radio/headset/pilot/alt
name = "pilot's bowman headset"
desc = "A bowman headset used by pilots, has access to the explorer channel."
icon_state = "pilot_headset_alt"
/obj/item/device/radio/headset/explorer
name = "explorer's headset"
desc = "Headset used by explorers for exploring. Access to the explorer channel."
icon_state = "exp_headset"
adhoc_fallback = TRUE
ks2type = /obj/item/device/encryptionkey/explorer
/obj/item/device/radio/headset/explorer/alt
name = "explorer's bowman headset"
desc = "Bowman headset used by explorers for exploring. Access to the explorer channel."
icon_state = "exp_headset_alt"
/obj/item/device/radio/headset/sar
name = "fm radio headset"
desc = "A headset for field medics."
icon_state = "sar_headset"
adhoc_fallback = TRUE
ks2type = /obj/item/device/encryptionkey/sar
/obj/item/device/radio/headset/sar/alt
name = "fm radio bowman headset"
desc = "A bowman headset for field medics."
icon_state = "sar_headset_alt"
/obj/item/device/radio/headset/volunteer
name = "volunteer's headset"
desc = "A headset used by volunteers to expedition teams, has access to the exploration channel."
icon_state = "pilot_headset"
adhoc_fallback = TRUE
ks2type = /obj/item/device/encryptionkey/pilot
/obj/item/device/radio/headset/talon
name = "talon headset"
desc = "A headset for communication between the crew of the ITV Talon."
adhoc_fallback = TRUE
icon_state = "pilot_headset"
ks2type = /obj/item/device/encryptionkey/talon

View File

@@ -11,10 +11,10 @@ var/global/list/default_internal_channels = list(
num2text(MED_I_FREQ)=list(access_medical_equip), num2text(MED_I_FREQ)=list(access_medical_equip),
num2text(SEC_FREQ) = list(access_security), num2text(SEC_FREQ) = list(access_security),
num2text(SEC_I_FREQ)=list(access_security), num2text(SEC_I_FREQ)=list(access_security),
num2text(SCI_FREQ) = list(access_tox, access_robotics, access_xenobiology, access_explorer), num2text(SCI_FREQ) = list(access_tox, access_robotics, access_xenobiology),
num2text(SUP_FREQ) = list(access_cargo, access_mining_station), num2text(SUP_FREQ) = list(access_cargo, access_mining_station),
num2text(SRV_FREQ) = list(access_janitor, access_library, access_hydroponics, access_bar, access_kitchen), num2text(SRV_FREQ) = list(access_janitor, access_library, access_hydroponics, access_bar, access_kitchen),
num2text(EXP_FREQ) = list(access_explorer, access_pilot, access_rd) num2text(EXP_FREQ) = list(access_explorer, access_pilot)
) )
var/global/list/default_medbay_channels = list( var/global/list/default_medbay_channels = list(
@@ -287,7 +287,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/list/zlevels) //BS12 EDIT /obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/list/zlevels) //BS12 EDIT
var/datum/radio_frequency/connection = null var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0) if(channel && channels && channels.len > 0)
if (channel == "department") if(channel == "department")
channel = channels[1] channel = channels[1]
connection = secure_radio_connections[channel] connection = secure_radio_connections[channel]
else else
@@ -304,7 +304,7 @@ var/global/list/default_medbay_channels = list(
Broadcast_Message(connection, A, Broadcast_Message(connection, A,
0, "*garbled automated announcement*", src, 0, "*garbled automated announcement*", src,
message_to_multilingual(message), from, "Automated Announcement", from, "synthesized voice", message_to_multilingual(message), from, "Automated Announcement", from, "synthesized voice",
4, 0, zlevels, connection.frequency, "states") DATA_FAKE, 0, zlevels, connection.frequency, "states")
// Interprets the message mode when talking into a radio, possibly returning a connection datum // Interprets the message mode when talking into a radio, possibly returning a connection datum
/obj/item/device/radio/proc/handle_message_mode(mob/living/M as mob, list/message_pieces, message_mode) /obj/item/device/radio/proc/handle_message_mode(mob/living/M as mob, list/message_pieces, message_mode)
@@ -363,8 +363,8 @@ var/global/list/default_medbay_channels = list(
if(!istype(message_mode, /datum/radio_frequency)) if(!istype(message_mode, /datum/radio_frequency))
return FALSE return FALSE
var/datum/radio_frequency/connection = message_mode
var/pos_z = get_z(src) var/pos_z = get_z(src)
var/datum/radio_frequency/connection = message_mode
//#### Tagging the signal with all appropriate identity values ####// //#### Tagging the signal with all appropriate identity values ####//
@@ -479,7 +479,6 @@ var/global/list/default_medbay_channels = list(
signal.transmission_method = TRANSMISSION_SUBSPACE signal.transmission_method = TRANSMISSION_SUBSPACE
//#### Sending the signal to all subspace receivers ####// //#### Sending the signal to all subspace receivers ####//
for(var/obj/machinery/telecomms/receiver/R in telecomms_list) for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
R.receive_signal(signal) R.receive_signal(signal)
@@ -494,7 +493,7 @@ var/global/list/default_medbay_channels = list(
else if(adhoc_fallback) //Less huzzah, we have to fallback else if(adhoc_fallback) //Less huzzah, we have to fallback
to_chat(loc, "<span class='warning'>\The [src] pings as it falls back to local radio transmission.</span>") to_chat(loc, "<span class='warning'>\The [src] pings as it falls back to local radio transmission.</span>")
subspace_transmission = FALSE subspace_transmission = FALSE
else //Oh well else //Oh well
return FALSE return FALSE
@@ -536,8 +535,6 @@ var/global/list/default_medbay_channels = list(
if(get_dist(src, M) <= canhear_range) if(get_dist(src, M) <= canhear_range)
talk_into(M, message_pieces, null, verb) talk_into(M, message_pieces, null, verb)
/obj/item/device/radio/proc/receive_range(freq, level) /obj/item/device/radio/proc/receive_range(freq, level)
// check if this radio can receive on the given frequency, and if so, // check if this radio can receive on the given frequency, and if so,
// what the range is in which mobs will hear the radio // what the range is in which mobs will hear the radio

View File

@@ -18,12 +18,12 @@
break break
..() // delete target ..() // delete target
Move() Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
// After target moves, check for nearby stakes. If associated, move to target // After target moves, check for nearby stakes. If associated, move to target
for(var/obj/structure/target_stake/M in view(3,src)) for(var/obj/structure/target_stake/M in view(3,src))
if(M.density == 0 && M.pinned_target == src) if(M.density == 0 && M.pinned_target == src)
M.loc = loc M.forceMove(loc)
// This may seem a little counter-intuitive but I assure you that's for a purpose. // This may seem a little counter-intuitive but I assure you that's for a purpose.
// Stakes are the ones that carry targets, yes, but in the stake code we set // Stakes are the ones that carry targets, yes, but in the stake code we set

View File

@@ -0,0 +1,347 @@
#define UAV_OFF 0
#define UAV_ON 1
#define UAV_PAIRING 2
#define UAV_PACKED 3
/obj/item/device/uav
name = "recon skimmer"
desc = "A semi-portable reconisance drone that folds into a backpack-sized carrying case."
icon = 'icons/obj/uav.dmi'
icon_state = "uav"
var/obj/item/weapon/cell/cell
var/cell_type = null //Can put a starting cell here
density = 1 //Is dense, but not anchored, so you can swap with it
slowdown = 3 //Heevvee.
health = 100
var/power_per_process = 50 // About 6.5 minutes of use on a high-cell (10,000)
var/state = UAV_OFF
var/datum/effect/effect/system/ion_trail_follow/ion_trail
var/list/mob/living/masters
// So you know which is which
var/nickname = "Generic Droan"
// Radial menu
var/static/image/radial_pickup = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pickup")
var/static/image/radial_wrench = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_wrench")
var/static/image/radial_power = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_power")
var/static/image/radial_pair = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pair")
// Movement cooldown
var/next_move = 0
// Idle shutdown time
var/no_masters_time = 0
/obj/item/device/uav/loaded
cell_type = /obj/item/weapon/cell/high
/obj/item/device/uav/Initialize()
. = ..()
if(!cell && cell_type)
cell = new cell_type
ion_trail = new /datum/effect/effect/system/ion_trail_follow()
ion_trail.set_up(src)
ion_trail.stop()
/obj/item/device/uav/Destroy()
qdel_null(cell)
qdel_null(ion_trail)
LAZYCLEARLIST(masters)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/device/uav/attack_hand(var/mob/user)
//Has to be on the ground to work with it properly
if(!isturf(loc))
return ..()
var/list/options = list(
"Pick Up" = radial_pickup,
"(Dis)Assemble" = radial_wrench,
"Toggle Power" = radial_power,
"Pairing Mode" = radial_pair)
var/choice = show_radial_menu(user, src, options, require_near = !issilicon(user))
switch(choice)
// Can pick up when off or packed
if("Pick Up")
if(state == UAV_OFF || state == UAV_PACKED)
return ..()
else
to_chat(user,"<span class='warning'>Turn [nickname] off or pack it first!</span>")
return
// Can disasemble or reassemble from packed or off (and this one takes time)
if("(Dis)Assemble")
if(can_transition_to(state == UAV_PACKED ? UAV_OFF : UAV_PACKED, user) && do_after(user, 10 SECONDS, src))
return toggle_packed(user)
// Can toggle power from on and off
if("Toggle Power")
if(can_transition_to(state == UAV_ON ? UAV_OFF : UAV_ON, user))
return toggle_power(user)
// Can pair when off
if("Pairing Mode")
if(can_transition_to(state == UAV_PAIRING ? UAV_OFF : UAV_PAIRING, user))
return toggle_pairing(user)
/obj/item/device/uav/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/modular_computer) && state == UAV_PAIRING)
var/obj/item/modular_computer/MC = I
LAZYDISTINCTADD(MC.paired_uavs, weakref(src))
playsound(src, 'sound/machines/buttonbeep.ogg', 50, 1)
visible_message("<span class='notice'>[user] pairs [I] to [nickname]</span>")
toggle_pairing()
else if(I.is_screwdriver() && cell)
if(do_after(user, 3 SECONDS, src))
to_chat(user, "<span class='notice'>You remove [cell] into [nickname].</span>")
playsound(src, I.usesound, 50, 1)
power_down()
cell.forceMove(get_turf(src))
cell = null
else if(istype(I, /obj/item/weapon/cell) && !cell)
if(do_after(user, 3 SECONDS, src))
to_chat(user, "<span class='notice'>You insert [I] into [nickname].</span>")
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
power_down()
cell.forceMove(get_turf(src))
cell = null
else if(istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/device/flashlight/pen))
var/tmp_label = sanitizeSafe(input(user, "Enter a nickname for [src]", "Nickname", nickname), MAX_NAME_LEN)
if(length(tmp_label) > 50 || length(tmp_label) < 3)
to_chat(user, "<span class='notice'>The nickname must be between 3 and 50 characters.</span>")
else
to_chat(user, "<span class='notice'>You scribble your new nickname on the side of [src].</span>")
nickname = tmp_label
desc = initial(desc) + " This one has <span class='notice'>'[nickname]'</span> scribbled on the side."
else
return ..()
/obj/item/device/uav/proc/can_transition_to(var/new_state, var/mob/user)
switch(state) //Current one
if(UAV_ON)
if(new_state == UAV_OFF || new_state == UAV_PACKED)
. = TRUE
if(UAV_OFF)
if(new_state == UAV_ON || new_state == UAV_PACKED || new_state == UAV_PAIRING)
. = TRUE
if(UAV_PAIRING)
if(new_state == UAV_OFF)
. = TRUE
if(UAV_PACKED)
if(new_state == UAV_OFF)
. = TRUE
if(!.)
if(user)
to_chat(user, "<span class='warning'>You can't do that while [nickname] is in this state.</span>")
return FALSE
/obj/item/device/uav/update_icon()
cut_overlays()
switch(state)
if(UAV_PAIRING)
add_overlay("[initial(icon_state)]_pairing")
icon_state = "[initial(icon_state)]"
if(UAV_ON)
icon_state = "[initial(icon_state)]_on"
if(UAV_OFF)
icon_state = "[initial(icon_state)]"
if(UAV_PACKED)
icon_state = "[initial(icon_state)]_packed"
/obj/item/device/uav/process()
if(cell?.use(power_per_process) != power_per_process)
visible_message("<span class='warning'>[src] sputters and thuds to the ground, inert.</span>")
playsound(src, 'sound/items/drop/metalboots.ogg', 75, 1)
power_down()
health -= initial(health)*0.25 //Lose 25% of your original health
if(LAZYLEN(masters))
no_masters_time = 0
else if(no_masters_time++ > 50)
power_down()
/obj/item/device/uav/proc/toggle_pairing()
switch(state)
if(UAV_PAIRING)
state = UAV_OFF
update_icon()
return TRUE
if(UAV_OFF)
state = UAV_PAIRING
update_icon()
return TRUE
return FALSE
/obj/item/device/uav/proc/toggle_power()
switch(state)
if(UAV_OFF)
power_up()
return TRUE
if(UAV_ON)
power_down()
return TRUE
return FALSE
/obj/item/device/uav/proc/toggle_packed()
if(UAV_ON)
power_down()
switch(state)
if(UAV_OFF) //Packing
state = UAV_PACKED
w_class = ITEMSIZE_LARGE
slowdown = 1
density = FALSE
update_icon()
return TRUE
if(UAV_PACKED) //Unpacking
state = UAV_OFF
w_class = ITEMSIZE_HUGE
slowdown = 3
density = TRUE
update_icon()
return TRUE
return FALSE
/obj/item/device/uav/proc/power_up()
if(state != UAV_OFF || !isturf(loc))
return
if(cell?.use(power_per_process) != power_per_process)
visible_message("<span class='warning'>[src] sputters and chugs as it tries, and fails, to power up.</span>")
return
state = UAV_ON
update_icon()
start_hover()
set_light(4, 4, "#FFFFFF")
START_PROCESSING(SSobj, src)
no_masters_time = 0
visible_message("<span class='notice'>[nickname] buzzes and lifts into the air.</span>")
/obj/item/device/uav/proc/power_down()
if(state != UAV_ON)
return
state = UAV_OFF
update_icon()
stop_hover()
set_light(0)
LAZYCLEARLIST(masters)
STOP_PROCESSING(SSobj, src)
visible_message("<span class='notice'>[nickname] gracefully settles onto the ground.</span>")
//////////////// Helpers
/obj/item/device/uav/get_cell()
return cell
/obj/item/device/uav/relaymove(var/mob/user, direction, signal = 1)
if(signal && state == UAV_ON && (weakref(user) in masters))
if(next_move <= world.time)
next_move = world.time + (1 SECOND/signal)
step(src, direction)
return TRUE // Even if we couldn't step, we're taking credit for absorbing the move
return FALSE
/obj/item/device/uav/proc/get_status_string()
return "[nickname] - [get_x(src)],[get_y(src)],[get_z(src)] - I:[health]/[initial(health)] - C:[cell ? "[cell.charge]/[cell.maxcharge]" : "Not Installed"]"
/obj/item/device/uav/proc/add_master(var/mob/living/M)
LAZYDISTINCTADD(masters, weakref(M))
/obj/item/device/uav/proc/remove_master(var/mob/living/M)
LAZYREMOVE(masters, weakref(M))
/obj/item/device/uav/check_eye()
if(state == UAV_ON)
return 0
else
return -1
/obj/item/device/uav/proc/start_hover()
if(!ion_trail.on) //We'll just use this to store if we're floating or not
ion_trail.start()
var/amplitude = 2 //maximum displacement from original position
var/period = 36 //time taken for the mob to go up >> down >> original position, in deciseconds. Should be multiple of 4
var/top = old_y + amplitude
var/bottom = old_y - amplitude
var/half_period = period / 2
var/quarter_period = period / 4
animate(src, pixel_y = top, time = quarter_period, easing = SINE_EASING | EASE_OUT, loop = -1) //up
animate(pixel_y = bottom, time = half_period, easing = SINE_EASING, loop = -1) //down
animate(pixel_y = old_y, time = quarter_period, easing = SINE_EASING | EASE_IN, loop = -1) //back
/obj/item/device/uav/proc/stop_hover()
if(ion_trail.on)
ion_trail.stop()
animate(src, pixel_y = old_y, time = 5, easing = SINE_EASING | EASE_IN) //halt animation
/obj/item/device/uav/hear_talk(var/mob/M, list/message_pieces, verb)
var/name_used = M.GetVoice()
for(var/wr_master in masters)
var/weakref/wr = wr_master
var/mob/master = wr.resolve()
var/message = master.combine_message(message_pieces, verb, M)
var/rendered = "<i><span class='game say'>UAV received: <span class='name'>[name_used]</span> [message]</span></i>"
master.show_message(rendered, 2)
/obj/item/device/uav/see_emote(var/mob/living/M, text)
for(var/wr_master in masters)
var/weakref/wr = wr_master
var/mob/master = wr.resolve()
var/rendered = "<i><span class='game say'>UAV received, <span class='message'>[text]</span></span></i>"
master.show_message(rendered, 2)
/obj/item/device/uav/show_message(msg, type, alt, alt_type)
for(var/wr_master in masters)
var/weakref/wr = wr_master
var/mob/master = wr.resolve()
var/rendered = "<i><span class='game say'>UAV received, <span class='message'>[msg]</span></span></i>"
master.show_message(rendered, type)
/obj/item/device/uav/take_damage(var/damage)
health -= damage
CheckHealth()
return
/obj/item/device/uav/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
user.do_attack_animation(src)
health -= damage
CheckHealth()
return
/obj/item/device/uav/ex_act(severity)
switch(severity)
if(1.0)
die()
if(2.0)
health -= 25
CheckHealth()
/obj/item/device/uav/proc/CheckHealth()
if(health <= 0)
die()
/obj/item/device/uav/proc/die()
visible_message("<span class='danger'>[src] shorts out and explodes!</span>")
power_down()
var/turf/T = get_turf(src)
qdel(src)
explosion(T, -1, 0, 1, 2) //Not very large
#undef UAV_OFF
#undef UAV_ON
#undef UAV_PACKED

View File

@@ -68,6 +68,11 @@
if(!S || S.robotic < ORGAN_ROBOT || S.open == 3) if(!S || S.robotic < ORGAN_ROBOT || S.open == 3)
return ..() return ..()
//VOREStation Add - No welding nanoform limbs
if(S.robotic > ORGAN_LIFELIKE)
return ..()
//VOREStation Add End
if(S.organ_tag == BP_HEAD) if(S.organ_tag == BP_HEAD)
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space)) if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
to_chat(user, "<span class='warning'>You can't apply [src] through [H.head]!</span>") to_chat(user, "<span class='warning'>You can't apply [src] through [H.head]!</span>")

View File

@@ -122,18 +122,6 @@
if(!has_buckled_mobs()) if(!has_buckled_mobs())
qdel(src) qdel(src)
/obj/effect/energy_net/Move()
..()
if(has_buckled_mobs())
for(var/A in buckled_mobs)
var/mob/living/occupant = A
occupant.buckled = null
occupant.forceMove(src.loc)
occupant.buckled = src
if (occupant && (src.loc != occupant.loc))
unbuckle_mob(occupant)
qdel(src)
/obj/effect/energy_net/user_unbuckle_mob(mob/living/buckled_mob, mob/user) /obj/effect/energy_net/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
user.setClickCooldown(user.get_attack_speed()) user.setClickCooldown(user.get_attack_speed())
visible_message("<span class='danger'>[user] begins to tear at \the [src]!</span>") visible_message("<span class='danger'>[user] begins to tear at \the [src]!</span>")

View File

@@ -142,6 +142,7 @@
return return
/mob/proc/unset_machine() /mob/proc/unset_machine()
machine?.remove_visual(src)
src.machine = null src.machine = null
/mob/proc/set_machine(var/obj/O) /mob/proc/set_machine(var/obj/O)

View File

@@ -1,4 +1,42 @@
//Gun Cabinets
/obj/structure/closet/secure_closet/guncabinet/sidearm
name = "emergency weapon cabinet"
req_one_access = list(access_armory,access_captain)
starts_with = list(
/obj/item/weapon/gun/energy/gun = 4)
/obj/structure/closet/secure_closet/guncabinet/rifle
name = "rifle cabinet"
req_one_access = list(access_explorer,access_brig)
starts_with = list(
/obj/item/ammo_magazine/clip/c762/hunter = 9,
/obj/item/weapon/gun/projectile/shotgun/pump/rifle = 2)
/obj/structure/closet/secure_closet/guncabinet/rifle/Initialize()
if(prob(85))
starts_with += /obj/item/weapon/gun/projectile/shotgun/pump/rifle
else
starts_with += /obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever
return ..()
/obj/structure/closet/secure_closet/guncabinet/phase
name = "explorer weapon cabinet"
req_one_access = list(access_explorer,access_brig)
starts_with = list(
/obj/item/weapon/gun/energy/phasegun = 2,
/obj/item/weapon/gun/energy/phasegun/pistol,
/obj/item/weapon/cell/device/weapon = 2,
/obj/item/clothing/accessory/permit/gun/planetside)
//Explorer Lockers
/obj/structure/closet/secure_closet/explorer /obj/structure/closet/secure_closet/explorer
name = "explorer locker"
icon = 'icons/obj/closet_vr.dmi' icon = 'icons/obj/closet_vr.dmi'
icon_state = "secureexp1" icon_state = "secureexp1"
icon_closed = "secureexp" icon_closed = "secureexp"
@@ -6,6 +44,7 @@
icon_opened = "secureexpopen" icon_opened = "secureexpopen"
icon_broken = "secureexpbroken" icon_broken = "secureexpbroken"
icon_off = "secureexpoff" icon_off = "secureexpoff"
req_access = list(access_explorer)
starts_with = list( starts_with = list(
/obj/item/clothing/under/explorer, /obj/item/clothing/under/explorer,
@@ -14,6 +53,7 @@
/obj/item/clothing/shoes/boots/winter/explorer, /obj/item/clothing/shoes/boots/winter/explorer,
/obj/item/clothing/gloves/black, /obj/item/clothing/gloves/black,
/obj/item/device/radio/headset/explorer, /obj/item/device/radio/headset/explorer,
/obj/item/device/radio/headset/explorer/alt,
/obj/item/device/flashlight, /obj/item/device/flashlight,
/obj/item/device/gps/explorer, /obj/item/device/gps/explorer,
/obj/item/weapon/storage/box/flare, /obj/item/weapon/storage/box/flare,
@@ -28,8 +68,25 @@
/obj/item/weapon/reagent_containers/food/snacks/liquidprotein, /obj/item/weapon/reagent_containers/food/snacks/liquidprotein,
/obj/item/device/cataloguer) /obj/item/device/cataloguer)
/obj/structure/closet/secure_closet/explorer/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack
else
starts_with += /obj/item/weapon/storage/backpack/satchel/norm
return ..()
//SAR Lockers
/obj/structure/closet/secure_closet/sar /obj/structure/closet/secure_closet/sar
name = "field medic locker" name = "field medic locker"
desc = "Supplies for a wilderness first responder."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_medical_equip)
starts_with = list( starts_with = list(
/obj/item/weapon/storage/backpack/dufflebag/emt, /obj/item/weapon/storage/backpack/dufflebag/emt,
@@ -45,6 +102,7 @@
/obj/item/clothing/suit/storage/hooded/wintercoat/medical/sar, /obj/item/clothing/suit/storage/hooded/wintercoat/medical/sar,
/obj/item/clothing/shoes/boots/winter/explorer, /obj/item/clothing/shoes/boots/winter/explorer,
/obj/item/device/radio/headset/sar, /obj/item/device/radio/headset/sar,
/obj/item/device/radio/headset/sar/alt,
/obj/item/weapon/cartridge/medical, /obj/item/weapon/cartridge/medical,
/obj/item/device/flashlight, /obj/item/device/flashlight,
/obj/item/weapon/tank/emergency/oxygen/engi, /obj/item/weapon/tank/emergency/oxygen/engi,
@@ -64,7 +122,12 @@
/obj/item/bodybag/cryobag, /obj/item/bodybag/cryobag,
/obj/item/device/cataloguer/compact) /obj/item/device/cataloguer/compact)
//Pilot Locker
/obj/structure/closet/secure_closet/pilot /obj/structure/closet/secure_closet/pilot
name = "pilot locker"
req_access = list(access_pilot)
starts_with = list( starts_with = list(
/obj/item/weapon/storage/backpack/parachute, /obj/item/weapon/storage/backpack/parachute,
/obj/item/weapon/material/knife/tacknife/survival, /obj/item/weapon/material/knife/tacknife/survival,
@@ -76,6 +139,7 @@
/obj/item/clothing/mask/gas/half, /obj/item/clothing/mask/gas/half,
/obj/item/clothing/shoes/black, /obj/item/clothing/shoes/black,
/obj/item/clothing/gloves/fingerless, /obj/item/clothing/gloves/fingerless,
/obj/item/device/radio/headset/pilot,
/obj/item/device/radio/headset/pilot/alt, /obj/item/device/radio/headset/pilot/alt,
/obj/item/device/flashlight, /obj/item/device/flashlight,
/obj/item/weapon/reagent_containers/food/snacks/liquidfood, /obj/item/weapon/reagent_containers/food/snacks/liquidfood,
@@ -87,6 +151,13 @@
/obj/item/device/gps/explorer, /obj/item/device/gps/explorer,
/obj/item/device/cataloguer/compact) /obj/item/device/cataloguer/compact)
/obj/structure/closet/secure_closet/pilot/Initialize()
if(prob(50))
starts_with += /obj/item/weapon/storage/backpack
else
starts_with += /obj/item/weapon/storage/backpack/satchel/norm
return ..()
/obj/structure/closet/secure_closet/pathfinder /obj/structure/closet/secure_closet/pathfinder
name = "pathfinder locker" name = "pathfinder locker"
icon = 'icons/obj/closet_vr.dmi' icon = 'icons/obj/closet_vr.dmi'
@@ -104,7 +175,8 @@
/obj/item/clothing/mask/gas/explorer, /obj/item/clothing/mask/gas/explorer,
/obj/item/clothing/shoes/boots/winter/explorer, /obj/item/clothing/shoes/boots/winter/explorer,
/obj/item/clothing/gloves/black, /obj/item/clothing/gloves/black,
/obj/item/device/radio/headset/explorer, /obj/item/device/radio/headset/pathfinder,
/obj/item/device/radio/headset/pathfinder/alt,
/obj/item/device/flashlight, /obj/item/device/flashlight,
/obj/item/device/gps/explorer, /obj/item/device/gps/explorer,
/obj/item/weapon/storage/box/flare, /obj/item/weapon/storage/box/flare,
@@ -128,3 +200,17 @@
else else
starts_with += /obj/item/weapon/storage/backpack/satchel/norm starts_with += /obj/item/weapon/storage/backpack/satchel/norm
return ..() return ..()
//Exotic Seeds Crate
/obj/structure/closet/crate/hydroponics/exotic
name = "exotic seeds crate"
desc = "All you need to destroy that pesky planet."
starts_with = list(
/obj/item/seeds/random = 6,
/obj/item/seeds/replicapod = 2,
/obj/item/seeds/ambrosiavulgarisseed = 2,
/obj/item/seeds/kudzuseed,
/obj/item/seeds/libertymycelium,
/obj/item/seeds/reishimycelium)

View File

@@ -47,8 +47,8 @@
/obj/item/clothing/under/rank/cargo/jeans, /obj/item/clothing/under/rank/cargo/jeans,
/obj/item/clothing/under/rank/cargo/jeans/female, /obj/item/clothing/under/rank/cargo/jeans/female,
/obj/item/clothing/shoes/brown, /obj/item/clothing/shoes/brown,
/obj/item/device/radio/headset/headset_cargo, /obj/item/device/radio/headset/headset_qm, //VOREStation Edit,
/obj/item/device/radio/headset/headset_cargo/alt, /obj/item/device/radio/headset/headset_qm/alt, //VOREStation Edit,
/obj/item/clothing/gloves/black, /obj/item/clothing/gloves/black,
/obj/item/clothing/gloves/fingerless, /obj/item/clothing/gloves/fingerless,
/obj/item/clothing/suit/fire/firefighter, /obj/item/clothing/suit/fire/firefighter,

View File

@@ -145,7 +145,7 @@
bound_height = width * world.icon_size bound_height = width * world.icon_size
update_state() update_state()
Move() Moved(atom/old_loc, direction, forced = FALSE)
. = ..() . = ..()
if(dir in list(EAST, WEST)) if(dir in list(EAST, WEST))
bound_width = width * world.icon_size bound_width = width * world.icon_size

View File

@@ -230,15 +230,6 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
to_chat(user, "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>") to_chat(user, "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>")
/obj/structure/bed/chair/janicart/Move()
..()
if(has_buckled_mobs())
for(var/A in buckled_mobs)
var/mob/living/L = A
if(L.buckled == src)
L.loc = loc
/obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M) /obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M)
update_mob() update_mob()
return ..() return ..()

View File

@@ -286,15 +286,10 @@
held = null held = null
/obj/structure/bed/roller/Move() /obj/structure/bed/roller/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
playsound(src, 'sound/effects/roll.ogg', 100, 1) playsound(src, 'sound/effects/roll.ogg', 100, 1)
if(has_buckled_mobs())
for(var/A in buckled_mobs)
var/mob/living/L = A
if(L.buckled == src)
L.loc = src.loc
/obj/structure/bed/roller/post_buckle_mob(mob/living/M as mob) /obj/structure/bed/roller/post_buckle_mob(mob/living/M as mob)
if(M.buckled == src) if(M.buckled == src)

View File

@@ -140,22 +140,24 @@
return return
..() ..()
/obj/structure/bed/chair/office/Move() /obj/structure/bed/chair/office/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
playsound(src, 'sound/effects/roll.ogg', 100, 1) playsound(src, 'sound/effects/roll.ogg', 100, 1)
if(has_buckled_mobs())
for(var/A in buckled_mobs) /obj/structure/bed/chair/office/handle_buckled_mob_movement(atom/new_loc, direction)
var/mob/living/occupant = A for(var/A in buckled_mobs)
occupant.buckled = null var/mob/living/occupant = A
occupant.Move(src.loc) occupant.buckled = null
occupant.buckled = src occupant.Move(src.loc)
if (occupant && (src.loc != occupant.loc)) occupant.buckled = src
if (propelled) if (occupant && (src.loc != occupant.loc))
for (var/mob/O in src.loc) if (propelled)
if (O != occupant) for (var/mob/O in src.loc)
Bump(O) if (O != occupant)
else Bump(O)
unbuckle_mob() else
unbuckle_mob()
/obj/structure/bed/chair/office/Bump(atom/A) /obj/structure/bed/chair/office/Bump(atom/A)
..() ..()

View File

@@ -91,8 +91,9 @@
create_track() create_track()
driving = 0 driving = 0
/obj/structure/bed/chair/wheelchair/Move() /obj/structure/bed/chair/wheelchair/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
cut_overlays() cut_overlays()
playsound(src, 'sound/effects/roll.ogg', 75, 1) playsound(src, 'sound/effects/roll.ogg', 75, 1)
if(has_buckled_mobs()) if(has_buckled_mobs())

View File

@@ -8,11 +8,11 @@
w_class = ITEMSIZE_HUGE w_class = ITEMSIZE_HUGE
var/obj/item/target/pinned_target // the current pinned target var/obj/item/target/pinned_target // the current pinned target
Move() Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
// Move the pinned target along with the stake // Move the pinned target along with the stake
if(pinned_target in view(3, src)) if(pinned_target in view(3, src))
pinned_target.loc = loc pinned_target.forceMove(loc)
else // Sanity check: if the pinned target can't be found in immediate view else // Sanity check: if the pinned target can't be found in immediate view
pinned_target = null pinned_target = null

View File

@@ -413,7 +413,7 @@
/obj/structure/window/Move() /obj/structure/window/Move()
var/ini_dir = dir var/ini_dir = dir
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
..() . = ..()
set_dir(ini_dir) set_dir(ini_dir)
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)

View File

@@ -1,6 +1,14 @@
// This is a datum-based artificial intelligence for simple mobs (and possibly others) to use. // This is a datum-based artificial intelligence for simple mobs (and possibly others) to use.
// The neat thing with having this here instead of on the mob is that it is independant of Life(), and that different mobs // The neat thing with having this here instead of on the mob is that it is independant of Life(), and that different mobs
// can use a more or less complex AI by giving it a different datum. // can use a more or less complex AI by giving it a different datum.
#define AI_NO_PROCESS 0
#define AI_PROCESSING (1<<0)
#define AI_FASTPROCESSING (1<<1)
#define START_AIPROCESSING(Datum) if (!(Datum.process_flags & AI_PROCESSING)) {Datum.process_flags |= AI_PROCESSING;SSai.processing += Datum}
#define STOP_AIPROCESSING(Datum) Datum.process_flags &= ~AI_PROCESSING;SSai.processing -= Datum
#define START_AIFASTPROCESSING(Datum) if (!(Datum.process_flags & AI_FASTPROCESSING)) {Datum.process_flags |= AI_FASTPROCESSING;SSaifast.processing += Datum}
#define STOP_AIFASTPROCESSING(Datum) Datum.process_flags &= ~AI_FASTPROCESSING;SSaifast.processing -= Datum
/mob/living /mob/living
var/datum/ai_holder/ai_holder = null var/datum/ai_holder/ai_holder = null
@@ -27,7 +35,20 @@
var/busy = FALSE // If true, the ticker will skip processing this mob until this is false. Good for if you need the var/busy = FALSE // If true, the ticker will skip processing this mob until this is false. Good for if you need the
// mob to stay still (e.g. delayed attacking). If you need the mob to be inactive for an extended period of time, // mob to stay still (e.g. delayed attacking). If you need the mob to be inactive for an extended period of time,
// consider sleeping the AI instead. // consider sleeping the AI instead.
var/process_flags = 0 // Where we're processing, see flag defines.
var/list/static/fastprocess_stances = list(
STANCE_ALERT,
STANCE_APPROACH,
STANCE_FIGHT,
STANCE_BLINDFIGHT,
STANCE_REPOSITION,
STANCE_MOVE,
STANCE_FOLLOW,
STANCE_FLEE
)
var/list/static/noprocess_stances = list(
STANCE_SLEEP
)
/datum/ai_holder/hostile /datum/ai_holder/hostile
@@ -40,16 +61,34 @@
/datum/ai_holder/New(var/new_holder) /datum/ai_holder/New(var/new_holder)
ASSERT(new_holder) ASSERT(new_holder)
holder = new_holder holder = new_holder
SSai.processing += src
home_turf = get_turf(holder) home_turf = get_turf(holder)
manage_processing(AI_PROCESSING)
GLOB.stat_set_event.register(holder, src, .proc/holder_stat_change)
..() ..()
/datum/ai_holder/Destroy() /datum/ai_holder/Destroy()
holder = null holder = null
SSai.processing -= src // We might've already been asleep and removed, but byond won't care if we do this again and it saves a conditional. manage_processing(AI_NO_PROCESS)
home_turf = null home_turf = null
return ..() return ..()
/datum/ai_holder/proc/manage_processing(var/desired)
if(desired & AI_PROCESSING)
START_AIPROCESSING(src)
else
STOP_AIPROCESSING(src)
if(desired & AI_FASTPROCESSING)
START_AIFASTPROCESSING(src)
else
STOP_AIFASTPROCESSING(src)
/datum/ai_holder/proc/holder_stat_change(var/mob, old_stat, new_stat)
if(old_stat >= DEAD && new_stat <= DEAD) //Revived
manage_processing(AI_PROCESSING)
else if(old_stat <= DEAD && new_stat >= DEAD) //Killed
manage_processing(AI_NO_PROCESS)
/datum/ai_holder/proc/update_stance_hud() /datum/ai_holder/proc/update_stance_hud()
var/image/stanceimage = holder.grab_hud(LIFE_HUD) var/image/stanceimage = holder.grab_hud(LIFE_HUD)
stanceimage.icon_state = "ais_[stance]" stanceimage.icon_state = "ais_[stance]"
@@ -78,7 +117,6 @@
return return
forget_everything() // If we ever wake up, its really unlikely that our current memory will be of use. forget_everything() // If we ever wake up, its really unlikely that our current memory will be of use.
set_stance(STANCE_SLEEP) set_stance(STANCE_SLEEP)
SSai.processing -= src
update_paused_hud() update_paused_hud()
// Reverses the above proc. // Reverses the above proc.
@@ -89,7 +127,6 @@
if(!should_wake()) if(!should_wake())
return return
set_stance(STANCE_IDLE) set_stance(STANCE_IDLE)
SSai.processing += src
update_paused_hud() update_paused_hud()
/datum/ai_holder/proc/should_wake() /datum/ai_holder/proc/should_wake()
@@ -122,12 +159,23 @@
// For setting the stance WITHOUT processing it // For setting the stance WITHOUT processing it
/datum/ai_holder/proc/set_stance(var/new_stance) /datum/ai_holder/proc/set_stance(var/new_stance)
if(stance == new_stance)
ai_log("set_stance() : Ignoring change stance to same stance request.", AI_LOG_INFO)
return
ai_log("set_stance() : Setting stance from [stance] to [new_stance].", AI_LOG_INFO) ai_log("set_stance() : Setting stance from [stance] to [new_stance].", AI_LOG_INFO)
stance = new_stance stance = new_stance
if(stance_coloring) // For debugging or really weird mobs. if(stance_coloring) // For debugging or really weird mobs.
stance_color() stance_color()
update_stance_hud() update_stance_hud()
if(new_stance in fastprocess_stances) //Becoming fast
manage_processing(AI_PROCESSING|AI_FASTPROCESSING)
else if(new_stance in noprocess_stances)
manage_processing(AI_NO_PROCESS) //Becoming off
else
manage_processing(AI_PROCESSING) //Becoming slow
// This is called every half a second. // This is called every half a second.
/datum/ai_holder/proc/handle_stance_tactical() /datum/ai_holder/proc/handle_stance_tactical()
ai_log("========= Fast Process Beginning ==========", AI_LOG_TRACE) // This is to make it easier visually to disinguish between 'blocks' of what a tick did. ai_log("========= Fast Process Beginning ==========", AI_LOG_TRACE) // This is to make it easier visually to disinguish between 'blocks' of what a tick did.
@@ -167,19 +215,6 @@
return return
switch(stance) switch(stance)
if(STANCE_IDLE)
if(should_go_home())
ai_log("handle_stance_tactical() : STANCE_IDLE, going to go home.", AI_LOG_TRACE)
go_home()
else if(should_follow_leader())
ai_log("handle_stance_tactical() : STANCE_IDLE, going to follow leader.", AI_LOG_TRACE)
set_stance(STANCE_FOLLOW)
else if(should_wander())
ai_log("handle_stance_tactical() : STANCE_IDLE, going to wander randomly.", AI_LOG_TRACE)
handle_wander_movement()
if(STANCE_ALERT) if(STANCE_ALERT)
ai_log("handle_stance_tactical() : STANCE_ALERT, going to threaten_target().", AI_LOG_TRACE) ai_log("handle_stance_tactical() : STANCE_ALERT, going to threaten_target().", AI_LOG_TRACE)
threaten_target() threaten_target()
@@ -241,9 +276,23 @@
if(STANCE_IDLE) if(STANCE_IDLE)
if(speak_chance) // In the long loop since otherwise it wont shut up. if(speak_chance) // In the long loop since otherwise it wont shut up.
handle_idle_speaking() handle_idle_speaking()
if(hostile) if(hostile)
ai_log("handle_stance_strategical() : STANCE_IDLE, going to find_target().", AI_LOG_TRACE) ai_log("handle_stance_strategical() : STANCE_IDLE, going to find_target().", AI_LOG_TRACE)
find_target() find_target()
if(should_go_home())
ai_log("handle_stance_tactical() : STANCE_IDLE, going to go home.", AI_LOG_TRACE)
go_home()
else if(should_follow_leader())
ai_log("handle_stance_tactical() : STANCE_IDLE, going to follow leader.", AI_LOG_TRACE)
set_stance(STANCE_FOLLOW)
else if(should_wander())
ai_log("handle_stance_tactical() : STANCE_IDLE, going to wander randomly.", AI_LOG_TRACE)
handle_wander_movement()
if(STANCE_APPROACH) if(STANCE_APPROACH)
if(target) if(target)
ai_log("handle_stance_strategical() : STANCE_APPROACH, going to calculate_path([target]).", AI_LOG_TRACE) ai_log("handle_stance_strategical() : STANCE_APPROACH, going to calculate_path([target]).", AI_LOG_TRACE)
@@ -291,4 +340,7 @@
// 'Taunts' the AI into attacking the taunter. // 'Taunts' the AI into attacking the taunter.
/mob/living/proc/taunt(atom/movable/taunter, force_target_switch = FALSE) /mob/living/proc/taunt(atom/movable/taunter, force_target_switch = FALSE)
if(ai_holder) if(ai_holder)
ai_holder.receive_taunt(taunter, force_target_switch) ai_holder.receive_taunt(taunter, force_target_switch)
#undef AI_PROCESSING
#undef AI_FASTPROCESSING

View File

@@ -6,7 +6,7 @@
// If our holder is able to do anything. // If our holder is able to do anything.
/datum/ai_holder/proc/can_act() /datum/ai_holder/proc/can_act()
if(!holder) // Holder missing. if(!holder) // Holder missing.
SSai.processing -= src manage_processing(AI_NO_PROCESS)
return FALSE return FALSE
if(holder.stat) // Dead or unconscious. if(holder.stat) // Dead or unconscious.
ai_log("can_act() : Stat was non-zero ([holder.stat]).", AI_LOG_TRACE) ai_log("can_act() : Stat was non-zero ([holder.stat]).", AI_LOG_TRACE)

View File

@@ -57,7 +57,7 @@
ai_log("lose_follow() : Exited.", AI_LOG_DEBUG) ai_log("lose_follow() : Exited.", AI_LOG_DEBUG)
/datum/ai_holder/proc/should_follow_leader() /datum/ai_holder/proc/should_follow_leader()
if(!leader) if(!leader || target)
return FALSE return FALSE
if(follow_until_time && world.time > follow_until_time) if(follow_until_time && world.time > follow_until_time)
lose_follow() lose_follow()

View File

@@ -43,6 +43,8 @@
ai_log("walk_to_destination() : Exiting.",AI_LOG_TRACE) ai_log("walk_to_destination() : Exiting.",AI_LOG_TRACE)
/datum/ai_holder/proc/should_go_home() /datum/ai_holder/proc/should_go_home()
if(stance != STANCE_IDLE)
return FALSE
if(!returns_home || !home_turf) if(!returns_home || !home_turf)
return FALSE return FALSE
if(get_dist(holder, home_turf) > max_home_distance) if(get_dist(holder, home_turf) > max_home_distance)
@@ -139,7 +141,7 @@
return MOVEMENT_ON_COOLDOWN return MOVEMENT_ON_COOLDOWN
/datum/ai_holder/proc/should_wander() /datum/ai_holder/proc/should_wander()
return wander && !leader return (stance == STANCE_IDLE) && wander && !leader
// Wanders randomly in cardinal directions. // Wanders randomly in cardinal directions.
/datum/ai_holder/proc/handle_wander_movement() /datum/ai_holder/proc/handle_wander_movement()

View File

@@ -25,8 +25,8 @@
// Step 1, find out what we can see. // Step 1, find out what we can see.
/datum/ai_holder/proc/list_targets() /datum/ai_holder/proc/list_targets()
. = hearers(vision_range, holder) - holder // Remove ourselves to prevent suicidal decisions. ~ SRC is the ai_holder. . = ohearers(vision_range, holder)
. -= dview_mob // Not the dview mob either, nerd. . -= dview_mob // Not the dview mob!
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/blob)) var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/blob))
@@ -43,13 +43,8 @@
if(!has_targets_list) if(!has_targets_list)
possible_targets = list_targets() possible_targets = list_targets()
for(var/possible_target in possible_targets) for(var/possible_target in possible_targets)
var/atom/A = possible_target if(can_attack(possible_target)) // Can we attack it?
if(found(A)) // In case people want to override this. . += possible_target
. = list(A)
break
if(can_attack(A)) // Can we attack it?
. += A
continue
var/new_target = pick_target(.) var/new_target = pick_target(.)
give_target(new_target) give_target(new_target)
@@ -57,7 +52,7 @@
// Step 3, pick among the possible, attackable targets. // Step 3, pick among the possible, attackable targets.
/datum/ai_holder/proc/pick_target(list/targets) /datum/ai_holder/proc/pick_target(list/targets)
if(target != null) // If we already have a target, but are told to pick again, calculate the lowest distance between all possible, and pick from the lowest distance targets. if(target) // If we already have a target, but are told to pick again, calculate the lowest distance between all possible, and pick from the lowest distance targets.
targets = target_filter_distance(targets) targets = target_filter_distance(targets)
else else
targets = target_filter_closest(targets) targets = target_filter_closest(targets)
@@ -88,32 +83,31 @@
// Filters return one or more 'preferred' targets. // Filters return one or more 'preferred' targets.
// This one is for closest targets. // This one is for targets closer than our current one.
/datum/ai_holder/proc/target_filter_distance(list/targets) /datum/ai_holder/proc/target_filter_distance(list/targets)
var/target_dist = get_dist(holder, target)
var/list/better_targets = list()
for(var/possible_target in targets) for(var/possible_target in targets)
var/atom/A = possible_target var/atom/A = possible_target
var/target_dist = get_dist(holder, target)
var/possible_target_distance = get_dist(holder, A) var/possible_target_distance = get_dist(holder, A)
if(target_dist < possible_target_distance) if(possible_target_distance < target_dist)
targets -= A better_targets += A
return targets return better_targets
// Returns the closest target and anything tied with it for distance
/datum/ai_holder/proc/target_filter_closest(list/targets) /datum/ai_holder/proc/target_filter_closest(list/targets)
var/lowest_distance = -1 var/lowest_distance = 1e6 //fakely far
var/list/sorted_targets = list() var/list/closest_targets = list()
for(var/possible_target in targets) for(var/possible_target in targets)
var/atom/A = possible_target var/atom/A = possible_target
var/current_distance = get_dist(holder, A) var/current_distance = get_dist(holder, A)
if(lowest_distance == -1) if(current_distance < lowest_distance)
closest_targets.Cut()
lowest_distance = current_distance lowest_distance = current_distance
sorted_targets += A closest_targets += A
else if(current_distance < lowest_distance)
targets.Cut()
lowest_distance = current_distance
sorted_targets += A
else if(current_distance == lowest_distance) else if(current_distance == lowest_distance)
sorted_targets += A closest_targets += A
return sorted_targets return closest_targets
/datum/ai_holder/proc/can_attack(atom/movable/the_target, var/vision_required = TRUE) /datum/ai_holder/proc/can_attack(atom/movable/the_target, var/vision_required = TRUE)
if(!can_see_target(the_target) && vision_required) if(!can_see_target(the_target) && vision_required)
@@ -163,11 +157,6 @@
return TRUE return TRUE
// return FALSE // return FALSE
// Override this for special targeting criteria.
// If it returns true, the mob will always select it as the target.
/datum/ai_holder/proc/found(atom/movable/the_target)
return FALSE
// 'Soft' loss of target. They may still exist, we still have some info about them maybe. // 'Soft' loss of target. They may still exist, we still have some info about them maybe.
/datum/ai_holder/proc/lose_target() /datum/ai_holder/proc/lose_target()
ai_log("lose_target() : Entering.", AI_LOG_TRACE) ai_log("lose_target() : Entering.", AI_LOG_TRACE)

View File

@@ -0,0 +1,5 @@
/datum/ai_holder/can_see_target(atom/movable/the_target, view_range = vision_range)
if(the_target && isbelly(the_target.loc))
return FALSE
return ..()

View File

@@ -5,7 +5,7 @@
var/list/major_alarms = new() var/list/major_alarms = new()
var/list/map_levels = using_map.get_map_levels(z) var/list/map_levels = using_map.get_map_levels(z)
for(var/datum/alarm/A in visible_alarms()) for(var/datum/alarm/A in visible_alarms())
if(z && (z && !(A.origin?.z in map_levels))) if(z && !(A.origin?.z in map_levels))
continue continue
if(A.max_severity() > 1) if(A.max_severity() > 1)
major_alarms.Add(A) major_alarms.Add(A)
@@ -15,7 +15,7 @@
var/list/minor_alarms = new() var/list/minor_alarms = new()
var/list/map_levels = using_map.get_map_levels(z) var/list/map_levels = using_map.get_map_levels(z)
for(var/datum/alarm/A in visible_alarms()) for(var/datum/alarm/A in visible_alarms())
if(z && (z && !(A.origin?.z in map_levels))) if(z && !(A.origin?.z in map_levels))
continue continue
if(A.max_severity() == 1) if(A.max_severity() == 1)
minor_alarms.Add(A) minor_alarms.Add(A)

View File

@@ -84,8 +84,8 @@
if(a_right) if(a_right)
a_right.on_found(finder) a_right.on_found(finder)
/obj/item/device/assembly_holder/Move() /obj/item/device/assembly_holder/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
if(a_left && a_right) if(a_left && a_right)
a_left.holder_movement() a_left.holder_movement()
a_right.holder_movement() a_right.holder_movement()

View File

@@ -79,8 +79,11 @@
/obj/item/device/assembly/infra/Move() /obj/item/device/assembly/infra/Move()
var/t = dir var/t = dir
..() . = ..()
set_dir(t) set_dir(t)
/obj/item/device/assembly/infra/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
QDEL_LIST_NULL(i_beams) QDEL_LIST_NULL(i_beams)
/obj/item/device/assembly/infra/holder_movement() /obj/item/device/assembly/infra/holder_movement()

View File

@@ -88,8 +88,8 @@
var/obj/item/weapon/grenade/chem_grenade/grenade = holder.loc var/obj/item/weapon/grenade/chem_grenade/grenade = holder.loc
grenade.primed(scanning) grenade.primed(scanning)
/obj/item/device/assembly/prox_sensor/Move() /obj/item/device/assembly/prox_sensor/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
sense() sense()
/obj/item/device/assembly/prox_sensor/interact(mob/user as mob)//TODO: Change this to the wires thingy /obj/item/device/assembly/prox_sensor/interact(mob/user as mob)//TODO: Change this to the wires thingy

View File

@@ -1,5 +1,15 @@
// Collars // Collars
/datum/gear/choker //A colorable choker
display_name = "choker (colorable, tagless)"
path = /obj/item/clothing/accessory/choker
slot = slot_tie
sort_category = "Accessories"
/datum/gear/choker/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
/datum/gear/collar /datum/gear/collar
display_name = "collar, silver" display_name = "collar, silver"
path = /obj/item/clothing/accessory/collar/silver path = /obj/item/clothing/accessory/collar/silver

View File

@@ -1,6 +1,7 @@
// Note for newly added fluff items: Ckeys should not contain any spaces, underscores or capitalizations, // Note for newly added fluff items: Ckeys should not contain any spaces, underscores or capitalizations,
// or else the item will not be usable. // or else the item will not be usable.
// Example: Someone whose username is "Master Pred_Man" should be written as "masterpredman" instead // Example: Someone whose username is "Master Pred_Man" should be written as "masterpredman" instead
// Note: Do not use characters such as # in the display_name. It will cause the item to be unable to be selected.
/datum/gear/fluff /datum/gear/fluff
path = /obj/item path = /obj/item
@@ -804,11 +805,18 @@
/datum/gear/fluff/nthasd_modkit //Converts a Security suit's sprite /datum/gear/fluff/nthasd_modkit //Converts a Security suit's sprite
path = /obj/item/device/modkit_conversion/hasd path = /obj/item/device/modkit_conversion/hasd
display_name = "NT-HASD #556's Modkit" display_name = "NT-HASD 556's Modkit"
ckeywhitelist = list("silencedmp5a5") ckeywhitelist = list("silencedmp5a5")
character_name = list("NT-HASD #556") character_name = list("NT-HASD #556")
allowed_roles = list("Colony Director", "Head of Personnel", "Security Officer", "Warden", "Head of Security","Detective") allowed_roles = list("Colony Director", "Head of Personnel", "Security Officer", "Warden", "Head of Security","Detective")
/datum/gear/fluff/serdykov_modkit //Also converts a Security suit's sprite
path = /obj/item/device/modkit_conversion/fluff/serdykit
display_name = "Serdykov Antoz's Modkit"
ckeywhitelist = list("silencedmp5a5")
character_name = list("Serdykov Antoz")
allowed_roles = list("Colony Director", "Head of Personnel", "Security Officer", "Warden", "Head of Security","Detective")
/datum/gear/fluff/tasy_clownuniform /datum/gear/fluff/tasy_clownuniform
path = /obj/item/clothing/under/sexyclown path = /obj/item/clothing/under/sexyclown
display_name = "Tasy's Clown Uniform" display_name = "Tasy's Clown Uniform"

View File

@@ -2,6 +2,29 @@
// Collars and such like that // Collars and such like that
// //
/obj/item/clothing/accessory/choker //A colorable, tagless choker
name = "plain choker"
slot_flags = SLOT_TIE | SLOT_OCLOTHING
desc = "A simple, plain choker. Or maybe it's a collar? Use in-hand to customize it."
icon = 'icons/obj/clothing/ties_vr.dmi'
icon_override = 'icons/mob/ties_vr.dmi'
icon_state = "choker_cst"
item_state = "choker_cst"
overlay_state = "choker_cst"
var/customized = 0
/obj/item/clothing/accessory/choker/attack_self(mob/user as mob)
if(!customized)
var/design = input(user,"Descriptor?","Pick descriptor","") in list("plain","simple","ornate","elegant","opulent")
var/material = input(user,"Material?","Pick material","") in list("leather","velvet","lace","fabric","latex","plastic","metal","chain","silver","gold","platinum","steel","bead","ruby","sapphire","emerald","diamond")
var/type = input(user,"Type?","Pick type","") in list("choker","collar","necklace")
name = "[design] [material] [type]"
desc = "A [type], made of [material]. It's rather [design]."
customized = 1
to_chat(usr,"<span class='notice'>[src] has now been customized.</span>")
else
to_chat(usr,"<span class='notice'>[src] has already been customized!</span>")
/obj/item/clothing/accessory/collar /obj/item/clothing/accessory/collar
slot_flags = SLOT_TIE | SLOT_OCLOTHING slot_flags = SLOT_TIE | SLOT_OCLOTHING
icon = 'icons/obj/clothing/ties_vr.dmi' icon = 'icons/obj/clothing/ties_vr.dmi'

View File

@@ -158,7 +158,7 @@
/obj/machinery/honey_extractor /obj/machinery/honey_extractor
name = "honey extractor" name = "honey extractor"
desc = "A machine used to turn honeycombs on the frame into honey and wax." desc = "A machine used to turn honeycombs on the frame into honey and wax."
icon = 'icons/obj/virology.dmi' icon = 'icons/obj/virology_vr.dmi' //VOREStation Edit
icon_state = "centrifuge" icon_state = "centrifuge"
var/processing = 0 var/processing = 0

View File

@@ -33,7 +33,7 @@
new /obj/item/weapon/disk/botany(src) new /obj/item/weapon/disk/botany(src)
/obj/machinery/botany /obj/machinery/botany
icon = 'icons/obj/hydroponics_machines.dmi' icon = 'icons/obj/hydroponics_machines_vr.dmi' //VOREStation Edit
icon_state = "hydrotray3" icon_state = "hydrotray3"
density = 1 density = 1
anchored = 1 anchored = 1

View File

@@ -1,6 +1,6 @@
/obj/machinery/portable_atmospherics/hydroponics /obj/machinery/portable_atmospherics/hydroponics
name = "hydroponics tray" name = "hydroponics tray"
icon = 'icons/obj/hydroponics_machines.dmi' icon = 'icons/obj/hydroponics_machines_vr.dmi' //VOREStation Edit
icon_state = "hydrotray3" icon_state = "hydrotray3"
density = 1 density = 1
anchored = 1 anchored = 1

View File

@@ -65,20 +65,19 @@
T.reconsider_lights() T.reconsider_lights()
return ..() return ..()
/atom/movable/Move() /atom/movable/Moved(atom/old_loc, direction, forced = FALSE)
var/turf/old_loc = loc
. = ..() . = ..()
if(loc != old_loc) for(var/datum/light_source/L in light_sources)
for(var/datum/light_source/L in light_sources) L.source_atom.update_light()
L.source_atom.update_light()
var/turf/new_loc = loc var/turf/new_turf = loc
if(istype(old_loc) && opacity) var/turf/old_turf = old_loc
old_loc.reconsider_lights() if(istype(old_turf) && opacity)
old_turf.reconsider_lights()
if(istype(new_loc) && opacity) if(istype(new_turf) && opacity)
new_loc.reconsider_lights() new_turf.reconsider_lights()
/atom/proc/set_opacity(new_opacity) /atom/proc/set_opacity(new_opacity)
if(new_opacity == opacity) if(new_opacity == opacity)

View File

@@ -54,13 +54,14 @@
master_area = null master_area = null
/obj/machinery/media/Move() /obj/machinery/media/Move()
..() disconnect_media_source()
. = ..()
if(anchored) if(anchored)
update_music() update_music()
/obj/machinery/media/forceMove(var/atom/destination) /obj/machinery/media/forceMove(var/atom/destination)
disconnect_media_source() disconnect_media_source()
..() . = ..()
if(anchored) if(anchored)
update_music() update_music()

View File

@@ -10,37 +10,38 @@
icon_vend = "exploration-vend" //VOREStation Add icon_vend = "exploration-vend" //VOREStation Add
//VOREStation Edit Start - Heavily modified list //VOREStation Edit Start - Heavily modified list
prize_list = list( prize_list = list(
new /datum/data/mining_equipment("1 Marker Beacon", /obj/item/stack/marker_beacon, 1), new /datum/data/mining_equipment("1 Marker Beacon", /obj/item/stack/marker_beacon, 1),
new /datum/data/mining_equipment("10 Marker Beacons", /obj/item/stack/marker_beacon/ten, 10), new /datum/data/mining_equipment("10 Marker Beacons", /obj/item/stack/marker_beacon/ten, 10),
new /datum/data/mining_equipment("30 Marker Beacons", /obj/item/stack/marker_beacon/thirty, 30), new /datum/data/mining_equipment("30 Marker Beacons", /obj/item/stack/marker_beacon/thirty, 30),
new /datum/data/mining_equipment("GPS Device", /obj/item/device/gps/explorer, 10), new /datum/data/mining_equipment("GPS Device", /obj/item/device/gps/explorer, 10),
new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 10), new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 10),
new /datum/data/mining_equipment("Absinthe", /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe, 10), new /datum/data/mining_equipment("Absinthe", /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe, 10),
new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/smokable/cigarette/cigar/havana, 15), new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/smokable/cigarette/cigar/havana, 15),
new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 20), new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 20),
new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 90), new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 90),
new /datum/data/mining_equipment("Geiger Counter", /obj/item/device/geiger, 75), new /datum/data/mining_equipment("Geiger Counter", /obj/item/device/geiger, 75),
new /datum/data/mining_equipment("Plush Toy", /obj/random/plushie, 30), new /datum/data/mining_equipment("Plush Toy", /obj/random/plushie, 30),
new /datum/data/mining_equipment("Extraction Equipment - Fulton Beacon", /obj/item/fulton_core, 300), new /datum/data/mining_equipment("Extraction Equipment - Fulton Beacon",/obj/item/fulton_core, 300),
new /datum/data/mining_equipment("Extraction Equipment - Fulton Pack", /obj/item/extraction_pack, 125), new /datum/data/mining_equipment("Extraction Equipment - Fulton Pack",/obj/item/extraction_pack, 125),
new /datum/data/mining_equipment("Umbrella", /obj/item/weapon/melee/umbrella/random, 20), new /datum/data/mining_equipment("Umbrella", /obj/item/weapon/melee/umbrella/random, 20),
new /datum/data/mining_equipment("Shelter Capsule", /obj/item/device/survivalcapsule, 50), new /datum/data/mining_equipment("Shelter Capsule", /obj/item/device/survivalcapsule, 50),
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card/survey, 50), new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card/survey, 50),
new /datum/data/mining_equipment("Trauma Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/trauma, 25), new /datum/data/mining_equipment("Trauma Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/trauma, 25),
new /datum/data/mining_equipment("Burn Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/burn, 25), new /datum/data/mining_equipment("Burn Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/burn, 25),
new /datum/data/mining_equipment("Oxy Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/oxy, 25), new /datum/data/mining_equipment("Oxy Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/oxy, 25),
new /datum/data/mining_equipment("Detox Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/detox, 25), new /datum/data/mining_equipment("Detox Medipen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/detox, 25),
new /datum/data/mining_equipment("Injector (L) - Glucose",/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/glucose, 50), new /datum/data/mining_equipment("Injector (L) - Glucose", /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/glucose,50),
new /datum/data/mining_equipment("Injector (L) - Panacea",/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/purity, 50), new /datum/data/mining_equipment("Injector (L) - Panacea", /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/purity,50),
new /datum/data/mining_equipment("Injector (L) - Trauma",/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/brute, 50), new /datum/data/mining_equipment("Injector (L) - Trauma", /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/brute,50),
new /datum/data/mining_equipment("Digital Tablet - Standard", /obj/item/modular_computer/tablet/preset/custom_loadout/standard, 50), new /datum/data/mining_equipment("Digital Tablet - Standard", /obj/item/modular_computer/tablet/preset/custom_loadout/standard, 50),
new /datum/data/mining_equipment("Digital Tablet - Advanced", /obj/item/modular_computer/tablet/preset/custom_loadout/advanced, 100), new /datum/data/mining_equipment("Digital Tablet - Advanced", /obj/item/modular_computer/tablet/preset/custom_loadout/advanced, 100),
new /datum/data/mining_equipment("Nanopaste Tube", /obj/item/stack/nanopaste, 100), new /datum/data/mining_equipment("Nanopaste Tube", /obj/item/stack/nanopaste, 100),
new /datum/data/mining_equipment("Mini-Translocator", /obj/item/device/perfect_tele/one_beacon, 120), new /datum/data/mining_equipment("Mini-Translocator", /obj/item/device/perfect_tele/one_beacon, 120),
new /datum/data/mining_equipment("UAV - Recon Skimmer", /obj/item/device/uav, 400),
new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c100, 100), new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c100, 100),
new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 250), new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 250),
new /datum/data/mining_equipment("Luxury Shelter Capsule", /obj/item/device/survivalcapsule/luxury, 310), new /datum/data/mining_equipment("Luxury Shelter Capsule", /obj/item/device/survivalcapsule/luxury, 310),
new /datum/data/mining_equipment("Industrial Equipment - Phoron Bore", /obj/item/weapon/gun/magnetic/matfed, 300), new /datum/data/mining_equipment("Industrial Equipment - Phoron Bore",/obj/item/weapon/gun/magnetic/matfed, 300),
new /datum/data/mining_equipment("Survey Tools - Shovel", /obj/item/weapon/shovel, 40), new /datum/data/mining_equipment("Survey Tools - Shovel", /obj/item/weapon/shovel, 40),
new /datum/data/mining_equipment("Survey Tools - Mechanical Trap", /obj/item/weapon/beartrap, 50), new /datum/data/mining_equipment("Survey Tools - Mechanical Trap", /obj/item/weapon/beartrap, 50),
new /datum/data/mining_equipment("Defense Equipment - Smoke Bomb",/obj/item/weapon/grenade/smokebomb, 10), new /datum/data/mining_equipment("Defense Equipment - Smoke Bomb",/obj/item/weapon/grenade/smokebomb, 10),
@@ -50,7 +51,7 @@
new /datum/data/mining_equipment("Fishing Net", /obj/item/weapon/material/fishing_net, 50), new /datum/data/mining_equipment("Fishing Net", /obj/item/weapon/material/fishing_net, 50),
new /datum/data/mining_equipment("Titanium Fishing Rod", /obj/item/weapon/material/fishing_rod/modern, 100), new /datum/data/mining_equipment("Titanium Fishing Rod", /obj/item/weapon/material/fishing_rod/modern, 100),
new /datum/data/mining_equipment("Durasteel Fishing Rod", /obj/item/weapon/material/fishing_rod/modern/strong, 750), new /datum/data/mining_equipment("Durasteel Fishing Rod", /obj/item/weapon/material/fishing_rod/modern/strong, 750),
new /datum/data/mining_equipment("Bar Shelter Capsule", /obj/item/device/survivalcapsule/luxurybar, 1000) new /datum/data/mining_equipment("Bar Shelter Capsule", /obj/item/device/survivalcapsule/luxurybar, 1000)
) )
//VOREStation Edit End //VOREStation Edit End

View File

@@ -377,10 +377,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
following = null following = null
return ..() return ..()
/mob/Move() /mob/Moved(atom/old_loc, direction, forced = FALSE)
. = ..() . = ..()
if(.) update_following()
update_following()
/mob/Life() /mob/Life()
// to catch teleports etc which directly set loc // to catch teleports etc which directly set loc

View File

@@ -6,30 +6,28 @@
// This might be laggy, comment it out if there are problems. // This might be laggy, comment it out if there are problems.
/mob/living/silicon/var/updating = 0 /mob/living/silicon/var/updating = 0
/mob/living/silicon/robot/Move() /mob/living/silicon/robot/Moved(atom/old_loc, direction, forced = FALSE)
var/oldLoc = src.loc
. = ..() . = ..()
if(.) if(!provides_camera_vision())
if(provides_camera_vision()) return
if(!updating) if(!updating)
updating = 1 updating = 1
spawn(BORG_CAMERA_BUFFER) spawn(BORG_CAMERA_BUFFER)
if(oldLoc != src.loc) if(old_loc != src.loc)
cameranet.updatePortableCamera(src.camera) cameranet.updatePortableCamera(src.camera)
updating = 0 updating = 0
/mob/living/silicon/AI/Move() /mob/living/silicon/ai/Moved(atom/old_loc, direction, forced = FALSE)
var/oldLoc = src.loc
. = ..() . = ..()
if(.) if(!provides_camera_vision())
if(provides_camera_vision()) return
if(!updating) if(!updating)
updating = 1 updating = 1
spawn(BORG_CAMERA_BUFFER) spawn(BORG_CAMERA_BUFFER)
if(oldLoc != src.loc) if(old_loc != src.loc)
cameranet.updateVisibility(oldLoc, 0) cameranet.updateVisibility(old_loc, 0)
cameranet.updateVisibility(loc, 0) cameranet.updateVisibility(loc, 0)
updating = 0 updating = 0
#undef BORG_CAMERA_BUFFER #undef BORG_CAMERA_BUFFER

View File

@@ -4,18 +4,17 @@
/mob/living/var/updating_cult_vision = 0 /mob/living/var/updating_cult_vision = 0
/mob/living/Move() /mob/living/Moved(atom/old_loc, direction, forced = FALSE)
var/oldLoc = src.loc
. = ..() . = ..()
if(.) if(!cultnet.provides_vision(src))
if(cultnet.provides_vision(src)) return
if(!updating_cult_vision) if(!updating_cult_vision)
updating_cult_vision = 1 updating_cult_vision = 1
spawn(CULT_UPDATE_BUFFER) spawn(CULT_UPDATE_BUFFER)
if(oldLoc != src.loc) if(old_loc != src.loc)
cultnet.updateVisibility(oldLoc, 0) cultnet.updateVisibility(old_loc, 0)
cultnet.updateVisibility(loc, 0) cultnet.updateVisibility(loc, 0)
updating_cult_vision = 0 updating_cult_vision = 0
#undef CULT_UPDATE_BUFFER #undef CULT_UPDATE_BUFFER

View File

@@ -81,7 +81,7 @@
return return
if(sleeping || stat == UNCONSCIOUS) if(sleeping || stat == UNCONSCIOUS)
hear_sleep(message) hear_sleep(multilingual_to_message(message_pieces))
return FALSE return FALSE
if(italics) if(italics)
@@ -168,7 +168,7 @@
var/message = combine_message(message_pieces, verb, speaker, always_stars = hard_to_hear, radio = TRUE) var/message = combine_message(message_pieces, verb, speaker, always_stars = hard_to_hear, radio = TRUE)
if(sleeping || stat == UNCONSCIOUS) //If unconscious or sleeping if(sleeping || stat == UNCONSCIOUS) //If unconscious or sleeping
hear_sleep(message) hear_sleep(multilingual_to_message(message_pieces))
return return
var/speaker_name = handle_speaker_name(speaker, vname, hard_to_hear) var/speaker_name = handle_speaker_name(speaker, vname, hard_to_hear)

View File

@@ -33,20 +33,20 @@
touching.clear_reagents() touching.clear_reagents()
..() ..()
/mob/living/carbon/Move(NewLoc, direct) /* VOREStation Edit - Duplicated in our code
/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
. = ..() . = ..()
if(.) if(src.nutrition && src.stat != 2)
if(src.nutrition && src.stat != 2) src.nutrition -= DEFAULT_HUNGER_FACTOR/10
if(src.m_intent == "run")
src.nutrition -= DEFAULT_HUNGER_FACTOR/10 src.nutrition -= DEFAULT_HUNGER_FACTOR/10
if(src.m_intent == "run") if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
src.nutrition -= DEFAULT_HUNGER_FACTOR/10 src.bodytemperature += 2
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
src.bodytemperature += 2 // Moving around increases germ_level faster
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
germ_level++
// Moving around increases germ_level faster
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
germ_level++
/* VOREStation Removal - Needless duplicate feature
/mob/living/carbon/relaymove(var/mob/living/user, direction) /mob/living/carbon/relaymove(var/mob/living/user, direction)
if((user in src.stomach_contents) && istype(user)) if((user in src.stomach_contents) && istype(user))
if(user.last_special <= world.time) if(user.last_special <= world.time)

View File

@@ -51,7 +51,7 @@
message = "lets out a bark." message = "lets out a bark."
m_type = 2 m_type = 2
playsound(loc, 'sound/voice/bark2.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) playsound(loc, 'sound/voice/bark2.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises)
if ("his") if ("hiss")
message = "lets out a hiss." message = "lets out a hiss."
m_type = 2 m_type = 2
playsound(loc, 'sound/voice/hiss.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) playsound(loc, 'sound/voice/hiss.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises)

View File

@@ -418,7 +418,7 @@
BITSET(hud_updateflag, WANTED_HUD) BITSET(hud_updateflag, WANTED_HUD)
if(istype(usr,/mob/living/carbon/human)) if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr var/mob/living/carbon/human/U = usr
U.handle_regular_hud_updates() U.handle_hud_list()
if(istype(usr,/mob/living/silicon/robot)) if(istype(usr,/mob/living/silicon/robot))
var/mob/living/silicon/robot/U = usr var/mob/living/silicon/robot/U = usr
U.handle_regular_hud_updates() U.handle_regular_hud_updates()

View File

@@ -58,8 +58,8 @@
..() ..()
if(life_tick%30==15) if(life_tick % 30)
hud_updateflag = 1022 hud_updateflag = (1 << TOTAL_HUDS) - 1
voice = GetVoice() voice = GetVoice()
@@ -91,7 +91,7 @@
else if(stat == DEAD && !stasis) else if(stat == DEAD && !stasis)
handle_defib_timer() handle_defib_timer()
if(!handle_some_updates()) if(skip_some_updates())
return //We go ahead and process them 5 times for HUD images and other stuff though. return //We go ahead and process them 5 times for HUD images and other stuff though.
//Update our name based on whether our face is obscured/disfigured //Update our name based on whether our face is obscured/disfigured
@@ -99,10 +99,10 @@
pulse = handle_pulse() pulse = handle_pulse()
/mob/living/carbon/human/proc/handle_some_updates() /mob/living/carbon/human/proc/skip_some_updates()
if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle
return 0 return 1
return 1 return 0
/mob/living/carbon/human/breathe() /mob/living/carbon/human/breathe()
if(!inStasisNow()) if(!inStasisNow())
@@ -951,7 +951,7 @@
//DO NOT CALL handle_statuses() from this proc, it's called from living/Life() as long as this returns a true value. //DO NOT CALL handle_statuses() from this proc, it's called from living/Life() as long as this returns a true value.
/mob/living/carbon/human/handle_regular_status_updates() /mob/living/carbon/human/handle_regular_status_updates()
if(!handle_some_updates()) if(skip_some_updates())
return 0 return 0
if(status_flags & GODMODE) return 0 if(status_flags & GODMODE) return 0
@@ -1292,8 +1292,11 @@
else else
bodytemp.icon_state = "temp0" bodytemp.icon_state = "temp0"
if(blinded) overlay_fullscreen("blind", /obj/screen/fullscreen/blind) if(blinded)
else clear_fullscreens() overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
else if(!machine)
clear_fullscreens()
if(disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription if(disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
if(glasses) //to every /obj/item if(glasses) //to every /obj/item
@@ -1395,11 +1398,12 @@
if(machine) if(machine)
var/viewflags = machine.check_eye(src) var/viewflags = machine.check_eye(src)
machine.apply_visual(src)
if(viewflags < 0) if(viewflags < 0)
reset_view(null, 0) reset_view(null, 0)
else if(viewflags && !looking_elsewhere) else if(viewflags && !looking_elsewhere)
sight |= viewflags sight |= viewflags
else
machine.apply_visual(src)
else if(eyeobj) else if(eyeobj)
if(eyeobj.owner != src) if(eyeobj.owner != src)

View File

@@ -58,22 +58,21 @@
nif.life() nif.life()
//Overriding carbon move proc that forces default hunger factor //Overriding carbon move proc that forces default hunger factor
/mob/living/carbon/Move(NewLoc, direct) /mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
. = ..() . = ..()
if(.) if(src.nutrition && src.stat != 2)
if(src.nutrition && src.stat != 2) if(ishuman(src))
if(ishuman(src)) var/mob/living/carbon/human/M = src
var/mob/living/carbon/human/M = src if(M.stat != 2 && M.nutrition > 0)
if(M.stat != 2 && M.nutrition > 0) M.nutrition -= M.species.hunger_factor/10
if(M.m_intent == "run")
M.nutrition -= M.species.hunger_factor/10 M.nutrition -= M.species.hunger_factor/10
if(M.m_intent == "run") if(M.nutrition < 0)
M.nutrition -= M.species.hunger_factor/10 M.nutrition = 0
if(M.nutrition < 0) else
M.nutrition = 0 src.nutrition -= DEFAULT_HUNGER_FACTOR/10
else if(src.m_intent == "run")
src.nutrition -= DEFAULT_HUNGER_FACTOR/10 src.nutrition -= DEFAULT_HUNGER_FACTOR/10
if(src.m_intent == "run") // Moving around increases germ_level faster
src.nutrition -= DEFAULT_HUNGER_FACTOR/10 if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
// Moving around increases germ_level faster germ_level++
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
germ_level++

View File

@@ -173,13 +173,11 @@
if(ear_damage < 100) if(ear_damage < 100)
adjustEarDamage(-0.05,-1) adjustEarDamage(-0.05,-1)
//this handles hud updates. Calls update_vision() and handle_hud_icons()
/mob/living/handle_regular_hud_updates() /mob/living/handle_regular_hud_updates()
if(!client) if(!client)
return 0 return 0
..() ..()
handle_vision()
handle_darksight() handle_darksight()
handle_hud_icons() handle_hud_icons()

View File

@@ -33,52 +33,52 @@
if (cell_use_power(A.active_usage)) if (cell_use_power(A.active_usage))
return ..() return ..()
/mob/living/silicon/robot/Move(a, b, flag) /mob/living/silicon/robot/Moved(atom/old_loc, direction, forced = FALSE)
. = ..() . = ..()
if(module) if(!module)
if(module.type == /obj/item/weapon/robot_module/robot/janitor) return
var/turf/tile = loc
if(isturf(tile))
tile.clean_blood()
if (istype(tile, /turf/simulated))
var/turf/simulated/S = tile
S.dirt = 0
for(var/A in tile)
if(istype(A, /obj/effect))
if(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay))
qdel(A)
else if(istype(A, /obj/item))
var/obj/item/cleaned_item = A
cleaned_item.clean_blood()
else if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/cleaned_human = A
if(cleaned_human.lying)
if(cleaned_human.head)
cleaned_human.head.clean_blood()
cleaned_human.update_inv_head(0)
if(cleaned_human.wear_suit)
cleaned_human.wear_suit.clean_blood()
cleaned_human.update_inv_wear_suit(0)
else if(cleaned_human.w_uniform)
cleaned_human.w_uniform.clean_blood()
cleaned_human.update_inv_w_uniform(0)
if(cleaned_human.shoes)
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes(0)
cleaned_human.clean_blood(1)
cleaned_human << "<font color='red'>[src] cleans your face!</font>"
if((module_state_1 && istype(module_state_1, /obj/item/weapon/storage/bag/ore)) || (module_state_2 && istype(module_state_2, /obj/item/weapon/storage/bag/ore)) || (module_state_3 && istype(module_state_3, /obj/item/weapon/storage/bag/ore))) //Borgs and drones can use their mining bags ~automagically~ if they're deployed in a slot. Only mining bags, as they're optimized for mass use. //Borgs and drones can use their mining bags ~automagically~ if they're deployed in a slot. Only mining bags, as they're optimized for mass use.
var/obj/item/weapon/storage/bag/ore/B = null if(istype(module_state_1, /obj/item/weapon/storage/bag/ore) || istype(module_state_2, /obj/item/weapon/storage/bag/ore) || istype(module_state_3, /obj/item/weapon/storage/bag/ore))
if(istype(module_state_1, /obj/item/weapon/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple. var/obj/item/weapon/storage/bag/ore/B = null
B = module_state_1 if(istype(module_state_1, /obj/item/weapon/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple.
else if(istype(module_state_2, /obj/item/weapon/storage/bag/ore)) B = module_state_1
B = module_state_2 else if(istype(module_state_2, /obj/item/weapon/storage/bag/ore))
else if(istype(module_state_3, /obj/item/weapon/storage/bag/ore)) B = module_state_2
B = module_state_3 else if(istype(module_state_3, /obj/item/weapon/storage/bag/ore))
var/turf/tile = loc B = module_state_3
if(isturf(tile)) var/turf/tile = loc
B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move! if(isturf(tile))
return B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move!
if(istype(module, /obj/item/weapon/robot_module/robot/janitor) && isturf(loc))
var/turf/tile = loc
tile.clean_blood()
if (istype(tile, /turf/simulated))
var/turf/simulated/S = tile
S.dirt = 0
for(var/A in tile)
if(istype(A, /obj/effect))
if(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay))
qdel(A)
else if(istype(A, /obj/item))
var/obj/item/cleaned_item = A
cleaned_item.clean_blood()
else if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/cleaned_human = A
if(cleaned_human.lying)
if(cleaned_human.head)
cleaned_human.head.clean_blood()
cleaned_human.update_inv_head(0)
if(cleaned_human.wear_suit)
cleaned_human.wear_suit.clean_blood()
cleaned_human.update_inv_wear_suit(0)
else if(cleaned_human.w_uniform)
cleaned_human.w_uniform.clean_blood()
cleaned_human.update_inv_w_uniform(0)
if(cleaned_human.shoes)
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes(0)
cleaned_human.clean_blood(1)
cleaned_human << "<font color='red'>[src] cleans your face!</font>"

View File

@@ -109,39 +109,35 @@
icon_state = "[module_sprites[icontype]]-wreck" icon_state = "[module_sprites[icontype]]-wreck"
add_overlay("wreck-overlay") add_overlay("wreck-overlay")
/mob/living/silicon/robot/Move(a, b, flag) /mob/living/silicon/robot/Moved(atom/old_loc, direction, forced = FALSE)
. = ..() . = ..()
if(scrubbing) if(scrubbing && isturf(loc) && water_res?.energy >= 1)
var/datum/matter_synth/water = water_res var/turf/tile = loc
if(water && water.energy >= 1) water_res.use_charge(1)
var/turf/tile = loc tile.clean_blood()
if(isturf(tile)) if(istype(tile, /turf/simulated))
water.use_charge(1) var/turf/simulated/T = tile
tile.clean_blood() T.dirt = 0
if(istype(tile, /turf/simulated)) for(var/A in tile)
var/turf/simulated/T = tile if(istype(A,/obj/effect/rune) || istype(A,/obj/effect/decal/cleanable) || istype(A,/obj/effect/overlay))
T.dirt = 0 qdel(A)
for(var/A in tile) else if(istype(A, /mob/living/carbon/human))
if(istype(A,/obj/effect/rune) || istype(A,/obj/effect/decal/cleanable) || istype(A,/obj/effect/overlay)) var/mob/living/carbon/human/cleaned_human = A
qdel(A) if(cleaned_human.lying)
else if(istype(A, /mob/living/carbon/human)) if(cleaned_human.head)
var/mob/living/carbon/human/cleaned_human = A cleaned_human.head.clean_blood()
if(cleaned_human.lying) cleaned_human.update_inv_head(0)
if(cleaned_human.head) if(cleaned_human.wear_suit)
cleaned_human.head.clean_blood() cleaned_human.wear_suit.clean_blood()
cleaned_human.update_inv_head(0) cleaned_human.update_inv_wear_suit(0)
if(cleaned_human.wear_suit) else if(cleaned_human.w_uniform)
cleaned_human.wear_suit.clean_blood() cleaned_human.w_uniform.clean_blood()
cleaned_human.update_inv_wear_suit(0) cleaned_human.update_inv_w_uniform(0)
else if(cleaned_human.w_uniform) if(cleaned_human.shoes)
cleaned_human.w_uniform.clean_blood() cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_w_uniform(0) cleaned_human.update_inv_shoes(0)
if(cleaned_human.shoes) cleaned_human.clean_blood(1)
cleaned_human.shoes.clean_blood() to_chat(cleaned_human, "<span class='warning'>[src] cleans your face!</span>")
cleaned_human.update_inv_shoes(0)
cleaned_human.clean_blood(1)
to_chat(cleaned_human, "<span class='warning'>[src] cleans your face!</span>")
return
/mob/living/silicon/robot/proc/vr_sprite_check() /mob/living/silicon/robot/proc/vr_sprite_check()
if(wideborg == TRUE) if(wideborg == TRUE)

View File

@@ -54,8 +54,8 @@
var/step = get_step_to(src, food, 0) var/step = get_step_to(src, food, 0)
Move(step) Move(step)
/mob/living/simple_mob/animal/goat/Move() /mob/living/simple_mob/animal/goat/Moved(atom/old_loc, direction, forced = FALSE)
..() . = ..()
if(!stat) if(!stat)
for(var/obj/effect/plant/SV in loc) for(var/obj/effect/plant/SV in loc)
SV.die_off(1) SV.die_off(1)

View File

@@ -256,14 +256,10 @@
for(var/possible_target in possible_targets) for(var/possible_target in possible_targets)
var/atom/A = possible_target var/atom/A = possible_target
if(found(A))
. = list(A)
break
if(istype(A, /mob/living) && !can_pick_mobs) if(istype(A, /mob/living) && !can_pick_mobs)
continue continue
if(can_attack(A)) // Can we attack it? if(can_attack(A)) // Can we attack it?
. += A . += A
continue
for(var/obj/item/I in .) for(var/obj/item/I in .)
last_search = world.time last_search = world.time

View File

@@ -196,29 +196,15 @@
next = null next = null
..() ..()
/mob/living/simple_mob/animal/space/space_worm/Move() /mob/living/simple_mob/animal/space/space_worm/Moved(atom/old_loc, direction, forced = FALSE)
var/attachementNextPosition = loc
. = ..() . = ..()
if(.) if(previous)
if(previous) if(previous.z != z)
if(previous.z != z) previous.z_transitioning = TRUE
previous.z_transitioning = TRUE else
else previous.z_transitioning = FALSE
previous.z_transitioning = FALSE previous.forceMove(old_loc) // None of this 'ripped in half by an airlock' business.
previous.forceMove(attachementNextPosition) // None of this 'ripped in half by an airlock' business. update_icon()
update_icon()
/mob/living/simple_mob/animal/space/space_worm/forceMove()
var/attachementNextPosition = loc
. = ..()
if(.)
if(previous)
if(previous.z != z)
previous.z_transitioning = TRUE
else
previous.z_transitioning = FALSE
previous.forceMove(attachementNextPosition) // None of this 'ripped in half by an airlock' business. x 2
update_icon()
/mob/living/simple_mob/animal/space/space_worm/head/Bump(atom/obstacle) /mob/living/simple_mob/animal/space/space_worm/head/Bump(atom/obstacle)
if(open_maw && !stat && obstacle != previous) if(open_maw && !stat && obstacle != previous)

View File

@@ -110,8 +110,8 @@
/client/Move(n, direct) /client/Move(n, direct)
if(!mob) //if(!mob) // Clients cannot have a null mob, as enforced by byond
return // Moved here to avoid nullrefs below // return // Moved here to avoid nullrefs below
if(mob.control_object) Move_object(direct) if(mob.control_object) Move_object(direct)
@@ -166,8 +166,11 @@
if(!mob.canmove) if(!mob.canmove)
return return
//if(istype(mob.loc, /turf/space) || (mob.flags & NOGRAV)) //Relaymove could handle it
// if(!mob.Process_Spacemove(0)) return 0 if(mob.machine)
var/result = mob.machine.relaymove(mob, direct)
if(result)
return result
if(!mob.lastarea) if(!mob.lastarea)
mob.lastarea = get_area(mob.loc) mob.lastarea = get_area(mob.loc)
@@ -218,10 +221,6 @@
return return
return mob.buckled.relaymove(mob,direct) return mob.buckled.relaymove(mob,direct)
if(istype(mob.machine, /obj/machinery))
if(mob.machine.relaymove(mob,direct))
return
if(mob.pulledby || mob.buckled) // Wheelchair driving! if(mob.pulledby || mob.buckled) // Wheelchair driving!
if(istype(mob.loc, /turf/space)) if(istype(mob.loc, /turf/space))
return // No wheelchair driving in space return // No wheelchair driving in space
@@ -366,17 +365,7 @@
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir) anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
mob.forceMove(get_step(mob, direct)) mob.forceMove(get_step(mob, direct))
mob.dir = direct mob.dir = direct
// Crossed is always a bit iffy
for(var/obj/S in mob.loc)
if(istype(S,/obj/effect/step_trigger) || istype(S,/obj/effect/beam))
S.Crossed(mob)
var/area/A = get_area_master(mob)
if(A)
A.Entered(mob)
if(isturf(mob.loc))
var/turf/T = mob.loc
T.Entered(mob)
mob.Post_Incorpmove() mob.Post_Incorpmove()
return 1 return 1
@@ -468,16 +457,11 @@
/mob/proc/update_gravity() /mob/proc/update_gravity()
return return
/*
// The real Move() proc is above, but touching that massive block just to put this in isn't worth it.
/mob/Move(var/newloc, var/direct)
. = ..(newloc, direct)
if(.)
post_move(newloc, direct)
*/
// Called when a mob successfully moves. // Called when a mob successfully moves.
// Would've been an /atom/movable proc but it caused issues. // Would've been an /atom/movable proc but it caused issues.
/mob/Moved(atom/oldloc) /mob/Moved(atom/oldloc)
. = ..()
for(var/obj/O in contents) for(var/obj/O in contents)
O.on_loc_moved(oldloc) O.on_loc_moved(oldloc)

View File

@@ -377,7 +377,7 @@
var/turf/T = join_props["turf"] var/turf/T = join_props["turf"]
var/join_message = join_props["msg"] var/join_message = join_props["msg"]
var/announce_channel = join_props["channel"] || "Common" // VOREStation Add var/announce_channel = join_props["channel"] || "Common"
if(!T || !join_message) if(!T || !join_message)
return 0 return 0

View File

@@ -255,6 +255,18 @@
else else
return ..() return ..()
/obj/item/modular_computer/apply_visual(var/mob/user)
if(active_program)
return active_program.apply_visual(user)
/obj/item/modular_computer/remove_visual(var/mob/user)
if(active_program)
return active_program.remove_visual(user)
/obj/item/modular_computer/relaymove(var/mob/user, direction)
if(active_program)
return active_program.relaymove(user, direction)
/obj/item/modular_computer/proc/set_autorun(program) /obj/item/modular_computer/proc/set_autorun(program)
if(!hard_drive) if(!hard_drive)
return return

View File

@@ -15,6 +15,7 @@
hard_drive.store_file(new/datum/computer_file/program/atmos_control()) hard_drive.store_file(new/datum/computer_file/program/atmos_control())
hard_drive.store_file(new/datum/computer_file/program/rcon_console()) hard_drive.store_file(new/datum/computer_file/program/rcon_console())
hard_drive.store_file(new/datum/computer_file/program/camera_monitor()) hard_drive.store_file(new/datum/computer_file/program/camera_monitor())
hard_drive.store_file(new/datum/computer_file/program/shutoff_monitor())
// Medical // Medical
/obj/item/modular_computer/console/preset/medical/install_default_programs() /obj/item/modular_computer/console/preset/medical/install_default_programs()

View File

@@ -203,8 +203,12 @@
/datum/computer_file/program/apply_visual(mob/M) /datum/computer_file/program/apply_visual(mob/M)
if(NM) if(NM)
NM.apply_visual(M) return NM.apply_visual(M)
/datum/computer_file/program/remove_visual(mob/M) /datum/computer_file/program/remove_visual(mob/M)
if(NM) if(NM)
NM.remove_visual(M) return NM.remove_visual(M)
/datum/computer_file/program/proc/relaymove(var/mob/M, direction)
if(NM)
return NM.relaymove(M, direction)

View File

@@ -0,0 +1,63 @@
/datum/computer_file/program/shutoff_monitor
filename = "shutoffmonitor"
filedesc = "Shutoff Valve Monitoring"
nanomodule_path = /datum/nano_module/shutoff_monitor
program_icon_state = "atmos_control"
program_key_state = "atmos_key"
program_menu_icon = "wrench"
extended_desc = "This program allows for remote monitoring and control of emergency shutoff valves."
required_access = access_engine
requires_ntnet = 1
network_destination = "shutoff valve control computer"
size = 5
var/has_alert = 0
/datum/nano_module/shutoff_monitor
name = "Shutoff Valve Monitoring"
/datum/nano_module/shutoff_monitor/Topic(ref, href_list)
if(..())
return 1
if(href_list["toggle_enable"])
var/obj/machinery/atmospherics/valve/shutoff/S = locate(href_list["toggle_enable"])
if(!istype(S))
return 0
S.close_on_leaks = !S.close_on_leaks
return 1
if(href_list["toggle_open"])
var/obj/machinery/atmospherics/valve/shutoff/S = locate(href_list["toggle_open"])
if(!istype(S))
return 0
if(S.open)
S.close()
else
S.open()
return 1
/datum/nano_module/shutoff_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
var/list/data = host.initial_data()
var/list/valves = list()
for(var/obj/machinery/atmospherics/valve/shutoff/S in GLOB.shutoff_valves)
valves.Add(list(list(
"name" = S.name,
"enabled" = S.close_on_leaks,
"open" = S.open,
"x" = S.x,
"y" = S.y,
"z" = S.z,
"ref" = "\ref[S]"
)))
data["valves"] = valves
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "shutoff_monitor.tmpl", "Shutoff Valve Monitoring", 627, 700, state = state)
if(host.update_layout()) // This is necessary to ensure the status bar remains updated along with rest of the UI.
ui.auto_update_layout = 1
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)

View File

@@ -0,0 +1,266 @@
/obj/item/modular_computer
var/list/paired_uavs //Weakrefs, don't worry about it!
/datum/computer_file/program/uav
filename = "rigger"
filedesc = "UAV Control"
nanomodule_path = /datum/nano_module/uav
program_icon_state = "comm_monitor"
program_key_state = "generic_key"
program_menu_icon = "link"
extended_desc = "This program allows remote control of certain drones, but only when paired with this device."
size = 12
available_on_ntnet = 1
//requires_ntnet = 1
/datum/nano_module/uav
name = "UAV Control program"
var/obj/item/device/uav/current_uav = null //The UAV we're watching
var/signal_strength = 0 //Our last signal strength report (cached for a few seconds)
var/signal_test_counter = 0 //How long until next signal strength check
var/list/viewers //Who's viewing a UAV through us
var/adhoc_range = 30 //How far we can operate on a UAV without NTnet
/datum/nano_module/uav/Destroy()
if(LAZYLEN(viewers))
for(var/weakref/W in viewers)
var/M = W.resolve()
if(M)
unlook(M)
. = ..()
/datum/nano_module/uav/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, state = default_state)
var/list/data = host.initial_data()
if(current_uav)
if(QDELETED(current_uav))
set_current(null)
else if(signal_test_counter-- <= 0)
signal_strength = get_signal_to(current_uav)
if(!signal_strength)
set_current(null)
else // Don't reset counter until we find a UAV that's actually in range we can stay connected to
signal_test_counter = 20
data["current_uav"] = null
if(current_uav)
data["current_uav"] = list("status" = current_uav.get_status_string(), "power" = current_uav.state == 1 ? 1 : null)
data["signal_strength"] = signal_strength ? signal_strength >= 2 ? "High" : "Low" : "None"
data["in_use"] = LAZYLEN(viewers)
var/list/paired_map = list()
var/obj/item/modular_computer/mc_host = nano_host()
if(istype(mc_host))
for(var/puav in mc_host.paired_uavs)
var/weakref/wr = puav
var/obj/item/device/uav/U = wr.resolve()
paired_map[++paired_map.len] = list("name" = "[U ? U.nickname : "!!Missing!!"]", "uavref" = "\ref[U]")
data["paired_uavs"] = paired_map
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "mod_uav.tmpl", "UAV Control", 600, 500, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/datum/nano_module/uav/Topic(var/href, var/href_list = list(), var/datum/topic_state/state)
if((. = ..()))
return
state = state || DefaultTopicState() || global.default_state
if(CanUseTopic(usr, state, href_list) == STATUS_INTERACTIVE)
CouldUseTopic(usr)
return OnTopic(usr, href_list, state)
CouldNotUseTopic(usr)
return TRUE
/datum/nano_module/uav/proc/OnTopic(var/mob/user, var/list/href_list)
if(href_list["switch_uav"])
var/obj/item/device/uav/U = locate(href_list["switch_uav"]) //This is a \ref to the UAV itself
if(!istype(U))
to_chat(usr,"<span class='warning'>Something is blocking the connection to that UAV. In-person investigation is required.</span>")
return TOPIC_NOACTION
if(!get_signal_to(U))
to_chat(usr,"<span class='warning'>The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.</span>")
return TOPIC_NOACTION
set_current(U)
return TOPIC_REFRESH
if(href_list["del_uav"])
var/refstring = href_list["del_uav"] //This is a \ref to the UAV itself
var/obj/item/modular_computer/mc_host = nano_host()
//This is so we can really scrape up any weakrefs that can't resolve
for(var/weakref/wr in mc_host.paired_uavs)
if(wr.ref == refstring)
if(current_uav?.weakref == wr)
set_current(null)
LAZYREMOVE(mc_host.paired_uavs, wr)
else if(href_list["view_uav"])
if(!current_uav)
return TOPIC_NOACTION
if(current_uav.check_eye(user) < 0)
to_chat(usr,"<span class='warning'>The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.</span>")
else
viewing_uav(user) ? unlook(user) : look(user)
return TOPIC_NOACTION
else if(href_list["power_uav"])
if(!current_uav)
return TOPIC_NOACTION
else if(current_uav.toggle_power())
//Clean up viewers faster
if(LAZYLEN(viewers))
for(var/weakref/W in viewers)
var/M = W.resolve()
if(M)
unlook(M)
return TOPIC_REFRESH
/datum/nano_module/uav/proc/DefaultTopicState()
return global.default_state
/datum/nano_module/uav/proc/CouldNotUseTopic(mob/user)
. = ..()
unlook(user)
/datum/nano_module/uav/proc/CouldUseTopic(mob/user)
. = ..()
if(viewing_uav(user))
look(user)
/datum/nano_module/uav/proc/set_current(var/obj/item/device/uav/U)
if(current_uav == U)
return
signal_strength = 0
current_uav = U
if(LAZYLEN(viewers))
for(var/weakref/W in viewers)
var/M = W.resolve()
if(M)
if(current_uav)
to_chat(M, "<span class='warning'>You're disconnected from the UAV's camera!</span>")
unlook(M)
else
look(M)
////
//// Finding signal strength between us and the UAV
////
/datum/nano_module/uav/proc/get_signal_to(var/atom/movable/AM)
// Following roughly the ntnet signal levels
// 0 is none
// 1 is weak
// 2 is strong
var/obj/item/modular_computer/host = nano_host() //Better not add this to anything other than modular computers.
if(!istype(host))
return
var/our_signal = host.get_ntnet_status() //1 low, 2 good, 3 wired, 0 none
var/their_z = get_z(AM)
//If we have no NTnet connection don't bother getting theirs
if(!our_signal)
if(get_z(host) == their_z && (get_dist(host, AM) < adhoc_range))
return 1 //We can connect (with weak signal) in same z without ntnet, within 30 turfs
else
return 0
var/list/zlevels_in_range = using_map.get_map_levels(their_z, FALSE)
var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE) - zlevels_in_range
var/their_signal = 0
for(var/relay in ntnet_global.relays)
var/obj/machinery/ntnet_relay/R = relay
if(!R.operable())
continue
if(R.z == their_z)
their_signal = 2
break
if(R.z in zlevels_in_range)
their_signal = 2
break
if(R.z in zlevels_in_long_range)
their_signal = 1
break
if(!their_signal) //They have no NTnet at all
if(get_z(host) == their_z && (get_dist(host, AM) < adhoc_range))
return 1 //We can connect (with weak signal) in same z without ntnet, within 30 turfs
else
return 0
else
return max(our_signal, their_signal)
////
//// UAV viewer handling
////
/datum/nano_module/uav/proc/viewing_uav(mob/user)
return (weakref(user) in viewers)
/datum/nano_module/uav/proc/look(var/mob/user)
if(issilicon(user)) //Too complicated for me to want to mess with at the moment
to_chat(user, "<span class='warning'>Regulations prevent you from controlling several corporeal forms at the same time!</span>")
return
if(!current_uav)
return
user.set_machine(nano_host())
user.reset_view(current_uav)
current_uav.add_master(user)
LAZYDISTINCTADD(viewers, weakref(user))
/datum/nano_module/uav/proc/unlook(var/mob/user)
user.unset_machine()
user.reset_view()
if(current_uav)
current_uav.remove_master(user)
LAZYREMOVE(viewers, weakref(user))
/datum/nano_module/uav/check_eye(var/mob/user)
if(get_dist(user, nano_host()) > 1 || user.blinded || !current_uav)
unlook(user)
return -1
var/viewflag = current_uav.check_eye(user)
if (viewflag < 0) //camera doesn't work
unlook(user)
return -1
return viewflag
////
//// Relaying movements to the UAV
////
/datum/nano_module/uav/relaymove(var/mob/user, direction)
if(current_uav)
return current_uav.relaymove(user, direction, signal_strength)
////
//// The effects when looking through a UAV
////
/datum/nano_module/uav/apply_visual(var/mob/M)
if(!M.client)
return
if(weakref(M) in viewers)
M.overlay_fullscreen("fishbed",/obj/screen/fullscreen/fishbed)
M.overlay_fullscreen("scanlines",/obj/screen/fullscreen/scanline)
if(signal_strength <= 1)
M.overlay_fullscreen("whitenoise",/obj/screen/fullscreen/noise)
else
M.clear_fullscreen("whitenoise", 0)
else
remove_visual(M)
/datum/nano_module/uav/remove_visual(mob/M)
if(!M.client)
return
M.clear_fullscreen("fishbed",0)
M.clear_fullscreen("scanlines",0)
M.clear_fullscreen("whitenoise",0)

View File

@@ -46,7 +46,7 @@
to_chat(user, "<span class='warning'>The crew monitor doesn't seem like it'll work here.</span>") to_chat(user, "<span class='warning'>The crew monitor doesn't seem like it'll work here.</span>")
if(program) if(program)
program.kill_program() program.kill_program()
else if(ui) if(ui)
ui.close() ui.close()
return return

View File

@@ -4,7 +4,7 @@
nanomodule_path = /datum/nano_module/program/ship/nav nanomodule_path = /datum/nano_module/program/ship/nav
program_icon_state = "helm" program_icon_state = "helm"
program_key_state = "generic_key" program_key_state = "generic_key"
program_menu_icon = "search" program_menu_icon = "pin-s"
extended_desc = "Displays a ship's location in the sector." extended_desc = "Displays a ship's location in the sector."
required_access = null required_access = null
requires_ntnet = 1 requires_ntnet = 1

View File

@@ -39,6 +39,27 @@ var/global/ntnet_card_uid = 1
icon_state = "netcard_advanced" icon_state = "netcard_advanced"
hardware_size = 1 hardware_size = 1
/obj/item/weapon/computer_hardware/network_card/quantum
name = "quantum NTNet network card"
desc = "A network card that can connect to NTnet from anywhere, using quantum entanglement."
long_range = 1
origin_tech = list(TECH_DATA = 6, TECH_ENGINEERING = 7)
power_usage = 200 // Infinite range but higher power usage.
icon_state = "netcard_advanced"
hardware_size = 1
/obj/item/weapon/computer_hardware/network_card/quantum/get_signal(var/specific_action = 0)
if(!holder2)
return 0
if(!enabled)
return 0
if(!check_functionality() || !ntnet_global || is_banned())
return 0
return 2
/obj/item/weapon/computer_hardware/network_card/wired /obj/item/weapon/computer_hardware/network_card/wired
name = "wired NTNet network card" name = "wired NTNet network card"
desc = "An advanced network card for usage with standard NTNet frequencies. This one also supports wired connection." desc = "An advanced network card for usage with standard NTNet frequencies. This one also supports wired connection."
@@ -82,7 +103,8 @@ var/global/ntnet_card_uid = 1
var/holderz = get_z(holder2) var/holderz = get_z(holder2)
if(!holderz) //no reception in nullspace if(!holderz) //no reception in nullspace
return 0 return 0
var/list/zlevels_in_range = using_map.get_map_levels(holderz, long_range) var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE)
var/list/zlevels_in_long_range = using_map.get_map_levels(holderz, TRUE) - zlevels_in_range
var/best = 0 var/best = 0
for(var/relay in ntnet_global.relays) for(var/relay in ntnet_global.relays)
var/obj/machinery/ntnet_relay/R = relay var/obj/machinery/ntnet_relay/R = relay
@@ -91,11 +113,16 @@ var/global/ntnet_card_uid = 1
continue continue
//We're on the same z //We're on the same z
if(R.z == holderz) if(R.z == holderz)
best = 2 best = 2 //Every network card gets high signal on the same z as the relay
break // No point in going further break // No point in going further
//Not on the same z but within range anyway //Not on the same z but within range anyway
if(R.z in zlevels_in_range) if(R.z in zlevels_in_range)
best = 1 best = long_range ? 2 : 1 //High-power network cards get good signal further away
break
//Only in long range
if(long_range && (R.z in zlevels_in_long_range))
best = 1 //High-power network cards can get low signal even at long range
break
return best return best
return 0 // No computer! return 0 // No computer!

View File

@@ -61,7 +61,7 @@
if(shadow) if(shadow)
shadow.sync_icon(src) shadow.sync_icon(src)
/mob/living/Move() /mob/living/Moved()
. = ..() . = ..()
check_shadow() check_shadow()

View File

@@ -62,3 +62,6 @@
/datum/proc/update_layout() /datum/proc/update_layout()
return FALSE return FALSE
/datum/nano_module/proc/relaymove(var/mob/user, direction)
return FALSE

View File

@@ -15,13 +15,13 @@
) )
// make a screeching noise to drive people mad // make a screeching noise to drive people mad
/obj/structure/ship_munition/disperser_charge/Move(atom/newloc, direct = 0) /obj/structure/ship_munition/disperser_charge/Moved(atom/old_loc, direction, forced = FALSE)
if((. = ..()) && prob(50)) . = ..()
if(prob(50))
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!isspace(T) && !istype(T, /turf/simulated/floor/carpet)) if(!isspace(T) && !istype(T, /turf/simulated/floor/carpet))
playsound(T, pick(move_sounds), 50, 1) playsound(T, pick(move_sounds), 50, 1)
/obj/structure/ship_munition/disperser_charge/fire /obj/structure/ship_munition/disperser_charge/fire
name = "FR1-ENFER charge" name = "FR1-ENFER charge"
color = "#b95a00" color = "#b95a00"

View File

@@ -19,19 +19,10 @@
icon_state = pick(event_icon_states) icon_state = pick(event_icon_states)
GLOB.overmap_event_handler.update_hazards(loc) GLOB.overmap_event_handler.update_hazards(loc)
/obj/effect/overmap/event/Move() /obj/effect/overmap/event/Moved(atom/old_loc, direction, forced = FALSE)
var/turf/old_loc = loc
. = ..() . = ..()
if(.) GLOB.overmap_event_handler.update_hazards(old_loc)
GLOB.overmap_event_handler.update_hazards(old_loc) GLOB.overmap_event_handler.update_hazards(loc)
GLOB.overmap_event_handler.update_hazards(loc)
/obj/effect/overmap/event/forceMove(atom/destination)
var/old_loc = loc
. = ..()
if(.)
GLOB.overmap_event_handler.update_hazards(old_loc)
GLOB.overmap_event_handler.update_hazards(loc)
/obj/effect/overmap/event/Destroy()//takes a look at this one as well, make sure everything is A-OK /obj/effect/overmap/event/Destroy()//takes a look at this one as well, make sure everything is A-OK
var/turf/T = loc var/turf/T = loc

Some files were not shown because too many files have changed in this diff Show More