diff --git a/code/__HELPERS/job.dm b/code/__HELPERS/job.dm index 89fe6877647e..220236c6f7e3 100644 --- a/code/__HELPERS/job.dm +++ b/code/__HELPERS/job.dm @@ -14,32 +14,10 @@ all_jobs += new jobtype return all_jobs - /proc/get_all_centcom_jobs() return list() -//gets the actual job rank (ignoring alt titles) -//this is used solely for sechuds -/obj/proc/GetJobRealName() - if (!istype(src,/obj/item/card/id)) return - var/obj/item/card/id/I = src - if(I.rank in GLOB.joblist) return I.rank - if(I.assignment in GLOB.joblist) return I.assignment - return "Unknown" - /proc/get_all_job_icons() return GLOB.joblist + list("Prisoner")//For all existing HUD icons -/obj/proc/GetJobName() //Used in secHUD icon generation - var/obj/item/card/id/I = src - if(istype(I)) - var/job_icons = get_all_job_icons() - var/centcom = get_all_centcom_jobs() - - if(I.assignment in job_icons) return I.assignment//Check if the job has a hud icon - if(I.rank in job_icons) return I.rank - if(I.assignment in centcom) return "Centcom"//Return with the NT logo if it is a Centcom job - if(I.rank in centcom) return "Centcom" - return "Unknown" //Return unknown if none of the above apply - /proc/get_actual_job_name(mob/M) if(!M) return null diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index a5e0eafe2f91..f6af3c0ca237 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -97,6 +97,21 @@ . = ..() screen_loc = null +/obj/item/card/id/proc/GetJobName() //Used in secHUD icon generation + + var/job_icons = get_all_job_icons() + var/centcom = get_all_centcom_jobs() + + if(assignment in job_icons) + return assignment//Check if the job has a hud icon + if(rank in job_icons) + return rank + if(assignment in centcom) + return "Centcom"//Return with the NT logo if it is a Centcom job + if(rank in centcom) + return "Centcom" + return "Unknown" //Return unknown if none of the above apply + /obj/item/card/id/attack_self(mob/user as mob) ..() user.visible_message("[user] shows you: [icon2html(src, viewers(user))] [name]: assignment: [assignment]") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 3bc8e97623da..95fd393d12b5 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1741,3 +1741,9 @@ return FALSE . = ..() + +/mob/living/carbon/human/make_dizzy(amount) + dizziness = min(500, dizziness + amount) // store what will be new value + // clamped to max 500 + if(dizziness > 100 && !is_dizzy) + INVOKE_ASYNC(src, PROC_REF(dizzy_process)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c28de81ecfc1..26139af07eb6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -593,20 +593,13 @@ adds a dizziness amount to a mob use this rather than directly changing var/dizziness since this ensures that the dizzy_process proc is started -currently only humans get dizzy +currently only mob/living/carbon/human get dizzy value of dizziness ranges from 0 to 1000 below 100 is not dizzy */ /mob/proc/make_dizzy(amount) - if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy - return - - dizziness = min(500, dizziness + amount) // store what will be new value - // clamped to max 500 - if(dizziness > 100 && !is_dizzy) - INVOKE_ASYNC(src, PROC_REF(dizzy_process)) - + return /* dizzy process - wiggles the client's pixel offset over time