Merge pull request #709 from ArchieBeepBoop/blacklistfix1

Re-Porting the Trait Blacklist System (Fixes broken respawn traits)
This commit is contained in:
Dahlular
2020-12-01 20:14:06 -07:00
committed by GitHub
18 changed files with 142 additions and 108 deletions
@@ -863,6 +863,7 @@
.["Make slime"] = "?_src_=vars;[HrefToken()];makeslime=[REF(src)]"
.["Toggle Purrbation"] = "?_src_=vars;[HrefToken()];purrbation=[REF(src)]"
.["Copy outfit"] = "?_src_=vars;[HrefToken()];copyoutfit=[REF(src)]"
.["Add/Remove Quirks"] = "?_src_=vars;[HrefToken()];modquirks=[REF(src)]"
/mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user)
if(pulling == target && grab_state >= GRAB_AGGRESSIVE && stat == CONSCIOUS)
+18 -13
View File
@@ -148,23 +148,28 @@
/////////////////////////////////// DISABILITIES ////////////////////////////////////
/mob/living/proc/add_quirk(quirk, spawn_effects) //separate proc due to the way these ones are handled
if(HAS_TRAIT(src, quirk))
/mob/living/proc/add_quirk(quirktype, spawn_effects) //separate proc due to the way these ones are handled
if(has_quirk(quirktype))
return
if(!SSquirks || !SSquirks.quirks[quirk])
var/datum/quirk/T = quirktype
var/qname = initial(T.name)
if(!SSquirks || !SSquirks.quirks[qname])
return
var/datum/quirk/T = SSquirks.quirks[quirk]
new T (src, spawn_effects)
new quirktype (src, spawn_effects)
return TRUE
/mob/living/proc/remove_quirk(quirk)
var/datum/quirk/T = roundstart_quirks[quirk]
if(T)
qdel(T)
return TRUE
/mob/living/proc/remove_quirk(quirktype)
for(var/datum/quirk/Q in roundstart_quirks)
if(Q.type == quirktype)
qdel(Q)
return TRUE
return FALSE
/mob/living/proc/has_quirk(quirk)
return roundstart_quirks[quirk]
/mob/living/proc/has_quirk(quirktype)
for(var/datum/quirk/Q in roundstart_quirks)
if(Q.type == quirktype)
return TRUE
return FALSE
/////////////////////////////////// TRAIT PROCS ////////////////////////////////////
@@ -225,4 +230,4 @@
/mob/living/proc/ignore_slowdown(source)
ADD_TRAIT(src, TRAIT_IGNORESLOWDOWN, source)
update_movespeed(FALSE)
update_movespeed(FALSE)
+3 -3
View File
@@ -452,12 +452,12 @@
qdel(M)
return
to_chat(usr, "<span class='boldnotice'>Please roleplay correctly, do not meta-game, and use information from a different character or characters, to influence your actions!</span>")
usr.client.lastrespawn = world.time + 1800 SECONDS
usr.client.respawn_observing = 0
message_admins("[client.ckey] respawned.")
M.key = key
M.ckey = ckey //shamelessly copied to
to_chat(M, "<span class='danger'>Please roleplay correctly, do not meta-game, and use information from a different character or characters, to influence your actions!</span>")
qdel(usr)
// M.Login() //wat
return