Skip to content

Commit

Permalink
Merge branch 'master' into translate
Browse files Browse the repository at this point in the history
  • Loading branch information
Legendaxe committed Mar 17, 2024
2 parents ca24764 + 6e004f5 commit 0504563
Show file tree
Hide file tree
Showing 98 changed files with 1,494 additions and 1,169 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/merge_upstream_master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Merge Upstream Master
on:
issue_comment:
types: [created]

jobs:
merge-upstream:
if: ${{ github.event.issue.pull_request && github.event.comment.body == '!merge_upstream' }}
runs-on: ubuntu-latest
steps:
- name: PR Data
run: |
curl -H "Authorization: token ${{ github.token }}" ${{ github.event.issue.pull_request.url }} > pr.json
echo "PR_REPO=`jq -r '.head.repo.full_name' < pr.json`" >> $GITHUB_ENV
echo "PR_BRANCH=`jq -r '.head.ref' < pr.json`" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
repository: ${{ env.PR_REPO }}
ref: ${{ env.PR_BRANCH }}
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Perform Merge
run: |
chmod +x tools/bootstrap/python
bash tools/hooks/install.sh
bash tgui/bin/tgui --install-git-hooks
chmod +x tools/hooks/*.merge tgui/bin/tgui
git config user.name github-actions
git config user.email [email protected]
git remote add upstream "https://github.com/${{ github.repository }}.git"
git fetch upstream master
git merge upstream/master && git push origin
- name: Notify Failure
if: failure()
run: |
curl -s -H "Authorization: token ${{ github.token }}" \
-X POST -d '{"body": "Merging upstream failed:\nhttps://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}' \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments"
11 changes: 7 additions & 4 deletions code/__DEFINES/cult_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define RUNE_COLOR_EMP "#4D94FF"
#define RUNE_COLOR_SUMMON "#00FF00"

#define is_sacrifice_target(A) SSticker.mode?.cult_objs.is_sac_target(A)
#define IS_SACRIFICE_TARGET(A) SSticker?.mode?.cult_team?.is_sac_target(A)

// Blood magic
/// Maximum number of spells with an empowering rune
Expand Down Expand Up @@ -42,9 +42,6 @@
#define DEFAULT_TOOLTIP "6:-29,5:-2"

// Text
#define CULT_GREETING "<span class='cultlarge'>You catch a glimpse of the Realm of [SSticker.cultdat.entity_name], [SSticker.cultdat.entity_title3]. \
You now see how flimsy the world is, you see that it should be open to the knowledge of [SSticker.cultdat.entity_name].</span>"

#define CULT_CURSES list("Заправщик шаттла только что перерезал себе горло и умолял о смерти.",\
"Навигационная программа шаттла была заменена файлом, содержащим два слова: «ОНО ИДЁТ».",\
"Уборщик шаттла вырвал свои кишки и начал рисовать странные фигуры на полу.",\
Expand All @@ -66,3 +63,9 @@
#define NARSIE_NEEDS_SUMMONING 2
#define NARSIE_HAS_RISEN 3
#define NARSIE_HAS_FALLEN -1

/// Safely accesses SSticker.cult_data, returns the default if cult data is not set up yet. Allows for both variable and proc call access.
#define GET_CULT_DATA(var_or_proc, default) (SSticker.cult_data ? SSticker.cult_data.var_or_proc : default)

/// Checks that the given element is living an has a cult antag datum
#define IS_CULTIST(mob) (isliving(mob) && mob?:mind?:has_antag_datum(/datum/antagonist/cultist)) // for someone TODO, move all antag checks over to TG's `IS_TRAITOR` defines. Also remove `isliving()` from this call someday
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@
#define COMSIG_AIRLOCK_CLOSE "airlock_close"

// /datum/objective signals
///from datum/objective/proc/find_target()
///from datum/objective/proc/find_target(list/target_blacklist)
#define COMSIG_OBJECTIVE_TARGET_FOUND "objective_target_found"
///from datum/objective/is_invalid_target()
#define COMSIG_OBJECTIVE_CHECK_VALID_TARGET "objective_check_valid_target"
Expand Down
24 changes: 13 additions & 11 deletions code/__DEFINES/gamemode.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
//objective defines
#define TARGET_INVALID_IS_OWNER 1
#define TARGET_INVALID_NOT_HUMAN 2
#define TARGET_INVALID_DEAD 3
#define TARGET_INVALID_NOCKEY 4
#define TARGET_INVALID_UNREACHABLE 5
#define TARGET_INVALID_GOLEM 6
#define TARGET_INVALID_EVENT 7
#define TARGET_INVALID_IS_TARGET 8
#define TARGET_INVALID_BLACKLISTED 9
#define TARGET_INVALID_CHANGELING 10
#define TARGET_INVALID_NOTHEAD 11
#define TARGET_INVALID_IS_OWNER 1
#define TARGET_INVALID_NOT_HUMAN 2
#define TARGET_INVALID_DEAD 3
#define TARGET_INVALID_NOCKEY 4
#define TARGET_INVALID_UNREACHABLE 5
#define TARGET_INVALID_GOLEM 6
#define TARGET_INVALID_EVENT 7
#define TARGET_INVALID_IS_TARGET 8
#define TARGET_INVALID_BLACKLISTED 9
#define TARGET_INVALID_CHANGELING 10
#define TARGET_INVALID_NOTHEAD 11
#define TARGET_INVALID_CULTIST 12
#define TARGET_INVALID_CULT_CONVERTABLE 13

//gamemode istype helpers
#define GAMEMODE_IS_CULT (SSticker && istype(SSticker.mode, /datum/game_mode/cult))
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/misc_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -690,3 +690,7 @@ do { \

#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) (new /datum/point_precise/vector(ATOM, null, null, null, null, ANGLE, SPEED))
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) (new /datum/point_precise/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT))

#define TEAM_ADMIN_ADD_OBJ_SUCCESS (1<<0)
#define TEAM_ADMIN_ADD_OBJ_CANCEL_LOG (1<<1)
#define TEAM_ADMIN_ADD_OBJ_PURPOSEFUL_CANCEL (1<<2)
1 change: 1 addition & 0 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)

/mob/dview/New() //For whatever reason, if this isn't called, then BYOND will throw a type mismatch runtime when attempting to add this to the mobs list. -Fox
SHOULD_CALL_PARENT(FALSE)
return

/mob/dview/Destroy()
SHOULD_CALL_PARENT(FALSE)
Expand Down
5 changes: 5 additions & 0 deletions code/controllers/controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
var/name

/datum/controller/proc/Initialize()
return

//cleanup actions
/datum/controller/proc/Shutdown()
return

//when we enter dmm_suite.load_map
/datum/controller/proc/StartLoadingMap()
return

//when we exit dmm_suite.load_map
/datum/controller/proc/StopLoadingMap()
return

/datum/controller/proc/Recover()
return

/datum/controller/proc/stat_entry(msg)
SHOULD_CALL_PARENT(TRUE)
Expand Down
1 change: 1 addition & 0 deletions code/controllers/subsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@
//usually called via datum/controller/subsystem/New() when replacing a subsystem (i.e. due to a recurring crash)
//should attempt to salvage what it can from the old instance of subsystem
/datum/controller/subsystem/Recover()
return

/datum/controller/subsystem/vv_edit_var(var_name, var_value)
switch(var_name)
Expand Down
7 changes: 4 additions & 3 deletions code/controllers/subsystem/SSticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ SUBSYSTEM_DEF(ticker)
var/Bible_name
/// Name of the bible deity
var/Bible_deity_name
/// Cult data. Here instead of cult for adminbus purposes
var/datum/cult_info/cultdat = null
/// Cult static info, used for things like sprites. Someone should refactor the sprites out of it someday and just use SEPERATE ICONS DEPNDING ON THE TYPE OF CULT... like a sane person
var/datum/cult_info/cult_data
/// If set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders
var/random_players = FALSE
/// Did we broadcast the tip of the round yet?
Expand Down Expand Up @@ -159,7 +159,8 @@ SUBSYSTEM_DEF(ticker)
reboot_helper("Round ended.", "proper completion")

/datum/controller/subsystem/ticker/proc/setup()
cultdat = setupcult()
var/random_cult = pick(typesof(/datum/cult_info))
cult_data = new random_cult()
score = new()

// Create and announce mode
Expand Down
5 changes: 4 additions & 1 deletion code/datums/ai_laws_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
law.delete_law(src)

/datum/ai_law/proc/delete_law(datum/ai_laws/laws)
return

/datum/ai_law/zero/delete_law(datum/ai_laws/laws)
laws.clear_zeroth_laws()
Expand Down Expand Up @@ -245,6 +246,7 @@
return law.get_state_law(src)

/datum/ai_law/proc/get_state_law(datum/ai_laws/laws)
return

/datum/ai_law/zero/get_state_law(datum/ai_laws/laws)
if(src == laws.zeroth_law)
Expand All @@ -271,7 +273,8 @@
/datum/ai_laws/proc/set_state_law(datum/ai_law/law, state)
law.set_state_law(src, state)

/datum/ai_law/proc/set_state_law(datum/ai_law/law, state)
/datum/ai_law/proc/set_state_law(datum/ai_laws/laws, state)
return

/datum/ai_law/zero/set_state_law(datum/ai_laws/laws, state)
if(src == laws.zeroth_law)
Expand Down
60 changes: 34 additions & 26 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
var/miming = 0 // Mime's vow of silence
/// A list of all the antagonist datums that the player is (does not include undatumized antags)
var/list/antag_datums
/// A lazy list of all teams the player is part of but doesnt have an antag role for, (i.e. a custom admin team)
// var/list/teams // SS220 EDIT - Commented for #840

var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
Expand Down Expand Up @@ -165,13 +167,6 @@
var/mob/living/carbon/human/H = new_character
if(H.mind in SSticker.mode.syndicates)
SSticker.mode.update_synd_icons_added()
if(H.mind in SSticker.mode.cult)
SSticker.mode.update_cult_icons_added(H.mind) // Adds the cult antag hud
SSticker.mode.add_cult_actions(H.mind) // And all the actions
if(SSticker.mode.cult_risen)
SSticker.mode.rise(H)
if(SSticker.mode.cult_ascendant)
SSticker.mode.ascend(H)

/datum/mind/proc/store_memory(new_text)
memory += "[new_text]<br>"
Expand Down Expand Up @@ -235,6 +230,13 @@
for(var/datum/antagonist/A as anything in antag_datums)
if(A.has_antag_objectives(include_team)) // this checks teams also
return TRUE
// For custom non-antag role teams
// SS220 EDIT START - Commented for #840
// if(include_team && LAZYLEN(teams))
// for(var/datum/team/team as anything in teams)
// if(team.objective_holder.has_objectives())
// return TRUE
// SS220 EDIT END
return FALSE

/**
Expand All @@ -252,6 +254,13 @@
if(team) // have to make asure a team exists here, team?. does not work below because it will add the null to the list
all_objectives += team.objective_holder.get_objectives() // Get all of their teams' objectives

// For custom non-antag role teams
// SS220 EDIT START - Commented for #840
/* if(include_team && LAZYLEN(teams))
for(var/datum/team/team as anything in teams)
all_objectives += team.objective_holder.get_objectives() */
// SS220 EDIT END

return all_objectives

/**
Expand Down Expand Up @@ -327,7 +336,7 @@

/datum/mind/proc/memory_edit_cult(mob/living/carbon/human/H)
. = _memory_edit_header("cult")
if(src in SSticker.mode.cult)
if(has_antag_datum(/datum/antagonist/cultist))
. += "<a href='?src=[UID()];cult=clear'>no</a>|<b><font color='red'>CULTIST</font></b>"
. += "<br>Give <a href='?src=[UID()];cult=dagger'>dagger</a>|<a href='?src=[UID()];cult=runedmetal'>runedmetal</a>."
else
Expand Down Expand Up @@ -809,8 +818,7 @@
to_chat(H, "<span class='userdanger'>You somehow have become the recipient of a mindshield transplant, and it just activated!</span>")
var/datum/antagonist/rev/has_rev = has_antag_datum(/datum/antagonist/rev)
if(has_rev)
has_rev.silent = TRUE // we have some custom text, lets make the removal silent
remove_antag_datum(/datum/antagonist/rev)
remove_antag_datum(/datum/antagonist/rev, silent_removal = TRUE) // we have some custom text, lets make the removal silent
to_chat(H, "<span class='userdanger'>The nanobots in the mindshield implant remove all thoughts about being a revolutionary. Get back to work!</span>")

else if(href_list["revolution"])
Expand Down Expand Up @@ -902,27 +910,25 @@
else if(href_list["cult"])
switch(href_list["cult"])
if("clear")
if(src in SSticker.mode.cult)
SSticker.mode.remove_cultist(src)
special_role = null
if(has_antag_datum(/datum/antagonist/cultist))
remove_antag_datum(/datum/antagonist/cultist)
log_admin("[key_name(usr)] has de-culted [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-culted [key_name_admin(current)]")
if("cultist")
if(!(src in SSticker.mode.cult))
to_chat(current, CULT_GREETING)
SSticker.mode.add_cultist(src)
to_chat(current, "<span class='cultitalic'>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve [SSticker.cultdat.entity_title2] above all else. Bring It back.</span>")
log_and_message_admins("[key_name(usr)] has culted [key_name(current)]")
if(!has_antag_datum(/datum/antagonist/cultist))
add_antag_datum(/datum/antagonist/cultist)
to_chat(current, "<span class='cultitalic'>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve [GET_CULT_DATA(entity_title2, "your god")] above all else. Bring It back.</span>")
log_and_message_admins("has culted [key_name(current)]")
if("dagger")
var/mob/living/carbon/human/H = current
if(!SSticker.mode.cult_give_item(/obj/item/melee/cultblade/dagger, H))
var/datum/antagonist/cultist/cultist = has_antag_datum(/datum/antagonist/cultist)
if(!cultist.cult_give_item(/obj/item/melee/cultblade/dagger))
to_chat(usr, "<span class='warning'>Spawning dagger failed!</span>")
log_and_message_admins("[key_name(usr)] has equipped [key_name(current)] with a cult dagger")
log_and_message_admins("has equipped [key_name(current)] with a cult dagger")
if("runedmetal")
var/mob/living/carbon/human/H = current
if(!SSticker.mode.cult_give_item(/obj/item/stack/sheet/runed_metal/ten, H))
var/datum/antagonist/cultist/cultist = has_antag_datum(/datum/antagonist/cultist)
if(!cultist.cult_give_item(/obj/item/stack/sheet/runed_metal/ten))
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")
log_and_message_admins("has equipped [key_name(current)] with 10 runed metal sheets")

else if(href_list["wizard"])

Expand Down Expand Up @@ -1527,9 +1533,11 @@
* Arguments:
* * datum_type - an antag datum typepath
*/
/datum/mind/proc/remove_antag_datum(datum_type, check_subtypes = TRUE)
/datum/mind/proc/remove_antag_datum(datum_type, check_subtypes = TRUE, silent_removal = FALSE)
var/datum/antagonist/A = has_antag_datum(datum_type, check_subtypes)
qdel(A)
if(A)
A.silent |= silent_removal
qdel(A)

/**
* Removes all antag datums from the src mind.
Expand Down
2 changes: 1 addition & 1 deletion code/datums/spells/construct_spells.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
if(C.holy)
C.set_light(3, 5, LIGHT_COLOR_DARK_BLUE)
else
C.set_light(2, 3, l_color = SSticker.cultdat ? SSticker.cultdat.construct_glow : LIGHT_COLOR_BLOOD_MAGIC)
C.set_light(2, 3, l_color = GET_CULT_DATA(construct_glow, LIGHT_COLOR_BLOOD_MAGIC))

/obj/effect/proc_holder/spell/ethereal_jaunt/shift/jaunt_steam(mobloc)
return
Expand Down
12 changes: 12 additions & 0 deletions code/datums/status_effects/status_effect.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,16 @@

/datum/status_effect/proc/on_apply() //Called whenever the buff is applied; returning FALSE will cause it to autoremove itself.
return TRUE

/datum/status_effect/proc/tick() //Called every tick.
return

/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null
return

/datum/status_effect/proc/on_timeout() // Called specifically whenever the status effect expires.
return

/datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself or when a status effect with on_remove_on_mob_delete = FALSE has its mob deleted
owner.clear_alert(id)
LAZYREMOVE(owner.status_effects, src)
Expand Down Expand Up @@ -182,12 +189,16 @@
var/reset_ticks_on_stack = FALSE //resets the current tick timer if a stack is gained

/datum/status_effect/stacking/proc/threshold_cross_effect() //what happens when threshold is crossed
return

/datum/status_effect/stacking/proc/stacks_consumed_effect() //runs if status is deleted due to threshold being crossed
return

/datum/status_effect/stacking/proc/fadeout_effect() //runs if status is deleted due to being under one stack
return

/datum/status_effect/stacking/proc/stack_decay_effect() //runs every time tick() causes stacks to decay
return

/datum/status_effect/stacking/proc/on_threshold_cross()
threshold_cross_effect()
Expand All @@ -196,6 +207,7 @@
qdel(src)

/datum/status_effect/stacking/proc/on_threshold_drop()
return

/datum/status_effect/stacking/proc/can_have_status()
return owner.stat != DEAD
Expand Down
Loading

0 comments on commit 0504563

Please sign in to comment.