Skip to content

Commit

Permalink
Power laser port 2 electric bogaloo (ParadiseSS13#27171)
Browse files Browse the repository at this point in the history
* wip

* some formatting and copying over UI

* it compiles now

* oops

* Moves WATT_TICK_TO_JOULE to the power defines file. fixes UI

* spelling and announcement fixes

* Handle offsets for different directions

* laser comes from the correct tile now

* Added north and south sprites for the laser

* Adjust offsets for north and south sprites

* finished all north and south sprites

* tgui rebuild. Also sprites and code begoon

* put PTLs in maps

* Repositions PTL room door in cyberiad

* fix if spacing

* undef and unundeffed define

* Removed overlapping stuff in some maps

* Actually makes the changes to metastation

* Fixes more mapping stuff

* Fix more unit test failures

* unmirror multitile component grid

* Fixes multitile

* explosions no longer make a hole in the beam

* This should fix it

* Stray pipe begone!

* Ok I think I fiigured it out

* removes redundant removals of components parts and a redundant check. various style fixes

* Adds blocking to the beam and objects other than living beings take damage now.

* not using kwargs now. should work.

* Style changes and fixes some mobs getting hit by the laser that shouldn't be.

* Review changes and fixes trying to access wall turf's location.

* allow the new wall turf to form to we can properly access it.

* Moves the ptl beam effect to an atom proc that is overriden by the different types of things that can end up in the beam.

* Fixes some comments, adds clarifications, removes redundant usage of src

* moves the announcement threshold to a global var. Fixes ghost interaction.

* Revert "moves the announcement threshold to a global var. Fixes ghost interaction."

This reverts commit 7916ee7.

* Makes announcement threshold a static variable of the PTL

* power safty check on the mob ptl function

* well alright then

* Revert "well alright then"

This reverts commit a8c0b68.

* Fixes ghost attack

* Sends credits to accounts 200 at a time to avoid spam.

* fix box station stuff

* fix the first announcement message

* fix the laser healing burn damage.

* Only round the earnings being sent so we don't delete credits.

* Give the high and medium cut ratios defines

* Fix and adjust some comments

* Uses the correct variable for the beam effects and fixes things being thrown while deleted

* Actually fixes qdeleted thing being thrown around error

* Fix the examine text

* Prevents grills from blocking the beam.

* Remove get_back_turf

* Make a blocker a UID instead of a ref

* limits capacity to 2000GJ

* replaces knobs with a number input

* Adds cameras to the rooms and a disposals bypass for faragus

* disallows pipes from being damaged by the beam

* Gives the PTL directional variants for mapping

* Allows deconstruction and reconstruction of the PTL as well as rotating it

* Removes a redundant newline

* Removes all damaging effects of the beam and it's blocking abilities

* Finishes the job

* Remove the disposals bypass on faragus since the beam is truly visual now

* implements orbital beaming of megafauna near the base. Still need to fix the overlay

* Dusts lavaland mobs when they are killed by the laser and disabled loot drops when damaged by it.

* Add some minor hazards to the PTL

* Fix the hazards

* Improves PTL rooms

* Fix some misplaced pipes and cables

* connect the disconnected pipes and cables in faragus

* minor map fixes

* more fixes and integrating faragus room a bit more

* correct the flash reduction to apply when not looking directly at the laser

* reduces the distance coefficient on the rads pulse

* Delta changes that apparently weren't committed earlier

* I think faragus is finally fixed.

* more mapping improvements

* fix wrong cable on faragus apc terminal

* moves the HV cable for the laser so it follows the station's outline more closely

* fixes cables converging

* Routes the cable along the existing catwalks instead of additional ones in farragus

* adds missing cable in faragus

* rebuild tgui

* Faragus mapping changes

* Delta Changes

* Diagoras changes

* Meta changes

* Cyberiad changes and placing a catwalk near the PTL for power measurements

* Faragus review changes

* Rebuild  TGUI

* Rebuild TGUI

* tgui rebuild

* Rebuild TGUI

* Rebuild TGUI

* Rebuild TGUI

* Changes the announcement sound from the one used for command comms announcement to the one used by most other announcement.

* Rebuild TGUI

* rebuild TGUI

* Move button contents to child

* Using the correct acronym for the power transmission laser in the interface name.

* Rebuild TGUI

* change the folder name as well

* TGUI rebuild

* Remove a redundant space from the first announcement message

* Adds a door to the PTL room on Diagoras

* Lowers the amount of money generated to less absurd amounts.

* another adjustment

* Fixes some walls in maints being in the space area

* fixes divide by 0 runtime

* prevents trying to read the icon of a null target

* Makes power line on diagoras less jank and fixes flashes on lasers pointing west

* Fixes the PTL being charged over it's capacity

* Makes the flash modifier angle based.

* adds an explanation of flashmod

* Adjusting curve so less powerful engines are better rewarded

* Changes the grid saturation to be based on input rather than output.

* Removes the PTL announcements and adds total energy sold to the UI

* Adds the amount of energy exported(in GJ) to the end of round score card

* Credit cap nerf

* Review changes

* missing space

* Revert "Merge branch 'master' into powerLaserPort"

This reverts commit fe4a08f, reversing
changes made to bef963c.

* Reapply "Merge branch 'master' into powerLaserPort"

This reverts commit c990d93.

* Fixes all the wrong path issues from the merge

* actually resolve the merge conflicts that somehow got automerged

* Should be all the duplicates

* Rest of the duplicates I missed

* remove lonely pipe and cable in faragus

* some more uncaught duplicates

---------

Co-authored-by: Burzah <[email protected]>
  • Loading branch information
Migratingcocofruit and Burzah authored Nov 25, 2024
1 parent 09830b2 commit 7aeb174
Show file tree
Hide file tree
Showing 33 changed files with 7,525 additions and 3,526 deletions.
3,364 changes: 1,714 additions & 1,650 deletions _maps/map_files/generic/Lavaland.dmm

Large diffs are not rendered by default.

1,055 changes: 723 additions & 332 deletions _maps/map_files/stations/boxstation.dmm

Large diffs are not rendered by default.

3,309 changes: 2,205 additions & 1,104 deletions _maps/map_files/stations/cerestation.dmm

Large diffs are not rendered by default.

1,053 changes: 877 additions & 176 deletions _maps/map_files/stations/deltastation.dmm

Large diffs are not rendered by default.

707 changes: 627 additions & 80 deletions _maps/map_files/stations/emeraldstation.dmm

Large diffs are not rendered by default.

765 changes: 602 additions & 163 deletions _maps/map_files/stations/metastation.dmm

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions code/__DEFINES/announce_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
#define ANNOUNCE_KIND_MAJOR "NAS Trurl Update"
#define ANNOUNCE_KIND_EVENT "NAS Trurl Update" // Intentionally the same as above
#define ANNOUNCE_KIND_AI "A.I. Announcement"
#define ANNOUNCE_KIND_PTL "Power Transmission Laser report"
3 changes: 3 additions & 0 deletions code/__DEFINES/power_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@
#define KJ * 1e3
#define MJ * 1e6
#define GJ * 1e9

/// Conversion ratio from Watt over a machine process tick time to Joules
#define WATT_TICK_TO_JOULE 2
1 change: 1 addition & 0 deletions code/_globalvars/lists/mob_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes
GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain simple animals
GLOBAL_LIST_EMPTY(human_list) //all instances of /mob/living/carbon/human and subtypes
GLOBAL_LIST_EMPTY(alive_mob_list) //List of all alive mobs, including clientless. Excludes /mob/new_player
GLOBAL_LIST_EMPTY(alive_megafauna_list) //List of all living megafauna
GLOBAL_LIST_EMPTY(dead_mob_list) //List of all dead mobs, including clientless. Excludes /mob/new_player
GLOBAL_LIST_EMPTY(non_respawnable_keys) //List of ckeys that are excluded from respawning for remainder of round.
GLOBAL_LIST_INIT(simple_animals, list(list(), list(), list(), list())) //One for each AI_* status define, List of all simple animals, including clientless
Expand Down
7 changes: 7 additions & 0 deletions code/defines/procs/announcer_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,10 @@ GLOBAL_DATUM_INIT(major_announcement, /datum/announcer, new(config_type = /datum
log_name = ANNOUNCE_KIND_AI
sound = sound('sound/misc/notice2.ogg')
style = "major"

/datum/announcement_configuration/ptl
default_title = ANNOUNCE_KIND_PTL
add_log = FALSE
sound = sound('sound/misc/notice2.ogg')
style = "major"

2 changes: 2 additions & 0 deletions code/game/area/areas/mining_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,5 @@
icon_state = "danger"

/area/lavaland/surface/outdoors/explored

/area/lavaland/surface/outdoors/targetable
4 changes: 4 additions & 0 deletions code/game/area/ss13_areas/engineering_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
name = "\improper Gravity Generator"
icon_state = "gravgen"

/area/station/engineering/transmission_laser
name = "\improper Power Transmission Laser"
icon_state = "engi"

/area/station/engineering/ai_transit_tube
name = "\improper AI Minisat Tranit Tube"
icon_state = "ai"
Expand Down
3 changes: 0 additions & 3 deletions code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#define ALERT_CATEGORY_NOPOWER "pulse_nopower"
#define ALERT_CATEGORY_NOREGEN "pulse_noregen"
/// Conversion ratio from Watt ticks to joules.
/// Should be a pulse demon's life tick length in seconds.
#define WATT_TICK_TO_JOULE 2

/mob/living/simple_animal/demon/pulse_demon
name = "pulse demon"
Expand Down Expand Up @@ -867,4 +865,3 @@
#undef PULSEDEMON_PLATING_SPARK_CHANCE
#undef PULSEDEMON_APC_CHARGE_MULTIPLIER
#undef PULSEDEMON_SMES_DRAIN_MULTIPLIER
#undef WATT_TICK_TO_JOULE
1 change: 1 addition & 0 deletions code/game/gamemodes/miniantags/revenant/revenant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@
// No other state is happening, therefore we are stunned
icon_state = icon_stun


/datum/objective/revenant
needs_target = FALSE
var/targetAmount = 100
Expand Down
3 changes: 3 additions & 0 deletions code/game/gamemodes/scoreboard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ GLOBAL_VAR(scoreboard) // Variable to save the scoreboard string once it's been
var/score_events_endured = 0
/// How many APCs have poor charge?
var/score_power_loss = 0
/// How many GigaJoules of power did we export?
var/score_gigajoules_exported = 0
/// How many people got out alive?
var/score_escapees = 0
/// How many people /didn't/ get out alive?
Expand Down Expand Up @@ -253,6 +255,7 @@ GLOBAL_VAR(scoreboard) // Variable to save the scoreboard string once it's been
<b>Ore Mined:</b> [score_ore_mined] ([points_ore_mined] Points)<br>"}
if(score_escapees)
dat += "<b>Shuttle Escapees:</b> [score_escapees] ([points_escapees] Points)<br>"
dat += "<b>Energy Exported:</b> [score_gigajoules_exported] GigaJoules<br>"
dat += "<b>Whole Station Powered:</b> [power_bonus ? "Yes" : "No"] ([power_bonus * 2500] Points)<br>"
dat += "<b>Whole Station Cleaned:</b> [mess_bonus ? "Yes" : "No"] ([mess_bonus * 1500] Points)<br><br>"

Expand Down
1 change: 1 addition & 0 deletions code/game/turfs/simulated/walls_indestructible.dm
Original file line number Diff line number Diff line change
Expand Up @@ -300,3 +300,4 @@ GLOBAL_DATUM(title_splash, /turf/simulated/wall/indestructible/splashscreen)
smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS
smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SYNDICATE_WALLS)
canSmoothWith = list(SMOOTH_GROUP_SYNDICATE_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)

Loading

0 comments on commit 7aeb174

Please sign in to comment.