mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 10:35:41 +01:00
Grep for space indentation (#54850)
#54604 atomizing Since a lot of the space indents are in lists ill atomize those later
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Datum which holds details of a running poll loaded from the database and supplementary info.
|
||||
*
|
||||
* Used to minimize the need for querying this data every time it's needed.
|
||||
*
|
||||
*/
|
||||
* Datum which holds details of a running poll loaded from the database and supplementary info.
|
||||
*
|
||||
* Used to minimize the need for querying this data every time it's needed.
|
||||
*
|
||||
*/
|
||||
/datum/poll_question
|
||||
///Reference list of the options for this poll, not used by text response polls.
|
||||
var/list/options = list()
|
||||
@@ -41,11 +41,11 @@
|
||||
var/future_poll
|
||||
|
||||
/**
|
||||
* Datum which holds details of a poll option loaded from the database.
|
||||
*
|
||||
* Used to minimize the need for querying this data every time it's needed.
|
||||
*
|
||||
*/
|
||||
* Datum which holds details of a poll option loaded from the database.
|
||||
*
|
||||
* Used to minimize the need for querying this data every time it's needed.
|
||||
*
|
||||
*/
|
||||
/datum/poll_option
|
||||
///Reference to the poll this option belongs to
|
||||
var/datum/poll_question/parent_poll
|
||||
@@ -67,9 +67,9 @@
|
||||
var/default_percentage_calc
|
||||
|
||||
/**
|
||||
* Shows a list of all current and future polls and buttons to edit or delete them or create a new poll.
|
||||
*
|
||||
*/
|
||||
* Shows a list of all current and future polls and buttons to edit or delete them or create a new poll.
|
||||
*
|
||||
*/
|
||||
/datum/admins/proc/poll_list_panel()
|
||||
var/list/output = list("Current and future polls<br>Note when editing polls or their options changes are not saved until you press Submit Poll.<br><a href='?_src_=holder;[HrefToken()];newpoll=1'>New Poll</a><a href='?_src_=holder;[HrefToken()];reloadpolls=1'>Reload Polls</a><hr>")
|
||||
for(var/p in GLOB.polls)
|
||||
@@ -91,9 +91,9 @@
|
||||
panel.open()
|
||||
|
||||
/**
|
||||
* Show the options for creating a poll or editing its parameters along with its linked options.
|
||||
*
|
||||
*/
|
||||
* Show the options for creating a poll or editing its parameters along with its linked options.
|
||||
*
|
||||
*/
|
||||
/datum/admins/proc/poll_management_panel(datum/poll_question/poll)
|
||||
var/list/output = list("<form method='get' action='?src=[REF(src)]'>[HrefTokenFormField()]")
|
||||
output += {"<input type='hidden' name='src' value='[REF(src)]'>Poll type
|
||||
@@ -235,12 +235,12 @@
|
||||
panel.open()
|
||||
|
||||
/**
|
||||
* Processes topic data from poll management panel.
|
||||
*
|
||||
* Reads through returned form data and assigns data to the poll datum, creating a new one if required, before passing it to be saved.
|
||||
* Also does some simple error checking to ensure the poll will be valid before creation.
|
||||
*
|
||||
*/
|
||||
* Processes topic data from poll management panel.
|
||||
*
|
||||
* Reads through returned form data and assigns data to the poll datum, creating a new one if required, before passing it to be saved.
|
||||
* Also does some simple error checking to ensure the poll will be valid before creation.
|
||||
*
|
||||
*/
|
||||
/datum/admins/proc/poll_parse_href(list/href_list, datum/poll_question/poll)
|
||||
if(!check_rights(R_POLL))
|
||||
return
|
||||
@@ -344,12 +344,12 @@
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Sets a poll and its associated data as deleted in the database.
|
||||
*
|
||||
* Calls the procedure set_poll_deleted to set the deleted column to 1 for each row in the poll_ tables matching the poll id used.
|
||||
* Then deletes each option datum and finally the poll itself.
|
||||
*
|
||||
*/
|
||||
* Sets a poll and its associated data as deleted in the database.
|
||||
*
|
||||
* Calls the procedure set_poll_deleted to set the deleted column to 1 for each row in the poll_ tables matching the poll id used.
|
||||
* Then deletes each option datum and finally the poll itself.
|
||||
*
|
||||
*/
|
||||
/datum/poll_question/proc/delete_poll()
|
||||
if(!check_rights(R_POLL))
|
||||
return
|
||||
@@ -371,14 +371,14 @@
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
* Inserts or updates a poll question to the database.
|
||||
*
|
||||
* Uses INSERT ON DUPLICATE KEY UPDATE to handle both inserting and updating at once.
|
||||
* The start and end datetimes and poll id for new polls is then retrieved for the poll datum.
|
||||
* Arguments:
|
||||
* * clear_votes - When true will call clear_poll_votes() to delete all votes matching this poll id.
|
||||
*
|
||||
*/
|
||||
* Inserts or updates a poll question to the database.
|
||||
*
|
||||
* Uses INSERT ON DUPLICATE KEY UPDATE to handle both inserting and updating at once.
|
||||
* The start and end datetimes and poll id for new polls is then retrieved for the poll datum.
|
||||
* Arguments:
|
||||
* * clear_votes - When true will call clear_poll_votes() to delete all votes matching this poll id.
|
||||
*
|
||||
*/
|
||||
/datum/poll_question/proc/save_poll_data(clear_votes)
|
||||
if(!check_rights(R_POLL))
|
||||
return
|
||||
@@ -437,13 +437,13 @@
|
||||
message_admins("[kna] [msg]")
|
||||
|
||||
/**
|
||||
* Saves all options of a poll to the database.
|
||||
*
|
||||
* Saves all the created options for a poll when it's submitted to the DB for the first time and associated an id with the options.
|
||||
* Insertion and id querying for each option is done separately to ensure data integrity; this is less performant, but not significantly.
|
||||
* Using MassInsert() would mean having to query a list of rows by poll_id or matching by fields afterwards, which doesn't guarantee accuracy.
|
||||
*
|
||||
*/
|
||||
* Saves all options of a poll to the database.
|
||||
*
|
||||
* Saves all the created options for a poll when it's submitted to the DB for the first time and associated an id with the options.
|
||||
* Insertion and id querying for each option is done separately to ensure data integrity; this is less performant, but not significantly.
|
||||
* Using MassInsert() would mean having to query a list of rows by poll_id or matching by fields afterwards, which doesn't guarantee accuracy.
|
||||
*
|
||||
*/
|
||||
/datum/poll_question/proc/save_all_options()
|
||||
if(!SSdbcore.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
|
||||
@@ -453,9 +453,9 @@
|
||||
option.save_option()
|
||||
|
||||
/**
|
||||
* Deletes all votes or text replies for this poll, depending on its type.
|
||||
*
|
||||
*/
|
||||
* Deletes all votes or text replies for this poll, depending on its type.
|
||||
*
|
||||
*/
|
||||
/datum/poll_question/proc/clear_poll_votes()
|
||||
if(!check_rights(R_POLL))
|
||||
return
|
||||
@@ -477,9 +477,9 @@
|
||||
to_chat(usr, "<span class='danger'>Poll [poll_type == POLLTYPE_TEXT ? "responses" : "votes"] cleared.</span>", confidential = TRUE)
|
||||
|
||||
/**
|
||||
* Show the options for creating a poll option or editing its parameters.
|
||||
*
|
||||
*/
|
||||
* Show the options for creating a poll option or editing its parameters.
|
||||
*
|
||||
*/
|
||||
/datum/admins/proc/poll_option_panel(datum/poll_question/poll, datum/poll_option/option)
|
||||
var/list/output = list("<form method='get' action='?src=[REF(src)]'>[HrefTokenFormField()]")
|
||||
output += {"<input type='hidden' name='src' value='[REF(src)]'> Option for poll [poll.question]
|
||||
@@ -493,7 +493,7 @@
|
||||
Maximum Value
|
||||
<input type='text' name='maxval' size='3' value='[option?.max_val]'>
|
||||
<div class='row'>
|
||||
<div class='column left'>
|
||||
<div class='column left'>
|
||||
<label class='inputlabel checkbox'>Minimum description
|
||||
<input type='checkbox' id='descmincheck' name='descmincheck' value='1'[option?.desc_min ? " checked": ""]>
|
||||
<div class='inputbox'></div></label>
|
||||
@@ -533,12 +533,12 @@
|
||||
panel.open()
|
||||
|
||||
/**
|
||||
* Processes topic data from poll option panel.
|
||||
*
|
||||
* Reads through returned form data and assigns data to the option datum, creating a new one if required, before passing it to be saved.
|
||||
* Also does some simple error checking to ensure the option will be valid before creation.
|
||||
*
|
||||
*/
|
||||
* Processes topic data from poll option panel.
|
||||
*
|
||||
* Reads through returned form data and assigns data to the option datum, creating a new one if required, before passing it to be saved.
|
||||
* Also does some simple error checking to ensure the option will be valid before creation.
|
||||
*
|
||||
*/
|
||||
/datum/admins/proc/poll_option_parse_href(list/href_list, datum/poll_question/poll, datum/poll_option/option)
|
||||
if(!check_rights(R_POLL))
|
||||
return
|
||||
@@ -631,12 +631,12 @@
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Inserts or updates a poll option to the database.
|
||||
*
|
||||
* Uses INSERT ON DUPLICATE KEY UPDATE to handle both inserting and updating at once.
|
||||
* The list of columns and values is built dynamically to avoid excess data being sent when not a rating type poll.
|
||||
*
|
||||
*/
|
||||
* Inserts or updates a poll option to the database.
|
||||
*
|
||||
* Uses INSERT ON DUPLICATE KEY UPDATE to handle both inserting and updating at once.
|
||||
* The list of columns and values is built dynamically to avoid excess data being sent when not a rating type poll.
|
||||
*
|
||||
*/
|
||||
/datum/poll_option/proc/save_option()
|
||||
if(!check_rights(R_POLL))
|
||||
return
|
||||
@@ -668,9 +668,9 @@
|
||||
qdel(query_update_poll_option)
|
||||
|
||||
/**
|
||||
* Sets a poll option and its votes as deleted in the database then deletes its datum.
|
||||
*
|
||||
*/
|
||||
* Sets a poll option and its votes as deleted in the database then deletes its datum.
|
||||
*
|
||||
*/
|
||||
/datum/poll_option/proc/delete_option()
|
||||
if(!check_rights(R_POLL))
|
||||
return
|
||||
@@ -690,9 +690,9 @@
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
* Loads all current and future server polls and their options to store both as datums.
|
||||
*
|
||||
*/
|
||||
* Loads all current and future server polls and their options to store both as datums.
|
||||
*
|
||||
*/
|
||||
/proc/load_poll_data()
|
||||
if(!SSdbcore.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
|
||||
|
||||
@@ -590,15 +590,15 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
send2otherserver(source,final)
|
||||
|
||||
/**
|
||||
* Sends a message to a set of cross-communications-enabled servers using world topic calls
|
||||
*
|
||||
* Arguments:
|
||||
* * source - Who sent this message
|
||||
* * msg - The message body
|
||||
* * type - The type of message, becomes the topic command under the hood
|
||||
* * target_servers - A collection of servers to send the message to, defined in config
|
||||
* * additional_data - An (optional) associated list of extra parameters and data to send with this world topic call
|
||||
*/
|
||||
* Sends a message to a set of cross-communications-enabled servers using world topic calls
|
||||
*
|
||||
* Arguments:
|
||||
* * source - Who sent this message
|
||||
* * msg - The message body
|
||||
* * type - The type of message, becomes the topic command under the hood
|
||||
* * target_servers - A collection of servers to send the message to, defined in config
|
||||
* * additional_data - An (optional) associated list of extra parameters and data to send with this world topic call
|
||||
*/
|
||||
/proc/send2otherserver(source, msg, type = "Ahelp", target_servers, list/additional_data = list())
|
||||
if(!CONFIG_GET(string/comms_key))
|
||||
debug_world_log("Server cross-comms message not sent for lack of configured key")
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has enabled anonymous names. THEME: [SSticker.anonymousnames].</span>")
|
||||
|
||||
/**
|
||||
* anonymous_name: generates a corporate random name. used in admin event tool anonymous names
|
||||
*
|
||||
* first letter is always a letter
|
||||
* Example name = "Employee Q5460Z"
|
||||
* Arguments:
|
||||
* * M - mob for preferences and gender
|
||||
*/
|
||||
* anonymous_name: generates a corporate random name. used in admin event tool anonymous names
|
||||
*
|
||||
* first letter is always a letter
|
||||
* Example name = "Employee Q5460Z"
|
||||
* Arguments:
|
||||
* * M - mob for preferences and gender
|
||||
*/
|
||||
/proc/anonymous_name(mob/M)
|
||||
switch(SSticker.anonymousnames)
|
||||
if(ANON_RANDOMNAMES)
|
||||
@@ -47,13 +47,13 @@
|
||||
return name
|
||||
|
||||
/**
|
||||
* anonymous_ai_name: generates a corporate random name (but for sillycones). used in admin event tool anonymous names
|
||||
*
|
||||
* first letter is always a letter
|
||||
* Example name = "Employee Assistant Assuming Delta"
|
||||
* Arguments:
|
||||
* * is_ai - boolean to decide whether the name has "Core" (AI) or "Assistant" (Cyborg)
|
||||
*/
|
||||
* anonymous_ai_name: generates a corporate random name (but for sillycones). used in admin event tool anonymous names
|
||||
*
|
||||
* first letter is always a letter
|
||||
* Example name = "Employee Assistant Assuming Delta"
|
||||
* Arguments:
|
||||
* * is_ai - boolean to decide whether the name has "Core" (AI) or "Assistant" (Cyborg)
|
||||
*/
|
||||
/proc/anonymous_ai_name(is_ai = FALSE)
|
||||
switch(SSticker.anonymousnames)
|
||||
if(ANON_RANDOMNAMES)
|
||||
|
||||
@@ -91,9 +91,9 @@
|
||||
}
|
||||
|
||||
ul li {
|
||||
margin-top: -1px; /* Prevent double borders */
|
||||
padding: 12px; /* Add some padding */
|
||||
color: #ffffff;
|
||||
margin-top: -1px; /* Prevent double borders */
|
||||
padding: 12px; /* Add some padding */
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
background: #40628a;
|
||||
border: 1px solid #161616;
|
||||
@@ -102,7 +102,7 @@
|
||||
}
|
||||
|
||||
.remove-reagent {
|
||||
background-color: #d03000;
|
||||
background-color: #d03000;
|
||||
}
|
||||
|
||||
.container-control {
|
||||
@@ -261,15 +261,15 @@
|
||||
<div class='uiContent'>
|
||||
|
||||
<div class="width: 100%">
|
||||
<button id="spawn-grenade">
|
||||
<button id="spawn-grenade">
|
||||
<i class="fas fa-bomb"></i> Spawn grenade
|
||||
</button>
|
||||
</button>
|
||||
<label for="grenade-type">Grenade type: </label>
|
||||
<select id="grenade-type">
|
||||
<option value="normal">Normal</option>
|
||||
</select>
|
||||
<div class="grenade-data normal">
|
||||
</div>
|
||||
<select id="grenade-type">
|
||||
<option value="normal">Normal</option>
|
||||
</select>
|
||||
<div class="grenade-data normal">
|
||||
</div>
|
||||
<br />
|
||||
<small>note: beakers recommended, other containers may have issues</small>
|
||||
</div>
|
||||
@@ -289,25 +289,25 @@
|
||||
<div>
|
||||
<button class="spawn-container">
|
||||
<i class="fas fa-cog"></i> Spawn
|
||||
</button>
|
||||
|
||||
</button>
|
||||
|
||||
<button class="import-reagents">
|
||||
<i class="fas fa-file-import"></i> Import
|
||||
</button>
|
||||
|
||||
<button class="export-reagents">
|
||||
</button>
|
||||
|
||||
<button class="export-reagents">
|
||||
<i class="fas fa-file-export"></i> Export
|
||||
</button>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<select class="select-new-reagent"></select><div class="reagent-div"><input style="width: 50%" type="text" name="newreagent" value="40" /> <button class="add-reagent">
|
||||
<i class="fas fa-plus"></i> Add
|
||||
</button>
|
||||
<select class="select-new-reagent"></select><div class="reagent-div"><input style="width: 50%" type="text" name="newreagent" value="40" /> <button class="add-reagent">
|
||||
<i class="fas fa-plus"></i> Add
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
|
||||
set desc = "Displays a list of active turfs coordinates at roundstart"
|
||||
|
||||
var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b>
|
||||
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
|
||||
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
|
||||
|
||||
for(var/t in GLOB.active_turfs_startlist)
|
||||
var/turf/T = t
|
||||
|
||||
@@ -1348,17 +1348,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
target.forceMove(bread)
|
||||
|
||||
/**
|
||||
* firing_squad is a proc for the :B:erforate smite to shoot each individual bullet at them, so that we can add actual delays without sleep() nonsense
|
||||
*
|
||||
* Hilariously, if you drag someone away mid smite, the bullets will still chase after them from the original spot, possibly hitting other people. Too funny to fix imo
|
||||
*
|
||||
* Arguments:
|
||||
* * target- guy we're shooting obviously
|
||||
* * source_turf- where the bullet begins, preferably on a turf next to the target
|
||||
* * body_zone- which bodypart we're aiming for, if there is one there
|
||||
* * wound_bonus- the wounding power we're assigning to the bullet, since we don't care about the base one
|
||||
* * damage- the damage we're assigning to the bullet, since we don't care about the base one
|
||||
*/
|
||||
* firing_squad is a proc for the :B:erforate smite to shoot each individual bullet at them, so that we can add actual delays without sleep() nonsense
|
||||
*
|
||||
* Hilariously, if you drag someone away mid smite, the bullets will still chase after them from the original spot, possibly hitting other people. Too funny to fix imo
|
||||
*
|
||||
* Arguments:
|
||||
* * target- guy we're shooting obviously
|
||||
* * source_turf- where the bullet begins, preferably on a turf next to the target
|
||||
* * body_zone- which bodypart we're aiming for, if there is one there
|
||||
* * wound_bonus- the wounding power we're assigning to the bullet, since we don't care about the base one
|
||||
* * damage- the damage we're assigning to the bullet, since we don't care about the base one
|
||||
*/
|
||||
/proc/firing_squad(mob/living/carbon/target, turf/source_turf, body_zone, wound_bonus, damage)
|
||||
if(!target.get_bodypart(body_zone))
|
||||
return
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
var/obj/chosen_obj = text2path(chosen)
|
||||
|
||||
var/list/settings = list(
|
||||
"mainsettings" = list(
|
||||
"name" = list("desc" = "Name", "type" = "string", "value" = "Bob"),
|
||||
"mainsettings" = list(
|
||||
"name" = list("desc" = "Name", "type" = "string", "value" = "Bob"),
|
||||
"maxhealth" = list("desc" = "Max. health", "type" = "number", "value" = 100),
|
||||
"access" = list("desc" = "Access ID", "type" = "datum", "path" = "/obj/item/card/id", "value" = "Default"),
|
||||
"access" = list("desc" = "Access ID", "type" = "datum", "path" = "/obj/item/card/id", "value" = "Default"),
|
||||
"objtype" = list("desc" = "Base obj type", "type" = "datum", "path" = "/obj", "value" = "[chosen]"),
|
||||
"googlyeyes" = list("desc" = "Googly eyes", "type" = "boolean", "value" = "No"),
|
||||
"disableai" = list("desc" = "Disable AI", "type" = "boolean", "value" = "Yes"),
|
||||
@@ -27,8 +27,7 @@
|
||||
"dropitem" = list("desc" = "Drop obj on death", "type" = "boolean", "value" = "Yes"),
|
||||
"mobtype" = list("desc" = "Base mob type", "type" = "datum", "path" = "/mob/living/simple_animal/hostile/mimic/copy", "value" = "/mob/living/simple_animal/hostile/mimic/copy"),
|
||||
"ckey" = list("desc" = "ckey", "type" = "ckey", "value" = "none"),
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
var/list/prefreturn = presentpreflikepicker(usr,"Customize mob", "Customize mob", Button1="Ok", width = 450, StealFocus = 1,Timeout = 0, settings=settings)
|
||||
if (prefreturn["button"] == 1)
|
||||
|
||||
Reference in New Issue
Block a user