Improves player retention by leveraging existing assets to incentivize higher average playetime (#51297)

* im a player ok that means i play

* FINE

* you win this time, shaps

* makes floyd happy

* Update code/__DEFINES/misc.dm

* i was just playing cyberboss dont be mad at me

* changes one character in a comment
This commit is contained in:
MrDoomBringer
2020-05-27 18:29:42 -04:00
committed by GitHub
parent 98d8133a3c
commit 3546417d7f
8 changed files with 39 additions and 10 deletions
+8 -1
View File
@@ -111,6 +111,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
///What scaling method should we use? Distort means nearest neighbor
var/scaling_method = SCALING_METHOD_DISTORT
var/uplink_spawn_loc = UPLINK_PDA
///The playtime_reward_cloak variable can be set to TRUE from the prefs menu only once the user has gained over 5K playtime hours. If true, it allows the user to get a cool looking roundstart cloak.
var/playtime_reward_cloak = FALSE
var/list/exp = list()
var/list/menuoptions
@@ -285,7 +287,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<br><b>Uplink Spawn Location:</b><BR><a href ='?_src_=prefs;preference=uplink_loc;task=input'>[uplink_spawn_loc]</a><BR></td>"
if (user.client.get_exp_living(TRUE) >= PLAYTIME_VETERAN)
dat += "<br><b>Don The Ultimate Gamer Cloak?:</b><BR><a href ='?_src_=prefs;preference=playtime_reward_cloak'>[(playtime_reward_cloak) ? "Enabled" : "Disabled"]</a><BR></td>"
var/use_skintones = pref_species.use_skintones
if(use_skintones)
@@ -1481,6 +1484,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(new_loc)
uplink_spawn_loc = new_loc
if("playtime_reward_cloak")
if (user.client.get_exp_living(TRUE) >= PLAYTIME_VETERAN)
playtime_reward_cloak = !playtime_reward_cloak
if("ai_core_icon")
var/ai_core_icon = input(user, "Choose your preferred AI core display screen:", "AI Core Display Screen Selection") as null|anything in GLOB.ai_core_display_screens
if(ai_core_icon)
@@ -353,6 +353,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["backpack"] >> backpack
S["jumpsuit_style"] >> jumpsuit_style
S["uplink_loc"] >> uplink_spawn_loc
S["playtime_reward_cloak"] >> playtime_reward_cloak
S["phobia"] >> phobia
S["randomise"] >> randomise
S["feature_mcolor"] >> features["mcolor"]
@@ -440,6 +441,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
backpack = sanitize_inlist(backpack, GLOB.backpacklist, initial(backpack))
jumpsuit_style = sanitize_inlist(jumpsuit_style, GLOB.jumpsuitlist, initial(jumpsuit_style))
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc))
playtime_reward_cloak = sanitize_integer(playtime_reward_cloak)
features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0)
features["ethcolor"] = copytext_char(features["ethcolor"], 1, 7)
features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], GLOB.tails_list_lizard)
@@ -491,6 +493,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["backpack"] , backpack)
WRITE_FILE(S["jumpsuit_style"] , jumpsuit_style)
WRITE_FILE(S["uplink_loc"] , uplink_spawn_loc)
WRITE_FILE(S["playtime_reward_cloak"] , playtime_reward_cloak)
WRITE_FILE(S["randomise"] , randomise)
WRITE_FILE(S["species"] , pref_species.id)
WRITE_FILE(S["phobia"], phobia)