Commit Graph

342 Commits

Author SHA1 Message Date
MrPerson 24dcf08b2e Merge branch 'master' of https://github.com/tgstation/-tg-station into alert_alert_ur_a_faget
Conflicts:
	code/modules/mob/living/carbon/alien/humanoid/life.dm
	code/modules/mob/living/carbon/alien/larva/life.dm
	code/modules/mob/living/carbon/alien/life.dm
	code/modules/mob/living/carbon/monkey/life.dm
	icons/mob/screen_alien.dmi
2015-03-02 12:04:38 -08:00
MrPerson 8ffbc1be14 On screen alert system
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.
2015-03-01 17:31:26 -08:00
phil235 c8b0a21baa Fixes a lot of duplicated code in life and its subprocs for carbon mobs.
Fixes cyborg and monkeys no seeing any flash when flashed.
2015-02-21 00:37:04 +01:00
phil235 05e3c305ef Fixes floating animation not updating correctly.
Makes life() procs more object oriented.
2015-02-16 18:56:57 +01:00
paprka 2706be1190 optimizations to the way inhand files are found 2015-01-18 21:14:47 -08:00
paprka 88230fabfa inhand refactor 2015-01-18 20:58:31 -08:00
Iamgoofball bc9d48fa42 Mutadone and Mannitol, tweaks and changes. 2015-01-16 19:28:13 -08:00
Iamgoofball 38070820f3 Merge branch 'master' of https://github.com/tgstation/-tg-station into goonchem_shoehorn_backup 2015-01-16 17:25:50 -08:00
Iamgoofball f3398e58a9 Removes Star Trek chemistry and transfers us to Goon Chemistry. 2015-01-16 17:21:36 -08:00
phil235 884e2a6f73 Fixes some runtimes from audible_message proc. Fixes silent PDAs calling audible message when receiving a message. 2015-01-14 18:00:17 +01:00
Cheridan 4bd70b2908 Merge pull request #6986 from Menshin/ear_damage_ooping
Ear damage/deafness tidying
2015-01-13 01:19:56 -06:00
Menshin 435ccf7ff9 * OOP'ed ear damages/deafness status updating
* Silicons are now immuned to ear damages/deafness
* Only living mobs can now take ear damages/be deafened
* Simple animals are now healing ear damages/deafness at the same rate as other living mobs
* Fixes being able to hear AI announcements when deaf
2015-01-13 00:40:46 +01:00
tkdrg 1218610f75 Merge pull request #6847 from Razharas/GenFixes
Fixes bugs caused by datum mutations
2015-01-11 16:14:03 -03:00
carnie 2d26c7e2bd Resolves #6927 - Many Stat() procs did not have if(statpanel("panelname")) checks. 2015-01-11 17:01:41 +00:00
Razharas f48563f1d1 Fixes some bugs and rutimes tkdrg pointed
Monkeys arent blind anymore
Bad dna mutation runtime fixed
Two handed shit runtime fixed
Carbons unarmed attacks runtime fixed
2015-01-08 22:35:07 +03:00
carnie a730649167 Fixes breathing (indentation error)
Fixes atmos machinery (old global list snuck back into code)
2015-01-05 19:44:17 +00:00
carnie a3f5e7ebfd Merge branch 'master' of https://github.com/tgstation/-tg-station into SubSystems
Conflicts:
	code/game/gamemodes/setupgame.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/reagents/Chemistry-Machinery.dm
2015-01-04 01:52:14 +00:00
Matt Smith a9203dcc66 Updating ear code from humans.
Keeping it together.
2014-12-31 21:57:25 +00:00
carnie a029a49392 SubSystem rewrite
Misc:

+Fixes unreported issue with initializing lighting on a specific zlevel

+Fixes two similar issues with moveElement and moveRange. Where fromIndex or toIndex could be adjusted incorrectly in certain conditions. Potentially causing bad-sorts, or out of bound errors.

+Rewrites listclearnulls(list/L) to no longer iterate through L.len elements for every null in the list (plus 1). i.e. went from L.len*(number_of_nulls+1) list-element reads (best-case), to L.len list-element reads (worst-case)

+New proc/getElementByVar(list/L, varname, value) which finds the first datum in a list, with a variable named varname, which equals value. You can also feed it atoms instead of lists due to the way the in operator functions.

+Fixes an unreported issue with Yota's list2text rewrite. Under certain conditions, the first element would not be converted into a string. Causing type-mismatch runtimes.

+New global map_ready variable. This is not fully implemented yet, but will be used to avoid duplicate calls to initialize() for map objects.

+All turfs now maintain references to all lights currently illuminating them. This will mean higher memory use unfortunately, due to the huge number of turfs. However, it will speed up updateAffectingLights significantly. I've used list husbandry to reduce baseline memory usage, so it shouldn't be any worse than some past atmos modifications memory-wise.

-Removed 'quadratic lighting', can add this back at some point. Sorry.

+modified the way lum() works slightly, to allow turfs to have overridden delta-lumen. i.e. space cannot be illuminated more than its default ambiance. This allowed removal of some iffy special-snowflake lighting areas implemented by somebody else.

+Lighting images in the dmi can now use arbitrary naming schemes. It is reliant on order now. This allows the dmi to be replaced by simply dropping in a new dmi.

-Removed all subtypes of /area/shuttle. Shuttles now create duplicate 'rooms' of /area/shuttle. (More on this later). This will conflict with most maps. Guide on how to fix to follow.

+All verbs/tools relating to world.tick_lag were refactored to use world.fps. However old config text for setting tick_lag will still work (it converts the value to fps for you)

+MC stats improved using smoothing. They now have their own tab so they dont get in the way when you're playing as an admin.

-removed the push_mob_back stuff due to conflicting changes. Sorry Giacom.

_OK, NOW THE ACTUAL INTERESTING STUFF_

Following systems moved over to subsystem datums:
air_master
garbage_manager
lighting_controller
process_mobs (aka Life())
nanomanager
power
sun
pipenets
AFK kick loops
shuttle_controller (aka emergency shuttle/pods), supply_shuttle and other shuttles
voting
bots
radio
diseases
events
jobs
objects
ticker

Subsystems hooks and variables should be commented fairly in-depth. If anything isn't particularly clear, please make an issue.

Many system-specific global variables have been refactored into

All tickers which previously used world.timeofday now use world.time

some subsystems can iterate before round start. this resolves the issue with votes not working pregame
2014-12-31 13:25:41 +00:00
Razharas 8d110ee496 Tiny clean up, still lots of work to do
Only compiletested, these changes were never tested in the game yet
2014-12-12 23:57:11 +03:00
Razharas 0921aa201f Added datum mutations
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
2014-12-12 04:48:11 +03:00
Cheridan 347e7ecf9d Merge pull request #6135 from Menshin/species_radiation_processing_fix
Fixes radiation levels processing for aliens, brains and monkeys
2014-12-09 09:31:31 -06:00
Razharas 7758a0afed Ok now explosions shall work properly
Changed severity to target, make items not destroy themselves on
severity lower than 1, all that stuff
2014-12-05 23:21:48 +03:00
tkdrg 74d73b29aa mob/Bump() refactor. OOPing and general cleanup.
Removes copy-paste. Creates three new mob/living procs.
ObjBump, MobBump and PushAM which are called by mob/living/Bump().
Removes a ton of copy-paste and needless code.
Also fixes simple_animal Bump() on harm intent.
Previously, they'd move twice.
Fixes #3550
2014-11-30 22:51:17 -03:00
Menshin 501a9ba121 * prevent brains and monkeys from having negative radiation levels
* humanize and monkeyize now also transfer radiation levels if using the TR_KEEPDAMAGE flag
2014-11-29 20:24:48 +01:00
Menshin be0ce03636 Fixes radiation processing for aliens, brains and monkeys 2014-11-28 23:50:11 +01:00
hornygranny b573a00f5e Merge pull request #5918 from Razharas/Cfour
Who am i kidding, its explosions rework for a long time already
2014-11-27 13:58:56 -08:00
tkdrg 7153becc62 Fixes implants not updating the implant secHUD
Makes med huds /carbon because of monkeys
Makes HUDs update after implant removal surgery
Fixes cloning not recovering antag huds
2014-11-27 12:56:17 -03:00
Razharas ff456ebaf4 Unwinded most of shit
Meh
2014-11-19 21:36:45 +03:00
tkdrg 61adfa8543 Somewhat cleaned up alien/Life() and carbon life a little bit 2014-11-08 01:12:33 -03:00
phil235 2d04cbc39c Fixing the merge conflicts. 2014-11-07 22:31:26 +01:00
phil235 1d96ef944d Merge branch 'master' of https://github.com/tgstation/-tg-station into AttackHandFix
Conflicts:
	code/game/machinery/turrets.dm
	code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
	code/modules/mob/living/carbon/alien/larva/larva.dm
	code/modules/mob/living/carbon/human/human.dm
	code/modules/mob/living/carbon/human/human_attackalien.dm
	code/modules/mob/living/carbon/human/human_attackpaw.dm
	code/modules/mob/living/carbon/monkey/monkey.dm
	code/modules/mob/living/carbon/slime/slime.dm
	code/modules/mob/living/silicon/ai/ai.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/living/simple_animal/constructs.dm
	code/modules/mob/living/simple_animal/simple_animal.dm
2014-11-07 21:47:18 +01:00
phil235 bc5754b378 adding diagonal attack animation. 2014-11-07 15:42:07 +01:00
phil235 e5dd72cb8e Some absolute pathing fixed.
Fixing some mistakes and typos.
Fixes many attacks on simple animals not checking the force_threshold.(adding attack_threshold_check() )
2014-11-06 18:50:13 +01:00
phil235 f908befb36 attack_alien() moved to living/attack_alien() and overridden in the children.
Adding missing attack logs.

Fixing some mistakes in attack_animal()'s

Attack_hand():
cyborg can now be grabbed
AI and cyborg can be punched, with damage only with hulk.
Rearranging the attack_hand() procs a bit.
Adding missing attack logs.
2014-11-06 00:32:19 +01:00
phil235 2c54ea4f47 Attack_animal() is moved and handled in living/attack_animal() in living_defense.dm and overridden in children.
Maybe fixes the animal emote not working (Ian nuzzles, etc)

moving attack_paw to living and nerfing it by making prob(75) apply to all living not just monkeys.

Attack_larva() is moved to living/attack_larva
Adding larva rubbing on silicon
Adding possibility to fail to bite the living as larva.

Adding missing attack logs
2014-11-05 22:34:47 +01:00
phil235 dfbe73e80a Added attack logs where missing.
Moving attack_alien for silicons to silicon/attack_alien() with overrides in children.
Fixing messages.

Attack_animal for silicons: all in silicon/attack_animal()

Attack_slime handled in living, overriden in its children.
Simplified the definition of the stunprob var, slight nerf to slime shock.
2014-11-05 20:37:14 +01:00
phil235 ea1daa40d5 moved attack_slime to carbon/alien to handle both larva and humanoid, with a little override in larva and humanoid.
Created proc/grabbedby in mob/living/living_defense.dm to handle all grab stuff in the attack_hand's and attack_alien's.
Fixed typos in messages.
one attack_larva gets a return attack_alien for its harm part.
Fixing larva attack on larva, couldn't help a fellow larva.
moving humanoid/attack_larva to alien/attack_larva() to handle both humanoid and larva being attacked by larva.
Fix a bug with attack_slime where you could glomp a dead humanoid indefinitely.
2014-11-05 17:42:40 +01:00
phil235 74f8a08522 Merge branch 'master' of https://github.com/tgstation/-tg-station into AttackAnimation
Conflicts:
	code/modules/mob/living/living.dm
2014-11-04 18:55:07 +01:00
phil235 1506383b2c Adding some missing do_attack_animation()
Moving do_attack_animation() proc to mob/living
Fixing the pixel offset issue from beds especially rollerbed.
Fixing the nograv bouncing stopping because of another animation being used.(lying down, jittering, attack animation)
2014-11-03 15:11:39 +01:00
phil235 3f30912c51 WIP - Adding attack animation to most attacks.
Fixing a couple "for(......) show_message()".
2014-11-02 22:50:58 +01:00
Remie Richards 2da228084b Updates monkey acid_act(), it was actually an older draft (still functional, but message spammy) 2014-10-28 19:15:48 +00:00
Remie Richards 9e2b813fac /acid type reagents now deal damage to limbs individually, stopping if opposed by a piece of clothing.
Pieces of clothing now reduce in protection when surviving an acid attack.
added a potentially useless helper.
2014-10-28 03:55:21 +00:00
phil235 5fadf38aa6 Merge branch 'master' of https://github.com/tgstation/-tg-station into ed209fix
Conflicts:
	code/game/machinery/bots/ed209bot.dm
	code/game/machinery/bots/secbot.dm
2014-10-10 17:12:05 +02:00
phil235 c607638f27 WIP 2014-10-08 01:24:49 +02:00
MrPerson 651c3e6db5 Merge to master - sole conflicting file was ninja.dm FUCK NINJAS 2014-10-04 01:45:39 -07:00
phil235 3248e23887 Merge branch 'master' of https://github.com/tgstation/-tg-station into AudibleMsgFix
Conflicts:
	code/modules/recycling/disposal.dm
2014-09-25 18:45:53 +02:00
phil235 8d6ee69a36 Fixing issue where people can't hear their own emotes while inside lockers and the audible messages when also in the dark. Removing object_talk() proc (obsolete). 2014-09-14 16:17:16 +02:00
phil235 87d7c9e91e Create the audible_message() proc to replace most instance of " for(var/mob/M in hearers(...) show_message(..., 2)"
fixing typos and missing emotes in emote lists.
2014-09-14 01:15:15 +02:00
phil235 24686b5248 Fixes many messages/sounds or lack thereof for different mobs.
(

Nothing when Attack w/ item on dead animal
No varied attack verb for the above.
Item attack on alive SA/syndicate/melee: no sound
No Punchsound on alive and dead SA.
goat attack on SA/human/alien/monkey : no sound
attack_hand and Item attack on dying mouse: nothing
is_muzzled() fix in slime.dm and humanoid.dm and larva.dm and humanattac?kpaw.dm (put a muzzle on self, immune to monkey bites!)
monkey attack on animal: can't attack alive!
monkey (821) has attacked the grey baby slime (477)! (needs bite and sound)
monkey can't attack_paw alien/slime/animal with health below 0.
attack_animal on larva has no sound.
monkey bite on human: no sound
Larva on Humanoid/slime.
can't monkeybite a wounded alien.
larva needs to be attackable by humanoid/slime/hand/item/monkey/SA
Monkey cant bite dead/unconscious monkey
Larva bite has no sound. can't bite anyone but animals

)
2014-09-13 17:41:47 +02:00