Commit Graph

37 Commits

Author SHA1 Message Date
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
FlamingLily
3958db8d27 Cleans up surgery and organ code. (#59068)
About The Pull Request

Scrubs those filthy single letter variables out of surgery and organ code.
Replaces a few 0s and 1s with FALSE and TRUE where relevant
Normalises and cleans up surgery step lists and surgical implements lists.
Replaces a whole lotta for loops with for x as anything in y lops

This is my first PR (upstream anyway) so I encourage you to treat my code with as much confidence as I treat it, which is to say none, because there's a strong chance I've totally broken everything.

But it compiles!
Why It's Good For The Game

code improvement, follows contributing guidelines.
Changelog

🆑 FlamingLily
code: Cleanup of surgery and organ code
/🆑
2021-05-22 19:49:47 +12:00
dragomagol
aa51207dda Makes borg organ bags into an apparatus (#56401)
Co-authored-by: spookydonut <github@spooksoftware.com>
2021-02-05 01:34:47 -08:00
Qustinnus
707fc287b4 Replaces intents with combat mode (#56601)
About The Pull Request

This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:

    Disarm and Grab intents have been removed.
    Harm/Help is now combat mode, toggled by F or 4 by default
    The context/verb/popup menu now only works when you do shift+right-click
    Right click is now disarm, both in and out of combat mode.
    Grabbing is now on ctrl-click.
    If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)

Minor interaction changes:

Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game

Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.

As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.

As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.

In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.

The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog

cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
2021-02-04 16:37:32 +13:00
Qustinnus
f66ca34626 Refactors monkeys into a species (#55614)
Changes monkeys from carbon subtype to species.
2020-12-30 16:30:15 +01:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
Jared-Fogle
418bd80a6b Remove healing skill (#52005)
* Remove healing skill

* Remove dissection from tech web
2020-07-07 10:10:12 -04:00
moo
bb3d562d01 Cobbduceus: Surgery Skill XP/Step Buffs (#49196)
* 💉

* 🐣

* excels help

* waaa_fb

* fixed lobotomy skill

* waaa_fb2
2020-02-14 19:17:27 +01:00
moo
4022d0c427 Bumps up Surgery XP gains, Fixes Surgery XP Gains, Fixes Surgery Failure Bug (#48231)
* works on my machine

* saving is a sin 1% of the time!

* works... on... my... machine...?

* i can't test this but it worked on my machine too

Co-Authored-By: Bobbahbrown <bobbahbrown@gmail.com>

* more testing /w TW

* caps XP gain (per iteration) for TW

* no skinnies

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
2020-01-02 23:48:15 +01:00
moo
964b3d65d5 Cobbduceus: Healing lvl? (Medical Skill) (#47538)
* b

* helps to commit huh

* math is hard

* parenthesis are even harder

* Update code/datums/skills/_skill.dm

Co-Authored-By: Bobbahbrown <bobbahbrown@gmail.com>

* removes efficiency... or efficacy 😏

* baby sha... i mean files
2019-11-21 04:49:24 +00:00
ATH1909
277f3df7d1 Update limb_augmentation.dm 2019-11-11 15:17:54 -06:00
Fikou
e450be44dc surgery tool refactor (#46856)
* awooooooooooooooooo

* a

* aw shet

* woops!!

* a

* wow heck you
2019-10-09 12:25:42 -04:00
kingofkosmos
df1fecc58c Adds notice-span to visible_messages with no spans (#46044)
About The Pull Request

Adds 'notice' span class to all visible_messages which had no span class, making all those black messages blue.
Why It's Good For The Game

This should help differentiate action-messages from talking-messages in the chat. More actions will be blue, thus black talking-messages should pop out more.
2019-08-26 20:50:00 +12:00
kingofkosmos
fb9731492c * extra spaces removed from "span class = '" --> "span class='"
* warning-spans added to cases of "You need..."
2019-06-25 21:03:25 +03:00
XDTM
3f28227f6c Makes surgery more stealthy (#44483)
About The Pull Request

Part of #44440

Surgery now gives detailed description to the surgeon and anyone within one tile of distance, and more vague or ambiguous descriptions to the patient and anyone further away. This can lead to a surgeon being able to perform a brainwashing in place of a brain surgery with nobody being the wiser, or implanting a different organ than the one agreed on, and so on.
Changelog

cl
add: Surgery steps are now shown in detail only to the surgeon and anyone standing adjacent to them; the patient and people watching from further away get a more vague/ambiguous description.
/cl
2019-06-18 11:44:58 +12:00
skoglol
8f0685df94 Fix some minor surgery text inconsistensies (#44198)
Currently we have all the basic surgeries listed without capital
letter, and all the researched ones with. This bring them all in line.
Also changed the name of a step in revival surgery to make it more
intuitive.
2019-06-01 15:16:12 -07:00
AnturK
199339d994 Surgery cleanup (#40788)
* Surgery cleanup

* Proper mobtype
2018-10-12 04:42:48 -04:00
XDTM
402f38b597 Fixes chest and head augmentation 2018-08-22 20:21:15 +02:00
Patrick Chieppe
2c8248575a Logging system refactor and improvement (#39521)
* Refactor several log lines to use datum_info_line and atom_loc_line

* Add default return strings from datum_info_line and atom_loc_line

* Add parentheses around atom_loc_line data

* Change more logs to use atom_loc_line

* Add check in atom_loc_line for turfs to avoid calling get_turf on them

* Re-add removed 'at'

* Replace datum_info_line with key_name and atom_loc_line with loc_name

* Refactor logging functions

* Avoid double-logging self-interactions

* Fallback to simple stringification if all else fails in key_name()

* Rewrite muscle spasm logging to use log_message

* Standardize logging of martial arts

* Tweak individual logging panel look

* Fix individual logging panel source

* When I typed || I really meant &&

* Fix Telecomms logging always showing client logs in the panel

* Reverts addition of buggy ownership log to panel

* Remove colon

* Fix missing log_directed_talk tag

* Add warning for missing type in log_direted_talk

* Change warnings to stack_traces

* Add square brackets around fallthrough key_name() case to help parsing

* Allow atom arguments/src in log_*() functions

* Change log_combat call with null argument to log_message

* Change mecha types' log_message() arguments to match atom and mob version

* Add key_name() case for atoms

* Fix resist_grab() unsetting pulledby before log_combat gets a chance to use it

* Fix log_globally logic

* Add logging for hitting objects with items

* Move log_combat() to atoms.dm

* Use utility functions for object stringification in log_combat()

* Use utility functions for object stringification in log_combat()

* Add missing logs for interacting with display cases

* Rewrite log_combat() comment

* Add missing space in log_combat()

* Add logging for hitting grilles barehanded

* Add missing ..()
2018-08-12 21:41:09 +02:00
XDTM
3a32240a9e Augmentation uses replace_limb instead of manually doing the same (#39595) 2018-08-08 12:42:17 -04:00
XDTM
43184b87a5 Limb damage rework (#38436)
balance: Limbs no longer need to have full damage to be dismemberable, although more damage means higher dismemberment chance.
balance: Damaging limbs now only counts as 75% for the mob's total health. Bleeding still applies normally.
add: Limbs that reach max damage will now be disabled until they are healed to half health.
add: Disabled limbs work similarly to missing limbs, but they can still be used to wear items or handcuffs.


Fixes #38445


Always felt odd how reaching max damage on a limb had no consequence. Now it does.
Currently i only added effects for disabling arms and legs; "breaking" heads and torsos has no effect as of now.
2018-07-17 20:34:02 +12:00
Ian Turk
fbe5f4a062 Replaced body zone magic strings with defines 2018-03-19 15:44:51 -05:00
ACCount
6de835a629 Adds tool_behaviour support to crafting, door wires, surgeries and mech construction (#35384)
* Adds tool_behaviour support to construction datums (mech construction)

* Adds tool_behaviour support to wire datums

* Adds tool_behavior support to surgeries

* Adds tool_behavior support to crafting

* New proc, to be used for checking tool qualities in hands

* Improves tool quality support on wires
2018-02-12 20:52:11 +01:00
swindly
6fe81af275 Allows cyborgs to perform limb augmentation (#32233)
* allows organ storage bags to be used to augment limbs

* replaces hardcoded stuff with intiial()
2017-11-02 23:21:14 -04:00
Jordan Brown
b6d349e1d4 Remove drop_item, drop_item_v, put_in_hands_or_del (#31386) 2017-10-07 13:36:33 -04:00
Jordan Brown
af4d9a85c9 Repaths /obj/item/weapon to /obj/item (#29929) 2017-08-16 10:38:51 -03:00
danno "big fucking moron" brando
9e969fd016 Augment Styles/Changes (#28977)
Full augment sets on the left, partial mix/match on the right.

This PR aims to make augmenting slightly more interesting than just turning your body grey, while also begin reminiscent of the cyborg parts that are actually used in the process.

Using the augment manipulator now found in robotics, one can insert a part and custom fit it to one of three different styles (security, engineering, and standard). Mix and match if you so choose, or make a full set for maximum style.
2017-07-18 18:35:01 +12:00
Profakos
67b0a7293e Fixes invisible robotic limbs (#26073)
* Fixes invisible surplus right leg

* New argument for change_bodypart_status

* I am not an admin

* Changes change_bodypart_status arguments to boolean
2017-04-12 19:07:00 -06:00
QualityVan
cf33dac52b Pseudolimbs refactor (#25804)
* Moves checks for psuedolimbs(chainsaws, armblades) into dismemberment

* Introduces psuedoparts for limbs, which some surgeries don't work on. Prevents silly things like putting a toolset in an armblade.

* Spelling, TRUE/FALSE defines, and removal of unnecessary setter.
2017-04-09 13:28:34 +02:00
KorPhaeron
41f5ece330 Fixes augmetic surgery resulting in invisible limbs (#25446) 2017-03-25 10:01:00 -03:00
Lzimann
5a618297ce Replaces the default output with the to_chat wrapper. 2017-03-10 01:32:05 -03:00
XDTM
fcf4320bb5 [Ready for review/merge]Rolls chainsaw surgery into prosthetic replacement, makes synthetic armblades implantable (#23213)
🆑 XDTM
tweak: Implanting chainsaws is now a prosthetic replacement instead of its own surgery.
add: You can now implant synthetic armblades (from an emagged limb grower) into people's arms to use it at its full potential.
del: Chainsaw removal surgery has been removed as well; you'll have to sever the limb and get a new one.
/🆑
Reason for adding

Makes the surgery code more consistent, without a snowflake surgery for chainsaws. This also gives a legitimate use for synthetic armblades, which were otherwise just a much shittier and harder to get circular saw.
2017-01-30 09:51:55 +13:00
Remie Richards
3f1faf85cb Fixes augmentation surgery allowing non-robot limbs (#22815)
* Fixes augmentation surgery allowing non-robot limbs

```&&``` -> ```||```

* user feedback is nice
2017-01-08 20:32:07 -05:00
phil235
443a4501ec Carbon Dismemberment , second attempt. (#20461)
* - I rearranged X_defense.dm mob files, more damage_procs.dm.Here's what's inside:
* X_defense.dm: is for the procs of attacks onto the mob, all the XXX_act() proc (things happening to the mob), as well as protection check and get procs (armor, ear prot, projectile dismemberment)
* damage_procs.dm: actual damage procs like adjustBruteLoss() getfireloss, any proc that handles damaging.

- some bugfixes with gibspawner effects.
- monkey's bodyparts can be dismembered and are used to create its icon.
- brains are no longer carbons.
- all carbon have bodyparts that can be dropped when the mob is gibbed.
- adminspawned bodyparts now have a default icon.
- robotic parts are now a child of bodyparts.
- health analyzer on alien/monkey shows damage on each limb
- added admin option to add/remove bodyparts for all carbon (instead of just remove on humans)
- Fixes keycheck message spam for janicart and all when trying to move.
- Fixes bug with buckling to a scooter while limbless.
- removed arg "hit_zone" in proj's on_hit() because we can already use the def_zone var (where hit_zone got its value)
- Fixes mob not getting any damage when hit by a projectile on their missing limb, despite a hit message shown). carbon/apply_damage() now when we specify a def_zone and the corresponding BP is missing we default to the chest instead of stopping the proc. Consistently with how human/attacked_by() default to its attack to chest if missing limb.
- Fixes mini uzi icon when empty and no mag (typo).
- I renamed and changed a bit check_eye_prot and ear prot
- renamed flash_eyes to flash_act()
- I made a soundbang_act() similar to flash_act but for loud bangs.
- added a gib and dust animation to larva.
- husked monkeys
- no damage overlay for husk or skeleton.
- damage overlay for robotic limb now.
- no damage overlay when organic bodypart husked.
- one handed human with a bloody hand still get a bloody single hand overlay.
- fix admin heal being unable to heal robotic bodyparts.
- slightly touched robotic bodypart sprites (head one pixel too high)
- Fixes 18532 "beheaded husk has hair".
- Fixes 18584 "Ling stasis appearance bug"
- no more eyes or lipstick on husks.
- can remove flashes/wires/cells from robot chest and head with crowbar.
- Fixes not being able to surgically amputate robotic arm/leg.

* More merge conflict fixes and adding the new files I forgot to add.

* of course I forgot birdstation

* More typos and stuff I forgot to undo.

* Fixing a typo in examine.dm
Removing an unnecessary check.
Making admin heal regenerate limbs on all carbons.
Monkey-human transformation now transfer missing limbs info and presence of a cavity implant.
NODISMEMBER species can still lack a limb if the mob lacked a limb and changed into that new species.
Changeling Regenerate ability now also regenerate limbs when in monkey form. (and remove some cryptic useless code)

* Fixing more conflicts with remie's multihands PR.

* Fixes runtime with hud when calling build_hand_slots().
Fixes lightgeist healing not working.
Fixes null.handle_fall() runtimes with pirate mobs.
Fixes typo in has_left_hadn() and has_right_hand().

* Derp, forgot to remove debug message.
2016-09-12 19:33:50 +02:00
Remie Richards
00738bd2a3 More than 2 hands!? WHAAAAAAT 2016-09-02 16:10:16 +01:00
Remie Richards
57b2773146 Fixes being able to use an invalid limb for augmentation surgery
It told the user it was wrong, but never stopped them.
2016-08-12 21:50:19 +01:00
Jack Edge
7f49175967 Renames files under code/ with naughty characters
Like seriously, don't use spaces in file names, this is a codebase,
they're annoying. Hopefully Github will show these renames correctly.
2016-05-24 12:16:19 +01:00