This commit is contained in:
Putnam
2020-01-05 19:12:28 -08:00
100 changed files with 8918 additions and 12230 deletions
+11
View File
@@ -141,6 +141,17 @@
current_button.add_overlay(mutable_appearance(icon_icon, button_icon_state))
current_button.button_icon_state = button_icon_state
/datum/action/ghost
icon_icon = 'icons/mob/mob.dmi'
button_icon_state = "ghost"
name = "Ghostize"
desc = "Turn into a ghost and freely come back to your body."
/datum/action/ghost/Trigger()
if(!..())
return 0
var/mob/M = target
M.ghostize(1)
//Presets for item actions
/datum/action/item_action
@@ -66,7 +66,7 @@
/datum/component/storage/concrete/_insert_physical_item(obj/item/I, override = FALSE)
. = TRUE
var/atom/real_location = real_location()
if(I.loc != real_location)
if(I.loc != real_location && real_location)
I.forceMove(real_location)
refresh_mob_views()
+2 -2
View File
@@ -11,7 +11,7 @@
if(type == /datum/element)
return ELEMENT_INCOMPATIBLE
if(element_flags & ELEMENT_DETACH)
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/Detach)
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/Detach, override = TRUE)
/datum/element/proc/Detach(datum/source, force)
UnregisterSignal(source, COMSIG_PARENT_QDELETING)
@@ -36,4 +36,4 @@
*/
/datum/proc/RemoveElement(eletype, ...)
var/datum/element/ele = SSdcs.GetElement(arglist(args))
ele.Detach(src)
ele.Detach(src)
@@ -0,0 +1,54 @@
/datum/element/ghost_role_eligibility
element_flags = ELEMENT_DETACH
var/list/timeouts = list()
var/list/mob/eligible_mobs = list()
/datum/element/ghost_role_eligibility/Attach(datum/target,penalize = FALSE)
. = ..()
if(!ismob(target))
return ELEMENT_INCOMPATIBLE
var/mob/M = target
if(!(M in eligible_mobs))
eligible_mobs += M
if(penalize) //penalizing them from making a ghost role / midround antag comeback right away.
var/penalty = CONFIG_GET(number/suicide_reenter_round_timer) MINUTES
var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES
if(world.time < roundstart_quit_limit) //add up the time difference to their antag rolling penalty if they quit before half a (ingame) hour even passed.
penalty += roundstart_quit_limit - world.time
if(penalty)
penalty += world.realtime
if(penalty - SSshuttle.realtimeofstart > SSshuttle.auto_call + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime)
penalty = CANT_REENTER_ROUND
if(!(M.ckey in timeouts))
timeouts += M.ckey
timeouts[M.ckey] = 0
timeouts[M.ckey] = max(timeouts[M.ckey],penalty)
/datum/element/ghost_role_eligibility/Detach(mob/M)
. = ..()
if(M in eligible_mobs)
eligible_mobs -= M
/datum/element/ghost_role_eligibility/proc/get_all_ghost_role_eligible(silent = FALSE)
var/list/candidates = list()
for(var/m in eligible_mobs)
var/mob/M = m
if(M.can_reenter_round(TRUE))
candidates += M
return candidates
/mob/proc/can_reenter_round(silent = FALSE)
var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(/datum/element/ghost_role_eligibility)
return eli.can_reenter_round(src,silent)
/datum/element/ghost_role_eligibility/proc/can_reenter_round(var/mob/M,silent = FALSE)
if(!(M in eligible_mobs))
return FALSE
if(!(M.ckey in timeouts))
return TRUE
var/timeout = timeouts[M.ckey]
if(timeout != CANT_REENTER_ROUND && timeout <= world.realtime)
return TRUE
if(!silent && M.client)
to_chat(M, "<span class='warning'>You are unable to reenter the round[timeout != CANT_REENTER_ROUND ? " yet. Your ghost role blacklist will expire in [DisplayTimeText(timeout - world.realtime)]" : ""].</span>")
return FALSE
+2 -1
View File
@@ -136,9 +136,10 @@
/datum/emote/sound
var/sound //Sound to play when emote is called
var/vary = FALSE //used for the honk borg emote
var/volume = 50
mob_type_allowed_typecache = list(/mob/living/brain, /mob/living/silicon)
/datum/emote/sound/run_emote(mob/user, params)
. = ..()
if(.)
playsound(user.loc, sound, 50, vary)
playsound(user.loc, sound, volume, vary)
+18
View File
@@ -87,3 +87,21 @@
/datum/quirk/monochromatic/remove()
if(quirk_holder)
quirk_holder.remove_client_colour(/datum/client_colour/monochrome)
/datum/quirk/alcohol_intolerance
name = "Alcohol Intolerance"
desc = "You take toxin damage from alcohol rather than getting drunk."
value = 0
mob_trait = TRAIT_NO_ALCOHOL
medical_record_text = "Patient's body does not react properly to ethyl alcohol."
/datum/quirk/alcohol_intolerance/add()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.disliked_food |= ALCOHOL
/datum/quirk/alcohol_intolerance/remove()
var/mob/living/carbon/human/H = quirk_holder
if(H)
var/datum/species/species = H.dna.species
species.disliked_food &= ~ALCOHOL