Code review

This commit is contained in:
Jack Edge
2016-06-23 00:40:28 +01:00
parent 5f9553163c
commit dc7c591748
4 changed files with 49 additions and 45 deletions
-44
View File
@@ -1,44 +0,0 @@
#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None"))
/proc/mass_purrbation()
for(var/M in mob_list)
if(ishumanbasic(M))
purrbation_apply(M)
CHECK_TICK
/proc/mass_remove_purrbation()
for(var/M in mob_list)
if(ishumanbasic(M))
purrbation_remove(M)
CHECK_TICK
/proc/purrbation_toggle(mob/living/carbon/human/H)
if(!ishumanbasic(H))
return
if(!ON_PURRBATION(H))
purrbation_apply(H)
. = TRUE
else
purrbation_remove(H)
. = FALSE
/proc/purrbation_apply(mob/living/carbon/human/H)
if(!istype(H))
return
if(ON_PURRBATION(H))
return
H << "Something is nya~t right."
H.dna.features["tail_human"] = "Cat"
H.dna.features["ears"] = "Cat"
H.regenerate_icons()
playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1)
/proc/purrbation_remove(mob/living/carbon/human/H)
if(!istype(H))
return
if(!ON_PURRBATION(H))
return
H << "You are no longer a cat."
H.dna.features["tail_human"] = "None"
H.dna.features["ears"] = "None"
H.regenerate_icons()
+2
View File
@@ -581,12 +581,14 @@
mass_purrbation()
message_admins("[key_name_admin(usr)] has put everyone on \
purrbation!")
log_admin("[key_name(usr)] has put everyone on purrbation.")
if("massremovepurrbation")
if(!check_rights(R_FUN))
return
mass_remove_purrbation()
message_admins("[key_name_admin(usr)] has removed everyone from \
purrbation.")
log_admin("[key_name(usr)] has removed everyone from purrbation.")
if(E)
E.processing = 0
+47
View File
@@ -1062,3 +1062,50 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
wabbajack(M)
message_admins("Mass polymorph started by [who_did_it] is complete.")
#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None"))
/proc/mass_purrbation()
for(var/M in mob_list)
if(ishumanbasic(M))
purrbation_apply(M)
CHECK_TICK
/proc/mass_remove_purrbation()
for(var/M in mob_list)
if(ishumanbasic(M))
purrbation_remove(M)
CHECK_TICK
/proc/purrbation_toggle(mob/living/carbon/human/H)
if(!ishumanbasic(H))
return
if(!ON_PURRBATION(H))
purrbation_apply(H)
. = TRUE
else
purrbation_remove(H)
. = FALSE
/proc/purrbation_apply(mob/living/carbon/human/H)
if(!ishuman(H))
return
if(ON_PURRBATION(H))
return
H << "Something is nya~t right."
H.dna.features["tail_human"] = "Cat"
H.dna.features["ears"] = "Cat"
H.regenerate_icons()
playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1)
/proc/purrbation_remove(mob/living/carbon/human/H)
if(!ishuman(H))
return
if(!ON_PURRBATION(H))
return
H << "You are no longer a cat."
H.dna.features["tail_human"] = "None"
H.dna.features["ears"] = "None"
H.regenerate_icons()
#undef ON_PURRBATION