Commit Graph

206 Commits

Author SHA1 Message Date
kevinz000
64851d819a Moves projectile processing to a subsystem (#30599)
ITT worst coder tries not to break everything and improve the code.
fixes #29211
🆑
refactor: Legacy projectiles have been removed. Instead, all projectiles are now PIXEL PROJECTILES!
rscadd: Reflectors can now be at any angle you want. Alt click them to set angle!
/🆑

Also lets just
fixes #18133
because the shortest path from point A to B is a straight line, when projectile ranges are "number of times moved/processed" ofcourse it's going to be shorter if you fire diagonally. It will be a problem as long as range is done like that or if range are in "pixels/tiles" moved without outright using get_dist.
2017-10-16 15:50:42 +13:00
nicbn
0fa8587f83 Bullet decals tweak (#31420)
* wee

* screen clock update

* resist and stop pulling

* Whoop, Joan messed up on the selection border so here's some fixed icons for that

* there we go

* Update walls.dm

* Update walls.dm

* Update walls.dm
2017-10-13 10:46:45 -04:00
Jordan Brown
189ed58a42 Merge pull request #31494 from MrStonedOne/tick_contention_tug_of_war
In which the stoner one gets stoned and tries to address tick contention... again
2017-10-10 14:27:59 -04:00
GLACoding
5289eac99d Syndicate turrets (and other machines in walls) can now be hit by projectiles. Also reworks target priorities. (#31012)
* Projectile code additions

* Adds !prehit checks and corrects the check for energy cannon spam

* Adds checks for machines and structures to stop double hitting

* JJRcop Requesting Fixes #1

* JJRcop Requested Fixes #2

* Fixes projectiles unable to hit mobs in machines

* Adds in a new proc select_target, and rewrites some bits

Fixes projectiles double hitting when targetting machines with mobs on them, also makes it so weapons with forcedodge can hit targets inside walls.

* AnturK requested fix #1
2017-10-10 21:28:04 +13:00
MrStonedOne
c8bb13d7c2 In which the stoner one gets stoned and tries to address tick contention... again
Tick contention is when the mc, sleep()/spawns(), and byond internal processing fight each other for game tick time. Usually in an unproductive way that wastes cpu cycles and reduces the effective amount of game tick to go around.

Tweaked the anti-tick contention heuristics of the MC a touch.

Fixed an incorrect operator in the mc's anti-tick contention heuristics causing it to apply in times of no lag rather then times of lag.

The mc's anti-tick contention heuristics now plays better with the high pop processing mode.

We no longer reserve the tail end of a tick for the mc to have if the mc doesn't plan to run next tick because of high pop mode or anti-tick contention heuristics.

stoplag() can now be given an initial delay allowing it to act like a smarter sleep (in that it sleeps for longer if the server is overwhelmed.

All short sleeps that only existed for performance reason and had no game play, visual/audio, or balance reasons behind their timing were converted to stoplag().
2017-10-09 01:21:43 -07:00
kevinz000
12b845fcd4 Update projectile.dm (#31180) 2017-10-05 08:50:42 +13:00
KorPhaeron
cc309236d9 ismecha define (#31192) 2017-10-02 02:03:40 -04:00
Jordan Brown
4178c209f1 Configuration datum refactor (#30763)
* Configuration datum refactor

* More WIP

* New easier on the eyes format

* More WIP

* Finished config.txt

* Fucktons more WIP

* The end of conversion draws near...

* Add all this shit

* Done converting entries finally

* Hunting down compile errors

* More WIP

* MORE CONVERSIONS

* More WIP

* More WIP

* Oh shit only 90 errors this time!

* IT COMPILES!!!

* Fixes world start runtimes
2017-09-29 15:36:51 +13:00
ShizCalev
5d91844926 Fixes suppressing weapons in your bag / pocket (#30894)
* Fixes suppressing in pocked and w_class issues

* Used defines for some things

* Reworded

* Removed the now redundant initial_w_class var

* Early returns

* Null
2017-09-26 11:19:00 +02:00
ShizCalev
39380d5b03 Removes old debug text 2017-09-19 18:56:39 -04:00
Ian Turk
7460f2c5b8 Replaced flags with flags_1 2017-08-16 13:01:15 -06:00
Jordan Brown
dce49b6caf Adds defines for mouse_opacity 2017-08-14 11:18:22 -04:00
Cyberboss
662cfd37da Merge pull request #29412 2017-07-30 20:54:44 -04:00
Joan Lung
522a8d6a95 Projectiles with non-angled sprites will no longer uselessly create and set a matrix (#29430) 2017-07-24 09:49:40 +02:00
Joan Lung
c1512653f5 Colossus's shotgun is now a static-spread blast of 5 bolts 2017-07-20 19:18:36 -04:00
oranges
fb113d67c6 Projectile target check hit code now uses a proc for resharing 2017-07-18 06:27:21 +00:00
oranges
5494f5328a Rename Bump to Collide (#29207)
This reduces confusion arising from the fact byond already has a built
in byond proc also named Bump.

We used an argument called yes to distinguish our Bump from byond's
builtin bump, but then we failed to make sure everyone of our bumps
properly override it, so a bunch of things have been double bumping

This resolves that issue permanently

I've also removed the second argument as it no longer has a purpose

I also cleaned up the recycler bump as it didn't do anything the
parent procs didn't already do
2017-07-14 13:47:22 +02:00
ShizCalev
59ef81245b Changes some 1s and 0s to TRUE and FALSE (#29144) 2017-07-10 10:31:34 -04:00
Jordan Brown
c1e3ac82ec Merge pull request #29081 from Fox-McCloud/reflect-refactor
Minor Projectile Reflection Refactor
2017-07-07 09:52:45 -04:00
Fox-McCloud
46b16513e2 it's truly false 2017-07-06 16:13:22 -04:00
Joan Lung
bea7bf9297 Adds Necropolis curses for cursed items in Necropolis ruins (#28992)
* Adds Necropolis curses for cursed items in Necropolis ruins

* Adds sounds credit @FuryMcFlurry

* stat tweak

* these are painful enough

* a bit stronger

* i kind of wish there was a version of get_ranged_target_turf() that worked off of angle.... but there isn't

* smart coder 2000

* bossed around
2017-07-06 11:14:26 -04:00
Fox-McCloud
380e938dae Minor Projectile Reflection Refactor 2017-07-06 02:45:30 -04:00
Ergovisavi
1a118c0651 Merge branch 'master' of https://github.com/tgstation/tgstation into gero_gero
# Conflicts:
#	icons/effects/96x96.dmi
2017-06-30 21:31:32 -07:00
Ergovisavi
999282e9d8 Junglestation frog mob take 1 2017-06-29 07:30:18 -07:00
kevinz000
226c0f1636 Fixes piggybacking giving person on top projectile density instead of the person on the bottom. (#28770) 2017-06-26 11:01:17 -03:00
kevinz000
d1108df80c [READY] The Portal Update - Linked portals, momentum conservation, and more! (#28055)
* THE PORTAL UPDATE

* portal gun checks

* damn functions

* o_range(s)

* Atmos Portals (#12)

* Rod Form's damage now scales with how much it's upgraded

* buffs chem grenades

* Fix getrev runtime

* Automatic changelog generation for PR #27948 [ci skip]

* Automatic changelog generation for PR #27951 [ci skip]

* Fixes admiral recall (#27861)

* the man with the 2 shotguns that blasted me to the end of the world with dualwielding. nerf (#27978)

* Beam rifles now slowdown while scoped (#27898)

* Update beam_rifle.dm

* Update beam_rifle.dm

* Update beam_rifle.dm

* Fixes a very silly clockwork false wall trick (#27996)

* Fixes #27979 (#28002)

* Automatic changelog generation for PR #28002 [ci skip]

* Fixes #27989 : Riot suits no longer hide jumpsuits (#28003)

* Fixes #27989

* remove tag

* Automatic changelog generation for PR #28003 [ci skip]

* Refactors a cooldown var to not require a spawn or sleep (#28011)

* wat (#28012)

* Remove spawns in favour of stacktrace calls, which don't stop the called (#28013)

proc

* Refactor another spawned cooldown var (#28014)

* Come on, pathetic (#28015)

* Refactor another spawn cooldown (#28016)

* Goodbye spawn (#28017)

* Another spawn timer (#28018)

* Remove a commented out function (#28019)

* Gotta go with the fro2.0 (#28010)

* This doesn't do anything (#28020)

* refactor another spawn cooldown (#28022)

* Refactors another spawn cooldown var (#28023)

* Refactor another spawn (#28024)

* Refactor another spawn var (#28027)

* woops

* woops2

* atmos links!

* unused

* wew

* ffs!

* Forced updates

* update

* Update portals.dm

* adjacent/atmospass checks

* Create portals.dm

* Update portals.dm

* Update other_tools.dm

* stuff

* crossed

* documentation

* reee

* no portal stacking!

* woops
2017-06-20 11:02:01 -04:00
Joan Lung
2672d88800 Renames stun effects and changes stun input values as preliminary work for changing stuns to status effects (#28524) 2017-06-18 23:03:51 -03:00
kevinz000
4f7970b3b9 Gang Machinegun Mouse Tracking + Projectile Source Fix (#27868)
Moves Gang Machineguns to its own file. It's not a goddamn portable turret and it's not even something that uses power!

Gang Machineguns now track the mouse location of the first buckled person (For those who don't code, that means the person using it)

Gang Machineguns will automatically aim and turn towards whatever that person is pointing at.. 
However, to make it target something specifically instead of a direction, you still have to hold your mouse down while firing.

Gang machineguns will no longer cause the user to shit out bullets if they unbuckle during firing :^)

SOME REFACTORS TO PIXEL PROJECTILES ARE INCLUDED...
2017-06-01 12:10:47 +12:00
kevinz000
29a1734b3c [READY]Replaces R&D accelerator laser with beam rifle, adds MouseMove and mouse parameter tracking to client, adds blast cannons! (#27618)
kevinz shitcode
2017-05-29 20:44:42 -05:00
kevinz000
aa61650035 Pixel projectile ricochets and reflections! (#27551)
Adds flags to atoms to allow them to reflect projectiles based on that projectile's reflection chance!
(can be overridden later for angle-based chances but this is good for now, ja?)
Gives titanium walls an 80% chance to reflect beams and 30% chance to reflect everything else!
Mostly-realistic reflection angles
If the math isn't fucked (I tested and the glitches seem to be from pixel projectile movement, not the math itself), this means we can have pixel projectile reflectors soon 😂😂😂😂😂
🆑
rscadd: Nanotrasen's new titanium wall blueprints are smooth enough that it can reflect projectiles!
/🆑
https://puu.sh/vYzMA/4f00c2a4a1.gif

o ya if this goes through i'll add pixel projectile support for reflectors when i have time so we can finally dump legacy b00lits.
2017-05-27 18:13:51 +12:00
Joan Lung
1b7c4a63dc Repaths /obj/effect/overlay/temp to /obj/effect/temp_visual (#27344) 2017-05-17 22:54:54 -05:00
kevinz000
75aaec129f Update projectile.dm 2017-05-02 01:59:02 -07:00
kevinz000
1d6dfb4060 Update projectile.dm 2017-04-03 03:31:37 -07:00
kevinz000
fe77d79a48 Update projectile.dm 2017-04-03 01:32:25 -07:00
kevinz000
0578826851 Update projectile.dm 2017-04-03 01:25:40 -07:00
Lzimann
5a618297ce Replaces the default output with the to_chat wrapper. 2017-03-10 01:32:05 -03:00
Kyle Spier-Swenson
12570805bd Closes the Pool. (#23150)
* Delete pool.dm

* Removes usage of PoolOrNew

* Wrap up
2017-01-22 16:00:23 -05:00
coiax
dabcce81ed CTF guns only hurt mobs with CTF armor (#22284)
* CTF guns only hurt mobs with CTF armor

This is moving towards the possiblity of spawning CTF spawns and flag
spawns onto the station without people being caught in the crossfire.

* Debug messages are bad
2016-12-23 09:31:55 +13:00
Norieno
7ef62027d6 Projectile Fix 2016-12-08 14:27:00 +03:00
XDTM
23906c811a Adds more golem types, adds golem shell creation with adamantine slimes (#21708)
* Diversifies golems

* Golems

* fixes a bug

* Glass golem + species bullet_act support

* Glass shatter

* More golems

* Final changes

* Added to xenobio

* update

* minor space

* Totally bananas

* silly me

* what Joan said

* Updated titanium, plastitanium, and alloy golems.
2016-11-28 18:34:08 +13:00
Leo
b0c95f03b0 Tweaks the projectile speed to be a bit slower 2016-11-13 12:07:38 -02:00
Cyberboss
6d1e30b062 Adds an exception for KAs 2016-11-09 16:07:39 -05:00
Cyberboss
bd9b35456d Fixes #21409 2016-11-09 09:07:04 -05:00
phil235
bdd972418c Projectiles are now twice as fast. 2016-11-04 17:54:20 +01:00
phil235
b7efc2cef4 Make energy guns able to use burst fire. (#21005)
* Make energy guns able to use burst fire.

* Changed obj/item/weapon/gun/projectile to /gun/ballistic and the name of the folder from "projectile" to "ballistic" to avoid confusion between actually projectiles and guns.

Syringe gun, energy guns and magic guns can now use burst fire.

* fixing merge conflict shit

* fixing map conflicts

* more map conflict fix

* two tiny fixes.

* tiny tweak

* fixing merge conflicts.
Moving the practice mini egun to the gun module.
Renamed nuclear.dm to energy_gun.dm

* map conflict fixes
2016-11-02 16:16:21 +13:00
Joan Lung
7f89fdf39f The range for combat-y visible messages is now a define (#21077) 2016-10-21 15:20:14 +13:00
phil235
f9c71fbfb0 Made some slightly less uglier sprites for attack effects.dmi
Melee attacks, gun firing, and things being hit by bullets will now still give witnesses a message, but only if they are less than 3 tiles away. The attacker still doesn't get the message for its own attacks.

I added two arguments to visible_message(), one to specify the visibility range, and one to ignore a specific mob that shouldn't get the message.
2016-10-15 16:10:28 +02:00
phil235
1ea0e47aa4 Visible_message() when being attacked by melee or projectile is replaced by a simple message only to the target instead of all viewers.
The message when firing a gun is removed.
To keep things balanced melee attacks (punches, alien attacks, animal attacks, etc...) now show a visual effect (similar to what we current have with item attacks.
Fixes muzzle flash effect not appearing for mech guns.
Fixes muzzle flash effect not appearing for certain ranged animal.
Fixes the item attack effect not being visible to camera viewers and mech occupants.
Fixes toy guns foam dart not dropping on the ground when shooting a mob on the same tile as us.
Fixes toy smg magazine sprite being invisible sometimes.
Fixes foam dart not facing the correct direction when fired.
Changes the bullet projectile sprite to have a slight tracer effect so as to be more visible.
2016-10-13 19:21:30 +02:00
phil235
5f835bfc26 Obj damaging system, acid damage, and fire damage refactor (WIP) (#20793)
Please refer to #20867 and #20870 for a easier view of the changes. Those two PRs show all meaningful changes (hopefully) and doesn't show the files changed with just 3 lines changed.

This PR does three things:

    It makes all children of /obj/ use the same damage system.
    Previously to make your new machine/structure be destroyable you needed to give it a var/health, and its own version of many damage related proc such as bullet_act(), take_damage(), attacked_by(), attack_animal(), attack_hulk(), ex_act(), etc... But now, all /obj/ use the same version of those procs at the /obj/ level in code/game/obj_defense.dm. All these obj share the same necessary vars: obj_integrity (health), max_integrity, integrity_failure (optional, below that health level failure happens), and the armor list var which was previously only for items, as well as the resistance_flags bitfield. When you want your new object to be destroyable, you only have to give it a value for those vars and maybe override one proc if you want a special behavior but that's it. This reorganization removes a lot of copypasta (most bullet_act() version for each obj were nearly identical). Two new elements are added to the armor list var: fire and acid armor values.
    How much damage an obj take depends on the armor value for each damage category. But some objects are INDESTRUCTIBLE and simply never take any damage no matter the type.
    The armor categories are:
    -melee(punches, item attacks, xeno/animal/hulk attacks, blob attacks, thrown weapons)
    -bullet
    -laser
    -energy (used by projectiles like ionrifle, taser, and also by EMPs)
    -bio (unused for this, only here because clothes use them when worn)
    -rad (same)
    -bomb (self-explanatory)
    -fire (for fire damage, not for heat damage though)
    -acid
    For machines and structures, when their health reaches zero the object is not just deleted but gets somewhat forcedeconstructed (the proc used is shared with the actual deconstruction system) which can drops things. To not frustrates players most of these objects drop most of the elements necessary to rebuild them (think window dropping shards). Machines drop a machine frame and all components for example (but the frame can then be itself smashed to pieces).
    For clothes, when they are damaged, they get a "damaged" overlay, which can also be seen when worn, similar to the "bloody" overlay.

    It refactors acid. See #20537.
    Some objects are ACID_PROOF and take no damage from acid, while others take varying amounts
    of damage depending on their acid armor value. Some objects are even UNACIDABLE, no acid effect can even land on them. Acid on objects can be washed off using water.

    It changes some aspect of damage from fires.
    All /obj/ can now take fire damage and be flammable, instead of just items. And instead of having just FLAMMABLE objs that become ON_FIRE as soon as some fire touch them (paper), we now have objects that are non flammable but do take damage from fire and become ashes if their health reaches zero (only for items). The damage taken varies depending on the obj's fire armor value and total health. There's also still obj and items that are FIRE_PROOF (although some might still be melted by lava if they're not LAVA_PROOF).
    When a mob is on fire, its clothes now take fire damage and can turn to ashes. Similarly, when a mob takes melee damages, its clothes gets damaged a bit and can turn to shreds. You can repair clothes with cloth that is produceable by botany's biogenerator.

    It also does many minor things:
        Clicking a structure/machine with an item on help intent never results in an attack (so you don't destroy a structure while trying to figure out which tool to use).
        I moved a lot of objects away from /obj/effect, it should only be used for visual effects, decals and stuff, not for things you can hit and destroy.
        I tweaked a bit how clothes shredding from bombs work.
        I made a machine or structure un/anchorable with the wrench, I don't remember which object...
        Since I changed the meaning of the FIRE_PROOF bitflag to actually mean fire immune, I'm buffing the slime extract that you apply on items to make them fire proof. well now they're really 100% fire proof!
        animals with environment_smash = 1 no longer one-hit destroy tables and stuff, we give them a decent obj_damage value so they can destroy most obj relatively fast depending on the animal.
        Probably a million things I forgot.

If you want to know how the damage system works all you need is the three obj vars "obj_integrity", "max_integrity", "integrity_failure", as well as the armor list var and the resistance_flags bitfield, and read the file obj_defense.dm
2016-10-10 11:14:59 +13:00
phil235
2d2975f783 Some preliminary changes before the damage refactor PR. The changes here do absolutely nothing gamewise.
This just adds some vars that the refactor will use. Putting this in a separate PR prevent the damage refactor PR from becoming too big (number of files changed) and hard to read and review.

Introduces the resistance_flags bitflag that replaces unacidable and burn_state.
Moves the armor var from item to /obj level and gives specific armor values to many objects, the armor list also gets two new armor types: fire and acid, which will be used in the refactor. the new fire and acid armor values are given to plenty of items.
2016-09-27 22:33:08 +02:00