be_special and antag defines are no longer limited to 16 values (1 - 32768) by being changed from a bitfield to a list, an appropriate block of code exists to automatically update bitfield versions to the new list format. the list format allows us to have (functionally) infinite antag types.
Just a note, as long as we are gonna senselessly move everything to action buttons, lets not forget that only humans have them, and atm monkeys and the like can not use action buttons for things where object verbs have been removed.
Something to think about before it gets to the point where simple mobs/monkeys/borgs/etc can't use anything.
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.
- Both HUD procs broken in to several smaller procs.
- Added defines so the arguments to process_data_hud() are clear.
- Several other tweaks to data_huds.dm
- Made the sensor mode defines match the data hud ones.
- Gave borgies a HUD button for sensor modes instead a verb, to be in
line with the AI.
- The AI can now access both Security and Medical HUDs via a new button
on its UI. The Medical HUD is exactly equal to all others. The AI's
Security HUD cannot detect implants.
- Cyborg HUD modules have been removed in favor of an inbuilt command,
to make it less of a hassle to access them.
- HUD code has been given its own file such that it can be used by any
mob. In addition, HUD users are placed into a list instead of searching
for only humans and checking them for a HUD item. This is to make it
easier to expand.
- Security HUD messages can now be received by any mob using a SecHUD.
- Rewrote all UI element positions to use values that are anchored to NORTH, SOUTH, EAST, WEST and CENTER instead of absolute numbers. Changing view range now no longer messes up the UI.
Screenshots:
http://www.ss13.eu/uiscaling_human.png (human)
http://www.ss13.eu/uiscaling_borg.png (cyborg)
http://www.ss13.eu/uiscaling_alien.png (alien)
http://www.ss13.eu/uiscaling_monkey.png (monkey)
- Changing the view range no longer messes up shortsightedness and welding mask dither effects
Screenshots:
http://www.ss13.eu/uiscaling_welding.png (welding mask)
http://www.ss13.eu/uiscaling_shortsight.png (shortsightedness)
- The flash overlay now covers the entire screen no matter what the view range is
- The damage overlay and blindness overlay are now centered even if you change the view range. They are however images of a fixed size, so they only cover a part of the screen. This one is better than it was, but still 'imperfect'. I'm guessing we'll have to wait until we switch to byond 500 for a better solution to this.
Screenshot:
http://www.ss13.eu/uiscaling_dead.png (critical condition)
- Pressing F12 now no longer only switches between the standard and a reduced overlay, it cycles through all available UI styles, of which there are currently three: Standard UI, reduced UI and no UI (intended for taking screenshots while alive). Note that this does not remove the blindness, damage and flash overlays, it however removes all damage indication icons (like suffocation, fire damage, etc)
Screenshot:
http://www.ss13.eu/uiscaling_blank.png (no UI)
Stings are now special cases of carbons' clicks
All the problems with stings-items were solved automatically by this
Clicking the ability sets your active sting
Currently active sting is shown on the UI
Changed sting icons to fit the UI
Clicking other ability will reset the active sting to the new one
Added "retract stinger" ability so you can get rid of any active sting
Added autoequip of items below you if you go from monkey to human form
as ling
Added commented-out greater form, just because
Monkeys now have chem counter in their UI just like humans
Monkeys have active sting icon in UI as well
Hope its not too much commits for one pull request
Also changed some of the previous additiong to ABSTRACT items in
show_inv
Fixes#646, #579, #863
Completely redoes the click code. Moves all click related code into code/_onclick for reference. Also moves hud datum code and all the screen object code I could find into code/_onclick/hud, as it is related. Item attack(), attackby(), afterattack(), and attack_self() have been moved into item_attack.dm for consistency.
Completely removes dummy objects and adds atom.Adjacent(user). This proc checks for border items and anything marked with throwpass for determining whether or not you can reach a given square. A turf helper, ClickCross(), was added to facilitate this.
Removes the monolithic Atom.Click() proc in favor of an overridable click handler attached to mobs. Click code no longer uses the : path operator as a consequence, and mob/lastDblClick has been moved to Client/next_click. A few end arounds were necessary (screen objects, buildmode, and spells), but this has been handled by repurposing Atom.Click(); if you have special click code, insert it in the object's Click() function and return 1 to prevent normal processing.
This update adds support for attack_ghost(); the previous "new" click handler had support for it but was never finished. I have taken the liberty of letting ghosts click portals, the gateway, and the teleporter to jump to the intended target square, and kept the previous default action of examine()ing every damn thing you click. It is to be suggested that you could do more with this proc when ghost interactions are enabled.
This update also adds support for double clicking. It is currently only used for ghosts and AIs, because the original (first) click still registers normally. For both of these, double clicking a square will jump you to it, and double clicking a mob will follow it. In the case of ghosts, double clicking bots and the singularity will also set you following it; if you double click your own corpse, you will re-enter it; this also works if your body is in a closet, sleeper, DNA scanner, etc. Default mobs ignore double clicks as normal.
-- NOTE --
There are two flags which were previously unused or misused by click code: USEDELAY and NODELAY. Ostensibly, USEDELAY would double the normal 1sec delay, and NODELAY would remove it.
Using either of these flags as intended would significantly affect the timing of the game. In particular, USEDELAY is currently applied to guns and about everything else that acts at range. I am adding USEDELAY as a half-second increase for now, but I have not put a significant amount of thought into it. I considered lowering the normal 1sec delay to .8sec to balance it, but the consequences of that on combat involve more calculations than I care to make.
NODELAY seems to never have been used, and I did not implement it, but I could do so trivially.