Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds warning messages when CAS sonic boom happens and makes the boom fallof slower #5410

Merged
merged 33 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
21f59f2
framework
uuuuhuuuu Jan 9, 2024
dea40a4
fix
uuuuhuuuu Jan 9, 2024
a4e607a
more fix
uuuuhuuuu Jan 9, 2024
17de1e8
message change
uuuuhuuuu Jan 9, 2024
45c0ed6
wording change again
uuuuhuuuu Jan 9, 2024
1af5bf7
fix
uuuuhuuuu Jan 9, 2024
d84fc9f
Update code/game/cas_manager/datums/cas_fire_envelope.dm
cuberound Jan 11, 2024
0ea982e
Update code/game/cas_manager/datums/cas_fire_envelope.dm
cuberound Jan 11, 2024
4df5cd2
minor text changes
uuuuhuuuu Jan 11, 2024
53fb2d1
text fix
uuuuhuuuu Jan 11, 2024
87099c6
renames some vars
uuuuhuuuu Jan 11, 2024
823a373
more vars
uuuuhuuuu Jan 11, 2024
02e2ea6
Merge branch 'master' into more-cas-warning
cuberound Jan 13, 2024
f70cbdd
Update code/game/cas_manager/datums/cas_fire_envelope.dm
cuberound Jan 15, 2024
d82acfd
Update code/game/cas_manager/datums/cas_fire_envelope.dm
cuberound Jan 15, 2024
4caef57
Update code/game/cas_manager/datums/cas_fire_envelope.dm
cuberound Jan 15, 2024
4b8390a
Update code/game/cas_manager/datums/cas_fire_envelope.dm
cuberound Jan 17, 2024
00306b6
removes last change
cuberound Jan 17, 2024
d32c234
Merge branch 'master' into more-cas-warning
cuberound Jan 20, 2024
8a2fdd7
fixes messed up containment escape
cuberound Jan 21, 2024
6b9e51f
Merge branch 'master' into more-cas-warning
cuberound Jan 21, 2024
8b80afa
removes direction from first message
cuberound Jan 23, 2024
db04a3a
removes messages that show up 0.5 before the ship shoots
cuberound Jan 23, 2024
c7667f4
Update cas_fire_envelope.dm
cuberound Jan 23, 2024
43f7d30
Update cas_fire_envelope.dm
cuberound Jan 23, 2024
433c342
Update cas_fire_envelope.dm
cuberound Jan 23, 2024
e5af0f2
Update cas_fire_mission.dm
cuberound Jan 23, 2024
d4b0695
Update cas_fire_mission.dm
cuberound Jan 23, 2024
a387ef6
Update cas_fire_mission.dm
cuberound Jan 23, 2024
9f57df2
Update cas_fire_mission.dm
cuberound Jan 23, 2024
b96a9ad
Update cas_fire_mission.dm
cuberound Jan 23, 2024
890840b
Update code/game/cas_manager/datums/cas_fire_envelope.dm
cuberound Jan 23, 2024
d4ff9d1
Update cas_fire_envelope.dm
cuberound Jan 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion code/game/cas_manager/datums/cas_fire_envelope.dm
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,26 @@
mission_error = "Target is off bounds or obstructed."
return
change_current_loc(target_turf)
playsound(target_turf, soundeffect, 70, TRUE, 50)
playsound(source = target_turf, soundin = soundeffect, vol = 70, vary = TRUE, sound_range = 50, falloff = 8)
harryob marked this conversation as resolved.
Show resolved Hide resolved

var/relative_dir
for(var/mob/mob in range(15, target_turf))
if(get_turf(mob) == target_turf)
relative_dir = 0
else
relative_dir = Get_Compass_Dir(mob, target_turf)

var/ds_identifier = "LARGE BIRD"
cuberound marked this conversation as resolved.
Show resolved Hide resolved
var/fm_identifier = "SPIT FIRE"
if (mob.mob_flags & KNOWS_TECHNOLOGY)
ds_identifier = "DROPSHIP"
fm_identifier = "EXECUTE FIREMISSION"
cuberound marked this conversation as resolved.
Show resolved Hide resolved

mob.show_message( \
SPAN_HIGHDANGER("YOU HEAR [ds_identifier] ROAR AS IT PREPARES TO [fm_identifier] [SPAN_UNDERLINE(relative_dir ? uppertext(("TO YOUR " + dir2text(relative_dir))) : uppertext("right above you"))]!"), SHOW_MESSAGE_VISIBLE, \
cuberound marked this conversation as resolved.
Show resolved Hide resolved
SPAN_HIGHDANGER("YOU HEAR SOMETHING APPROACH [SPAN_UNDERLINE(relative_dir ? uppertext(("TO YOUR " + dir2text(relative_dir))) : uppertext("right above you"))]!"), SHOW_MESSAGE_AUDIBLE \
cuberound marked this conversation as resolved.
Show resolved Hide resolved
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
)

sleep(flyto_period)
stat = FIRE_MISSION_STATE_FIRING
mission.execute_firemission(linked_console, target_turf, dir, fire_length, step_delay, src)
Expand Down
46 changes: 23 additions & 23 deletions code/game/cas_manager/datums/cas_fire_mission.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
for(var/datum/cas_fire_mission_record/record as anything in records)
.["records"] += list(record.ui_data(user))

/datum/cas_fire_mission/proc/build_new_record(obj/structure/dropship_equipment/weapon/weap, fire_length)
/datum/cas_fire_mission/proc/build_new_record(obj/structure/dropship_equipment/weapon/weapon, fire_length)
var/datum/cas_fire_mission_record/record = new()
record.weapon = weap
record.weapon = weapon
record.offsets = new /list(fire_length)
for(var/idx = 1; idx<=fire_length; idx++)
record.offsets[idx] = "-"
Expand All @@ -53,24 +53,24 @@
// if weapon appears in weapons list but not in record
// > add empty record for new weapon
var/found = FALSE
for(var/obj/structure/dropship_equipment/weapon/weap in weapons)
if(record.weapon == weap)
for(var/obj/structure/dropship_equipment/weapon/weapon in weapons)
if(record.weapon == weapon)
found=TRUE
break
if(!found)
bad_records.Add(record)
for(var/obj/structure/dropship_equipment/weapon/weap in weapons)
for(var/obj/structure/dropship_equipment/weapon/weapon in weapons)
var/found = FALSE
for(var/datum/cas_fire_mission_record/record in records)
if(record.weapon == weap)
if(record.weapon == weapon)
found=TRUE
break
if(!found)
missing_weapons.Add(weap)
missing_weapons.Add(weapon)
for(var/datum/cas_fire_mission_record/record in bad_records)
records -= record
for(var/obj/structure/dropship_equipment/weapon/weap in missing_weapons)
build_new_record(weap, fire_length)
for(var/obj/structure/dropship_equipment/weapon/weapon in missing_weapons)
build_new_record(weapon, fire_length)

/datum/cas_fire_mission/proc/record_for_weapon(weapon_id)
for(var/datum/cas_fire_mission_record/record as anything in records)
Expand Down Expand Up @@ -176,36 +176,36 @@
msg_admin_niche("[usr ? key_name(usr) : "Someone"] is launching Fire Mission '[name]' at ([initial_turf.x],[initial_turf.y],[initial_turf.z]) [ADMIN_JMP(initial_turf)]")

var/relative_dir
for(var/mob/M in range(15, initial_turf))
if(get_turf(M) == initial_turf)
for(var/mob/mob in range(15, initial_turf))
if(get_turf(mob) == initial_turf)
relative_dir = 0
else
relative_dir = Get_Compass_Dir(M, initial_turf)
relative_dir = Get_Compass_Dir(mob, initial_turf)

var/ds_identifier = "LARGE BIRD"
if (M.mob_flags & KNOWS_TECHNOLOGY)
if (mob.mob_flags & KNOWS_TECHNOLOGY)
ds_identifier = "DROPSHIP"

M.show_message( \
SPAN_HIGHDANGER("A [ds_identifier] FLIES [SPAN_UNDERLINE(relative_dir ? uppertext(("TO YOUR " + dir2text(relative_dir))) : uppertext("right above you"))]!"), SHOW_MESSAGE_VISIBLE, \
mob.show_message( \
SPAN_HIGHDANGER("area [ds_identifier] FLIES [SPAN_UNDERLINE(relative_dir ? uppertext(("TO YOUR " + dir2text(relative_dir))) : uppertext("right above you"))]!"), SHOW_MESSAGE_VISIBLE, \
cuberound marked this conversation as resolved.
Show resolved Hide resolved
SPAN_HIGHDANGER("YOU HEAR SOMETHING GO [SPAN_UNDERLINE(relative_dir ? uppertext(("TO YOUR " + dir2text(relative_dir))) : uppertext("right above you"))]!"), SHOW_MESSAGE_AUDIBLE \
)

// Xenos have time to react to the first message
sleep(0.5 SECONDS)

for(var/mob/M in range(10, initial_turf))
if(get_turf(M) == initial_turf)
for(var/mob/mob in range(10, initial_turf))
if(get_turf(mob) == initial_turf)
relative_dir = 0
else
relative_dir = Get_Compass_Dir(M, initial_turf)
relative_dir = Get_Compass_Dir(mob, initial_turf)

var/ds_identifier = "LARGE BIRD"
if (M.mob_flags & KNOWS_TECHNOLOGY)
if (mob.mob_flags & KNOWS_TECHNOLOGY)
ds_identifier = "DROPSHIP"

M.show_message( \
SPAN_HIGHDANGER("A [ds_identifier] FIRES [SPAN_UNDERLINE(relative_dir ? uppertext(("TO YOUR " + dir2text(relative_dir))) : uppertext("right above you"))]!"), 1, \
mob.show_message( \
SPAN_HIGHDANGER("area [ds_identifier] FIRES [SPAN_UNDERLINE(relative_dir ? uppertext(("TO YOUR " + dir2text(relative_dir))) : uppertext("right above you"))]!"), 1, \
cuberound marked this conversation as resolved.
Show resolved Hide resolved
cuberound marked this conversation as resolved.
Show resolved Hide resolved
SPAN_HIGHDANGER("YOU HEAR SOMETHING FIRE [SPAN_UNDERLINE(relative_dir ? uppertext(("TO YOUR " + dir2text(relative_dir))) : uppertext("right above you"))]!"), 2 \
)

Expand Down Expand Up @@ -243,8 +243,8 @@
if (current_turf == null)
return -1
var/turf/shootloc = locate(current_turf.x + sx*offset, current_turf.y + sy*offset, current_turf.z)
var/area/A = get_area(shootloc)
if(shootloc && !CEILING_IS_PROTECTED(A?.ceiling, CEILING_PROTECTION_TIER_3) && !protected_by_pylon(TURF_PROTECTION_CAS, shootloc))
var/area/area = get_area(shootloc)
if(shootloc && !CEILING_IS_PROTECTED(area?.ceiling, CEILING_PROTECTION_TIER_3) && !protected_by_pylon(TURF_PROTECTION_CAS, shootloc))
item.weapon.open_fire_firemission(shootloc)
sleep(step_delay)
if(envelope)
Expand Down