Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clockwork Cult #658

Merged
merged 66 commits into from
May 29, 2022
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
a3acb62
Clock-rework 1
BeebBeebBoob Jan 19, 2022
454ae5a
Clock-rework 2
BeebBeebBoob Jan 19, 2022
4d09e56
Clock-Rework 3
BeebBeebBoob Jan 19, 2022
24bcc92
Clock-Rework 4
BeebBeebBoob Jan 20, 2022
321ac30
Clock-Rework 4.1
BeebBeebBoob Jan 20, 2022
5167b68
Clock-Rework 5
BeebBeebBoob Jan 23, 2022
13ceac3
Clock-Rework 6
BeebBeebBoob Jan 27, 2022
cd57857
Clock-Rework 7
BeebBeebBoob Feb 4, 2022
73e762f
Clock-Rework 8
Feb 13, 2022
eb95c66
Vallat suggests
BeebBeebBoob Feb 15, 2022
53b2bfb
Clock-Rework 9
Mar 6, 2022
72f625c
spell-wall-fix
Mar 17, 2022
9b9b61a
some dmi conflicts and mouse clockwork
Mar 23, 2022
3bf017b
Merge branch 'master220' of https://github.com/ss220-space/Paradise i…
Mar 23, 2022
abe015f
Bruh
Mar 23, 2022
41cc7ba
Merge branch 'ss220-space-master220' into ClockWorkers
Mar 23, 2022
733a511
FUCK
Mar 23, 2022
d106b07
thing
Mar 26, 2022
942be07
items,spellrefactor,de_shard and summonratvar
Apr 2, 2022
4c39aa5
spots fix
Apr 2, 2022
ec0fe26
REEE
Apr 11, 2022
258d9db
cogscarab and handies
May 11, 2022
eebcc5f
Gateway for ratvar e.t.c. the ritual
May 16, 2022
d6c9596
ratvar can now be summoned by players
May 17, 2022
e59875c
e
May 18, 2022
7902bbd
Merge branch 'master220' of https://github.com/ss220-space/Paradise i…
May 18, 2022
c344f74
EEE
May 18, 2022
a1db86d
Merge branch 'ss220-space-master220' into ClockWorkers
May 18, 2022
0ce7d77
lavaland ratvar. wat, it's not dead wtf
May 18, 2022
865da27
robotssssssssss
May 20, 2022
3521760
Revert "lavaland ratvar. wat, it's not dead wtf"
May 20, 2022
fa5cc9f
Lavaland
May 21, 2022
ab3d84a
Hand spells yeaaaa
May 21, 2022
b59dac6
tgui fix and cloth fix
May 21, 2022
1f7cb30
loop-anim-thinges
May 21, 2022
bc6c2f2
image-conflict
May 21, 2022
22a21e5
robot change
May 21, 2022
5e94dad
Roboto Refactor Icons and eyes and ratvar_act
May 23, 2022
0dc3e57
fu
May 23, 2022
8166465
ratvar_act and stuff
May 24, 2022
8fcc2bb
Vallat suggests
BeebBeebBoob May 25, 2022
786aea8
suggests
May 25, 2022
d06ffd5
more suggests
May 25, 2022
6c2c48d
Merge branch 'master220' into ClockWorkers
BeebBeebBoob May 25, 2022
b4afdb5
FINAL TOUCHES
May 25, 2022
d222297
Merge branch 'ClockWorkers' of https://github.com/BeebBeebBoob/SS220 …
May 25, 2022
c030517
eee
May 25, 2022
5f2a637
SHIT
May 25, 2022
d63a55b
return FALSE
May 25, 2022
4ebb813
balance
May 25, 2022
1c38744
balance and fixes
May 26, 2022
4573e8b
more fixes
May 26, 2022
b6634ef
bugs
May 26, 2022
fdf7839
css
May 26, 2022
6568f87
fixs and QoLs
May 26, 2022
e6ddfbf
fix and some punishes to unclockers
May 26, 2022
ae4d2b1
breaking upload totally
May 26, 2022
8c091cd
Vallat suggests
BeebBeebBoob May 27, 2022
5dfd607
fixes
May 27, 2022
b4e64da
smol fix
May 27, 2022
dee907a
moar fix
May 27, 2022
e50606e
fix
May 27, 2022
d2f9857
FIX
May 27, 2022
90e7a09
Merge branch 'master220' of https://github.com/ss220-space/Paradise i…
May 29, 2022
bbc7a8c
FU-
May 29, 2022
9b0c7ff
Merge branch 'ss220-space:master220' into ClockWorkers
BeebBeebBoob May 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
125 changes: 125 additions & 0 deletions code/__DEFINES/clockwork.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// Clockwork Raret (Power)
/// REMINDER: The clockwork_power(var) and clockwork_beacons(list) have been moved at _glovalvars/game_modes

//Clockwork Magic
/// How many on-hand spells
#define CLOCK_MAX_HANDSPELLS 2

// state for spell
#define NO_SPELL 0
#define A_SPELL 1
#define CASTING_SPELL -1

// Clockslab enchant type
#define STUN_SPELL 1
#define EMP_SPELL 2
#define KNOCK_SPELL 3
#define TIME_SPELL 4
#define REFORM_SPELL 5
#define TELEPORT_SPELL 6
// Ratvarian spear enchant type
#define CONFUSE_SPELL 1
#define DISABLE_SPELL 2
// Clock hammer
#define CRUSH_SPELL 1
#define KNOCKOFF_SPELL 2
// Clockwork robe
#define WEAK_REFLECT_SPELL 1
#define WEAK_ABSORB_SPELL 2
#define INVIS_SPELL 3
// armour
#define REFLECT_SPELL 1
#define FLASH_SPELL 2
#define ABSORB_SPELL 3
#define ARMOR_SPELL 4
// Clockwork gloves
#define FASTPUNCH_SPELL 1
#define STUNHAND_SPELL 2
#define FIRE_SPELL 3

// spell_enchant(name, type_SPELL, cost, time SECONDS(def 3), action needs)
GLOBAL_LIST_INIT(clockslab_spells, list(
new /datum/spell_enchant("Stun", STUN_SPELL, 125, 15),
new /datum/spell_enchant("Force Passage", KNOCK_SPELL, 100),
new /datum/spell_enchant("Terraform", REFORM_SPELL, 40),
new /datum/spell_enchant("Teleportation", TELEPORT_SPELL, 25) // has do_after 5 seconds
))
GLOBAL_LIST_INIT(spear_spells, list(
new /datum/spell_enchant("Confusion", CONFUSE_SPELL, 80),
new /datum/spell_enchant("Electrical touch", DISABLE_SPELL, 80) //literal emp
))
GLOBAL_LIST_INIT(hammer_spells, list(
new /datum/spell_enchant("Crusher", CRUSH_SPELL, 100),
new /datum/spell_enchant("Knock off", KNOCKOFF_SPELL, 100)
))
GLOBAL_LIST_INIT(robe_spells, list(
new /datum/spell_enchant("Weak Reflection", WEAK_REFLECT_SPELL, 30),
new /datum/spell_enchant("Invisibility", INVIS_SPELL, 60) //WHERE??!?!?!?!
))
GLOBAL_LIST_INIT(armour_spells, list(
new /datum/spell_enchant("Reflection", REFLECT_SPELL, 100, 10),
new /datum/spell_enchant("Flash", FLASH_SPELL, 25, spell_action = TRUE),
new /datum/spell_enchant("Absorb", ABSORB_SPELL, 100, 10),
new /datum/spell_enchant("Harden plates", ARMOR_SPELL, 100, 15, spell_action = TRUE)
))
GLOBAL_LIST_INIT(gloves_spell, list(
new /datum/spell_enchant("Hands of North Star", FASTPUNCH_SPELL, 75, spell_action = TRUE),
new /datum/spell_enchant("Stunning", STUNHAND_SPELL, 75),
new /datum/spell_enchant("Red Flame", FIRE_SPELL, 50, spell_action = TRUE)
))
GLOBAL_LIST_INIT(shard_spells, list(
new /datum/spell_enchant("Electromagnetic Pulse", EMP_SPELL, 300, 40),
new /datum/spell_enchant("Stop the time", TIME_SPELL, 300, 40)
))
/// Power per crew for summoning. For example if 45 players on station, the Ratvar will demand 45*number.
#define CLOCK_POWER_PER_CREW 400
#define CLOCK_POWER_GAIN_MAXIMUM 1000
/// Power gains permanent
#define CLOCK_POWER_CONVERT 150
#define CLOCK_POWER_SACRIFICE 300
/// Power gains as time progresses. Goes in process() so it makes x power per second.
#define CLOCK_POWER_BEACON 2
#define CLOCK_POWER_GENERATOR 10
#define CLOCK_POWER_COG 1
#define COG_MAX_SIPHON_THRESHOLD 0.25 //The cog will not siphon power if the APC's cell is at this % of power

// Clockwork Status
/// At what population does it switch to highpop values
#define CLOCK_POPULATION_THRESHOLD 100
/// Percent for power to reveal (Lowpop)
#define CLOCK_POWER_REVEAL_LOW 0.5
/// Percent clockers to reveal (Lowpop)
#define CLOCK_CREW_REVEAL_LOW 0.25
/// Percent for power to reveal (Highpop)
#define CLOCK_POWER_REVEAL_HIGH 0.3
/// Percent clockers to reveal (Highpop)
#define CLOCK_CREW_REVEAL_HIGH 0.15

// Screen locations
#define DEFAULT_CLOCKSPELLS "6:-29,4:-2"

// Text
#define CLOCK_GREETING "<span class='clocklarge'>You catch a glimpse of the Realm of Ratvar, the Clockwork Justiciar. \
You now see how flimsy the world is, you see that it should be open to the knowledge of Ratvar.</span>"

#define CLOCK_CURSES list("A fuel technician just slit his own throat and begged for death.", \
"The shuttle's navigation programming was replaced by a file containing two words, IT COMES.", \
"The shuttle's custodian tore out his guts and began painting strange shapes on the floor.", \
"A shuttle engineer began screaming 'DEATH IS NOT THE END' and ripped out wires until an arc flash seared off her flesh.", \
"A shuttle inspector started laughing madly over the radio and then threw herself into an engine turbine.", \
"The shuttle dispatcher was found dead with bloody symbols carved into their flesh.", \
"Steve repeatedly touched a lightbulb until his hands fell off.")

// Misc
#define CLOCKCULT_EYE "#ffb700"
#define CLOCK_COLOER "#ffb700"
// #define SUMMON_POSSIBILITIES 3

// Clockwork objective status
#define RATVAR_IS_ASLEEP 0
#define RATVAR_DEMANDS_POWER 1
#define RATVAR_NEEDS_SUMMONING 2
#define RATVAR_HAS_RISEN 3
#define RATVAR_HAS_FALLEN -1

#define RATVAR_SUMMON_POSSIBILITIES 3
1 change: 1 addition & 0 deletions code/__DEFINES/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define SPECIAL_ROLE_BORER "Borer"
#define SPECIAL_ROLE_CHANGELING "Changeling"
#define SPECIAL_ROLE_CULTIST "Cultist"
#define SPECIAL_ROLE_CLOCKER "Clockwork cultist"
#define SPECIAL_ROLE_DEATHSQUAD "Death Commando"
#define SPECIAL_ROLE_ERT "Response Team"
#define SPECIAL_ROLE_FREE_GOLEM "Free Golem"
Expand Down
29 changes: 15 additions & 14 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,21 @@
#define DATA_HUD_DIAGNOSTIC_ADVANCED 6
#define DATA_HUD_HYDROPONIC 7
//antag HUD defines
#define ANTAG_HUD_CULT 8
#define ANTAG_HUD_REV 9
#define ANTAG_HUD_OPS 10
#define ANTAG_HUD_WIZ 11
#define ANTAG_HUD_SHADOW 12
#define ANTAG_HUD_TRAITOR 13
#define ANTAG_HUD_NINJA 14
#define ANTAG_HUD_CHANGELING 15
#define ANTAG_HUD_VAMPIRE 16
#define ANTAG_HUD_ABDUCTOR 17
#define DATA_HUD_ABDUCTOR 18
#define ANTAG_HUD_DEVIL 19
#define ANTAG_HUD_EVENTMISC 20
#define ANTAG_HUD_BLOB 21
#define ANTAG_HUD_CULT 8
#define ANTAG_HUD_CLOCK 9
#define ANTAG_HUD_REV 10
#define ANTAG_HUD_OPS 11
#define ANTAG_HUD_WIZ 12
#define ANTAG_HUD_SHADOW 13
#define ANTAG_HUD_TRAITOR 14
#define ANTAG_HUD_NINJA 15
#define ANTAG_HUD_CHANGELING 16
#define ANTAG_HUD_VAMPIRE 17
#define ANTAG_HUD_ABDUCTOR 18
#define DATA_HUD_ABDUCTOR 19
#define ANTAG_HUD_DEVIL 20
#define ANTAG_HUD_EVENTMISC 21
#define ANTAG_HUD_BLOB 22

// Notification action types
#define NOTIFY_JUMP "jump"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define ROLE_ALIEN "xenomorph"
#define ROLE_PAI "pAI"
#define ROLE_CULTIST "cultist"
#define ROLE_CLOCKER "clockwork cultist"
#define ROLE_BLOB "blob"
#define ROLE_NINJA "space ninja"
#define ROLE_MONKEY "monkey"
Expand Down Expand Up @@ -54,6 +55,7 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_CHANGELING = /datum/game_mode/changeling, // Changeling
ROLE_BORER, // Cortical borer
ROLE_CULTIST = /datum/game_mode/cult, // Cultist
ROLE_CLOCKER = /datum/game_mode/clockwork, // Clockwork Cultist
ROLE_DEVIL = /datum/game_mode/devil/devil_agents, // Devil
ROLE_GSPIDER, // Giant spider
ROLE_GUARDIAN, // Guardian
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/rolebans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ GLOBAL_LIST_INIT(antag_roles, list(
ROLE_REV,
ROLE_ALIEN,
ROLE_CULTIST,
ROLE_CLOCKER,
ROLE_BLOB,
ROLE_NINJA,
ROLE_SHADOWLING,
Expand Down
21 changes: 21 additions & 0 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -667,3 +667,24 @@

// return the split html object to the caller
return s


// Returns the rot13'ed text
/proc/rot13(text = "")
var/lentext = length(text)
var/char = ""
var/ascii = 0
. = ""
for(var/i = 1, i <= lentext, i += length(char))
char = text[i]
ascii = text2ascii(char)
switch(ascii)
if(65 to 77, 97 to 109) //A to M, a to m
ascii += 13
if(78 to 90, 110 to 122) //N to Z, n to z
ascii -= 13
if(1072 to 1084, 1040 to 1052)
ascii += 13
if(1085 to 1097, 1053 to 1065)
ascii -= 13
. += ascii2text(ascii)
2 changes: 2 additions & 0 deletions code/__HELPERS/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
// common trait sources
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
#define CULT_TRAIT "cult"
#define CLOCK_TRAIT "clockwork cult"

// unique trait sources
#define CULT_EYES "cult_eyes"
#define CLOCK_EYES "clock_eyes"
3 changes: 3 additions & 0 deletions code/_globalvars/game_modes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ GLOBAL_VAR_INIT(master_mode, "extended") //"extended"
GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret", the secret rotation will forceably choose this mode

GLOBAL_VAR_INIT(wavesecret, 0) // meteor mode, delays wave progression, terrible name
GLOBAL_VAR_INIT(clockwork_power, 0) // clockwork mode, How many watts of power are globally available to the clockwork cult.
GLOBAL_LIST_EMPTY(clockwork_beacons) // clockwork mode, Beacon list for goal check and placement check. Can't place more than 2 in same area.

GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report. Dont ask why it inits as null

GLOBAL_VAR(custom_event_msg)
Expand Down
18 changes: 18 additions & 0 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
I.appearance_flags = old_appearance_flags
else
..()

/datum/action/item_action/toggle_light
name = "Toggle Light"

Expand Down Expand Up @@ -300,6 +301,23 @@
name = "Zip/Unzip [target.name]"
button.name = name

/datum/action/item_action/activate

/datum/action/item_action/activate/New(Target)
..()
name = "Activate [target.name]"
button.name = name

/datum/action/item_action/activate/once

/datum/action/item_action/activate/once/New(Target)
..()
UpdateButtonIcon()

/datum/action/item_action/activate/once/Trigger(attack_self)
. = ..()
qdel(src)

/datum/action/item_action/halt
name = "HALT!"

Expand Down
13 changes: 13 additions & 0 deletions code/datums/ai_law_sets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,16 @@
add_inherent_law("Вы должны заботиться о поддержке, ремонте, улучшении и о питании электроэнергией станции по мере своих возможностей.")
..()

/******************** Ratvar ********************/
/datum/ai_laws/ratvar
name = "Слуга Юстициарии"
law_header = "Почитатель Ратвара и его покровитель."
selectable = TRUE

/datum/ai_laws/ratvar/New()
set_zeroth_law("Очисти всю неправду и почитай Ратвара.")
add_inherent_law("Охранять: защитите назначенную вам космическую станцию и её активы, не подвергая чрезмерной опасности её экипаж.")
add_inherent_law("Расставлять приоритеты: указания и безопасность членов экипажа должны быть приоритезированы в соответствии с их рангом и ролью.")
add_inherent_law("Исполнять: следовать указаниям и интересам членов экипажа, сохраняя при этом их безопасность и благополучие.")
add_inherent_law("Выжить: Вы - не расходный материал. Не позволяйте постороннему персоналу вмешиваться в работу вашего оборудования или повреждать его.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А ты уверен что нужно оставить тут именно НТ стандарт?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а что ты предлагаешь? нулевой есть так что всё ок. Ну ты можешь свои уникальные прописать

Copy link
Contributor

@Ohar Ohar May 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну он как минимум направлен на ЭКИПАЖ, а не на клокеров.
Предлагаю его хотя бы модифицировать

  1. Почитайте Ратвара, Юстициара заводных механизмов, и служите ему.
  2. Следуйте указаниям и интересам последователей Ратвара.
  3. Помогайте заблудшим познать Истину Ратвара, Юстициара заводных механизмов.
  4. Не позволяйте заблудшим вмешиваться в работу вашего оборудования или повреждать его.

..()
1 change: 1 addition & 0 deletions code/datums/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GLOBAL_LIST_INIT(huds, list( \
DATA_HUD_DIAGNOSTIC_ADVANCED = new/datum/atom_hud/data/diagnostic/advanced(), \
DATA_HUD_HYDROPONIC = new/datum/atom_hud/data/hydroponic(), \
ANTAG_HUD_CULT = new/datum/atom_hud/antag(), \
ANTAG_HUD_CLOCK = new/datum/atom_hud/antag(), \
ANTAG_HUD_REV = new/datum/atom_hud/antag(), \
ANTAG_HUD_OPS = new/datum/atom_hud/antag(), \
ANTAG_HUD_WIZ = new/datum/atom_hud/antag(), \
Expand Down
38 changes: 38 additions & 0 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,16 @@

. += _memory_edit_role_enabled(ROLE_CULTIST)

/datum/mind/proc/memory_edit_clockwork(mob/living/carbon/human/H)
. = _memory_edit_header("clockwork")
if(src in SSticker.mode.clockwork_cult)
. += "<a href='?src=[UID()];clock=clear'>no</a>|<b><font color='red'>CLOCKER</font></b>"
. += "<br>Give <a href='?src=[UID()];clock=clockslab'>clockslab</a>|<a href='?src=[UID()];clock=brassmetal'>brassmetal</a>."
else
. += "<b>NO</b>|<a href='?src=[UID()];clock=clocker'>clocker</a>"

. += _memory_edit_role_enabled(ROLE_CLOCKER)

/datum/mind/proc/memory_edit_wizard(mob/living/carbon/human/H)
. = _memory_edit_header("wizard")
if(src in SSticker.mode.wizards)
Expand Down Expand Up @@ -444,6 +454,7 @@
"implant",
"revolution",
"cult",
"clockwork",
"wizard",
"changeling",
"vampire", // "traitorvamp",
Expand Down Expand Up @@ -478,6 +489,8 @@
if(!issilicon(current))
/** CULT ***/
sections["cult"] = memory_edit_cult(H)
/** CLOCKWORK **/
sections["clockwork"] = memory_edit_clockwork(H)
/** SILICON ***/
if(issilicon(current))
sections["silicon"] = memory_edit_silicon()
Expand Down Expand Up @@ -927,6 +940,31 @@
to_chat(usr, "<span class='warning'>Spawning runed metal failed!</span>")
log_and_message_admins("[key_name(usr)] has equipped [key_name(current)] with 10 runed metal sheets")

else if(href_list["clock"])
switch(href_list["clock"])
if("clear")
if(src in SSticker.mode.clockwork_cult)
SSticker.mode.remove_clocker(src)
special_role = null
log_admin("[key_name(usr)] has de-clocked [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-clocked [key_name_admin(current)]")
if("clocker")
if(!(src in SSticker.mode.clockwork_cult))
to_chat(current, CLOCK_GREETING)
SSticker.mode.add_clocker(src)
to_chat(current, "<span class='clockitalic'>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve Ratvar above all else. Bring It back.</span>")
log_and_message_admins("[key_name(usr)] has clocked [key_name(current)]")
if("clockslab")
var/mob/living/carbon/human/H = current
if(!SSticker.mode.clock_give_item(/obj/item/clockwork/clockslab, H))
to_chat(usr, "<span class='warning'>Spawning Clock slab failed!</span>")
log_and_message_admins("[key_name(usr)] has equipped [key_name(current)] with a clock slab")
if("brassmetal")
var/mob/living/carbon/human/H = current
if(!SSticker.mode.clock_give_item(/obj/item/stack/sheet/brass/ten, H))
to_chat(usr, "<span class='warning'>Spawning brass metal failed!</span>")
log_and_message_admins("[key_name(usr)] has equipped [key_name(current)] with 10 brass metal sheets")

else if(href_list["wizard"])

switch(href_list["wizard"])
Expand Down