Skip to content

Commit

Permalink
[MIRROR] Various legion updates (#2781)
Browse files Browse the repository at this point in the history
Co-authored-by: SierraKomodo <[email protected]>
Co-authored-by: Lexanx <[email protected]>
  • Loading branch information
3 people authored Nov 24, 2024
1 parent e93fd1e commit 97cfd15
Show file tree
Hide file tree
Showing 14 changed files with 133 additions and 10 deletions.
37 changes: 37 additions & 0 deletions html/changelogs/legion_event_2_caled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# admin
#################################

# Your name.
author: caledfwlchschime

# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True

# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- soundadd: "Added sound effects for legion voices."
37 changes: 37 additions & 0 deletions html/changelogs/legion_event_2_sierrakomodo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# admin
#################################

# Your name.
author: SierraKomodo

# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True

# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Added additional lines to the list of options for legion broadcasts."
37 changes: 37 additions & 0 deletions html/changelogs/legion_event_2_spookerton.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# admin
#################################

# Your name.
author: Spookerton

# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True

# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- soundadd: "New sounds for legion warp in effects."
Binary file modified icons/mob/simple_animal/hivebot.dmi
Binary file not shown.
5 changes: 5 additions & 0 deletions packs/legion/_globals.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
GLOBAL_VAR_CONST(legion_warp_sound, 'packs/legion/sounds/legion_arrive.ogg')

GLOBAL_LIST_INIT(legion_voices_sounds, list(\
'packs/legion/sounds/legion_voices1.ogg'\
))
7 changes: 4 additions & 3 deletions packs/legion/_pack.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "hivebot.dm"
#include "mob.dm"
#include "structure.dm"
#include "_globals.dm"
#include "legion_beacon.dm"
#include "legion_hivebot.dm"
#include "legion_mob.dm"
#include "legion_narrate.dm"
Binary file removed packs/legion/hivebot.dmi
Binary file not shown.
Binary file added packs/legion/icons/beacon.dmi
Binary file not shown.
10 changes: 6 additions & 4 deletions packs/legion/structure.dm → packs/legion/legion_beacon.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/structure/legion
abstract_type = /obj/structure/legion
icon = 'packs/legion/legion.dmi'
icon = 'packs/legion/icons/beacon.dmi'


/obj/structure/legion/beacon
Expand Down Expand Up @@ -33,7 +33,7 @@
var/broadcast_rate = 30 SECONDS

/// Integer. Percentage change of a legion message broadcast per tick.
var/broadcast_change = 5
var/broadcast_chance = 5

/// Integer. `world.time` of the last legion broadcast.
var/last_broadcast_time = 0
Expand Down Expand Up @@ -93,7 +93,7 @@
return
spawn_legion()

if (world.time >= last_broadcast_time + broadcast_rate && rand(1, 100) <= broadcast_change)
if (world.time >= last_broadcast_time + broadcast_rate && rand(1, 100) <= broadcast_chance)
last_broadcast_time = world.time
show_legion_messages(get_z(src))

Expand All @@ -116,11 +116,13 @@


/obj/structure/legion/beacon/on_update_icon()
ClearOverlays()
switch (beacon_state)
if (BEACON_STATE_ON)
icon_state = "beacon_active"
if (BEACON_STATE_OFF)
icon_state = "beacon"
AddOverlays(emissive_appearance(icon, "[icon_state]_emissive", src))


/obj/structure/legion/beacon/on_death()
Expand Down Expand Up @@ -240,7 +242,7 @@
if (!target)
target = get_turf(src)
new /obj/explosion(target)
playsound(src, 'sound/effects/EMPulse.ogg', 25, TRUE)
playsound(src, GLOB.legion_warp_sound, 25, TRUE)


/* Hivebot Variant */
Expand Down
2 changes: 1 addition & 1 deletion packs/legion/hivebot.dm → packs/legion/legion_hivebot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
// Random legion hivebot spawner
/obj/random/legion/hivebot
abstract_type = /obj/random/legion/hivebot
icon = 'packs/legion/hivebot.dmi'
icon = 'icons/mob/simple_animal/hivebot.dmi'
icon_state = "spawner"


Expand Down
2 changes: 1 addition & 1 deletion packs/legion/mob.dm → packs/legion/legion_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

if (!mapload)
new /obj/explosion(loc)
playsound(src, 'sound/effects/EMPulse.ogg', 25, TRUE)
playsound(src, GLOB.legion_warp_sound, 25, TRUE)
if (linked_beacon)
visible_message(SPAN_WARNING("\The [linked_beacon] warps \a [src] in!"))
else
Expand Down
6 changes: 5 additions & 1 deletion packs/legion/legion_narrate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ GLOBAL_LIST_INIT(legion_last_words_generic, list(\
"I don't want to die!",\
"No, get away!",\
"I give up. Just do it already.",\
"I'm so scared..."\
"I'm so scared...",\
"Help me!",\
"It's so hot!",\
))


Expand Down Expand Up @@ -81,12 +83,14 @@ GLOBAL_LIST_EMPTY(legion_last_words_player)
message = pick(GLOB.legion_narrations)

var/count = 0
var/sound_to_play = pick(GLOB.legion_voices_sounds)
for (var/mob/player in GLOB.player_list)
if (!(get_z(player) in connected_z_levels))
continue
if (!player.isSynthetic() && !isobserver(player))
continue
to_chat(player, SPAN_LEGION(message))
sound_to(player, sound_to_play)
count++

log_debug("Displayed legion message to [count] mob\s across [length(connected_z_levels)] z-level\s.")
Expand Down
Binary file added packs/legion/sounds/legion_arrive.ogg
Binary file not shown.
Binary file added packs/legion/sounds/legion_voices1.ogg
Binary file not shown.

0 comments on commit 97cfd15

Please sign in to comment.