Replaces some of the hardcoded HUD icons defined at mob level with a pair of mob procs throw_alert() and clear_alert(). Alerts will appear on the top-right side of the screen.
You can shift-click alerts to get a description of what's wrong and sometimes a tip on how to solve the alert.
Alerts can be given a master, which overlays the master on top of a box and forwards clicks of the alert to that master. Getting buckled will put an alert of what you're buckled to, for example. If it's a chair, you just click the alert and you're unbuckled. The idea I'm shooting for is to replace resist entirely with this kind of stuff.
Making a new alert and using it is a little complicated. This explanation will suck, but this is simpler than I'm making it sound, I promise. Throw_alert() has 4 args, category, id, severity, and obj/new_master. If you don't supply an id, category will be used as id. Only 1 alert per category is allowed; any duplicate will be replaced. Additionally clear_alert() clears alerts by category. Id MUST match a type path of /obj/screen/alert/[id]. That type path is where the alert's name and desc come from. The icon_state of the alert will either be "template" if new_master is set or [id][severity] otherwise. new_master is totally optional.
Examples:
throw_alert("oxy") -- takes name/desc of obj/screen/alert/oxy, icon_state = "oxy" -- clear_alert("oxy")
throw_alert("nutrition","fat") -- takes name/desc of obj/screen/alert/fat, icon_state = "fat" -- clear_alert("nutrition")
throw_alert("nutrition","starving") -- takes name/desc of obj/screen/alert/starving, icon_state = "starving" -- clear_alert("nutrition")
throw_alert("temp","cold",1) -- takes name/desc of obj/screen/alert/cold, icon_state = "cold1" -- clear_alert("temp")
throw_alert("temp","cold",3) -- takes name/desc of obj/screen/alert/cold, icon_state = "cold3" -- clear_alert("temp")
If you pass a new_master, id is only used to get name/desc and still must match a path, but the icon_state is "template" and icon is from the mob's ui preference instead of icons/mob/screen_alert.dmi.
Several unused icons removed, like borg oxygen and temperature alerts. Also some icons were used but now are not and were removed, like the nutrition icon for being well-fed and cyborg charge icon for being fully charged.
Fixes the blobbernaut death animation looping.
Fixes armchair layer being above ghost layer.
Fixes chloral hydrate metabolization rate (and 2 other reagents)
Fixes a typo in closet/attack_self() .
Add the incapacitated proc to mobs to check for stat, stun, weakened, paralysis, restrained. And replacing those checks by that new proc in some places.
Fixes player controlled hostile simple animal not calling AttackingTarget() for their melee attack.
Fixes player controlled hostile simple animal's ranged attack targeting the target from their previous melee attack instead of the target clicked.
No functional changes. Just moving the declarations of functions around.
I may be wrong in this, IE I don't know if declaration order matters in this, if it does, just reject my PR. Otherwise accepting it, would be good to help newbie coders to understand code flow a little easier.
Also removed some mob vars like sdisabilities and merged the usability
with disabilities
Removed need for mutations var, they are not handled in dna
Removed blinded var, now its handled by eye_blind being bigger than zero
Ands lots, lots of other shit in files that used mutations
Replacing some fo mob in viewers() show_message() with visible message().
Simplifying some message code in a couple places, fixing typos and span classes.