Files
Bubberstation/code/_globalvars/bitfields.dm
Ryll Ryll 5c174800fb Grenades and projectiles can have shrapnel and embed, all carbons can suffer embeds, some bullets can ricochet, sizable refactor of embedding (#49634)
About The Pull Request

It annoyed me that we have a perfectly good frag grenade item, and a perfectly good shrapnel component, but no crossover episode between the two. This remedies that, and does a lot, lot more.

dreamseeker_2020-03-30_05-01-13.png

dreamseeker_2020-03-30_05-01-26.png

Big points:

    Adds new component: pellet_cloud, which can be used by ammo casings, guns, and landmines to spray shrapnel and display aggregate hit messages ("You're hit by 6 buckshot pellets!" vs "You're hit by the buckshot pellet in the X" x6). All gun ammo that shoot multiple pellets now use this component on firing.
    Adds stingbangs, premium less-lethal grenades that shoot off lots of stinger pellets, to cargo. Frag grenades are also reworked to have smaller booms, but shoot off lots of shrapnel shards. You can jump on top of these grenades to absorb a portion of the shrapnel to save those around you! There's an achievement for dying this way, called "Look Out, Sir!"
    Projectiles can now embed items/shrapnel. Adds .38 DumDum ammo to cargo that does less damage and has negative armor pen, but can embed in people. This is the only ammo that currently embeds.
    Bullets can now ricochet off walls, structures, and machinery (harder surfaces are more likely to ricochet). Only standard .38 and Match Grade .38/.357/L6 ammo can ricochet, with Match Grade being much better at ricocheting. You can buy Match Grade .38 from cargo and Match Grade L6 ammo from the nuke uplink, while Match .357 is admin only.
    Armor now protects you from harmful embeds, taking the better of the bullet/bomb armor on the affected limb. Armor penetration can modify this of course, and many blunt embeds like stingbangs and DumDum bullets are significantly worse if you have even 1 armor.

Other misc fixes/changes

    Refactored the embed element a bunch and fixed it creating new elements for every instance rather than expected bespoke behavior. There are new /obj/item helpers for modifying and adding embedding.
    Fixes #49989: Spears can no longer embed in turfs cause their sprite is annoying to me, it's generally harder for most things to embed in turfs
    Fixes #49741: New carbon helpers for removing embedded objects
    Fixes #46416: Handles embedded objects getting qdel'd or moved while embedded
    Renamed the old shrapnel component for RPG loot to MIRV to avoid confusion
    Repathed frag grenades from under minibombs to under base grenades, and added explosion vars to base grenades

Why It's Good For The Game

Fixes a bunch of janky design with embeds, adds lots of new avenues for projectile and grenade variety, ricochets and collateral damage are fun!
Changelog

🆑 Ryll/Shaps
add: Adds stingbangs to cargo (and one in the sec vendor premium), premium less-lethal grenades that shoot off a giant swarm of stingball pellets to help incapacitate swarms of people in tight quarters. You can jump on top of a live one to be a hero and absorb a bunch of shrapnel, same with frag grenades. There's even an achievement for dying to a grenade you jumped on!
add: Projectiles can now embed in people! Or at least grenade shrapnel and the new .38 DumDum ammo, now available in cargo, can. DumDum rounds excel against unarmored targets, but are pricey and do poorly against armored targets.
add: Bullets can now ricochet! Or at least, standard .38 and the new .38/L6 Match Grade ammo can. Match Grade ammo is finely tuned to ricochet easier and seek targets off bounces better, and can be purchased from cargo (for the .38) or nuke ops uplink (for the L6), but standard .38 ammo has a chance to ricochet as well.
tweak: Frag grenades now have smaller explosions but shoot off a bunch of devastating shrapnel, excellent for soft targets!
tweak: Shotguns and other multi-pellet guns now print aggregate messages, so you'll get one "You've been hit by 6 buckshot pellets!" rather than 6 "You've been hit by the buckshot pellet in the X!" messages. Bye bye lag!
balance: Armor can now protect against embedding weapons, taking the best of either the bullet or bomb armor for the limb in question away from the embed chance. Some weapons are better at piercing armor than others!
/🆑
2020-04-03 16:58:38 +13:00

219 lines
6.7 KiB
Plaintext

GLOBAL_LIST_INIT(bitfields, list(
"appearance_flags" = list(
"LONG_GLIDE" = LONG_GLIDE,
"RESET_COLOR" = RESET_COLOR,
"RESET_ALPHA" = RESET_ALPHA,
"RESET_TRANSFORM" = RESET_TRANSFORM,
"NO_CLIENT_COLOR" = NO_CLIENT_COLOR,
"KEEP_TOGETHER" = KEEP_TOGETHER,
"KEEP_APART" = KEEP_APART,
"PLANE_MASTER" = PLANE_MASTER,
"TILE_BOUND" = TILE_BOUND,
"PIXEL_SCALE" = PIXEL_SCALE
),
"sight" = list(
"SEE_INFRA" = SEE_INFRA,
"SEE_SELF" = SEE_SELF,
"SEE_MOBS" = SEE_MOBS,
"SEE_OBJS" = SEE_OBJS,
"SEE_TURFS" = SEE_TURFS,
"SEE_PIXELS" = SEE_PIXELS,
"SEE_THRU" = SEE_THRU,
"SEE_BLACKNESS" = SEE_BLACKNESS,
"BLIND" = BLIND
),
"obj_flags" = list(
"EMAGGED" = EMAGGED,
"IN_USE" = IN_USE,
"CAN_BE_HIT" = CAN_BE_HIT,
"BEING_SHOCKED" = BEING_SHOCKED,
"DANGEROUS_POSSESSION" = DANGEROUS_POSSESSION,
"ON_BLUEPRINTS" = ON_BLUEPRINTS,
"UNIQUE_RENAME" = UNIQUE_RENAME,
"USES_TGUI" = USES_TGUI,
"FROZEN" = FROZEN,
),
"datum_flags" = list(
"DF_USE_TAG" = DF_USE_TAG,
"DF_VAR_EDITED" = DF_VAR_EDITED,
"DF_ISPROCESSING" = DF_ISPROCESSING,
),
"item_flags" = list(
"BEING_REMOVED" = BEING_REMOVED,
"IN_INVENTORY" = IN_INVENTORY,
"FORCE_STRING_OVERRIDE" = FORCE_STRING_OVERRIDE,
"NEEDS_PERMIT" = NEEDS_PERMIT,
"SLOWS_WHILE_IN_HAND" = SLOWS_WHILE_IN_HAND,
"NO_MAT_REDEMPTION" = NO_MAT_REDEMPTION,
"DROPDEL" = DROPDEL,
"NOBLUDGEON" = NOBLUDGEON,
"ABSTRACT" = ABSTRACT,
"IN_STORAGE" = IN_STORAGE,
),
"admin_flags" = list(
"BUILDMODE" = R_BUILD,
"ADMIN" = R_ADMIN,
"BAN" = R_BAN,
"FUN" = R_FUN,
"SERVER" = R_SERVER,
"DEBUG" = R_DEBUG,
"POSSESS" = R_POSSESS,
"PERMISSIONS" = R_PERMISSIONS,
"STEALTH" = R_STEALTH,
"POLL" = R_POLL,
"VAREDIT" = R_VAREDIT,
"SOUNDS" = R_SOUND,
"SPAWN" = R_SPAWN,
"AUTOLOGIN" = R_AUTOADMIN,
"DBRANKS" = R_DBRANKS
),
"interaction_flags_atom" = list(
"INTERACT_ATOM_REQUIRES_ANCHORED" = INTERACT_ATOM_REQUIRES_ANCHORED,
"INTERACT_ATOM_ATTACK_HAND" = INTERACT_ATOM_ATTACK_HAND,
"INTERACT_ATOM_UI_INTERACT" = INTERACT_ATOM_UI_INTERACT,
"INTERACT_ATOM_REQUIRES_DEXTERITY" = INTERACT_ATOM_REQUIRES_DEXTERITY,
"INTERACT_ATOM_IGNORE_INCAPACITATED" = INTERACT_ATOM_IGNORE_INCAPACITATED,
"INTERACT_ATOM_IGNORE_RESTRAINED" = INTERACT_ATOM_IGNORE_RESTRAINED,
"INTERACT_ATOM_CHECK_GRAB" = INTERACT_ATOM_CHECK_GRAB,
"INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND" = INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND,
"INTERACT_ATOM_NO_FINGERPRINT_INTERACT" = INTERACT_ATOM_NO_FINGERPRINT_INTERACT
),
"interaction_flags_machine" = list(
"INTERACT_MACHINE_OPEN" = INTERACT_MACHINE_OPEN,
"INTERACT_MACHINE_OFFLINE" = INTERACT_MACHINE_OFFLINE,
"INTERACT_MACHINE_WIRES_IF_OPEN" = INTERACT_MACHINE_WIRES_IF_OPEN,
"INTERACT_MACHINE_ALLOW_SILICON" = INTERACT_MACHINE_ALLOW_SILICON,
"INTERACT_MACHINE_OPEN_SILICON" = INTERACT_MACHINE_OPEN_SILICON,
"INTERACT_MACHINE_REQUIRES_SILICON" = INTERACT_MACHINE_REQUIRES_SILICON,
"INTERACT_MACHINE_SET_MACHINE" = INTERACT_MACHINE_SET_MACHINE
),
"interaction_flags_item" = list(
"INTERACT_ITEM_ATTACK_HAND_PICKUP" = INTERACT_ITEM_ATTACK_HAND_PICKUP,
),
"pass_flags" = list(
"PASSTABLE" = PASSTABLE,
"PASSGLASS" = PASSGLASS,
"PASSGRILLE" = PASSGRILLE,
"PASSBLOB" = PASSBLOB,
"PASSMOB" = PASSMOB,
"PASSCLOSEDTURF" = PASSCLOSEDTURF,
"LETPASSTHROW" = LETPASSTHROW
),
"movement_type" = list(
"GROUND" = GROUND,
"FLYING" = FLYING,
"VENTCRAWLING" = VENTCRAWLING,
"FLOATING" = FLOATING,
"UNSTOPPABLE" = UNSTOPPABLE
),
"resistance_flags" = list(
"LAVA_PROOF" = LAVA_PROOF,
"FIRE_PROOF" = FIRE_PROOF,
"FLAMMABLE" = FLAMMABLE,
"ON_FIRE" = ON_FIRE,
"UNACIDABLE" = UNACIDABLE,
"ACID_PROOF" = ACID_PROOF,
"INDESTRUCTIBLE" = INDESTRUCTIBLE,
"FREEZE_PROOF" = FREEZE_PROOF
),
"flags_1" = list(
"NOJAUNT_1" = NOJAUNT_1,
"UNUSED_RESERVATION_TURF_1" = UNUSED_RESERVATION_TURF_1,
"CAN_BE_DIRTY_1" = CAN_BE_DIRTY_1,
"CULT_PERMITTED_1" = CULT_PERMITTED_1,
"HEAR_1" = HEAR_1,
"CONDUCT_1" = CONDUCT_1,
"NO_LAVA_GEN_1" = NO_LAVA_GEN_1,
"NODECONSTRUCT_1" = NODECONSTRUCT_1,
"OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1,
"ON_BORDER_1" = ON_BORDER_1,
"NO_RUINS_1" = NO_RUINS_1,
"PREVENT_CLICK_UNDER_1" = PREVENT_CLICK_UNDER_1,
"HOLOGRAM_1" = HOLOGRAM_1,
"SHOCKED_1" = SHOCKED_1,
"INITIALIZED_1" = INITIALIZED_1,
"ADMIN_SPAWNED_1" = ADMIN_SPAWNED_1
),
"flags_ricochet" = list(
"RICOCHET_SHINY" = RICOCHET_SHINY,
"RICOCHET_HARD" = RICOCHET_HARD
),
"clothing_flags" = list(
"LAVAPROTECT" = LAVAPROTECT,
"STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE,
"BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT,
"MASKINTERNALS" = MASKINTERNALS,
"NOSLIP" = NOSLIP,
"THICKMATERIAL" = THICKMATERIAL,
"VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE,
"VOICEBOX_DISABLED" = VOICEBOX_DISABLED,
"SCAN_REAGENTS" = SCAN_REAGENTS,
"BLOCKS_SHOVE_KNOCKDOWN" = BLOCKS_SHOVE_KNOCKDOWN,
"SNUG_FIT" = SNUG_FIT,
"ANTI_TINFOIL_MANEUVER" = ANTI_TINFOIL_MANEUVER,
),
"zap_flags" = list(
"ZAP_MOB_DAMAGE" = ZAP_MOB_DAMAGE,
"ZAP_OBJ_DAMAGE" = ZAP_OBJ_DAMAGE,
"ZAP_MOB_STUN" = ZAP_MOB_STUN,
"ZAP_ALLOW_DUPLICATES" = ZAP_ALLOW_DUPLICATES,
"ZAP_MACHINE_EXPLOSIVE" = ZAP_MACHINE_EXPLOSIVE,
),
"smooth" = list(
"SMOOTH_TRUE" = SMOOTH_TRUE,
"SMOOTH_MORE" = SMOOTH_MORE,
"SMOOTH_DIAGONAL" = SMOOTH_DIAGONAL,
"SMOOTH_BORDER" = SMOOTH_BORDER,
"SMOOTH_QUEUED" = SMOOTH_QUEUED,
),
"car_traits" = list(
"CAN_KIDNAP" = CAN_KIDNAP,
),
"mobility_flags" = list(
"MOVE" = MOBILITY_MOVE,
"STAND" = MOBILITY_STAND,
"PICKUP" = MOBILITY_PICKUP,
"USE" = MOBILITY_USE,
"UI" = MOBILITY_UI,
"STORAGE" = MOBILITY_STORAGE,
"PULL" = MOBILITY_PULL,
),
"rad_flags" = list(
"RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS,
"RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE,
),
"disease_flags" = list (
"CURABLE" = CURABLE,
"CAN_CARRY" = CAN_CARRY,
"CAN_RESIST" = CAN_RESIST
),
"mob_biotypes" = list (
"MOB_ORGANIC" = MOB_ORGANIC,
"MOB_MINERAL" = MOB_MINERAL,
"MOB_ROBOTIC" = MOB_ROBOTIC,
"MOB_UNDEAD" = MOB_UNDEAD,
"MOB_HUMANOID" = MOB_HUMANOID,
"MOB_BUG" = MOB_BUG,
"MOB_BEAST" = MOB_BEAST,
"MOB_EPIC" = MOB_EPIC,
"MOB_REPTILE" = MOB_REPTILE,
"MOB_SPIRIT" = MOB_SPIRIT
),
"machine_stat" = list (
"BROKEN" = BROKEN,
"NOPOWER" = NOPOWER,
"MAINT" = MAINT,
"EMPED" = EMPED
),
"vis_flags" = list(
"VIS_INHERIT_ICON" = VIS_INHERIT_ICON,
"VIS_INHERIT_ICON_STATE" = VIS_INHERIT_ICON_STATE,
"VIS_INHERIT_DIR" = VIS_INHERIT_DIR,
"VIS_INHERIT_LAYER" = VIS_INHERIT_LAYER,
"VIS_INHERIT_PLANE" = VIS_INHERIT_PLANE,
"VIS_INHERIT_ID" = VIS_INHERIT_ID,
"VIS_UNDERLAY" = VIS_UNDERLAY,
"VIS_HIDE" = VIS_HIDE
)
))