Skip to content

Commit

Permalink
Revert "Ports the Power Transmission Laser" (ParadiseSS13#27170)
Browse files Browse the repository at this point in the history
* Revert "fixes this bloody laser (ParadiseSS13#27167)"

This reverts commit 1bec4cd.

* Revert "Ports the Power Transmission Laser (ParadiseSS13#26928)"

This reverts commit 592b7c3.

* this lol

* TGUI
  • Loading branch information
S34NW authored Oct 22, 2024
1 parent 1bec4cd commit cff9341
Show file tree
Hide file tree
Showing 26 changed files with 1,024 additions and 3,451 deletions.
952 changes: 326 additions & 626 deletions _maps/map_files/stations/boxstation.dmm

Large diffs are not rendered by default.

891 changes: 257 additions & 634 deletions _maps/map_files/stations/cerestation.dmm

Large diffs are not rendered by default.

800 changes: 194 additions & 606 deletions _maps/map_files/stations/deltastation.dmm

Large diffs are not rendered by default.

464 changes: 82 additions & 382 deletions _maps/map_files/stations/emeraldstation.dmm

Large diffs are not rendered by default.

580 changes: 149 additions & 431 deletions _maps/map_files/stations/metastation.dmm

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion code/__DEFINES/announce_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
#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: 0 additions & 3 deletions code/__DEFINES/power_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,3 @@
#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
7 changes: 0 additions & 7 deletions code/defines/procs/announcer_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,3 @@ 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/announce.ogg')
style = "major"

4 changes: 0 additions & 4 deletions code/game/area/ss13_areas/engineering_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@
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
7 changes: 0 additions & 7 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,6 @@
if(reagents)
reagents.temperature_reagents(exposed_temperature)

/// This is the default Power Transmission Laser action on atoms. Called when an atom enters the beam and while it's in the beam.
/atom/proc/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
var/mw_power = (ptl.output_number * ptl.power_format_multi_output) / (1 MW)
fire_act(null, 3000 * mw_power, 2500) // Equivalent to being in a fire at a temperature of 3000 degrees kelvin per MW.
if(ptl.blocker && (ptl.blocker.UID() == UID())) // If this is the blocker we need to check if it was destroyed
ptl.check_blocker()

/// If it returns TRUE, attack chain stops
/atom/proc/tool_act(mob/living/user, obj/item/I, tool_type)
switch(tool_type)
Expand Down
3 changes: 3 additions & 0 deletions code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#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 @@ -865,3 +867,4 @@
#undef PULSEDEMON_PLATING_SPARK_CHANCE
#undef PULSEDEMON_APC_CHARGE_MULTIPLIER
#undef PULSEDEMON_SMES_DRAIN_MULTIPLIER
#undef WATT_TICK_TO_JOULE
4 changes: 0 additions & 4 deletions code/game/gamemodes/miniantags/revenant/revenant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,6 @@
// No other state is happening, therefore we are stunned
icon_state = icon_stun

/// Spooky ghost can go through lasers
/mob/living/simple_animal/revenant/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
return

/datum/objective/revenant
needs_target = FALSE
var/targetAmount = 100
Expand Down
4 changes: 0 additions & 4 deletions code/game/objects/effects/effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,3 @@

// Readd to ourselves
attached_to.vis_contents |= src

/// The PTL beam shouldn't affect effects
/obj/effect/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
return
7 changes: 0 additions & 7 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,3 @@
return O.return_obj_air()
else
return null

/// Objects take damage equal to the amount of megawatts being output by the beam.
/obj/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
var/mw_power = (ptl.output_number * ptl.power_format_multi_output) / (1 MW)
take_damage(mw_power)
if(ptl.blocker && (ptl.blocker.UID() == UID())) // If this is the blocker we need to check if it was destroyed
ptl.check_blocker()
4 changes: 0 additions & 4 deletions code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,6 @@
/obj/structure/window/GetExplosionBlock()
return reinf && fulltile ? real_explosion_block : 0

/// The beam goes through windows without damaging them
/obj/structure/window/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
return

/obj/structure/window/basic
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."

Expand Down
9 changes: 0 additions & 9 deletions code/game/turfs/simulated/minerals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,6 @@
return
return ..()

/// Cold ancient rock has a chance to be destroyed by the laser from 50 MW output and above
/turf/simulated/mineral/ancient/outer/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
var/mw_power = (ptl.output_number * ptl.power_format_multi_output) / (1 MW) // Laser output power in megawatts
if(prob(mw_power - 50))// Chance to destroy the rock increases with power output, starting at 50MW
ChangeTurf(baseturf)
if(ptl.blocker && (ptl.blocker.UID() == UID())) // If this is the blocker we need to check if it was destroyed
ptl.check_blocker()


/turf/simulated/mineral/random/high_chance
color = COLOR_YELLOW
mineralChance = 25
Expand Down
7 changes: 0 additions & 7 deletions code/game/turfs/simulated/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,4 @@
/turf/simulated/wall/MouseExited(location, control, params)
usr.hud_used.screentip_text.maptext = ""

/// Walls take damage equivalent to power in megawatts
/turf/simulated/wall/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
var/mw_power = (ptl.output_number * ptl.power_format_multi_output) / (1 MW)
take_damage(mw_power / 5) // Walls have less hp than machines, but are supposed to be harder to destroy, so we compensate by making them take less damage.
if(ptl.blocker && (ptl.blocker.UID() == UID())) // If this is the blocker we need to check if it was destroyed
ptl.check_blocker()

#undef MAX_DENT_DECALS
4 changes: 0 additions & 4 deletions code/game/turfs/simulated/walls_indestructible.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
/turf/simulated/wall/indestructible/mech_melee_attack(obj/mecha/M)
return

/turf/simulated/wall/indestructible/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
return

/turf/simulated/wall/indestructible/necropolis
name = "necropolis wall"
desc = "A seemingly impenetrable wall."
Expand Down Expand Up @@ -303,4 +300,3 @@ 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)

10 changes: 0 additions & 10 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,3 @@

/turf/return_analyzable_air()
return get_readonly_air()

/// What happens to a turf when it is hit by a power transmission laser, depends on the density of the turf
/turf/ptl_beam_act(obj/machinery/power/transmission_laser/ptl)
var/mw_power = (ptl.output_number * ptl.power_format_multi_output) / (1 MW)
if(!density)
return // Non dense turfs are unaffected by default so we don't destroy floors. Dense turfs have chance to be destroyed.
if(prob(mw_power))
ChangeTurf(baseturf)
if(ptl.blocker && (ptl.blocker.UID() == UID())) // If this is the blocker we need to check if it was destroyed
ptl.check_blocker()
Loading

0 comments on commit cff9341

Please sign in to comment.