Skip to content

Commit

Permalink
Merge branch 'BeeStation:master' into energy-weapon-gameplay
Browse files Browse the repository at this point in the history
  • Loading branch information
Pockets-byte authored Oct 19, 2024
2 parents f8b7374 + 969985b commit e57ea3f
Show file tree
Hide file tree
Showing 37 changed files with 744 additions and 86 deletions.
4 changes: 4 additions & 0 deletions code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@
C?.give_award(/datum/award/achievement/misc/threekhours, C.mob)
if(hours > 4000)
C?.give_award(/datum/award/achievement/misc/fourkhours, C.mob)
//NSV13 - emergency repair achievement hook
if(C && GLOB.plating_repairers["[C.ckey]"] && GLOB.plating_repairers["[C.ckey]"] >= 200)
C.give_award(/datum/award/achievement/misc/emergency_repairs, C.mob)
//NSV13 end

CHECK_TICK

Expand Down
2 changes: 1 addition & 1 deletion code/datums/achievements/_achievement_data.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
/datum/achievement_data/proc/increase_score(datum/award/score/achievement_type, mob/user, value)
var/datum/award/score/A = SSachievements.awards[achievement_type]
get_data(achievement_type) //Get the current status first if necessary
if(length(A.high_scores) == 0 || A.high_scores[A.high_scores[1]] < value)
if(A.announce_highscore && (length(A.high_scores) == 0 || A.high_scores[A.high_scores[1]] < value)) //NSV13 - Adds support for non-spamming scores.
to_chat(world, "<span class='greenannounce'><B>[user.client.key] set a new high score in [A.name]: [value]</B></span>")
if(!data[achievement_type] || value > data[achievement_type])
data[achievement_type] = value
Expand Down
2 changes: 2 additions & 0 deletions code/datums/achievements/_awards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
default_value = 0
var/track_high_scores = TRUE
var/list/high_scores = list()
///Determines whether we announce if we achieve a new highscore.
var/announce_highscore = TRUE //NSV13 - no spammies

/datum/award/score/New()
. = ..()
Expand Down
10 changes: 8 additions & 2 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,14 @@

/obj/item/projectile/proc/process_homing() //Nsv13 - Enhanced the performance of this entire proc.
if(QDELETED(homing_target)) //NSV13 - Changed proc to be less performance intensive
return FALSE
var/targetAngle = get_angle(src, homing_target)
if(homing_target) //Bla bla refclearing. Necessary evil. (Probably not worth the hassle of handling this via comsig, so this is here instead)
homing_target = null
return FALSE //Hi, Delta from the past here, future one. We don't just disable homing entirely here because some projectiles might be able to reassess targets.
var/targetAngle
if(z && SSmapping.level_trait(z, ZTRAIT_OVERMAP)) //This bit of performance cost should be worth making these track properly.
targetAngle = overmap_angle(src, homing_target)
else
targetAngle = get_angle(src, homing_target)
var/angle = closer_angle_difference(Angle, targetAngle)
next_homing_process = world.time + homing_delay
setAngle(Angle + CLAMP(angle, -homing_turn_speed, homing_turn_speed))
Expand Down
4 changes: 2 additions & 2 deletions config/starmap/starmap_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@
"is_hypergate": 0,
"preset_trader": null,
"audio_cues": "[]",
"startup_proc": null
"startup_proc": "STARTUP_PROC_TYPE_DOLOS"
},
{
"name": "Abassi",
Expand All @@ -1169,7 +1169,7 @@
"is_hypergate": 0,
"preset_trader": null,
"audio_cues": "[]",
"startup_proc": null
"startup_proc": "STARTUP_PROC_TYPE_ABASSI"
},
{
"name": "Oasis Fidei",
Expand Down
40 changes: 30 additions & 10 deletions html/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,36 @@
-->
<div class="commit sansserif">

<h2 class="date">18 October 2024</h2>
<h3 class="author">DeltaFire15 updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Overmap projectiles now correctly home across z loop borders.</li>
</ul>

<h2 class="date">10 October 2024</h2>
<h3 class="author">Bokkiewokkie updated:</h3>
<ul class="changes bgimages16">
<li class="imageadd">Updated icons for fighter batteries</li>
<li class="imageadd">Added icons for fighter targeting systems</li>
</ul>

<h2 class="date">26 September 2024</h2>
<h3 class="author">Bokkiewokkie updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Added space mines</li>
</ul>
<h3 class="author">DeltaFire15 updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">The NSV-specific achievements should work now.</li>
<li class="rscadd">Some more NSV-specific achievements.</li>
<li class="bugfix">Replaced a dist call for overmap singularities with the proper version.</li>
</ul>
<h3 class="author">SerynEngi and BluHNT updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Added new MAA hardsuit sprite</li>
<li class="balance">made MAA hardsuit less weapon-resistant in exchange for more speed.</li>
</ul>

<h2 class="date">13 September 2024</h2>
<h3 class="author">DeltaFire15 updated:</h3>
<ul class="changes bgimages16">
Expand Down Expand Up @@ -105,16 +135,6 @@ <h3 class="author">riquewright updated:</h3>
<li class="balance">added random ore spawns</li>
<li class="bugfix">pre-beebase objects and turfs</li>
</ul>

<h2 class="date">16 August 2024</h2>
<h3 class="author">Kenionatus updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Auto recall reminders now also get sent during combat</li>
</ul>
<h3 class="author">Pockets-byte updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">added a rejection message to the comms console</li>
</ul>
</div>

<b>GoonStation 13 Development Team</b>
Expand Down
17 changes: 17 additions & 0 deletions html/changelogs/.all_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2166,3 +2166,20 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
- balance: Naval coffee now has a weaker mood buff.
- bugfix: Temperature protection values returned by the getter are no longer very
very slightly off the value they should be. Thanks decimal precision.
2024-09-26:
Bokkiewokkie:
- rscadd: Added space mines
DeltaFire15:
- bugfix: The NSV-specific achievements should work now.
- rscadd: Some more NSV-specific achievements.
- bugfix: Replaced a dist call for overmap singularities with the proper version.
SerynEngi and BluHNT:
- rscadd: Added new MAA hardsuit sprite
- balance: made MAA hardsuit less weapon-resistant in exchange for more speed.
2024-10-10:
Bokkiewokkie:
- imageadd: Updated icons for fighter batteries
- imageadd: Added icons for fighter targeting systems
2024-10-18:
DeltaFire15:
- bugfix: Overmap projectiles now correctly home across z loop borders.
1 change: 1 addition & 0 deletions nsv13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4053,6 +4053,7 @@
#include "nsv13\code\modules\overmap\types\spacepirates.dm"
#include "nsv13\code\modules\overmap\types\syndicate.dm"
#include "nsv13\code\modules\overmap\weapons\damage.dm"
#include "nsv13\code\modules\overmap\weapons\mines.dm"
#include "nsv13\code\modules\overmap\weapons\plasma_gun.dm"
#include "nsv13\code\modules\overmap\weapons\projectiles_fx.dm"
#include "nsv13\code\modules\overmap\weapons\ship_weapon.dm"
Expand Down
9 changes: 9 additions & 0 deletions nsv13/code/__DEFINES/medal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@
#define MEDAL_CREW_VERYCOMPETENT "On the frontlines"
#define MEDAL_CREW_EXTREMELYCOMPETENT "Pre-emptive strike"
#define MEDAL_CREW_HYPERCOMPETENT "Cleared the Abassi Ridge"

#define MEDAL_PIRATE_EXTERMINATOR "Pirate Exterminator"
#define MEDAL_FIST_BREAKER "Fist Breaker"
#define MEDAL_TORP_DIRECTHIT "OW!!!"
#define MEDAL_EMERGENCY_REPAIRS "Emergency Repairs"
#define MEDAL_BLACKHOLE_INCIDENT "AAAAAAAAAAAAA"
#define MEDAL_ILLEGAL_TECHNOLOGY "Regulation 10124"

#define TORPCOUNT_SCORE "Torpedo Technician"
2 changes: 2 additions & 0 deletions nsv13/code/__DEFINES/starsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
#define SECTOR_SOL 1
#define SECTOR_NEUTRAL 2
#define SECTOR_SYNDICATE 3

#define COMSIG_STAR_SYSTEM_AFTER_ENTER "star_system_after_enter"
26 changes: 26 additions & 0 deletions nsv13/code/controllers/subsystem/overmap_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ SUBSYSTEM_DEF(overmap_mode)
var/list/modes
var/list/mode_names

///Have we already handed people the base achievement this round?
var/patrol_achievement_base_granted = FALSE
///Have we already handed people the extended patrol achievement this round?
var/patrol_achievement_adv_granted = FALSE

/datum/controller/subsystem/overmap_mode/Initialize(start_timeofday)
//Retrieve the list of modes
//Check our map for any white/black lists
Expand Down Expand Up @@ -458,6 +463,27 @@ SUBSYSTEM_DEF(overmap_mode)
mode.winner = F //This should allow the mode to finish up by itself
mode.check_finished()
if((objective_check >= objective_length) && !failed)
var/achievement_type
if(!SSovermap_mode.round_extended)
if(!SSovermap_mode.patrol_achievement_base_granted)
achievement_type = /datum/award/achievement/misc/crew_competent
SSovermap_mode.patrol_achievement_base_granted = TRUE
else
if(!SSovermap_mode.patrol_achievement_adv_granted)
achievement_type = /datum/award/achievement/misc/crew_very_competent
SSovermap_mode.patrol_achievement_adv_granted = TRUE
if(achievement_type)
for(var/mob/living/living_mob in GLOB.mob_living_list)
if(!living_mob.job)
continue
var/datum/job/job_ref = SSjob.GetJob(living_mob.job)
if(!job_ref)
continue
if(job_ref.faction != "Station")
continue
if(!living_mob.client)
continue
living_mob.client.give_award(achievement_type, living_mob)
victory()

/datum/overmap_gamemode/proc/victory()
Expand Down
66 changes: 63 additions & 3 deletions nsv13/code/controllers/subsystem/starsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ Returns a faction datum by its name (case insensitive!)
if(backupx && backupy)
target.contents_positions[OM] = list("x" = backupx, "y" = backupy) //Cache the ship's position so we can regenerate it later.
else
target.contents_positions[OM] = list("x" = rand(15, 240), "y" = rand(15, 240))
target.contents_positions[OM] = list("x" = rand(15, world.maxx - 15), "y" = rand(15, world.maxy - 15))
else
if(!OM.z)
START_PROCESSING(SSphysics_processing, OM)
Expand Down Expand Up @@ -384,6 +384,24 @@ Returns a faction datum by its name (case insensitive!)
return FALSE
return (world.time - info["from_time"])/(info["to_time"] - info["from_time"])

/datum/controller/subsystem/star_system/proc/dolos_visited(datum/star_system/source, obj/structure/overmap/entering)
SIGNAL_HANDLER
if(entering.ai_controlled)
return
for(var/mob/living/visitor in entering.mobs_in_ship)
if(!visitor.client)
continue
INVOKE_ASYNC(visitor.client, TYPE_PROC_REF(/client, give_award), /datum/award/achievement/misc/crew_extremely_competent, visitor)

/datum/controller/subsystem/star_system/proc/abassi_visited(datum/star_system/source, obj/structure/overmap/entering)
SIGNAL_HANDLER
if(entering.ai_controlled)
return
for(var/mob/living/visitor in entering.mobs_in_ship)
if(!visitor.client)
continue
INVOKE_ASYNC(visitor.client, TYPE_PROC_REF(/client, give_award), /datum/award/achievement/misc/crew_hypercompetent, visitor)

//////star_system DATUM///////

/datum/star_system
Expand Down Expand Up @@ -447,6 +465,10 @@ Returns a faction datum by its name (case insensitive!)
if("STARTUP_PROC_TYPE_BRASIL_LITE")
addtimer(CALLBACK(src, PROC_REF(generate_litelands)), 5 SECONDS)
return
if("STARTUP_PROC_TYPE_DOLOS")
addtimer(CALLBACK(src, PROC_REF(register_dolos_achievement)), 5 SECONDS)
if("STARTUP_PROC_TYPE_ABASSI")
addtimer(CALLBACK(src, PROC_REF(register_abassi_achievement)), 5 SECONDS)
message_admins("WARNING: Invalid startup_proc declared for [name]! Review your defines (~L438, starsystem.dm), please.")
return 1

Expand Down Expand Up @@ -661,10 +683,10 @@ Returns a faction datum by its name (case insensitive!)
OM.disable_dampeners()
RegisterSignal(OM, COMSIG_PARENT_QDELETING, PROC_REF(handle_affecting_del))
for(var/obj/structure/overmap/OM as() in affecting)
if(overmap_dist(src, OM) > influence_range || !z || OM.z != z)
var/dist = overmap_dist(src, OM)
if(dist > influence_range || !z || OM.z != z)
stop_affecting(OM)
continue
var/dist = get_dist(src, OM)
var/grav_level = OVERMAP_SINGULARITY_PROX_GRAVITY
if(dist <= redshift_range)
var/redshift ="#[num2hex(130-dist,2)][num2hex(0,2)][num2hex(0,2)]"
Expand All @@ -685,6 +707,7 @@ Returns a faction datum by its name (case insensitive!)
if(istype(crushed, /area/space))
continue
crushed.has_gravity = OVERMAP_SINGULARITY_DEATH_GRAV //You are dead.
grant_death_achievement(OM)
qdel(OM)
continue
if(grav_tracker[OM] != grav_level)
Expand Down Expand Up @@ -724,6 +747,12 @@ Returns a faction datum by its name (case insensitive!)
cached_colours[deleting] = null
UnregisterSignal(deleting, COMSIG_PARENT_QDELETING)

/obj/effect/overmap_anomaly/singularity/proc/grant_death_achievement(obj/structure/overmap/congratulations)
for(var/mob/living/nice_job in congratulations.mobs_in_ship)
if(!nice_job.client)
continue
nice_job.client.give_award(/datum/award/achievement/misc/blackhole_incident, nice_job)

#undef OVERMAP_SINGULARITY_PROX_GRAVITY
#undef OVERMAP_SINGULARITY_REDSHIFT_GRAV
#undef OVERMAP_SINGULARITY_DANGER_GRAV
Expand Down Expand Up @@ -810,6 +839,8 @@ Returns a faction datum by its name (case insensitive!)
SSstar_system.spawn_anomaly(/obj/effect/overmap_anomaly/wormhole, src, center=TRUE)
if(alignment == "syndicate")
spawn_enemies() //Syndicate systems are even more dangerous, and come pre-loaded with some Syndie ships.
if(prob(20)) //Watch your step!
spawn_mines("syndicate")
if(alignment == "unaligned")
if(prob(25))
spawn_enemies()
Expand Down Expand Up @@ -897,11 +928,27 @@ Returns a faction datum by its name (case insensitive!)
/datum/star_system/proc/spawn_enemies(enemy_type, amount)
if(!amount)
amount = difficulty_budget
if(amount <= 0)
amount = 1 //Why else are you calling this?
for(var/i = 0, i < amount, i++) //number of enemies is set via the star_system vars
if(!enemy_type)
enemy_type = pick(SSstar_system.enemy_types) //Spawn a random set of enemies.
SSstar_system.spawn_ship(enemy_type, src)

/datum/star_system/proc/spawn_mines(faction, amount)
if(!amount)
amount = difficulty_budget*2
if(amount <= 0)
amount = 1 //Why else are you calling this?
if(!faction) //Someone forgot to set their IFF
faction = alignment
if(!occupying_z) //We didn't get one
for(var/i = 0, i < amount, i++)
var/obj/structure/space_mine/M = new /obj/structure/space_mine(null, faction, src) //You are in nullspace now
contents_positions[M] = list("x" = rand(5, world.maxx - 5),"y" = rand(5, world.maxy - 5))
for(var/i = 0, i < amount, i++)
new /obj/structure/space_mine(get_turf(locate(rand(5, world.maxx - 5), rand(5, world.maxy - 5), occupying_z)), faction, src) //random location in the system

/datum/star_system/proc/lerp_x(datum/star_system/other, t)
return x + (t * (other.x - x))

Expand Down Expand Up @@ -1549,6 +1596,17 @@ Random starsystem. Excluded from starmap saving, as they're generated at init.
#undef RANDOM_CONNECTION_BASE_CHANCE
#undef RANDOM_CONNECTION_REPEAT_PENALTY

/*
These are used to check if someone is visiting one of the special systems.
Handled this way and done on the starsystem controller so we do not conflict with other signals that rely on star systems registering a signal onto themselves.
*/

/datum/star_system/proc/register_dolos_achievement()
SSstar_system.RegisterSignal(src, COMSIG_STAR_SYSTEM_AFTER_ENTER, TYPE_PROC_REF(/datum/controller/subsystem/star_system, dolos_visited))

/datum/star_system/proc/register_abassi_achievement()
SSstar_system.RegisterSignal(src, COMSIG_STAR_SYSTEM_AFTER_ENTER, TYPE_PROC_REF(/datum/controller/subsystem/star_system, abassi_visited))

/*
<Summary>
Welcome to the endgame. This sector is the hardest you'll encounter in game and holds the Syndicate capital.
Expand Down Expand Up @@ -1611,6 +1669,7 @@ Welcome to the endgame. This sector is the hardest you'll encounter in game and
hidden = FALSE
desc = "A place where giants fell. You feel nothing save for an odd sense of unease and an eerie silence."
system_traits = STARSYSTEM_NO_ANOMALIES | STARSYSTEM_NO_WORMHOLE
startup_proc = "STARTUP_PROC_TYPE_DOLOS"

/datum/star_system/sector4/abassi
name = "Abassi"
Expand All @@ -1626,6 +1685,7 @@ Welcome to the endgame. This sector is the hardest you'll encounter in game and
threat_level = THREAT_LEVEL_DANGEROUS
hidden = TRUE
system_traits = STARSYSTEM_NO_ANOMALIES | STARSYSTEM_NO_WORMHOLE
startup_proc = "STARTUP_PROC_TYPE_ABASSI"

/datum/star_system/sector4/laststand
name = "Oasis Fidei" //oasis of faith
Expand Down
Loading

0 comments on commit e57ea3f

Please sign in to comment.