mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #2934 from Anewbe/char_reset
Ports Bay's character resets
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
#define SAVE_RESET -1
|
||||
|
||||
var/list/preferences_datums = list()
|
||||
|
||||
@@ -199,7 +199,8 @@ datum/preferences
|
||||
dat += "Slot - "
|
||||
dat += "<a href='?src=\ref[src];load=1'>Load slot</a> - "
|
||||
dat += "<a href='?src=\ref[src];save=1'>Save slot</a> - "
|
||||
dat += "<a href='?src=\ref[src];reload=1'>Reload slot</a>"
|
||||
dat += "<a href='?src=\ref[src];reload=1'>Reload slot</a> - "
|
||||
dat += "<a href='?src=\ref[src];resetslot=1'>Reset slot</a>"
|
||||
|
||||
else
|
||||
dat += "Please create an account to save your preferences."
|
||||
@@ -248,6 +249,11 @@ datum/preferences
|
||||
load_character(text2num(href_list["changeslot"]))
|
||||
sanitize_preferences()
|
||||
close_load_dialog(usr)
|
||||
else if(href_list["resetslot"])
|
||||
if("No" == alert("This will reset the current slot. Continue?", "Reset current slot?", "No", "Yes"))
|
||||
return 0
|
||||
load_character(SAVE_RESET)
|
||||
sanitize_preferences()
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
@@ -67,11 +67,20 @@
|
||||
if(!S) return 0
|
||||
S.cd = "/"
|
||||
if(!slot) slot = default_slot
|
||||
slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
S["default_slot"] << slot
|
||||
S.cd = "/character[slot]"
|
||||
if(slot != SAVE_RESET) // SAVE_RESET will reset the slot as though it does not exist, but keep the current slot for saving purposes.
|
||||
slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
S["default_slot"] << slot
|
||||
else
|
||||
S["default_slot"] << default_slot
|
||||
|
||||
if(slot != SAVE_RESET)
|
||||
S.cd = "/character[slot]"
|
||||
player_setup.load_character(S)
|
||||
else
|
||||
player_setup.load_character(S)
|
||||
S.cd = "/character[default_slot]"
|
||||
|
||||
player_setup.load_character(S)
|
||||
return 1
|
||||
|
||||
36
html/changelogs/PsiOmegaDelta - IAmKind.yml
Normal file
36
html/changelogs/PsiOmegaDelta - IAmKind.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: PsiOmegaDelta
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Resetting a character slot now requires confirmation."
|
||||
36
html/changelogs/zuhayr-saves.yml
Normal file
36
html/changelogs/zuhayr-saves.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Zuhayr
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Added a reset slot button to chargen."
|
||||
Reference in New Issue
Block a user