mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
[MIRROR] Refactors playtime tracking code. (#5546)
* Refactors playtime tracking code. * Update robot.dm Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk> Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
co-authored by
Timberpoes
Gandalf
parent
08e3340578
commit
5e289dad34
@@ -1018,6 +1018,12 @@
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/get_exp_list(minutes)
|
||||
. = ..()
|
||||
|
||||
if(mind.assigned_role in SSjob.name_occupations)
|
||||
.[mind.assigned_role] = minutes
|
||||
|
||||
/mob/living/carbon/human/monkeybrain
|
||||
ai_controller = /datum/ai_controller/monkey
|
||||
|
||||
|
||||
@@ -2001,3 +2001,20 @@
|
||||
return FALSE
|
||||
return style.harm_act(src, target)
|
||||
return style.help_act(src, target)
|
||||
|
||||
/**
|
||||
* Returns an assoc list of assignments and minutes for updating a client's exp time in the databse.
|
||||
*
|
||||
* Arguments:
|
||||
* * minutes - The number of minutes to allocate to each valid role.
|
||||
*/
|
||||
/mob/living/proc/get_exp_list(minutes)
|
||||
var/list/exp_list = list()
|
||||
|
||||
if(mind && mind.special_role && !(mind.datum_flags & DF_VAR_EDITED))
|
||||
exp_list[mind.special_role] = minutes
|
||||
|
||||
if(mind.assigned_role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL])
|
||||
exp_list[mind.assigned_role] = minutes
|
||||
|
||||
return exp_list
|
||||
|
||||
@@ -1057,3 +1057,10 @@
|
||||
|
||||
/mob/living/silicon/on_handsblocked_end()
|
||||
return // AIs have no hands
|
||||
|
||||
/mob/living/silicon/ai/get_exp_list(minutes)
|
||||
. = ..()
|
||||
|
||||
var/datum/job/ai/ai_job_ref = SSjob.GetJobType(/datum/job/ai)
|
||||
|
||||
.[ai_job_ref.title] = minutes
|
||||
|
||||
@@ -1002,3 +1002,10 @@
|
||||
aiPDA.owner = newname
|
||||
aiPDA.name = newname + " (" + aiPDA.ownjob + ")"
|
||||
// SKYRAT EDIT ADDITION END
|
||||
|
||||
/mob/living/silicon/robot/get_exp_list(minutes)
|
||||
. = ..()
|
||||
|
||||
var/datum/job/cyborg/cyborg_job_ref = SSjob.GetJobType(/datum/job/cyborg)
|
||||
|
||||
.[cyborg_job_ref.title] = minutes
|
||||
|
||||
Reference in New Issue
Block a user