From 4265079220a572deb8ce495182c01ecc9fbcfb74 Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 31 Oct 2019 13:55:40 +0200 Subject: [PATCH] Fixes adding verbs to mobs in varedit. Previously only strictly human, robot, and ai types would get any additional verbs that weren't strictly /mob or /mob/living procs or verbs. This means that unless your mob was strictly the base type of human or robot or AI, it would be impossible to add any procs or verbs that are made for anything that is not strictly /mob or /mob/living. Strictly meaning that any and all subtypes would be excluded. Now humans and human subtypes can get carbon and human verbs, robots and robot subtypes can get silicon and robot verbs, AI and AI subtypes can get silicon and AI verbs, and now also simplemobs and simplemob subtypes can get simplemob verbs. --- code/modules/admin/view_variables/topic.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index ce2c684c09..4130cfcb0d 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -359,13 +359,14 @@ var/list/possibleverbs = list() possibleverbs += "Cancel" // One for the top... possibleverbs += typesof(/mob/proc,/mob/verb,/mob/living/proc,/mob/living/verb) - switch(H.type) - if(/mob/living/carbon/human) - possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc) - if(/mob/living/silicon/robot) - possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb) - if(/mob/living/silicon/ai) - possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb) + if(istype(H,/mob/living/carbon/human)) + possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc) + if(istype(H,/mob/living/silicon/robot)) + possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb) + if(istype(H,/mob/living/silicon/ai)) + possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb) + if(istype(H,/mob/living/simple_mob)) + possibleverbs += typesof(/mob/living/simple_mob/proc,/mob/living/simple_mob/verb) possibleverbs -= H.verbs possibleverbs += "Cancel" // ...And one for the bottom