Commit Graph
63 Commits
Author SHA1 Message Date
Spookerton 978f4511a5 examine signature changed to include distance
- distance is INFINITE, 0, or a positive integer based on get_dist() between
the examiner and examinee's turfs when they are on the same Z. When the
examiner is dead or a ghost, distance is always 0.
- also updates /examine( implementations to use it!
- adds w_class_to_name proc for reusing "It is a X item." examine behavior.
2024-01-31 13:49:52 +00:00
MechoidandGitHub a9fe81de92 Energy Gun maint, Electromag damage type. (#9017)
* Energy gun icons moved to their own DMI.

Electromag damage type added, allowing objects to deal EMP damage.
EMP beamtypes added as proof of concept for above, and future use.

* Sort unused icons from used.
Remove duplicates from gun2.

* lasersmg sprite returned

* E X A M P L E
2023-03-22 17:35:28 -08:00
atermonera 7a9806d9b4 Removes weapons 2022-04-17 19:14:32 -08:00
Rykka 3fd5296682 TGMC Ammo HUD Port
Ports over TGMC's Ammo HUD and all relevant code, adapted to work for Polaris's guns. This took me several days, but hey, I learned a bunch. <:
Time to port Aim Mode + Mentorhelp. :3c 
- All guns now have an ammo HUD sprite. If one lacks one, it will be ??? or blank, at which point, make an issue report, as all guns should be working by now.
- Guns will display how many rounds they have left until ammunition runs dry.
- Ammo will only count the casings that CURRENTLY have a projectile in them. This is slightly unrealistic, yes, but it is better and more intuitive for the player. This also enables guns like the revolver to work, given they recycle casings.
- Up to 4 ammo HUDs can be displayed at once, but given we lack TGMC's attachments and guncode, you'll only ever usually see 2. TBD on porting over TGMC guncode. <:
- Ammunition for multiple guns has different colors in the HUD based on what you currently have loaded.
- If you're looking at this later on to add new things. DON'T USE _FLASH IN THE HUD_STATE_EMPTY. THE _FLASH IS ADDED ON BY CODE.
- Grenades have a hud_state, pending us ever porting over a grenade launcher. Rockets ALSO have a hud_state.


Example of Laser/Energy Weapons:
https://i.imgur.com/MGvqGxh.mp4
Captain's Gun:
https://i.imgur.com/Wd0SS3C.gif

Full Test of all weapons:
https://streamable.com/usp4dy

Upstream port of https://github.com/CHOMPStation2/CHOMPStation2/pull/4033
2022-04-07 01:00:23 -06:00
MistakeNot4892andGitHub 2f0a618d45 /atom New() => Initialize() [MDB IGNORE] (#8298)
* Find and replace argless atom New() to Initialize().

* Manual replacement of no-arg New() to Initialize().

* Manually replacing remaining New() overrides.

* Fixing linter issues with now-removed New() args.

* Tidying area init overrides.

* Porting Neb's atom subsystem.

* Trying to isolate init problems.

* Adjusting Init code post-test.

* Merging duplicate Initialize() procs.

* Merge resolution.
2021-11-14 00:09:14 -08:00
Aronai Sieyes ad75bb86bd Alter playsound paradigm 2020-05-19 11:06:28 -04:00
AtermoneraandGitHub 61c4929d61 Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
Removes limits on eating, centralizes nutrition changing.
2020-04-29 14:14:11 -07:00
Aronai SieyesandGitHub 6c6644f86c Rewrite examine() to pass a list around (#7038) 2020-04-29 13:42:16 -07:00
Neerti 2dee403370 Removes limits on eating, centralizes nutrition changing. 2020-04-26 05:30:32 -04:00
AtermoneraandGitHub 88bd01c271 Merge pull request #6834 from Mechoid/RIGFixes
Fix various RIG issues
2020-03-16 22:06:01 -07:00
MechoidandGitHub c7ba2a8e4b Antag Uplink Expansion (#6788)
* Adds Energy Daggerpens, Thieves gloves and Buzzer Ring.

* Updoot

* fixfix weakfire

* Extra Touches

* chlgongog

* Fix antag injector cases.
2020-03-16 21:21:41 -07:00
Mechoid 08310b2fec Fix various RIG issues 2020-03-13 14:54:34 -07:00
Arokha SieyesandLeshana 5b15917d32 to_chat replacing stream operator 2020-02-17 13:14:08 -05:00
MechoidandAtermonera e2e870f2b4 Medical Expansion (#6465)
* Starts work on the Medical Expansion.

* Further Work

* Save Everything!

* Large volume of things.

* Log of Change

* I'm an idiot.

* Kidney assisted sprites. They didn't exist, for some reason.

* Fixfix

* Fixfix

* Update encased.dm

* Update glass.dm

* Update Chemistry-Reagents.dm

I am once more an idiot.

* Split augs.

* Fixfix
2019-10-19 19:27:39 -08:00
Mechoid be47785e34 I shouldn't do math at 2 AM 2019-02-08 22:24:34 -08:00
Mechoid 7d90ecf05e Fix a div 0. 2019-02-07 21:21:27 -08:00
SpadesandAtermonera 81c3036140 Guns sounds refactor and improvements (#5803)
* Gun sound updates

Grenade Launcher sound source:
https://freesound.org/people/LeMudCrab/sounds/163458/

* Actually, this is a better way to handle this.

* Fixed accidental inconsistent indentation

* Renames shotgun.ogg to Gunshot_shotgun.ogg

Also actually changes the file names like I was supposed to last night.

* *peers* Didn't I just fix this shit?

* Actually fixes the missing files this time

* Update audible_deception.dm

* Changed tungsten core projectile sound by request

* Actually no this line is stupid and makes me angry

Simplifies dumb code that was badly copypasted.

Also fixed missing D'eagle fire_sound

* Smarter code

Less copypasta, more runtimes prevented in case somebody decides to make
a soundless gun whether done intentionally or not.

* Update gun.dm
2019-01-06 18:27:24 -08:00
MechoidandAtermonera a428fad5e8 Event / Future PoI / Other weaponry & tools. (#5764)
* Starts work on New gear

* Solidify New Gear Post-Testing

* Fix non-meter energy weapons not using their normal power supply.

* Fixfix
2018-12-15 20:11:10 -08:00
kevinz000 4bb5ec014a Regex2 2018-10-14 20:04:44 -07:00
kevinz000 2c0898f870 Regex 2018-10-14 20:03:17 -07:00
Anewbe 91edca4434 Recharger refactor 2018-06-14 15:37:22 -05:00
Leshana d05163baba Fix missing descriptions on guns.
examine() is supposed to return a value, these ones did not.
2018-04-27 09:48:43 -04:00
AnewbeandAtermonera 534a588a6a Gun changes (#4185)
* Various background gun changes

* Forgot to include the sounds, woops

* Fixes some more gun stuff

* Makes the cham gun work again
2018-02-12 23:12:14 -08:00
Neerti 7497aef295 work 2017-11-26 12:08:05 -05:00
Anewbe c9cbbd3a9b Swaps non-mounted recharging guns to batteries 2017-10-27 20:43:31 -05:00
Neerti 4bfcec55f2 work 2017-09-04 21:52:47 -04:00
Leshana 4b46703d9d A plethora of Destroy() fixes - return qdel hints and clean stuff up. 2017-06-14 01:07:35 -04:00
Anewbe 771d8b9e4b Adds a smaller device cell for use in non-weapon devices 2016-10-08 15:34:18 -05:00
Anewbe 9ff32b5914 Weapon Cell Oversight fixes 2016-10-07 21:48:21 -05:00
Anewbe 0f51fda83a Energy weapons can be reloaded 2016-10-06 21:30:52 -05:00
Yoshax 374b866053 Completes dna lockable guns implementation by adding a dna chip that can be added to guns 2016-08-31 15:24:22 +01:00
Zuhayr ab9574ee06 Fixing some infinite loops in gun update_icon() calls. 2016-01-22 04:27:00 +10:30
Neerti e0986cb7ab Ballistic weapons will now correctly say that the firing mode was changed. 2015-12-02 08:04:34 -05:00
HarpyEagle ad54aca3ab Streamlines gun firemodes
Gun firemodes now work by setting vars on the parent gun item. Removes the
need to unpack a bunch of firemode values when shooting and the need for
certain guns to define special firemode types.
2015-08-10 14:38:08 -04:00
mwerezak 3906989eac Mostly removes creation of throwaway objects from chameleon items
- Replaces the creation of throwaway items from New() with initial() calls for all chameleon items.
- Unfortunately throwaway items could not be removed when switch appearance, as initial() does not work very will with list vars.
- Makes chameleon item name cache lists global.
- Makes chameleon guns a subtype of energy guns, removes chameleon magazines.
- Moves chameleon.dm to clothing module root
- Items without icon or icon_state are no longer selectable as chameleon appearances.
- Chameleon verbs go in their own panel.
2015-06-06 18:19:23 -04:00
PsiOmega e74c0e65bf Merge remote-tracking branch 'upstream/master' into dev-freeze
Conflicts:
	code/game/objects/items/weapons/power_cells.dm
2015-05-22 08:26:13 +02:00
mwerezak defc4c1f94 Adds check_charge(), checked_use() 2015-05-18 20:09:09 -04:00
mwerezak aeb1f5ae68 Updates instances of if(cell.use(...)) 2015-05-14 01:52:04 -04:00
mwerezak f3dd96bb8c Adjusts charge costs for gun/energy
In particular, charge costs were chosen so that mounted energy guns
drain 80% of a default rig's power cell in 40 shots, and mounted laser
cannons drain the same in 20 shots.
2015-05-07 00:13:21 -04:00
mwerezak 3e1e137cec Adds device powercells
Adds a type of smaller power cell for powering devices. Not used by much
at the moment, but it's one step closer to a more coherent picture of
power cells.
2015-05-06 23:41:57 -04:00
RavingManiac f1ccb3ee6e Muzzle-flash lighting effect for guns
Energy guns now display shots remaining on examine
2015-05-03 12:19:11 +10:00
PsiOmegaDelta 851d5423f3 Merge pull request #8971 from mwerezak/burst-fire
Gun firemode system, burst firing
2015-04-28 20:24:03 +02:00
mwerezak e93e9c1434 Expands firemodes to include energy gun settings
Expands on firemodes to include settings for the egun/adv egun,
floraray, and pulse rifle.

By default attack_self() now cycles firemodes for any gun. Updates
several projectile guns in a desperate attempt to avoid the need for an
unload ammo verb.
2015-04-28 02:06:54 -04:00
PsiOmega 1ae0ad6d92 Updates the atom_pool, now datum_pool, to handle any datum object.
Makes the garbage collector similarly robust. Continues the whole Destroy/qdel porting.
2015-04-24 09:59:05 +02:00
mwerezak 36cf695256 Adds Skowron's inhand icons for various guns 2015-03-28 02:10:09 -04:00
mwerezak dfec1fcb5c Improves energy gun charge icon handling, adds ion rifle in-hand sprite. 2015-02-22 21:46:18 -05:00
mwerezak 5ab6b91c5e Generalizes emp energy weapon drain to power cells 2015-02-12 01:37:41 -05:00
mwerezak ea39f7f718 Cleanup can_fire(), projectile flag
Removes can_fire() and moves some of it's functionality into
get_next_projectile(), which was renamed to consume_next_projectile() to
indicate the possibility of side-effects.
Also renamed flag var to check_armour
2015-02-12 01:37:19 -05:00
mwerezak 611a42bb33 Gun cleanup and rewrite
Rewrites gun.dm. Reorganizes the firing procedure into logical procs and cleans up some unnecessary variables or demotes them to the subtypes that actually care. Energy weapons that create their own projectiles no longer care about in_chamber. Launcher support is much more natural now.

Cleans up duplicated cyborg energy weapon power supply code. Adds support for energy weapons to recharge from external power sources, unifying cyborg and hardsuit mounted weapons. Incorporates the cyborg taser recharging mechanism. Cleans up laser tag gun duplication

Changes path strings to actual paths. Changes relative paths to absolute paths.

Renamed several targeting vars to make their purposes more clear.

Fixed targeting not handling firing correctly for certain subtypes.
2015-02-11 15:46:09 -05:00
unknownandmwerezak 39b467c9da New bullet types, projectile rewrite
* Refactors projectile Bump()
* Converts projectile_type var strings to paths
* Reorganizes bullet projectile paths
* Made a pass through all the bullet_act() definitions. Mainly ensured that damage_type is checked when dealing damage to certain objects. Removed stupid /turf bullet_act() override, replaced with on_hit() overrides on the relevant projectiles.

* Adds shotgun pellets projectile. Adds Raptor's shotgun slug sprite.
* Gives stunshots more of their own identity, refluffs them as taser cartridges for shotguns. They still aren't obtainable anywhere unless spawned.
* Makes projectiles pass through girders and cultgirders with a certain probability, unless the girder itself was clicked.
* Projectiles are also able to pass through grilles. Low damage projectiles have a chance to be blocked by grilles. High damage projectiles have a chance to have some damage absorbed by the grille.
* Makes projectiles for blanks invisible.
* Adds flash bullet types
* Adds support for 'penetrating' projectiles
* Swaps .45 and 9mm projectile types. .45s hit slightly harder, 9mils have more ammo capacity.
2015-02-06 20:09:32 -05:00