Gravity generators now stop ship maneuver effects. (#15254)

This commit is contained in:
Matt Atlas
2022-12-10 18:07:11 +01:00
committed by GitHub
parent 31df759e82
commit 5257d2bc2b
4 changed files with 68 additions and 9 deletions
+2
View File
@@ -32,6 +32,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
var/list/obj/effect/landmark/entry_points
var/obj/effect/overmap/targeting
var/obj/machinery/leviathan_safeguard/levi_safeguard
var/obj/machinery/gravity_generator/main/gravity_generator
var/comms_support = FALSE // Whether ghostroles attached to this overmap object spawn with comms
var/comms_name = "shipboard" // Snowflake name to apply to comms equipment ("shipboard radio headset", "intercom (shipboard)", "shipboard telecommunications mainframe"), etc.
@@ -79,6 +80,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
ship_weapons.Cut()
targeting = null
levi_safeguard = null
gravity_generator = null
STOP_PROCESSING(SSprocessing, src)
. = ..()
+14 -8
View File
@@ -278,10 +278,13 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
forceMove(get_step(src, dir_to_move))
for(var/mob/living/L in living_mob_list)
if(L.z in map_z)
to_chat(L, SPAN_DANGER("<font size=4>The ship rapidly inclines under your feet!</font>"))
if(!L.buckled_to)
var/turf/T = get_step_away(get_turf(L), get_step(L, new_dir), 10)
L.throw_at(T, 10, 10)
if(!gravity_generator?.on && !L.anchored)
to_chat(L, SPAN_DANGER("<font size=4>The ship rapidly inclines beneath you!</font>"))
if(!L.buckled_to)
var/turf/T = get_step_away(get_turf(L), get_step(L, new_dir), 10)
L.throw_at(T, 10, 10)
else
to_chat(L, SPAN_WARNING("The ship inclines beneath you, but the artificial gravity keeps you on your feet."))
shake_camera(L, 2 SECONDS, 10)
sound_to(L, sound('sound/effects/combatroll.ogg'))
last_combat_roll = world.time
@@ -310,16 +313,19 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
update_icon()
for(var/mob/living/L in living_mob_list)
if(L.z in map_z)
to_chat(L, SPAN_DANGER("The ship rapidly turns under your feet!"))
if(!L.buckled_to)
L.Weaken(3)
if(!gravity_generator?.on && !L.anchored)
to_chat(L, SPAN_DANGER("The ship rapidly turns beneath you!"))
if(!L.buckled_to)
L.Weaken(3)
else
to_chat(L, SPAN_WARNING("The ship turns beneath you, but the artificial gravity keeps you on your feet."))
shake_camera(L, 1 SECOND, 2)
L.playsound_simple(soundin = 'sound/machines/thruster.ogg', volume = 50)
last_combat_turn = world.time
/obj/effect/overmap/visitable/ship/signal_hit(var/list/hit_data)
for(var/obj/machinery/computer/ship/targeting/TR in consoles)
TR.visible_message(SPAN_NOTICE("[icon2html(src, viewers(get_turf(src)))] Hit confirmed on [hit_data["target_name"]] in [hit_data["target_area"]] at coordinates [hit_data["coordinates"]]."), range = 2)
TR.visible_message(SPAN_NOTICE("[icon2html(src, viewers(get_turf(TR)))] Hit confirmed on [hit_data["target_name"]] in [hit_data["target_area"]] at coordinates [hit_data["coordinates"]]."), range = 2)
#undef MOVING
#undef SANITIZE_SPEED
+10 -1
View File
@@ -135,6 +135,7 @@
for(var/obj/machinery/gravity_generator/part/O in parts)
O.main_part = null
qdel(O)
linked.gravity_generator = null
return ..()
/obj/machinery/gravity_generator/main/proc/eventshutofftoggle() // Used by the gravity event. Bypasses charging and all of that stuff.
@@ -450,7 +451,15 @@
. = ..()
soundloop = new(src, start_immediately = FALSE)
addtimer(CALLBACK(src, .proc/updateareas), 10)
return
return INITIALIZE_HINT_LATELOAD
/obj/machinery/gravity_generator/main/LateInitialize()
if(current_map.use_overmap && !linked)
var/my_sector = map_sectors["[z]"]
if (istype(my_sector, /obj/effect/overmap/visitable))
attempt_hook_up(my_sector)
if(linked)
linked.gravity_generator = src
/obj/machinery/gravity_generator/main/proc/updateareas()
for(var/area/A in all_areas)
+42
View File
@@ -0,0 +1,42 @@
################################
# 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, Wildkins
# 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:
- rscadd: "You are no longer affected by ship maneuvers if there is an active gravity generator."
- bugfix: "AIs no longer get thrown around by ship maneuvers."