|
| 1 | +/singleton/canonicity |
| 2 | + /// This is the name of the canonicity type. |
| 3 | + var/name = "Round Canonicity" |
| 4 | + /// The description. Should fill in the users about the details of the round canonicity. |
| 5 | + var/desc = "This is a base type, report this to a dev if it somehow happens to be used." |
| 6 | + /// If the round itself is canon or not. Non-canon rounds are things like non-canon events, where everything is "forgotten" the next round. |
| 7 | + var/round_canon |
| 8 | + /// If antagonist actions are canon during this round. |
| 9 | + var/antagonist_actions_canon |
| 10 | + /// If character deaths are canon during this round. |
| 11 | + var/character_death_canon |
| 12 | + /// If away sites are canon or not. It's a bit more complex than just that; see the relevant defines. |
| 13 | + var/away_site_canon |
| 14 | + /// If offships are canon or not. It's a bit more complex than just that; see the relevant defines. |
| 15 | + var/offship_canon |
| 16 | + |
| 17 | +/** |
| 18 | + * This proc is automatically called on /datum/game_mode/proc/pre_game_setup(). |
| 19 | + * See that proc for details. |
| 20 | + */ |
| 21 | +/singleton/canonicity/proc/pre_game_setup() |
| 22 | + return |
| 23 | + |
| 24 | +/** |
| 25 | + * Called when someone clicks on the stat panel entry to open the canon panel TGUI. |
| 26 | + */ |
| 27 | +/singleton/canonicity/ui_interact(mob/user, datum/tgui/ui) |
| 28 | + ui = SStgui.try_update_ui(user, src, ui) |
| 29 | + if(!ui) |
| 30 | + ui = new(user, src, "CanonPanel", "Canon Panel") |
| 31 | + ui.open() |
| 32 | + |
| 33 | +/singleton/canonicity/ui_state(mob/user) |
| 34 | + return GLOB.always_state |
| 35 | + |
| 36 | +/singleton/canonicity/ui_status(mob/user, datum/ui_state/state) |
| 37 | + return UI_INTERACTIVE |
| 38 | + |
| 39 | +/singleton/canonicity/ui_static_data(mob/user) |
| 40 | + var/list/data = list() |
| 41 | + |
| 42 | + data["name"] = name |
| 43 | + data["desc"] = desc |
| 44 | + |
| 45 | + data["round_canon_info"] = round_canon_info() |
| 46 | + data["antagonist_actions_canon_info"] = antagonist_actions_canon_info() |
| 47 | + data["character_death_canon_info"] = character_death_canon_info() |
| 48 | + data["away_site_canon_info"] = away_site_canon_info() |
| 49 | + data["offship_canon_info"] = offship_canon_info() |
| 50 | + |
| 51 | + data["is_storyteller"] = isstoryteller(user) |
| 52 | + data["is_admin"] = check_rights(R_ADMIN, FALSE, user) |
| 53 | + |
| 54 | + return data |
| 55 | + |
| 56 | +/singleton/canonicity/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) |
| 57 | + . = ..() |
| 58 | + switch(action) |
| 59 | + if("edit_round_canon_type") |
| 60 | + var/singleton/canonicity/canon_types = GET_SINGLETON_SUBTYPE_LIST(/singleton/canonicity) |
| 61 | + var/singleton/canonicity/selected_canon = tgui_input_list(ui.user, "Select a new canonicity for this round.", "Canon Panel", canon_types) |
| 62 | + if(istype(selected_canon)) |
| 63 | + var/changer = ui.user |
| 64 | + SSticker.set_round_canon(selected_canon.type, FALSE, TRUE) |
| 65 | + SStgui.close_all_uis(src) |
| 66 | + message_admins(SPAN_DANGER("[changer] has changed the round canonicity to [SSticker.round_canon.name].")) |
| 67 | + |
| 68 | +/singleton/canonicity/proc/round_canon_info() |
| 69 | + . = list() |
| 70 | + switch(round_canon) |
| 71 | + if(ROUND_FULL_CANON) |
| 72 | + . += "This round is canon. All actions taken by non-antagonists during this round are considered canon." |
| 73 | + if(ROUND_NON_CANON) |
| 74 | + . += "This round is non-canon. All actions taken during this round are considered non-canon." |
| 75 | + |
| 76 | +/singleton/canonicity/proc/antagonist_actions_canon_info() |
| 77 | + . = list() |
| 78 | + switch(antagonist_actions_canon) |
| 79 | + if(ANTAGONIST_ACTIONS_NOT_EXPECTED) |
| 80 | + . += "Antagonist actions are not expected during this round." |
| 81 | + if(ANTAGONIST_ACTIONS_CANON) |
| 82 | + . += "Antagonist actions are canon during this round. This includes event antagonists." |
| 83 | + if(ANTAGONIST_ACTIONS_NOT_CANON) |
| 84 | + . += "Antagonist actions are not canon during this round." |
| 85 | + . += "This includes actions by non-antagonists directly influenced by antagonists." |
| 86 | + |
| 87 | +/singleton/canonicity/proc/character_death_canon_info() |
| 88 | + . = list() |
| 89 | + switch(character_death_canon) |
| 90 | + if(LIMITED_CHARACTER_DEATH) |
| 91 | + . += "Character deaths are limited during this round. If all involved parties agree, character deaths can be retconned. If you would like to contest a death, or determine if a party counts as involved, please adminhelp." |
| 92 | + . += "To count as involved, a player has to be an active participant of your death, meaning that they must have intentionally contributed to it. As an example, if you die to a carp on an expedition, you can retcon this death without asking others." |
| 93 | + if(FORCED_CHARACTER_DEATH) |
| 94 | + . += "Character deaths are forced canon during this round. All character deaths must go through headmins and loremasters to be retconned, no exceptions!" |
| 95 | + if(NO_CHARACTER_DEATH) |
| 96 | + . += "Character deaths are not canon during this round." |
| 97 | + |
| 98 | +/singleton/canonicity/proc/away_site_canon_info() |
| 99 | + . = list() |
| 100 | + switch(away_site_canon) |
| 101 | + if(AWAY_SITE_NOT_CANON) |
| 102 | + . += "Away sites are not canon this round." |
| 103 | + if(AWAY_SITE_CANON_LIMITED) |
| 104 | + . += "Away site canon is limited. This means that while it is canon that you go to an away site, the exact details of where you went are not. You can say that you went to a greimorian infested station, for example, \ |
| 105 | + but you cannot remember the same away site across rounds." |
| 106 | + if(AWAY_SITE_CANON_FULL) |
| 107 | + . += "Away sites are canon, including the exact details." |
| 108 | + |
| 109 | +/singleton/canonicity/proc/offship_canon_info() |
| 110 | + . = list() |
| 111 | + switch(offship_canon) |
| 112 | + if(OFFSHIP_NOT_CANON) |
| 113 | + . += "Offship actions are not canon during this round." |
| 114 | + if(OFFSHIP_CANON_LIMITED) |
| 115 | + . += "Offship action canon is limited. This means that offship actions are canon, barring hostile actions taken against the [SSatlas.current_map.full_name]. If anything is unclear, make sure to adminhelp." |
| 116 | + if(OFFSHIP_CANON_FULL) |
| 117 | + . += "Offship actions are canon during this round." |
| 118 | + |
| 119 | +/singleton/canonicity/extended |
| 120 | + name = "Extended Canon" |
| 121 | + desc = "This type of canonicity is in place for Extended rounds or canon events." |
| 122 | + round_canon = ROUND_FULL_CANON |
| 123 | + antagonist_actions_canon = ANTAGONIST_ACTIONS_NOT_EXPECTED |
| 124 | + character_death_canon = LIMITED_CHARACTER_DEATH |
| 125 | + away_site_canon = AWAY_SITE_CANON_LIMITED |
| 126 | + offship_canon = OFFSHIP_CANON_LIMITED |
| 127 | + |
| 128 | +/singleton/canonicity/odyssey |
| 129 | + name = "Odyssey Canon" |
| 130 | + desc = "This type of canonicity is in place for Odyssey rounds, where antagonists are present and their actions are considered canon." |
| 131 | + round_canon = ROUND_FULL_CANON |
| 132 | + antagonist_actions_canon = ANTAGONIST_ACTIONS_CANON |
| 133 | + character_death_canon = LIMITED_CHARACTER_DEATH |
| 134 | + away_site_canon = AWAY_SITE_CANON_LIMITED |
| 135 | + offship_canon = OFFSHIP_CANON_LIMITED |
| 136 | + |
| 137 | +/singleton/canonicity/limited |
| 138 | + name = "Limited Canon" |
| 139 | + desc = "This type of canonicity is in place for Secret rounds or Odysseys where the antagonist actions are not considered canon." |
| 140 | + round_canon = ROUND_FULL_CANON |
| 141 | + antagonist_actions_canon = ANTAGONIST_ACTIONS_NOT_CANON |
| 142 | + character_death_canon = LIMITED_CHARACTER_DEATH |
| 143 | + away_site_canon = AWAY_SITE_CANON_LIMITED |
| 144 | + offship_canon = OFFSHIP_CANON_LIMITED |
| 145 | + |
| 146 | +/singleton/canonicity/canon_event |
| 147 | + name = "Full Canon" |
| 148 | + desc = "This type of canonicity is in place for canon event rounds." |
| 149 | + round_canon = ROUND_FULL_CANON |
| 150 | + antagonist_actions_canon = ANTAGONIST_ACTIONS_CANON |
| 151 | + character_death_canon = FORCED_CHARACTER_DEATH |
| 152 | + away_site_canon = AWAY_SITE_CANON_FULL |
| 153 | + offship_canon = OFFSHIP_CANON_FULL |
| 154 | + |
| 155 | +/singleton/canonicity/non_canon_event |
| 156 | + name = "Non-Canon Event" |
| 157 | + desc = "This type of canonicity is in place for non-canon events." |
| 158 | + round_canon = ROUND_NON_CANON |
| 159 | + antagonist_actions_canon = ANTAGONIST_ACTIONS_NOT_CANON |
| 160 | + character_death_canon = NO_CHARACTER_DEATH |
| 161 | + away_site_canon = AWAY_SITE_NOT_CANON |
| 162 | + offship_canon = OFFSHIP_NOT_CANON |
0 commit comments