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

Ship Combat Improvements...? #296

Closed
wants to merge 13 commits into from
1 change: 0 additions & 1 deletion code/datums/fluff_emails.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var/title //email title
var/entry_text //email content


//emails for the Almayer computers
/datum/fluff_email/almayer

Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/ARES/ARES_interface.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// #################### ARES Interface Console #####################
/obj/structure/machinery/computer/ares_console
name = "ARES Interface"
desc = "A console built to interface with ARES, allowing for 1:1 communication."
name = "AI Interface"
desc = "A console built to interface with the ship AI, allowing for 1:1 communication."
icon = 'icons/obj/structures/machinery/ares.dmi'
icon_state = "console"
exproof = TRUE
Expand Down Expand Up @@ -384,7 +384,7 @@
return FALSE
if(security_level < SEC_LEVEL_RED)
set_security_level(SEC_LEVEL_RED, no_sound = TRUE, announce = FALSE)
shipwide_ai_announcement("ATTENTION! GENERAL QUARTERS. ALL HANDS, MAN YOUR BATTLESTATIONS.", MAIN_AI_SYSTEM, 'sound/effects/GQfullcall.ogg')
shipwide_ai_announcement("GENERAL QUARTERS GENERAL QUARTERS, ALL HANDS TO BATTLE STATIONS. SET CONDITION ZULU THROUGHOUT THE SHIP.", MAIN_AI_SYSTEM, 'sound/effects/GQfullcall.ogg')
log_game("[key_name(usr)] has called for general quarters via ARES.")
message_admins("[key_name_admin(usr)] has called for general quarters via ARES.")
log_ares_security("General Quarters", "[last_login] has called for general quarters via ARES.")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/adminpanelgq.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if(prompt != "Yes")
return FALSE

var/whattoannounce = "ATTENTION! GENERAL QUARTERS. ALL HANDS, MAN YOUR BATTLESTATIONS."
var/whattoannounce = "GENERAL QUARTERS GENERAL QUARTERS, ALL HANDS TO BATTLE STATIONS. SET CONDITION ZULU THROUGHOUT THE SHIP."
var/log = "[key_name_admin(src)] Sent General Quarters!"

prompt = tgui_alert(src, "Do you want to use a custom announcement?", "Choose.", list("Yes", "No"), 20 SECONDS)
Expand Down
47 changes: 33 additions & 14 deletions code/modules/admin/verbs/adminpanelweapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,27 @@
set name = "Weapons"
set category = "Admin.Ship"

var/weapontype = tgui_alert(src, "What weapon?", "Choose wisely!", list("Missile", "Railgun"), 20 SECONDS)
var/weapontype = tgui_alert(src, "Which weapon?", list("Missile", "Railgun"), 20 SECONDS)
if(!weapontype)
return
var/hiteta = tgui_input_number(src, "Give an ETA for the weapon to hit.", "Don't make them wait too long!", 10, 120, 10, 20 SECONDS)

var/hiteta = tgui_input_number(src, "Time on target, max 120s", 10, 120, 10, 20 SECONDS)
if(!hiteta)
return
var/point_defense = tgui_alert(src, "Allow Point Defence of the ship to intercept, or for the weapon to miss?", "standard PD/miss chance is 30%.", list("Yes", "No"), 20 SECONDS)

var/point_defense = tgui_alert(src, "Allow Point Defence of the ship to attempt intercept? Normal is 30%. This can be configured!", list("Yes", "No"), 20 SECONDS)
if(!point_defense)
return
point_defense = point_defense == "Yes"
var/exactplace = tgui_alert(src, "Shoot it at random places, or where you're at?", "Choose wisely!", list("Random", "Where I am"), 20 SECONDS)
if(point_defense == TRUE)
var/point_defense_custom = tgui_alert(src, "Configure intercept chance? If no, the standard chance will be used." list("Yes", "No"), 20 SECONDS)

Check failure on line 18 in code/modules/admin/verbs/adminpanelweapons.dm

View workflow job for this annotation

GitHub Actions / Run Linters

got 'list', expected one of: operator, field access, ')', ','
if(!point_defense_custom)
return
if(point_defense_custom == TRUE)
point_defence_chance = tgui_input_number(src, "Percent chance of successful shootdown? Default is 30.", 5, 100, 5, 20 SECONDS)


var/exactplace = tgui_alert(src, "Target a random location or your current area?", list("Random", "Current"), 20 SECONDS)
if(!exactplace)
return
exactplace = exactplace == "Where I am"
Expand All @@ -27,7 +37,7 @@
if(salvo == TRUE)
quantity = tgui_input_number(src, "How many?", "Don't go overboard. Please.", 2, 10, 2, 20 SECONDS)

var/prompt = tgui_alert(src, "Are you sure you want to open fire at the USS Almayer with those parameters?", "Choose wisely!", list("Yes", "No"), 20 SECONDS)
var/prompt = tgui_alert(src, "Are you sure you want to open fire at the ship with those parameters?", "Choose wisely!", list("Yes", "No"), 20 SECONDS)
if(prompt != "Yes")
return
var/atom/picked_atom
Expand All @@ -36,16 +46,16 @@

if("Missile")
if(exactplace == TRUE)
shipwide_ai_announcement("DANGER: MISSILE WARNING. LAUNCH DETECTED, BRACE, BRACE, BRACE. ESTIMATED TIME: [hiteta] SECONDS.", MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
shipwide_ai_announcement("INCOMING, INCOMING, INCOMING. NIGHTMARE, NIGHTMARE, IMPACT [hiteta] SECONDS.", MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 1, mob.loc, point_defense), hiteta SECONDS)
message_admins("[key_name_admin(src)] Fired a Single Missile at the Almayer at their own location, [mob.loc], with point defense as [point_defense]")
if(point_defense == TRUE)
var/spoolup = hiteta - 4
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "ATTENTION: TRACKING TARGET, SPOOLING UP POINT DEFENSE. ATTEMPTING TO INTERCEPT." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "AIR DEFENSE TRACKING. BRACE BRACE BRACE." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)

if(exactplace == FALSE)
if(salvo == TRUE)
shipwide_ai_announcement("DANGER: MISSILE SALVO DETECTED, BRACE, BRACE, BRACE. SALVO SIZE: [quantity], ESTIMATED TIME: [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
shipwide_ai_announcement("INCOMING, INCOMING, INCOMING. NIGHTMARE, NIGHTMARE, RIPPLE [quantity] IMPACT [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
targets = shipside_random_turf_picker(quantity)
if(targets == null)
tgui_alert(src, "Uh oh! Something broke at this point! Contact the coders!", "Acknowledge!", list("ok."), 10 SECONDS)
Expand All @@ -54,9 +64,9 @@
message_admins("[key_name_admin(src)] Fired a salvo of [quantity] Missiles at the Almayer at random places, with point defense as [point_defense]")
if(point_defense == TRUE)
var/spoolup = hiteta - 4
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "ATTENTION: TRACKING TARGETS, SPOOLING UP POINT DEFENSE. ATTEMPTING TO INTERCEPT." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "AIR DEFENSE TRACKING. BRACE BRACE BRACE." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)
else
shipwide_ai_announcement("DANGER: MISSILE WARNING. LAUNCH DETECTED, BRACE, BRACE, BRACE. ESTIMATED TIME: [hiteta] SECONDS.", MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
shipwide_ai_announcement("INCOMING, INCOMING, INCOMING. NIGHTMARE, NIGHTMARE, IMPACT [hiteta] SECONDS.", MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
picked_atom = shipside_random_turf_picker(1)
if(picked_atom == null)
tgui_alert(src, "Uh oh! Something broke at this point! Contact the coders!", "Acknowledge!", list("ok."), 10 SECONDS)
Expand All @@ -65,18 +75,21 @@
message_admins("[key_name_admin(src)] Fired a Single Missile at the Almayer at a random place, [picked_atom], with point defense as [point_defense]")
if(point_defense == TRUE)
var/spoolup = hiteta - 4
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "ATTENTION: TRACKING TARGET, SPOOLING UP POINT DEFENSE. ATTEMPTING TO INTERCEPT." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "AIR DEFENSE TRACKING. BRACE BRACE BRACE." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)

if("Railgun")
if(exactplace == TRUE)
shipwide_ai_announcement("DANGER: RAILGUN EMISSIONS DETECTED, INCOMING SHOT. BRACE, BRACE, BRACE. ESTIMATED TIME: [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
shipwide_ai_announcement("INCOMING, INCOMING, INCOMING. RAILGUN BURST IDENTIFIED AND TRACKED, IMPACT [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 2, mob.loc, point_defense), hiteta SECONDS)
message_admins("[key_name_admin(src)] Fired a single Railgun Slug at the Almayer at their location, [mob.loc], with the possibility of missing as [point_defense]")
if(point_defense == TRUE)
var/spoolup = hiteta - 4

Check failure on line 86 in code/modules/admin/verbs/adminpanelweapons.dm

View workflow job for this annotation

GitHub Actions / Run Linters

inconsistent multiple indentation: 2 > 1
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "AIR DEFENSE TRACKING. BRACE BRACE BRACE." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)


if(exactplace == FALSE)
if(salvo == TRUE)
shipwide_ai_announcement("DANGER: RAILGUN EMISSIONS DETECTED, SALVO INCOMING. BRACE, BRACE, BRACE. SALVO SIZE: [quantity], ESTIMATED TIME: [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
shipwide_ai_announcement("INCOMING, INCOMING, INCOMING. MULTIPLE RAILGUN BURSTS IDENTIFIED AND TRACKED, IMPACT [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
targets = shipside_random_turf_picker(quantity)
if(targets == null)
tgui_alert(src, "Uh oh! Something broke at this point! Contact the coders!", "Acknowledge!", list("ok."), 10 SECONDS)
Expand All @@ -85,17 +98,23 @@
message_admins("[key_name_admin(src)] Fired a salvo of Railgun Slugs at the Almayer at random places, with the possibility of missing [point_defense]")
picked_atom = null
targets = null
if(point_defense == TRUE)
var/spoolup = hiteta - 4
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "AIR DEFENSE TRACKING. BRACE BRACE BRACE." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)

if(salvo == FALSE)
prompt = tgui_alert(src, "Are you sure you want to shoot a railgun slug at the USS Almayer at a random place?", "Choose wisely!", list("Yes", "No"), 20 SECONDS)
if(prompt == "Yes")
shipwide_ai_announcement("DANGER: RAILGUN EMISSIONS DETECTED, INCOMING SHOT. BRACE, BRACE, BRACE. ESTIMATED TIME: [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
shipwide_ai_announcement("INCOMING, INCOMING, INCOMING. RAILGUN BURST IDENTIFIED AND TRACKED, IMPACT [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg')
picked_atom = shipside_random_turf_picker(1)
if(picked_atom == null)
tgui_alert(src, "Uh oh! Something broke at this point! Contact the coders!", "Acknowledge!", list("ok."), 10 SECONDS)
return
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 2, picked_atom, point_defense), hiteta SECONDS)
message_admins("[key_name_admin(src)] Fired a single Railgun Slug at the Almayer at a random location, [picked_atom], with the possibility of missing as [point_defense]")
if(point_defense == TRUE)
var/spoolup = hiteta - 4
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "AIR DEFENSE TRACKING. BRACE BRACE BRACE." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS)

/proc/shipside_random_turf_picker(turfquantity)

Expand Down
6 changes: 4 additions & 2 deletions code/modules/almayer/weaponhits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
if(WEAPON_RAILGUN)
var/datum/cause_data/antishiprailgun_cause_data = create_cause_data("Railgun shot")
var/hitchance = HIT_CHANCE_CHEAT
if(point_defense == TRUE)
if(point_defense == TRUE && point_defense_custom == TRUE)

Check failure on line 65 in code/modules/almayer/weaponhits.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "point_defense_custom"
hitchance = HIT_CHANCE_CHEAT - point_defense_chance

Check failure on line 66 in code/modules/almayer/weaponhits.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "point_defense_chance"
else if(point_defense == TRUE)
hitchance = HIT_CHANCE_STANDARD
if(salvo == TRUE)
var/confirmedhit
Expand Down Expand Up @@ -115,7 +117,7 @@
if(!is_mainship_level(current_mob.z))
continue
playsound_client (current_mob.client, 'sound/effects/railgun_miss.ogg', 60)
to_chat(current_mob.client, SPAN_DANGER("You hear railgun shots barely missing the hull!"))
to_chat(current_mob.client, SPAN_DANGER("You hear railgun bursts barely missing the hull!"))
//REMOVE THIS WHEN WE USE THESE DEFS SOMEWHERE ELSE OR ELSE IT STRAIGHT UP WON'T WORK.
#undef WEAPON_MISSILE
#undef WEAPON_RAILGUN
Expand Down
4 changes: 2 additions & 2 deletions code/modules/defenses/sentry_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Sentry gun computer which links to defensive structures.
*/
/obj/item/device/sentry_computer
name = "\improper Sentry Gun Network Laptop"
desc = "A laptop loaded with sentry control software."
name = "\improper AN/PSQ-55 Remote Weapons Console"
desc = "A TREE hardened laptop equipped with additional C2 software for the UA-571 family of robot sentries."
icon = 'icons/obj/structures/props/sentrycomp.dmi'
icon_state = "sentrycomp_cl"
w_class = SIZE_SMALL
Expand Down
Loading