diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index cdc7f1b3857..e7ac3cdbbbf 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -83,7 +83,7 @@
if(SSticker.current_state == GAME_STATE_PREGAME)
var/time_remaining = SSticker.GetTimeLeft()
if(time_remaining > 0)
- stat("Time To Start:", "[round(time_remaining/10)]s")
+ stat("Time To Start:", "[round(time_remaining/10)]s")
else if(time_remaining == -10)
stat("Time To Start:", "DELAYED")
else
@@ -325,7 +325,7 @@
/mob/dead/new_player/proc/AttemptLateSpawn(rank)
if(!IsJobAvailable(rank))
alert(src, "[rank] is not available. Please try another.")
- return 0
+ return FALSE
if(SSticker.late_join_disabled)
alert(src, "An administrator has disabled late join spawning.")
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 98b1b46ed8c..baa6e4a6250 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -104,6 +104,7 @@
if(stat)
return 0
on = TRUE
+ canmove = TRUE
set_light(initial(light_range))
update_icon()
diag_hud_set_botstat()
@@ -111,6 +112,7 @@
/mob/living/simple_animal/bot/proc/turn_off()
on = FALSE
+ canmove = FALSE
set_light(0)
bot_reset() //Resets an AI's call, should it exist.
update_icon()
diff --git a/code/modules/orbit/orbit.dm b/code/modules/orbit/orbit.dm
index 91932423d41..ef68134f80e 100644
--- a/code/modules/orbit/orbit.dm
+++ b/code/modules/orbit/orbit.dm
@@ -19,8 +19,6 @@
Check()
lock = _lock
-
-
//do not qdel directly, use stop_orbit on the orbiter. (This way the orbiter can bind to the orbit stopping)
/datum/orbit/Destroy(force = FALSE)
SSorbit.processing -= src
@@ -54,7 +52,9 @@
orbiter.loc = targetloc
orbiter.update_parallax_contents()
lastloc = orbiter.loc
-
+ for(var/other_orbit in orbiter.orbiters)
+ var/datum/orbit/OO = other_orbit
+ OO.Check(targetloc)
/atom/movable/var/datum/orbit/orbiting = null
/atom/var/list/orbiters = null
diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm
index d7094d8c853..89f5af1b63e 100644
--- a/code/modules/power/singularity/singularity.dm
+++ b/code/modules/power/singularity/singularity.dm
@@ -164,7 +164,7 @@
dissipate_track = 0
dissipate_strength = 1
if(STAGE_TWO)
- if((check_turfs_in(1,1))&&(check_turfs_in(2,1))&&(check_turfs_in(4,1))&&(check_turfs_in(8,1)))
+ if(check_cardinals_range(1, TRUE))
current_size = STAGE_TWO
icon = 'icons/effects/96x96.dmi'
icon_state = "singularity_s3"
@@ -176,7 +176,7 @@
dissipate_track = 0
dissipate_strength = 5
if(STAGE_THREE)
- if((check_turfs_in(1,2))&&(check_turfs_in(2,2))&&(check_turfs_in(4,2))&&(check_turfs_in(8,2)))
+ if(check_cardinals_range(2, TRUE))
current_size = STAGE_THREE
icon = 'icons/effects/160x160.dmi'
icon_state = "singularity_s5"
@@ -188,7 +188,7 @@
dissipate_track = 0
dissipate_strength = 20
if(STAGE_FOUR)
- if((check_turfs_in(1,3))&&(check_turfs_in(2,3))&&(check_turfs_in(4,3))&&(check_turfs_in(8,3)))
+ if(check_cardinals_range(3, TRUE))
current_size = STAGE_FOUR
icon = 'icons/effects/224x224.dmi'
icon_state = "singularity_s7"
@@ -296,6 +296,16 @@
step(src, movement_dir)
+/obj/singularity/proc/check_cardinals_range(steps, retry_with_move = FALSE)
+ . = length(GLOB.cardinals) //Should be 4.
+ for(var/i in GLOB.cardinals)
+ . -= check_turfs_in(i, steps) //-1 for each working direction
+ if(. && retry_with_move) //If there's still a positive value it means it didn't pass. Retry with move if applicable
+ for(var/i in GLOB.cardinals)
+ if(step(src, i)) //Move in each direction.
+ if(check_cardinals_range(steps, FALSE)) //New location passes, return true.
+ return TRUE
+ . = !.
/obj/singularity/proc/check_turfs_in(direction = 0, step = 0)
if(!direction)
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 65b83664879..862547abe9a 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -16,8 +16,8 @@
throw_range = 5
force = 5
origin_tech = "combat=1"
- needs_permit = 1
- unique_rename = 0
+ needs_permit = TRUE
+ unique_rename = FALSE
attack_verb = list("struck", "hit", "bashed")
var/fire_sound = "gunshot"
@@ -25,7 +25,7 @@
var/can_suppress = FALSE
var/can_unsuppress = TRUE
var/recoil = 0 //boom boom shake the room
- var/clumsy_check = 1
+ var/clumsy_check = TRUE
var/obj/item/ammo_casing/chambered = null
trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
var/sawn_desc = null //description change if weapon is sawn-off
@@ -93,19 +93,17 @@
/obj/item/gun/equipped(mob/living/user, slot)
. = ..()
- if(zoomable && user.get_active_held_item() != src)
- zoom(user, FALSE) //we can only stay zoomed in if it's in our hands
+ if(zoomed && user.get_active_held_item() != src)
+ zoom(user, FALSE) //we can only stay zoomed in if it's in our hands //yeah and we only unzoom if we're actually zoomed using the gun!!
//called after the gun has successfully fired its chambered ammo.
/obj/item/gun/proc/process_chamber()
- return 0
-
+ return FALSE
//check if there's enough ammo/energy/whatever to shoot one time
//i.e if clicking would make it shoot
/obj/item/gun/proc/can_shoot()
- return 1
-
+ return TRUE
/obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
to_chat(user, "*click*")
@@ -196,13 +194,13 @@
/obj/item/gun/proc/handle_pins(mob/living/user)
if(pin)
if(pin.pin_auth(user) || pin.emagged)
- return 1
+ return TRUE
else
pin.auth_fail(user)
- return 0
+ return FALSE
else
to_chat(user, "[src]'s trigger is locked. This weapon doesn't have a firing pin installed!")
- return 0
+ return FALSE
/obj/item/gun/proc/recharge_newshot()
return
@@ -421,7 +419,7 @@
target.visible_message("[user] points [src] at [target]'s head, ready to pull the trigger...", \
"[user] points [src] at your head, ready to pull the trigger...")
- semicd = 1
+ semicd = TRUE
if(!do_mob(user, target, 120) || user.zone_selected != "mouth")
if(user)
@@ -429,10 +427,10 @@
user.visible_message("[user] decided not to shoot.")
else if(target && target.Adjacent(user))
target.visible_message("[user] has decided to spare [target]", "[user] has decided to spare your life!")
- semicd = 0
+ semicd = FALSE
return
- semicd = 0
+ semicd = FALSE
target.visible_message("[user] pulls the trigger!", "[user] pulls the trigger!")
diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm
index 4b01389a223..b567d59df7a 100644
--- a/code/modules/projectiles/guns/ballistic/automatic.dm
+++ b/code/modules/projectiles/guns/ballistic/automatic.dm
@@ -366,7 +366,8 @@
can_suppress = TRUE
w_class = WEIGHT_CLASS_NORMAL
zoomable = TRUE
- zoom_amt = 7 //Long range, enough to see in front of you, but no tiles behind you.
+ zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you.
+ zoom_out_amt = 13
slot_flags = SLOT_BACK
actions_types = list()