mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 00:47:31 +01:00
Relaymove tweaks (#19489)
Made relaymoves uniform in function header and non sleepable. Improved IPC/borg recharger, made it time constant. Tweaked client/Move() to avoid a range(), moved a relaymove around to fix a bug, some minor tweaks. Fixed IPC/borg recharge station not taking the IPC/Borg in on bump.
This commit is contained in:
@@ -1,2 +1,11 @@
|
||||
// Atom movement signals. Format:
|
||||
// When the signal is called: (signal arguments)
|
||||
// All signals send the source datum of the signal as the first argument
|
||||
|
||||
///from base of atom/relaymove(): (mob/living/user, direction)
|
||||
#define COMSIG_ATOM_RELAYMOVE "atom_relaymove"
|
||||
///prevents the "you cannot move while buckled! message"
|
||||
#define COMSIG_BLOCK_RELAYMOVE (1<<0)
|
||||
|
||||
///From base of /datum/move_loop/process() after attempting to move a movable: (datum/move_loop/loop, old_dir)
|
||||
#define COMSIG_MOVABLE_MOVED_FROM_LOOP "movable_moved_from_loop"
|
||||
|
||||
@@ -123,6 +123,18 @@
|
||||
|
||||
return (!density || !height || air_group)
|
||||
|
||||
/**
|
||||
* An atom we are buckled or is contained within us has tried to move
|
||||
*/
|
||||
/atom/proc/relaymove(mob/living/user, direction)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_RELAYMOVE, user, direction) & COMSIG_BLOCK_RELAYMOVE)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/**
|
||||
* An atom has entered this atom's contents
|
||||
*
|
||||
|
||||
@@ -230,11 +230,6 @@
|
||||
found += A.search_contents_for(path,filter_path)
|
||||
return found
|
||||
|
||||
// Called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled_to var set.
|
||||
// See code/modules/mob/mob_movement.dm for more.
|
||||
/atom/proc/relaymove()
|
||||
return
|
||||
|
||||
// Called to set the atom's dir and used to add behaviour to dir-changes.
|
||||
/atom/proc/set_dir(new_dir)
|
||||
. = new_dir != dir
|
||||
|
||||
@@ -54,8 +54,12 @@
|
||||
/obj/item/stack/cable_coil = 2
|
||||
)
|
||||
|
||||
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
/obj/machinery/dna_scannernew/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat)
|
||||
return
|
||||
src.go_out()
|
||||
return
|
||||
|
||||
@@ -46,7 +46,11 @@
|
||||
L.forceMove(get_turf(src))
|
||||
L.visible_message(SPAN_WARNING("\The [src] ejects [L]!"))
|
||||
|
||||
/obj/effect/phase_shift/relaymove(mob/user)
|
||||
/obj/effect/phase_shift/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
|
||||
@@ -465,7 +465,11 @@
|
||||
var/mob/M = A
|
||||
M.reset_view(null)
|
||||
|
||||
/obj/effect/dummy/veil_walk/relaymove(var/mob/user, direction)
|
||||
/obj/effect/dummy/veil_walk/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user != owner_mob)
|
||||
return
|
||||
if(ghost_last_move + ghost_move_delay > world.time)
|
||||
|
||||
@@ -294,7 +294,11 @@
|
||||
LB.user_unbuckle(user)
|
||||
go_in(target, user)
|
||||
|
||||
/obj/machinery/sleeper/relaymove(var/mob/user)
|
||||
/obj/machinery/sleeper/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user == occupant)
|
||||
go_out()
|
||||
|
||||
|
||||
@@ -78,7 +78,11 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/machinery/bodyscanner/relaymove(mob/user as mob)
|
||||
/obj/machinery/bodyscanner/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if (user.stat)
|
||||
return
|
||||
go_out()
|
||||
|
||||
@@ -333,7 +333,11 @@
|
||||
qdel(occupant)
|
||||
return
|
||||
|
||||
/obj/machinery/clonepod/relaymove(mob/user as mob)
|
||||
/obj/machinery/clonepod/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat)
|
||||
return
|
||||
go_out()
|
||||
|
||||
@@ -110,7 +110,11 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/relaymove(mob/user as mob)
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(src.occupant == user && !user.stat)
|
||||
go_out()
|
||||
|
||||
|
||||
@@ -560,7 +560,11 @@ GLOBAL_LIST_EMPTY(frozen_crew)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/machinery/cryopod/relaymove(var/mob/user)
|
||||
/obj/machinery/cryopod/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
go_out()
|
||||
|
||||
/obj/machinery/cryopod/proc/save_ipc_tag(var/mob/M)
|
||||
|
||||
@@ -6,16 +6,33 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
idle_power_usage = 75
|
||||
var/mob/occupant = null
|
||||
/**
|
||||
* The `/mob/living` that is currently occupying the charger
|
||||
*/
|
||||
var/mob/living/occupant = null
|
||||
|
||||
/**
|
||||
* The `/obj/item/cell` that is currently inside the charger
|
||||
*/
|
||||
var/obj/item/cell/cell = null
|
||||
|
||||
var/icon_update_tick = 0 // Used to rebuild the overlay only once every 10 ticks
|
||||
var/charging = 0
|
||||
var/charging_efficiency = 1.3//Multiplier applied to all operations of giving power to cells, represents entropy. Efficiency increases with upgrades
|
||||
var/charging_power // W. Power rating drawn from internal cell to recharge occupant's cell 60 kW unupgraded
|
||||
var/restore_power_active // W. Power drawn from APC to recharge internal cell when an occupant is charging. 40 kW if un-upgraded
|
||||
var/restore_power_passive // W. Power drawn from APC to recharge internal cell when idle. 7 kW if un-upgraded
|
||||
var/weld_rate = 0 // How much brute damage is repaired per tick
|
||||
var/wire_rate = 0 // How much burn damage is repaired per tick
|
||||
|
||||
///Multiplier applied to all operations of giving power to cells, represents entropy, efficiency increases with upgrades
|
||||
var/charging_efficiency = 1.3
|
||||
|
||||
///Watts, Power rating drawn from internal cell to recharge occupant's cell 60 kW unupgraded
|
||||
var/charging_power
|
||||
|
||||
///Watts, Power drawn from APC to recharge internal cell when an occupant is charging. 40 kW if un-upgraded
|
||||
var/restore_power_active
|
||||
///Watts, Power drawn from APC to recharge internal cell when idle. 7 kW if un-upgraded
|
||||
var/restore_power_passive
|
||||
|
||||
///How much brute damage is repaired per second
|
||||
var/weld_rate = 0
|
||||
///How much burn damage is repaired per second
|
||||
var/wire_rate = 0
|
||||
|
||||
var/weld_power_use = 2300 // power used per point of brute damage repaired. 2.3 kW ~ about the same power usage of a handheld arc welder
|
||||
var/wire_power_use = 500 // power used per point of burn damage repaired.
|
||||
@@ -32,10 +49,15 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharge_station/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/recharge_station/proc/has_cell_power()
|
||||
return cell && cell.percent() > 0
|
||||
|
||||
/obj/machinery/recharge_station/process()
|
||||
/obj/machinery/recharge_station/process(seconds_per_tick)
|
||||
if(stat & (BROKEN))
|
||||
return
|
||||
if(!cell) // Shouldn't be possible, but sanity check
|
||||
@@ -49,13 +71,13 @@
|
||||
|
||||
//First, draw from the internal power cell to recharge/repair/etc the occupant
|
||||
if(occupant)
|
||||
process_occupant()
|
||||
process_occupant(seconds_per_tick)
|
||||
|
||||
//Then, if external power is available, recharge the internal cell
|
||||
var/recharge_amount = 0
|
||||
if(!(stat & NOPOWER))
|
||||
// Calculating amount of power to draw
|
||||
recharge_amount = (occupant ? restore_power_active : restore_power_passive) * CELLRATE
|
||||
recharge_amount = (occupant ? restore_power_active : restore_power_passive) * CELLRATE * seconds_per_tick
|
||||
|
||||
recharge_amount = cell.give(recharge_amount*charging_efficiency)
|
||||
use_power_oneoff(recharge_amount / CELLRATE)
|
||||
@@ -71,7 +93,7 @@
|
||||
update_icon()
|
||||
|
||||
//Processes the occupant, drawing from the internal power cell if needed.
|
||||
/obj/machinery/recharge_station/proc/process_occupant()
|
||||
/obj/machinery/recharge_station/proc/process_occupant(seconds_per_tick = 1)
|
||||
if(!isrobot(occupant) && !ishuman(occupant))
|
||||
return
|
||||
|
||||
@@ -80,14 +102,14 @@
|
||||
var/mob/living/silicon/robot/R = occupant
|
||||
|
||||
if(R.module)
|
||||
R.module.respawn_consumable(R, charging_power * CELLRATE / 250) //consumables are magical, apparently
|
||||
R.module.respawn_consumable(R, charging_power * CELLRATE * seconds_per_tick / 250) //consumables are magical, apparently
|
||||
target = R.cell
|
||||
|
||||
//Lastly, attempt to repair the cyborg if enabled
|
||||
if(weld_rate && R.getBruteLoss() && cell.checked_use(weld_power_use * weld_rate * CELLRATE))
|
||||
R.adjustBruteLoss(-weld_rate)
|
||||
if(wire_rate && R.getFireLoss() && cell.checked_use(wire_power_use * wire_rate * CELLRATE))
|
||||
R.adjustFireLoss(-wire_rate)
|
||||
if(weld_rate && R.getBruteLoss() && cell.checked_use(weld_power_use * weld_rate * CELLRATE * seconds_per_tick))
|
||||
R.adjustBruteLoss(-weld_rate * seconds_per_tick)
|
||||
if(wire_rate && R.getFireLoss() && cell.checked_use(wire_power_use * wire_rate * CELLRATE * seconds_per_tick))
|
||||
R.adjustFireLoss(-wire_rate * seconds_per_tick)
|
||||
|
||||
if(ishuman(occupant))
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
@@ -100,7 +122,7 @@
|
||||
target = R.cell
|
||||
|
||||
if(target && !target.fully_charged())
|
||||
var/diff = min(target.maxcharge - target.charge, charging_power * CELLRATE) // Capped by charging_power / tick
|
||||
var/diff = min(target.maxcharge - target.charge, charging_power * CELLRATE * seconds_per_tick) // Capped by charging_power / tick
|
||||
var/charge_used = cell.use(diff)
|
||||
target.give(charge_used*charging_efficiency)
|
||||
|
||||
@@ -119,7 +141,11 @@
|
||||
return 0
|
||||
return cell.percent()
|
||||
|
||||
/obj/machinery/recharge_station/relaymove(mob/user as mob)
|
||||
/obj/machinery/recharge_station/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat)
|
||||
return
|
||||
go_out()
|
||||
@@ -215,10 +241,11 @@
|
||||
if(icon_update_tick == 0)
|
||||
build_overlays()
|
||||
|
||||
/obj/machinery/recharge_station/CollidedWith(var/mob/living/silicon/robot/R)
|
||||
go_in(R)
|
||||
/obj/machinery/recharge_station/CollidedWith(atom/movable/AM)
|
||||
if(isliving(AM))
|
||||
go_in(AM)
|
||||
|
||||
/obj/machinery/recharge_station/proc/go_in(var/mob/M)
|
||||
/obj/machinery/recharge_station/proc/go_in(mob/living/M)
|
||||
if(occupant)
|
||||
return
|
||||
if(!hascell(M))
|
||||
@@ -230,9 +257,12 @@
|
||||
M.reset_view(src)
|
||||
occupant = M
|
||||
update_icon()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/recharge_station/proc/hascell(var/mob/M)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
SHOULD_BE_PURE(TRUE)
|
||||
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.cell)
|
||||
@@ -251,7 +281,7 @@
|
||||
if(!occupant)
|
||||
return
|
||||
|
||||
occupant.forceMove(loc)
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant.reset_view()
|
||||
occupant = null
|
||||
update_icon()
|
||||
@@ -269,27 +299,6 @@
|
||||
to_chat(usr, SPAN_DANGER("Cancelled loading [R] into the charger. You and [R] must stay still!"))
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/verb/move_eject()
|
||||
set category = "Object"
|
||||
set name = "Eject Recharger"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/verb/move_inside()
|
||||
set category = "Object"
|
||||
set name = "Enter Recharger"
|
||||
set src in oview(1)
|
||||
|
||||
if(!usr.incapacitated())
|
||||
return
|
||||
go_in(usr)
|
||||
|
||||
/obj/machinery/recharge_station/MouseDrop_T(atom/dropping, mob/user)
|
||||
if (istype(dropping, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = dropping
|
||||
|
||||
@@ -142,7 +142,11 @@
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/suit_cycler/relaymove(var/mob/user)
|
||||
/obj/machinery/suit_cycler/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
eject_occupant(user)
|
||||
|
||||
/obj/machinery/suit_cycler/MouseDrop_T(atom/dropping, mob/user)
|
||||
|
||||
@@ -175,7 +175,11 @@
|
||||
carded_ai.show_message(rendered, type)
|
||||
..()
|
||||
|
||||
/obj/item/aicard/relaymove(var/mob/user, var/direction)
|
||||
/obj/item/aicard/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat || user.stunned)
|
||||
return
|
||||
var/obj/item/rig/rig = src.get_rig()
|
||||
|
||||
@@ -126,8 +126,13 @@
|
||||
..()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/relaymove(var/mob/user, direction)
|
||||
if(istype(loc, /turf/space)) return //No magical space movement!
|
||||
/obj/effect/dummy/chameleon/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(istype(loc, /turf/space))
|
||||
return //No magical space movement!
|
||||
|
||||
if(can_move)
|
||||
can_move = 0
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
light_range = 1
|
||||
light_color = COLOR_BRIGHT_GREEN
|
||||
|
||||
/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
|
||||
/obj/item/device/paicard/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat || user.stunned)
|
||||
return
|
||||
if(istype(loc, /mob/living/bot))
|
||||
|
||||
@@ -530,7 +530,11 @@
|
||||
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Robots can open/close it, but not the AI.
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user as mob)
|
||||
/obj/structure/closet/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
|
||||
|
||||
@@ -152,7 +152,11 @@
|
||||
/obj/structure/closet/statue/MouseDrop_T()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/relaymove()
|
||||
/obj/structure/closet/statue/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/attack_hand()
|
||||
|
||||
@@ -358,7 +358,11 @@
|
||||
has_items = 1
|
||||
|
||||
//Shamelessly copied from wheelchair code
|
||||
/obj/structure/janitorialcart/relaymove(mob/user, direction)
|
||||
/obj/structure/janitorialcart/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
||||
if(user==pulling)
|
||||
pulling = null
|
||||
|
||||
@@ -106,7 +106,11 @@
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/morgue/relaymove(mob/user)
|
||||
/obj/structure/morgue/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat || locked)
|
||||
return
|
||||
var/turf/S = get_step(src, src.dir)
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
if(buckled)
|
||||
buckled.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/stool/chair/office/wheelchair/relaymove(mob/user, direction)
|
||||
/obj/structure/bed/stool/chair/office/wheelchair/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
// Redundant check?
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
||||
if(user==pulling)
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
H.take_overall_damage(5, 0, DAMAGE_FLAG_SHARP, src)
|
||||
to_chat(user, SPAN_WARNING("You cut yourself while climbing into \the [src]!"))
|
||||
|
||||
/obj/structure/trash_pile/relaymove(mob/user)
|
||||
/obj/structure/trash_pile/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat || user.resting) // don't care too much about use_check here, checking these will suffice
|
||||
return
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
@@ -65,7 +65,11 @@
|
||||
else
|
||||
AddOverlays("gridle")
|
||||
|
||||
/obj/machinery/gibber/relaymove(mob/user as mob)
|
||||
/obj/machinery/gibber/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
go_out()
|
||||
return
|
||||
|
||||
|
||||
@@ -264,7 +264,11 @@
|
||||
SIGNAL_HANDLER
|
||||
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom, relaymove), user, direction, TRUE)
|
||||
|
||||
/mob/living/heavy_vehicle/relaymove(var/mob/living/user, var/direction, var/turn_only = FALSE)
|
||||
/mob/living/heavy_vehicle/relaymove(mob/living/user, direction, var/turn_only = FALSE)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(!can_move(user))
|
||||
return
|
||||
|
||||
|
||||
@@ -76,7 +76,11 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/spresent/relaymove(mob/user as mob)
|
||||
/obj/effect/spresent/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if (user.stat)
|
||||
return
|
||||
to_chat(user, SPAN_WARNING("You can't move."))
|
||||
|
||||
@@ -201,7 +201,11 @@
|
||||
if("Vaurca")
|
||||
braintype = "vaurca"
|
||||
|
||||
/obj/item/device/mmi/relaymove(var/mob/user, var/direction)
|
||||
/obj/item/device/mmi/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat || user.stunned)
|
||||
return
|
||||
var/obj/item/rig/rig = get_rig()
|
||||
|
||||
@@ -76,7 +76,11 @@
|
||||
|
||||
src.help_up_offer = 0
|
||||
|
||||
/mob/living/carbon/relaymove(var/mob/living/user, direction)
|
||||
/mob/living/carbon/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if((user in contents) && istype(user))
|
||||
if(user.last_special <= world.time)
|
||||
user.last_special = world.time + 50
|
||||
|
||||
@@ -242,8 +242,10 @@
|
||||
|
||||
var/old_move_delay = move_delay
|
||||
|
||||
if(!mob)
|
||||
return // Moved here to avoid nullrefs below
|
||||
if(!direct || !new_loc)
|
||||
return FALSE
|
||||
if(!mob?.loc)
|
||||
return FALSE
|
||||
|
||||
if(mob.control_object)
|
||||
Move_object(direct)
|
||||
@@ -307,6 +309,10 @@
|
||||
if(!mob.lastarea)
|
||||
mob.lastarea = get_area(mob.loc)
|
||||
|
||||
if(isobj(mob.loc) || ismob(mob.loc)) //Inside an object, tell it we are moving out
|
||||
var/atom/O = mob.loc
|
||||
return O.relaymove(mob, direct)
|
||||
|
||||
if(isturf(mob.loc))
|
||||
if(!mob.check_solid_ground())
|
||||
var/allowmove = mob.Allow_Spacemove(0)
|
||||
@@ -319,15 +325,15 @@
|
||||
|
||||
|
||||
if(mob.restrained()) //Why being pulled while cuffed prevents you from moving
|
||||
for(var/mob/M in range(mob, 1))
|
||||
if(M.pulling == mob)
|
||||
if(!M.restrained() && M.stat == 0 && M.canmove && mob.Adjacent(M))
|
||||
to_chat(src, SPAN_NOTICE("You're restrained! You can't move!"))
|
||||
return FALSE
|
||||
else
|
||||
M.stop_pulling()
|
||||
var/mob/puller = mob.pulledby
|
||||
if(puller)
|
||||
if(!puller.restrained() && puller.stat == 0 && puller.canmove && mob.Adjacent(puller))
|
||||
to_chat(src, SPAN_NOTICE("You're restrained! You can't move!"))
|
||||
return FALSE
|
||||
else
|
||||
puller.stop_pulling()
|
||||
|
||||
if(mob.pinned.len)
|
||||
if(length(mob.pinned))
|
||||
to_chat(src, SPAN_WARNING("You're pinned to a wall by [mob.pinned[1]]!"))
|
||||
move_delay = world.time + 1 SECOND // prevent spam
|
||||
return FALSE
|
||||
@@ -423,7 +429,7 @@
|
||||
else
|
||||
. = mob.SelfMove(new_loc, direct)
|
||||
|
||||
for (var/obj/item/grab/G in list(mob:l_hand, mob:r_hand))
|
||||
for (var/obj/item/grab/G in list(mob.l_hand, mob.r_hand))
|
||||
if (G.state == GRAB_NECK)
|
||||
mob.set_dir(GLOB.reverse_dir[direct])
|
||||
G.adjust_position()
|
||||
@@ -437,10 +443,6 @@
|
||||
var/mob/living/carbon/human/H = mob
|
||||
H.species.handle_sprint_cost(H, sprint_tally, FALSE)
|
||||
|
||||
if(isobj(mob.loc) || ismob(mob.loc)) //Inside an object, tell it we moved
|
||||
var/atom/O = mob.loc
|
||||
return O.relaymove(mob, direct)
|
||||
|
||||
/mob/living/carbon/human/proc/get_crawl_tally()
|
||||
var/obj/item/organ/external/rhand = organs_by_name[BP_R_HAND]
|
||||
. += limb_check(rhand)
|
||||
|
||||
@@ -109,7 +109,11 @@
|
||||
PH.set_hud_maptext("| Ship Status | [connected.x]-[connected.y] |<br>Speed: [round(connected.get_speed()*1000, 0.01)] | Acceleration: [get_acceleration()]<br>ETA to Next Grid: [get_eta()]")
|
||||
PH.check_ship_overlay(PH.loc, connected)
|
||||
|
||||
/obj/machinery/computer/ship/helm/relaymove(var/mob/user, direction)
|
||||
/obj/machinery/computer/ship/helm/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(viewing_overmap(user) && connected)
|
||||
connected.relaymove(user, direction, accellimit)
|
||||
return 1
|
||||
|
||||
@@ -79,8 +79,12 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overmap/visitable/ship/relaymove(mob/user, direction, accel_limit)
|
||||
accelerate(direction, accel_limit)
|
||||
/obj/effect/overmap/visitable/ship/relaymove(mob/living/user, direction, accel_limit)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
INVOKE_ASYNC(src, PROC_REF(accelerate), direction, accel_limit)
|
||||
|
||||
/obj/effect/overmap/visitable/ship/proc/is_still()
|
||||
return !MOVING(speed[1]) && !MOVING(speed[2])
|
||||
|
||||
@@ -310,7 +310,11 @@
|
||||
return 1
|
||||
|
||||
// attempt to move while inside
|
||||
/obj/machinery/disposal/relaymove(mob/user as mob)
|
||||
/obj/machinery/disposal/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.stat || src.flushing)
|
||||
return
|
||||
if(user.loc == src)
|
||||
@@ -746,7 +750,11 @@
|
||||
|
||||
|
||||
// called when player tries to move while in a pipe
|
||||
/obj/disposalholder/relaymove(mob/user as mob)
|
||||
/obj/disposalholder/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(!istype(user,/mob/living))
|
||||
return
|
||||
|
||||
|
||||
@@ -96,7 +96,11 @@
|
||||
AM.forceMove(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction)
|
||||
/obj/effect/dummy/spell_jaunt/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if (!src.canmove || reappearing) return
|
||||
var/turf/newLoc = get_step(src,direction)
|
||||
if(!(newLoc.turf_flags & TURF_FLAG_NOJAUNT))
|
||||
|
||||
@@ -90,7 +90,11 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/vehicle/animal/relaymove(mob/user, direction)
|
||||
/obj/vehicle/animal/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user != load || user.incapacitated())
|
||||
return
|
||||
return Move(get_step(src, direction))
|
||||
|
||||
@@ -189,7 +189,11 @@
|
||||
to_chat(user, SPAN_NOTICE("\The [src] already has a key in it."))
|
||||
..()
|
||||
|
||||
/obj/vehicle/bike/relaymove(mob/user, direction)
|
||||
/obj/vehicle/bike/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user != load || !on || user.incapacitated())
|
||||
return
|
||||
return Move(get_step(src, direction))
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
to_chat(user, "You remove [load] from \the [src]")
|
||||
to_chat(load, "You were removed from \the [src] by [user]")
|
||||
|
||||
/obj/vehicle/unicycle/relaymove(mob/user, direction)
|
||||
/obj/vehicle/unicycle/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user != load || !on || user.incapacitated())
|
||||
return
|
||||
return Move(get_step(src, direction))
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/relaymove(mob/living/user, direction)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(user.loc != src || !(direction & initialize_directions)) //can't go in a way we aren't connecting to
|
||||
return
|
||||
ventcrawl_to(user,findConnecting(direction, user.ventcrawl_layer),direction)
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# - (fixes bugs)
|
||||
# wip
|
||||
# - (work in progress)
|
||||
# qol
|
||||
# - (quality of life)
|
||||
# soundadd
|
||||
# - (adds a sound)
|
||||
# sounddel
|
||||
# - (removes a sound)
|
||||
# rscadd
|
||||
# - (adds a feature)
|
||||
# rscdel
|
||||
# - (removes a feature)
|
||||
# imageadd
|
||||
# - (adds an image or sprite)
|
||||
# imagedel
|
||||
# - (removes an image or sprite)
|
||||
# spellcheck
|
||||
# - (fixes spelling or grammar)
|
||||
# experiment
|
||||
# - (experimental change)
|
||||
# balance
|
||||
# - (balance changes)
|
||||
# code_imp
|
||||
# - (misc internal code change)
|
||||
# refactor
|
||||
# - (refactors code)
|
||||
# config
|
||||
# - (makes a change to the config files)
|
||||
# admin
|
||||
# - (makes changes to administrator tools)
|
||||
# server
|
||||
# - (miscellaneous changes to server)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: FluffyGhost
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- code_imp: "Made relaymoves uniform in function header and non sleepable."
|
||||
- code_imp: "Improved IPC/borg recharger, made it time constant."
|
||||
- code_imp: "Tweaked client/Move() to avoid a range(), moved a relaymove around to fix a bug, some minor tweaks."
|
||||
- bugfix: "Fixed IPC/borg recharge station not taking the IPC/Borg in on bump."
|
||||
Reference in New Issue
Block a user