diff --git a/code/__defines/ship_weapons.dm b/code/__defines/ship_weapons.dm
index dfa326d8a76..8ffbc7d0484 100644
--- a/code/__defines/ship_weapons.dm
+++ b/code/__defines/ship_weapons.dm
@@ -41,6 +41,7 @@
//Overmap projectiles.
#define OVERMAP_PROJECTILE_RANGE_LOW 5
-#define OVERMAP_PROJECTILE_RANGE_MEDIUM 15
+#define OVERMAP_PROJECTILE_RANGE_MEDIUM 10
+#define OVERMAP_PROJECTILE_RANGE_MEDIUMHIGH 15
#define OVERMAP_PROJECTILE_RANGE_HIGH 25
#define OVERMAP_PROJECTILE_RANGE_ULTRAHIGH 30
diff --git a/code/modules/overmap/overmap_object.dm b/code/modules/overmap/overmap_object.dm
index 0590738ba13..5caa9266593 100644
--- a/code/modules/overmap/overmap_object.dm
+++ b/code/modules/overmap/overmap_object.dm
@@ -99,7 +99,8 @@
C.targeting = FALSE
/obj/effect/overmap/visitable/proc/detarget(var/obj/effect/overmap/O, var/obj/machinery/computer/C)
- playsound(C, 'sound/items/rfd_interrupt.ogg')
+ if(C)
+ playsound(C, 'sound/items/rfd_interrupt.ogg')
if(O)
O.cut_overlay(O.targeted_overlay)
O.maptext = null
diff --git a/code/modules/overmap/sectors.dm b/code/modules/overmap/sectors.dm
index 591c5affa64..e5f7811ab09 100644
--- a/code/modules/overmap/sectors.dm
+++ b/code/modules/overmap/sectors.dm
@@ -54,7 +54,11 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
LAZYADD(SSshuttle.sectors_to_initialize, src) //Queued for further init. Will populate the waypoint lists; waypoints not spawned yet will be added in as they spawn.
SSshuttle.clear_init_queue()
+ START_PROCESSING(SSprocessing, src)
+/obj/effect/overmap/visitable/process()
+ if(get_dist(src, targeting) > 7)
+ detarget(targeting)
/obj/effect/overmap/visitable/Destroy()
for(var/obj/machinery/hologram/holopad/H as anything in SSmachinery.all_holopads)
@@ -71,6 +75,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
ship_weapons.Cut()
targeting = null
levi_safeguard = null
+ STOP_PROCESSING(SSprocessing, src)
. = ..()
//This is called later in the init order by SSshuttle to populate sector objects. Importantly for subtypes, shuttles will be created by then.
diff --git a/code/modules/overmap/ship_weaponry/_ship_ammo_loader.dm b/code/modules/overmap/ship_weaponry/_ship_ammo_loader.dm
index 7e1c00c3053..b3c866abe2e 100644
--- a/code/modules/overmap/ship_weaponry/_ship_ammo_loader.dm
+++ b/code/modules/overmap/ship_weaponry/_ship_ammo_loader.dm
@@ -5,6 +5,8 @@
icon_state = "ammo_loader"
density = TRUE
anchored = TRUE
+ var/damage = 0
+ var/max_damage = 1000
var/obj/machinery/ship_weapon/weapon
var/weapon_id //Used to connect weapon systems to the relevant ammunition loader.
@@ -22,6 +24,23 @@
if(!weapon)
crash_with("[src] at [x] [y] [z] has no weapon attached!")
+/obj/machinery/ammunition_loader/ex_act(severity)
+ switch(severity)
+ if(1)
+ add_damage(50)
+ if(2)
+ add_damage(25)
+ if(3)
+ add_damage(10)
+
+/obj/machinery/ammunition_loader/proc/add_damage(var/amount)
+ damage = max(0, min(damage + amount, max_damage))
+ update_damage()
+
+/obj/machinery/ammunition_loader/proc/update_damage()
+ if(damage >= max_damage)
+ qdel(src)
+
/obj/machinery/ammunition_loader/attackby(obj/item/W, mob/user)
if(isliving(user))
var/mob/living/carbon/human/H = user
diff --git a/code/modules/overmap/ship_weaponry/_ship_ammunition.dm b/code/modules/overmap/ship_weaponry/_ship_ammunition.dm
index f53b49dc666..8cfb6b46461 100644
--- a/code/modules/overmap/ship_weaponry/_ship_ammunition.dm
+++ b/code/modules/overmap/ship_weaponry/_ship_ammunition.dm
@@ -23,6 +23,7 @@
var/obj/entry_point
var/obj/item/projectile/original_projectile
var/heading = SOUTH
+ var/range = OVERMAP_PROJECTILE_RANGE_MEDIUM
//Cookoff variables.
var/cookoff_devastation = 0
@@ -177,6 +178,7 @@
P.desc = desc
P.ammunition = src
P.target = overmap_target
+ P.range = range
if(istype(origin, /obj/effect/overmap/visitable/ship))
var/obj/effect/overmap/visitable/ship/S = origin
P.dir = S.dir
diff --git a/code/modules/overmap/ship_weaponry/_ship_gun.dm b/code/modules/overmap/ship_weaponry/_ship_gun.dm
index 44df58b2775..5f4c2333bff 100644
--- a/code/modules/overmap/ship_weaponry/_ship_gun.dm
+++ b/code/modules/overmap/ship_weaponry/_ship_gun.dm
@@ -4,6 +4,8 @@
icon = 'icons/obj/machines/ship_guns/longbow.dmi'
idle_power_usage = 1500
active_power_usage = 50000
+ anchored = TRUE
+ density = TRUE
var/damage = 0
var/max_damage = 1000
var/heavy_firing_sound = 'sound/weapons/gunshot/ship_weapons/120mm_mortar.ogg' //The sound in the immediate firing area. Very loud.
@@ -124,6 +126,7 @@
for(var/A in connected_dummies)
var/obj/structure/ship_weapon_dummy/dummy = A
qdel(dummy)
+ connected_dummies.Cut()
/obj/machinery/ship_weapon/proc/pre_fire(var/atom/target, var/obj/effect/landmark/landmark) //We can fire, so what do we do before that? Think like a laser charging up.
fire(target, landmark)
@@ -135,39 +138,43 @@
var/list/connected_z_levels = GetConnectedZlevels(z)
for(var/mob/living/carbon/human/H in player_list)
if(H.z in connected_z_levels)
- playsound(H, heavy_firing_sound, 100)
+ sound_to(H, sound(heavy_firing_sound, volume = 50))
if(H.is_listening())
H.adjustEarDamage(rand(0, 5), 2, TRUE)
else if(firing_effects & FIRING_EFFECT_FLAG_SILENT)
- for(var/mob/living/carbon/human/H in get_area(src))
- playsound(H, heavy_firing_sound, 100)
- if(H.is_listening())
- H.adjustEarDamage(rand(0, 5), 2, TRUE)
+ for(var/mob/living/carbon/human/H in human_mob_list)
+ if(get_area(H) == get_area(src))
+ sound_to(H, sound(heavy_firing_sound, volume = 50))
+ if(H.is_listening())
+ H.adjustEarDamage(rand(0, 5), 2, TRUE)
else
- for(var/mob/living/carbon/human/H in get_area(src))
- playsound(H, heavy_firing_sound, 100)
- if (H.is_listening())
- H.adjustEarDamage(rand(0, 5), 2, TRUE)
- var/list/connected_z_levels = GetConnectedZlevels(z)
- for(var/mob/living/carbon/human/H in player_list)
- if(H.z in connected_z_levels)
- playsound(H, light_firing_sound, 50)
+ for(var/mob/living/carbon/human/H in human_mob_list)
+ var/list/connected_z_levels = GetConnectedZlevels(z)
+ if(get_area(H) == get_area(src))
+ sound_to(H, sound(heavy_firing_sound, volume = 50))
+ if (H.is_listening())
+ H.adjustEarDamage(rand(0, 5), 2, TRUE)
+ else
+ if(H.z in connected_z_levels)
+ sound_to(H, sound(light_firing_sound, volume = 50))
if(screenshake_type == SHIP_GUN_SCREENSHAKE_ALL_MOBS)
var/list/connected_z_levels = GetConnectedZlevels(z)
- for(var/mob/living/H in living_mob_list)
+ for(var/mob/living/carbon/human/H in human_mob_list)
if(H.z in connected_z_levels)
to_chat(H, SPAN_DANGER("Your legs buckle as the ground shakes beneath you!"))
shake_camera(H, 10, 5)
else if(screenshake_type == SHIP_GUN_SCREENSHAKE_SCREEN)
- for(var/mob/living/carbon/human/H in get_area(src))
- if(!H.buckled_to)
- to_chat(H, SPAN_DANGER("Your legs buckle as the ground shakes beneath you!"))
- shake_camera(H, 10, 5)
+ for(var/mob/living/carbon/human/H in human_mob_list)
+ if(get_area(H) == get_area(src))
+ if(!H.buckled_to)
+ to_chat(H, SPAN_DANGER("Your legs buckle as the ground shakes beneath you!"))
+ shake_camera(H, 10, 5)
if(firing_effects & FIRING_EFFECT_FLAG_THROW_MOBS)
var/list/connected_z_levels = GetConnectedZlevels(z)
for(var/mob/M in living_mob_list)
if(M.z in connected_z_levels)
- M.throw_at_random(FALSE, 7, 10)
+ if(!M.Check_Shoegrip() && !M.buckled_to)
+ M.throw_at_random(FALSE, 7, 10)
flick("weapon_firing", src)
return TRUE
@@ -252,6 +259,7 @@
icon_state = "dummy"
mouse_opacity = 2
layer = OBJ_LAYER+0.1 //Higher than the gun itself.
+ anchored = TRUE
density = TRUE
opacity = FALSE
atmos_canpass = CANPASS_DENSITY
diff --git a/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm b/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm
index 57b726585b6..65707fd9884 100644
--- a/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm
+++ b/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm
@@ -8,7 +8,7 @@
var/obj/item/ship_ammunition/ammunition
var/atom/target //The target is the actual overmap object we're hitting.
var/obj/entry_target //The entry target is where the projectile itself is going to spawn in world.
- var/range = OVERMAP_PROJECTILE_RANGE_ULTRAHIGH
+ var/range = OVERMAP_PROJECTILE_RANGE_MEDIUM
var/current_range_counter = 0
var/speed = 0 //A projectile with 0 speed does not move. Note that this is the 'lag' variable on walk_towards! Lower speed is better.
@@ -24,13 +24,34 @@
/obj/effect/overmap/projectile/Bump(var/atom/A)
if(istype(A, /turf/unsimulated/map/edge))
- QDEL_NULL(ammunition)
- qdel(src)
+ handle_wraparound()
..()
+/obj/effect/overmap/projectile/proc/handle_wraparound()
+ var/nx = x
+ var/ny = y
+ var/low_edge = 1
+ var/high_edge = current_map.overmap_size - 1
+
+ if((dir & WEST) && x == low_edge)
+ nx = high_edge
+ else if((dir & EAST) && x == high_edge)
+ nx = low_edge
+ if((dir & SOUTH) && y == low_edge)
+ ny = high_edge
+ else if((dir & NORTH) && y == high_edge)
+ ny = low_edge
+ if((x == nx) && (y == ny))
+ return //we're not flying off anywhere
+ if(!check_entry())
+ var/turf/T = locate(nx,ny,z)
+ if(T)
+ forceMove(T)
+
/obj/effect/overmap/projectile/Move()
if(!check_entry())
. = ..()
+ handle_wraparound()
current_range_counter++
if(current_range_counter >= range)
qdel(src)
diff --git a/code/modules/overmap/ship_weaponry/weaponry/leviathan.dm b/code/modules/overmap/ship_weaponry/weaponry/leviathan.dm
index 1c49acf89b8..5c815f55c0e 100644
--- a/code/modules/overmap/ship_weaponry/weaponry/leviathan.dm
+++ b/code/modules/overmap/ship_weaponry/weaponry/leviathan.dm
@@ -83,11 +83,13 @@
/obj/machinery/ship_weapon/leviathan/disable()
firing = FALSE
- for(var/mob/living/L in living_mob_list)
- if(get_area(L) == get_area(src))
- sound_to(L, 'sound/effects/ship_weapons/leviathan_powerdown.ogg')
- visible_message(SPAN_DANGER("\The [src]'s humming comes to an abrupt halt."))
- update_use_power(POWER_USE_OFF)
+ if(use_power != POWER_USE_OFF)
+ visible_message(SPAN_DANGER("\The [src]'s humming comes to an abrupt halt."))
+ for(var/mob/living/L in living_mob_list)
+ if(AreConnectedZLevels(L.z, z))
+ sound_to(L, 'sound/effects/ship_weapons/leviathan_powerdown.ogg')
+ to_chat(L, SPAN_WARNING("The ground below you settles down, no longer vibrating."))
+ update_use_power(POWER_USE_OFF)
icon_state = "weapon_off"
/obj/machinery/ship_weapon/leviathan/enable()
@@ -95,10 +97,11 @@
if(!smes)
visible_message(SPAN_DANGER("\The [src] doesn't light up at all! Its maintenance display indicates there is no SMES to draw power from."))
return
- for(var/mob/living/L in living_mob_list)
- if(get_area(L) == get_area(src))
- sound_to(L, 'sound/effects/ship_weapons/leviathan_powerup.ogg')
visible_message(SPAN_DANGER("\The [src] lights up with a powerful hum..."))
+ for(var/mob/living/L in living_mob_list)
+ if(AreConnectedZLevels(L.z, z))
+ sound_to(L, 'sound/effects/ship_weapons/leviathan_powerup.ogg')
+ to_chat(L, SPAN_WARNING("The ground below you starts vibrating with a slight hum..."))
update_use_power(POWER_USE_IDLE)
icon_state = "weapon_on"
@@ -121,6 +124,7 @@
/obj/item/ship_ammunition/leviathan
name = "zero-point artillery beam"
desc = "A beam of pure energy."
+ range = OVERMAP_PROJECTILE_RANGE_ULTRAHIGH
caliber = SHIP_CALIBER_ZTA
impact_type = SHIP_AMMO_IMPACT_ZTA
overmap_icon_state = "heavy_pulse"
@@ -129,6 +133,9 @@
. = ..()
set_light(3, 3, LIGHT_COLOR_PURPLE)
+/obj/item/ship_ammunition/leviathan/get_speed()
+ return 2
+
/obj/item/projectile/ship_ammo/leviathan
name = "zero-point artillery beam"
desc = "A concentrated stream of pure energy."
diff --git a/code/modules/overmap/ship_weaponry/weaponry/longbow_ammo.dm b/code/modules/overmap/ship_weaponry/weaponry/longbow_ammo.dm
index 347e918aca1..c7dc8b9cb70 100644
--- a/code/modules/overmap/ship_weaponry/weaponry/longbow_ammo.dm
+++ b/code/modules/overmap/ship_weaponry/weaponry/longbow_ammo.dm
@@ -41,6 +41,7 @@
P.forceMove(src)
var/image/OL = image(P.icon, P.primer_state, layer = layer - 0.01)
add_overlay(OL)
+ update_status()
/obj/item/ship_ammunition/longbow/proc/add_warhead(var/obj/item/warhead/W)
if(W && !QDELETED(W))
@@ -54,20 +55,23 @@
cookoff_devastation = warhead.cookoff_devastation
cookoff_heavy = warhead.cookoff_heavy
cookoff_light = warhead.cookoff_light
+ update_status()
/obj/item/ship_ammunition/longbow/update_status()
desc = initial(desc)
+ desc += "
"
if(primer && !warhead)
desc += "It is loaded with [primer], but no warhead."
name = "longbow casing"
ammunition_flags = initial(ammunition_flags)
else if(warhead && !primer)
desc += "It has a [warhead], but no primer."
- name = "longbow casing"
+ name = "[warhead.warhead_type] longbow casing"
else if(warhead && primer)
desc += "It has a [warhead] and is loaded with [primer]! It's ready to go."
- name = "longbow shell"
+ name = "[warhead.warhead_type] longbow shell"
else
+ name = "longbow casing"
desc += "It isn't loaded with a warhead and has no primer."
ammunition_flags = initial(ammunition_flags)
@@ -87,6 +91,7 @@
desc = "This is a medium power primer for Longbow warheads."
icon = 'icons/obj/guns/ship/ship_ammo_longarm.dmi'
icon_state = "primer_med_obj"
+ w_class = ITEMSIZE_HUGE
var/primer_state = "primer_med" //This is the overlay state when it gets applied to the projectile.
var/speed = 30 //Somewhat of a misleading name. This is the lag in world ticks between each walk() called by the overmap projectile. Lower is better.
@@ -109,6 +114,7 @@
desc = "This is a generic warhead. Not for use."
icon = 'icons/obj/guns/ship/ship_ammo_longarm.dmi'
icon_state = "generic_warhead_obj"
+ w_class = ITEMSIZE_HUGE
var/warhead_state = "generic_warhead" //This is the overlay state when it gets applied to the projectile.
var/caliber
var/warhead_type
@@ -182,7 +188,6 @@
add_primer(P)
var/obj/item/warhead/longbow/W = new()
add_warhead(W)
- update_status()
/obj/item/ship_ammunition/longbow/preset_ap/Initialize()
. = ..()
@@ -190,7 +195,6 @@
add_primer(P)
var/obj/item/warhead/longbow/ap/W = new()
add_warhead(W)
- update_status()
/obj/item/ship_ammunition/longbow/preset_bb/Initialize()
. = ..()
@@ -198,4 +202,3 @@
add_primer(P)
var/obj/item/warhead/longbow/bunker/W = new()
add_warhead(W)
- update_status()
\ No newline at end of file
diff --git a/code/modules/overmap/ships/ship.dm b/code/modules/overmap/ships/ship.dm
index 8a5397d3a5c..3a0b9d8ef51 100644
--- a/code/modules/overmap/ships/ship.dm
+++ b/code/modules/overmap/ships/ship.dm
@@ -43,13 +43,11 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
min_speed = round(min_speed, SHIP_MOVE_RESOLUTION)
max_speed = round(max_speed, SHIP_MOVE_RESOLUTION)
SSshuttle.ships += src
- START_PROCESSING(SSprocessing, src)
/obj/effect/overmap/visitable/ship/find_z_levels(var/fore_direction)
. = ..(fore_dir)
/obj/effect/overmap/visitable/ship/Destroy()
- STOP_PROCESSING(SSprocessing, src)
SSshuttle.ships -= src
for(var/obj/machinery/computer/ship/S in SSmachinery.machinery)
if(S.linked == src)
@@ -146,6 +144,7 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
adjust_speed(0, -acceleration)
/obj/effect/overmap/visitable/ship/process()
+ ..()
if(!halted && !is_still())
var/list/deltas = list(0,0)
for(var/i = 1 to 2)
diff --git a/html/changelogs/mattatlas-nomorelarp.yml b/html/changelogs/mattatlas-nomorelarp.yml
new file mode 100644
index 00000000000..1602466c90e
--- /dev/null
+++ b/html/changelogs/mattatlas-nomorelarp.yml
@@ -0,0 +1,49 @@
+################################
+# 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
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+# balance
+# admin
+# backend
+# security
+# refactor
+#################################
+
+# Your name.
+author: MattAtlas
+
+# 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, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - tweak: "Bridge crew no longer have access to the flak cannon or to ammunition storage."
+ - tweak: "Leviathan powerup is now a global effect."
+ - tweak: "Lowered the sound of most guns."
+ - tweak: "Ammunition loaders no longer instantly explode and die when hit."
+ - bugfix: "Fixes ship weapons not being anchored."
+ - bugfix: "Fixes projectiles not deleting when they reach the Overmap edge area. They now wrap around and delete after a certain amount of steps (30 for leviathan shots, 10 for normal shots)."
+ - tweak: "Finished longbow shells will now have the impact type in the name."
+ - tweak: "Leviathan projectiles have been sped up."
+ - tweak: "Targeted overmap objects are now detargeted if they go past the 7 tile range."
diff --git a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm
index 9991685a453..fbe828a0596 100644
--- a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm
+++ b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm
@@ -1008,7 +1008,7 @@
},
/obj/machinery/door/airlock/hatch{
name = "Ship Flak Munitions Bay";
- req_one_access = list(19,11,31)
+ req_one_access = list(10,60,20,31)
},
/obj/machinery/door/firedoor,
/turf/simulated/floor/tiled/dark,
@@ -10279,7 +10279,7 @@
id_tag = "airlocks_deck2_ammostorage_fore";
locked = 1;
name = "Secure Ammunition Storage";
- req_one_access = list(10,19,20,36,74)
+ req_one_access = list(10,60,20,31)
},
/obj/machinery/door/blast/regular{
dir = 8;
@@ -10299,7 +10299,7 @@
name = "Door Bolt Control";
pixel_x = 25;
pixel_y = -7;
- req_one_access = list(10,19,20,31,74);
+ req_one_access = list(10,60,20,31);
specialfunctions = 4
},
/obj/machinery/button/remote/blast_door{
@@ -10308,7 +10308,7 @@
name = "Blast Door Control";
pixel_x = 25;
pixel_y = 7;
- req_one_access = list(10,19,20,31,74)
+ req_one_access = list(10,60,20,31)
},
/turf/simulated/floor/tiled/full,
/area/horizon/secure_ammunition_storage)
@@ -11750,7 +11750,7 @@
id_tag = "airlocks_deck2_ammostorage_aft";
locked = 1;
name = "Secure Ammunition Storage";
- req_one_access = list(10,19,20,36,74)
+ req_one_access = list(10,60,20,31)
},
/obj/effect/floor_decal/industrial/hatch/yellow,
/obj/machinery/door/blast/regular{
@@ -11766,7 +11766,7 @@
name = "Door Bolt Control";
pixel_x = -25;
pixel_y = 7;
- req_one_access = list(10,19,20,31,74);
+ req_one_access = list(10,60,20,31);
specialfunctions = 4
},
/obj/machinery/button/remote/blast_door{
@@ -11775,7 +11775,7 @@
name = "Blast Door Control";
pixel_x = -25;
pixel_y = -7;
- req_one_access = list(10,19,20,31,74)
+ req_one_access = list(10,60,20,31)
},
/turf/simulated/floor/tiled/full,
/area/horizon/secure_ammunition_storage)