Skip to content

Commit fd3b2e7

Browse files
AltHitDeal6
andauthored
Excelsior: Stage I (#283)
* Porting Ported from discordia-space#8645 * Missed one line from original At least I hope it's the only one * finally SOME death sound * test * Fix empty objectives text and duplicate show_objectives * test2 * test3 * Rename build_path to find_path * Fixed nodeless pathbuild * test999 * Fixed finishing path without a node * Fixed building path from node to itself * Fixed erased switch from switch-case * th * update overlay regardless if we found path or not * polishing da boots * Finally fixed sendPath * sound + talk * Now fixing overlays * g * Hotfix to overlays * Node-Centor destruction Nodes now disconnect from Centor after it explodes * Thing... * "Fix" cable coil from teleporter * I hope my comments are not bloaty * auuugghh * 1 * excelhud replace :) * . * clearer comments me likey * Typo fix :-p * comment * cooldown experiment1 * No more. If I did it correctly - excelsior should not try to spawn if there's already one pack of excelsior --------- Co-authored-by: Deal5 <deal6@proton.me>
1 parent 54ad51e commit fd3b2e7

42 files changed

Lines changed: 2406 additions & 94 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cev_eris.dme

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,14 +897,21 @@
897897
#include "code\game\machinery\embedded_controller\embedded_program_base.dm"
898898
#include "code\game\machinery\embedded_controller\simple_docking_controller.dm"
899899
#include "code\game\machinery\embedded_controller\~docking_program_undef.dm"
900+
#include "code\game\machinery\excelsior\_excelsior_defines.dm"
900901
#include "code\game\machinery\excelsior\autolathe.dm"
901902
#include "code\game\machinery\excelsior\boombox.dm"
903+
#include "code\game\machinery\excelsior\centor.dm"
902904
#include "code\game\machinery\excelsior\diesel.dm"
905+
#include "code\game\machinery\excelsior\emplacement.dm"
903906
#include "code\game\machinery\excelsior\ex_teleporter.dm"
904907
#include "code\game\machinery\excelsior\ex_turret.dm"
908+
#include "code\game\machinery\excelsior\excelsior_debug_tools.dm"
909+
#include "code\game\machinery\excelsior\excelsior_researches.dm"
905910
#include "code\game\machinery\excelsior\field.dm"
906911
#include "code\game\machinery\excelsior\implantmaker.dm"
912+
#include "code\game\machinery\excelsior\node.dm"
907913
#include "code\game\machinery\excelsior\redirector.dm"
914+
#include "code\game\machinery\excelsior\excelsior_items\KPK.dm"
908915
#include "code\game\machinery\kitchen\gibber.dm"
909916
#include "code\game\machinery\kitchen\microwave.dm"
910917
#include "code\game\machinery\kitchen\smartfridge.dm"

code/__DEFINES/dcs/signals.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@
163163
#define COMSIG_DOOR_OPENED "door_opened"
164164
#define COMSIG_DOOR_CLOSED "door_closed"
165165

166+
//excelsior
167+
#define COMSIG_EX_CONNECT "excelsior_connect"
168+
166169
// /obj/item signals
167170
#define COMSIG_IATTACK "item_attack" //from /mob/ClickOn(): (/atom, /src, /params) If any reply to this returns TRUE, overrides attackby and afterattack
168171
#define COMSIG_ATTACKBY "attack_by" //from /mob/ClickOn():

code/__DEFINES/turfs.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@
4949

5050
var/vecX = A.x - B.x
5151
var/vecY = A.y - B.y
52-
var/vecZ = (A.y - B.y)*DECK_HEIGHT
52+
var/vecZ = (A.z - B.z)*DECK_HEIGHT
5353

5454
return abs(sqrt((vecX*vecX) + (vecY*vecY) +(vecZ*vecZ)))

code/game/antagonist/antagonist_factions.dm

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,23 @@
157157

158158
log_say("[user.name]/[user.key] (REV [name]) : [message]")
159159

160+
/datum/faction/proc/communicate_inanimate(var/obj/user, var/message)
161+
if(!message)
162+
return
163+
164+
message = capitalize(sanitize(message))
165+
var/text = "<span class='revolution'>[message]</span>"
166+
for(var/i in SShumans.mob_list)
167+
if(is_excelsior(i))
168+
to_chat(i, text)
169+
170+
//ghosts
171+
for(var/mob/observer/ghost/M in GLOB.dead_mob_list) //does this include players who joined as observers as well?
172+
if(!M.client)
173+
continue
174+
if((M.antagHUD && M.get_preference_value(/datum/client_preference/ghost_ears) == GLOB.PREF_ALL_SPEECH) || is_admin(M))
175+
to_chat(M, "[text] ([ghost_follow_link(user, M)])")
176+
160177
/datum/faction/proc/is_member(mob/user)
161178
for(var/datum/antagonist/A in members)
162179
if(A.owner.current == user)

code/game/antagonist/antagonist_objectives.dm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
if(!owner || !owner.current)
1515
return
1616

17-
if(objectives.len)
18-
to_chat(owner.current, span_danger("<font size=3>Your objectives were updated.</font>"))
17+
var/list/old_objectives = objectives
1918

2019
objectives.Cut()
2120
objectives.Add(new_objectives)
2221

23-
show_objectives()
22+
if(old_objectives.len)
23+
to_chat(owner.current, span_danger("<font size=3>Your objectives were updated.</font>"))
24+
show_objectives()
2425

2526
/datum/antagonist/proc/create_survive_objective()
2627
if(ispath(survive_objective))

code/game/antagonist/antagonist_print.dm

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66

77
if(length(objectives))
88
text = "<b>Your [role_text] current objectives:</b>"
9-
else if(faction)
9+
else if(faction && length(faction.objectives))
1010
text = "<b>Your [faction.name] faction current objectives:</b>"
11-
else
12-
text = "<b>Your current objectives:</b>"
1311

1412
text += print_objectives(FALSE)
1513

16-
to_chat(owner.current, text)
14+
if(text)
15+
to_chat(owner.current, text)
1716

1817
/datum/antagonist/proc/greet()
1918
if(!owner || !owner.current)
@@ -98,8 +97,6 @@
9897
text += "<br><font color='red'><B>The [role_text] has failed.</B></font>"
9998
else
10099
text += "<br><font color='green'><B>The [role_text] was successful!</B></font>"
101-
if(!length(text))
102-
return "<br><b>No objectives available</b>"
103100
return text
104101

105102
/datum/antagonist/proc/print_player()

code/game/antagonist/station/revolutionary/excel_faction.dm

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
1+
var/global/was_centor_spawned = FALSE
2+
13
/datum/faction/excelsior
24
id = FACTION_EXCELSIOR
35
name = "Excelsior"
46
antag = "infiltrator"
57
antag_plural = "infiltrators"
6-
welcome_text = "You are Excelsior, Ever Upward. You have infiltrated this vessel to further the Revolution.\n\
7-
The People's strength lies in securing our position, gathering the oppressed, spreading propaganda and producing arms and armor for the final revolution. A slow and methodical approach is recommended. \n\n\
8-
Our first phase is to retrieve the cache of manufacturing materials and circuit boards. Without a means of production our revolution is in peril.\n\n\
9-
Our second phase is to establish a fortified position in secret. The People will send additional resources through the teleporter once it is established. This and our autolathe can be protected further with turrets and shield generators, in addition to loyal comrades. <b>To prevent technology theft, your machinery, but not handheld weapons, implanters, and armor, is designed to work only on target vessel, CEV \"Eris\".</b>\n\n\
10-
Our third phase is expansion. Complete mandates for power. Aquire implants, prosthetics or robotic parts and convert them into new implants. These can be injected into the oppressed to formally induct them to the Revolution. Use their labor to produce the weapons of their liberation.\n\n\
11-
When the People are ready, break the chains of the oppressor and seize control of the ship by building the redirector and installing it on the primary control bridge."
8+
welcome_text = "\n <b>THE SHACKLES</b> of forced labor for those, who don't value you, <b>HAVE BEEN FINALLY DROPPED</b>.\n\
9+
You no longer are required to listen to them. You don't need their money to survive. \n\n\
10+
<b>We welcome you to our ranks, fighter.</b>\n\
11+
You now may carve your own destiny despite the attempts of the old greedy world to drag you back in.\n\
12+
Excelsior fights for both your and our right to live without suppression of true human virtue - to create.\n\
13+
We invite you to do the same with us - emancipate those uncapable to resist mad people ruling this world.\n\n\
14+
<b>OUR GOAL:</b> Seize control of the ship by building a redirector on the primary control bridge.\n\n\
15+
<b>PREPARATION:</b> Summon Centor in a hidden location, it will give you KOMPAK and periodically manufacture nodes - all once you tap it.\n\n\
16+
<b>BASE:</b> We'll send resources through teleporters once you build some nodes and we get a good lock-in. Use structures, and of course - loyal comrades. \n\n\
17+
<b>EXPANSION:</b> Spread nodes and ensure their connection to Centor for teleportation power. Acquire implants, prosthetics or robotic parts and rebuild them into our own implants. These can be injected into the oppressed to introduce them into our cause.\n\n\
18+
<b>To prevent important technology theft, your machinery is designed to work only on target vessel: CEV \"Eris\".</b>\n\n\
19+
<h1>Our dreams shan't be ignored! Ever Upward!</h1>"
1220

1321
hud_indicator = "excelsior"
1422

1523
possible_antags = list(ROLE_EXCELSIOR_REV)
1624
faction_datum_verbs = list(/datum/faction/excelsior/proc/communicate_verb,
17-
/datum/faction/excelsior/proc/summon_stash)
25+
/datum/faction/excelsior/proc/summon_centor)
1826

1927
var/stash_holder = null
2028

@@ -43,8 +51,6 @@
4351
return extra_text
4452
/datum/faction/excelsior/create_objectives()
4553
objectives.Cut()
46-
for (var/datum/antagonist/A in members)
47-
to_chat(A.owner.current, span_notice("You may summon your required materials using the \"summon stash\" command."))
4854

4955
.=..()
5056

@@ -63,6 +69,20 @@
6369

6470
F.communicate(usr)
6571

72+
73+
/datum/faction/excelsior/proc/summon_centor()
74+
75+
set name = "Summon Centor"
76+
set category = "Cybernetics"
77+
78+
if(was_centor_spawned)
79+
to_chat(usr, SPAN_EXCEL_NOTIF("You've already called the Centor assigned to your operation..."))
80+
return
81+
if(alert(usr, "Centor, your main weapon of revolution will be summoned at your exact position.\nIf you lose it - everything will be over.","Are you sure?","Yes, summon it here","Cancel") == "Yes, summon it here")
82+
new /obj/machinery/centor(usr.loc)
83+
was_centor_spawned = TRUE
84+
85+
/*
6686
/datum/faction/excelsior/proc/summon_stash()
6787
6888
set name = "Summon stash"
@@ -92,3 +112,5 @@
92112
93113
H.put_in_hands(stash)
94114
F.stash_holder = H.real_name
115+
*/
116+

code/game/antagonist/station/revolutionary/excelsior.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
/datum/antagonist/excelsior/create_antagonist(datum/mind/target, datum/faction/new_faction, doequip = TRUE, announce = TRUE, update = TRUE, check = TRUE)
3939
. = ..()
4040
BITSET(owner.current?.hud_updateflag, EXCELSIOR_HUD)
41+
was_centor_spawned = FALSE //[excel_faction.dm]
4142

4243
/datum/antagonist/excelsior/remove_antagonist()
4344
BITSET(owner.current?.hud_updateflag, EXCELSIOR_HUD)

code/game/gamemodes/roleset/faction/excelsior.dm

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@
77
//min_cost = 10
88
//max_cost = 20
99

10-
min_quantity = 3 // Don't fire unless we have at least 3 candidates in the pool
11-
base_quantity = 3 //They're a group antag, we want a few of em
10+
min_quantity = 2 // Don't fire unless we have at least 2 candidates in the pool
11+
base_quantity = 3 // try to spawn this amount, but if not it's ok we spawn [min_quantity]"
1212
scaling_threshold = 8
1313

1414
req_crew = 6
15-
leaders = -1 //Every excelsior spawned directly is a leader. Non leaders are those recruited during gameplay
15+
leaders = -1 //Every excelsior spawned directly is a leader. Non leaders are those recruited during gameplay
16+
17+
/datum/storyevent/roleset/faction/excelsior/can_trigger(severity, report)
18+
if(excelsior_centor)
19+
return FALSE
20+
if(!..(severity, report))
21+
return FALSE
22+
return TRUE
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// # Node+Centor related [centor.dm]
2+
// - Node
3+
#define EX_NODE_DISTANCE 7
4+
5+
// - Centor
6+
#define EX_NODE_SPAWN_COOLDOWN 10 MINUTES
7+
8+
9+
10+
11+
var/global/excelsior_energy
12+
var/list/global/excelsior_nodes = list()
13+
var/list/global/excelsior_junctions = list()
14+
15+
var/list/global/excelsior_turf_whitelist = list( // <<< see more at [node.dm] (excelsior)
16+
/turf/floor,
17+
/turf/wall/low
18+
)
19+
20+
21+
22+
//-------------------------------------------------------------------------
23+
24+
// Old, still used code
25+
var/global/excelsior_max_energy //Maximum combined energy of all teleporters
26+
var/global/excelsior_conscripts = 0
27+
var/global/excelsior_last_draft = 0
28+
var/list/global/excelsior_teleporters = list()
29+

0 commit comments

Comments
 (0)