Files
Paradise/code/_globalvars/bitfields.dm
AVeryReluctantSpider 6a1fc4f5c2 Praise Be and Skkula: The PR (Skkulakin Race 2025) [READY FOR REVIEW] (#30744)
* skulk.dm placeholder for testing purposes

* Made an oopsie, fixed

* Skulk flesh color and language color testing

* Adding working language key, fixed language color

* Changed skulk flesh color, may change it again soon

* Ran tgui, hopefully fixed language color

* Changed skulk language color, hopefully for good this time

* Missed a spot

* Tgui fuckery

* If at first you don't succeed, cry to yourself for a bit then try again

* Tgui makes me violent

* Eyewear no longer save Skkulakin from flashes

* Skulk bones now hurt really bad

* Adds Skulk Sprites, Back Accessories, and other Placeholders

* Desperately trying to get body_accessories to work

* Minor name changes

* Skkulakin now have colorable eyes

* Makes the silk-spinning ability somewhat work, more changes need to be made

* Fixes the Skulks' ability to spin silk, however still needs changes

* Changed Skulks easier bone breaks into a trait

* Skulks (Now with 100% ethically sourced back spines!)

* Gives Skkulakin the Vox clothing sprites (Not counting head, glasses, or masks)

* Added update_spines_layer() for testing and help purposes

* Working on getting Skulk Backspines to change color depending on preset

* Skulk Backspines are now colored the same as your preset up spawning in (Thank you, Qwerty)

* Undefines SILK_NUTRITION_AMOUNT (I made a woopsie)

* Readds a return I may have accidentally removed at some point

* Skkulakin can now chitter

* Silk now be used to craft cloth and has an icon

* TGUI is going to make me do things

* Fixes the Brittle Bones Trait to work with Frail Quirk

* Sprite Fix

* Adds masking helpers

* Made a small woopsie

* I'm genuinely a fucking idiot

* Adds a bunch of new clothing

* Changes some clothing descriptions

* Fixes more placeholders and adds two new outfits

* Made small mistake, fixed

* Temporary change (Will revert soon)

* Reverted previous changes as the event is now over

* New Skulk Clothing, added some to the racial tab in the loadout, and made low-inquis robes orderable from cargo

* Adds High-Inquis Robes into cargo console

* Adds Skkulakin Flag (Orderable From Merch Vendor)

* Made small mistake, fixed it

* Inquisitorial Crate only has Low-Inquisitor clothing again

* Commits all offered suggestions

* Converts spans to defines and sorts out the rest of Skulk clothing (No MODs just yet)

* Gives Skulks the Nian Butt Sprite for now

* Fixes a small error with biosuits

* Fixes small coding error

* Fixes a few mor small coding errors

* Update code/modules/mob/living/carbon/human/appearance.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Update code/game/objects/items/stacks/sheets/sheet_types.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Update code/modules/economy/merch_items.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Removes 'collective' from outfit_admin.dm

* Basic Pixel-Shifting (Not Yet Complete)

* improve skulk headwear offset

* Revert "improve skulk headwear offset"

This reverts commit 2d93d61699.

* improve skulk headwear offset

* Cleans up some code and fixes ALL hats for Skkulakin

* Lets the AI speak Skkula-Runespeak, fixes Bomber Jackets and Winter Coats, makes Backpacks look better, fixes other small sprite issues

* Let them wear pants

* Update code/modules/mob/language.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Fixes masks and glasses for skkulakin

* Fixes Inquisitor Masks and adds missing Engineering Outfits

* Fixes Explorer Suits and HECK Suit for Skulks

* Fixes a few small issues and resolves some suggested changes

* Rebuilds TGUI

* Fixes Science Jumpsuits & Radsuits

* Fix Skkulakin chef belt disappearance.

* fix string assoc lookups for alists

* Update code/game/objects/structures/mirror.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/species/skulk.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>

---------

Signed-off-by: AVeryReluctantSpider <102713858+AVeryReluctantSpider@users.noreply.github.com>
Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Alfalfa Scout <alfalfascout@proton.me>
2026-01-17 20:54:56 +00:00

236 lines
6.6 KiB
Plaintext

GLOBAL_LIST_INIT(bitfields, generate_bitfields())
/// Specifies a bitfield for smarter debugging
/datum/bitfield
/// The variable name that contains the bitfield
var/variable
/// An associative list of the readable flag and its true value
var/list/flags
/datum/bitfield/can_vv_delete()
return FALSE
/datum/bitfield/vv_edit_var(var_name, var_value)
return FALSE // no.
/// Turns /datum/bitfield subtypes into a list for use in debugging
/proc/generate_bitfields()
var/list/bitfields = list()
for(var/_bitfield in subtypesof(/datum/bitfield))
var/datum/bitfield/bitfield = new _bitfield
bitfields[bitfield.variable] = bitfield.flags
return bitfields
/proc/translate_bitfield(variable_type, variable_name, variable_value)
if(variable_type != VV_BITFIELD)
return variable_value
var/list/flags = list()
for(var/flag in GLOB.bitfields[variable_name])
if(variable_value & GLOB.bitfields[variable_name][flag])
flags += flag
if(length(flags))
return jointext(flags, ", ")
return "NONE"
/proc/input_bitfield(mob/user, bitfield, current_value)
if(!user || !(bitfield in GLOB.bitfields))
return
var/list/currently_checked = list()
for(var/name in GLOB.bitfields[bitfield])
currently_checked[name] = (current_value & GLOB.bitfields[bitfield][name])
var/list/result = tgui_input_checkbox_list(user, "Editing bitfield for [bitfield].", "Editing bitfield", currently_checked)
if(isnull(result) || !islist(result))
return
var/new_result = 0
for(var/name in GLOB.bitfields[bitfield])
if(result[name])
new_result |= GLOB.bitfields[bitfield][name]
return new_result
// MARK: Default byond bitfields
DEFINE_BITFIELD(appearance_flags, list(
"KEEP_APART" = KEEP_APART,
"KEEP_TOGETHER" = KEEP_TOGETHER,
"LONG_GLIDE" = LONG_GLIDE,
"NO_CLIENT_COLOR" = NO_CLIENT_COLOR,
"PIXEL_SCALE" = PIXEL_SCALE,
"PLANE_MASTER" = PLANE_MASTER,
"RESET_ALPHA" = RESET_ALPHA,
"RESET_COLOR" = RESET_COLOR,
"RESET_TRANSFORM" = RESET_TRANSFORM,
"TILE_BOUND" = TILE_BOUND,
"PASS_MOUSE" = PASS_MOUSE,
"TILE_MOVER" = TILE_MOVER,
))
DEFINE_BITFIELD(sight, list(
"BLIND" = BLIND,
"SEE_BLACKNESS" = SEE_BLACKNESS,
"SEE_INFRA" = SEE_INFRA,
"SEE_MOBS" = SEE_MOBS,
"SEE_OBJS" = SEE_OBJS,
"SEE_PIXELS" = SEE_PIXELS,
"SEE_SELF" = SEE_SELF,
"SEE_THRU" = SEE_THRU,
"SEE_TURFS" = SEE_TURFS,
))
DEFINE_BITFIELD(vis_flags, list(
"VIS_HIDE" = VIS_HIDE,
"VIS_INHERIT_DIR" = VIS_INHERIT_DIR,
"VIS_INHERIT_ICON" = VIS_INHERIT_ICON,
"VIS_INHERIT_ICON_STATE" = VIS_INHERIT_ICON_STATE,
"VIS_INHERIT_ID" = VIS_INHERIT_ID,
"VIS_INHERIT_LAYER" = VIS_INHERIT_LAYER,
"VIS_INHERIT_PLANE" = VIS_INHERIT_PLANE,
"VIS_UNDERLAY" = VIS_UNDERLAY,
))
// MARK: Other bitfields
DEFINE_BITFIELD(flags, list(
"STOPSPRESSUREDMAGE" = STOPSPRESSUREDMAGE,
"NODROP" = NODROP,
"NOBLUDGEON" = NOBLUDGEON,
"AIRTIGHT" = AIRTIGHT,
"HANDSLOW" = HANDSLOW,
"CONDUCT" = CONDUCT,
"ABSTRACT" = ABSTRACT,
"SKIP_TRANSFORM_REEQUIP" = SKIP_TRANSFORM_REEQUIP,
"ON_BORDER" = ON_BORDER,
"PREVENT_CLICK_UNDER" = PREVENT_CLICK_UNDER,
"NODECONSTRUCT" = NODECONSTRUCT,
"EARBANGPROTECT" = EARBANGPROTECT,
"HEADBANGPROTECT" = HEADBANGPROTECT,
"BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT,
"THICKMATERIAL" = THICKMATERIAL,
"DROPDEL" = DROPDEL,
"NO_SCREENTIPS" = NO_SCREENTIPS,
))
DEFINE_BITFIELD(turf_flags, list(
"UNUSED_RESERVATION_TURF" = UNUSED_RESERVATION_TURF,
"RESERVATION_TURF" = RESERVATION_TURF
))
DEFINE_BITFIELD(flags_2, list(
"SLOWS_WHILE_IN_HAND_2" = SLOWS_WHILE_IN_HAND_2,
"NO_EMP_WIRES_2" = NO_EMP_WIRES_2,
"HOLOGRAM_2" = HOLOGRAM_2,
"FROZEN_2" = FROZEN_2,
"STATIONLOVING_2" = STATIONLOVING_2,
"INFORM_ADMINS_ON_RELOCATE_2" = INFORM_ADMINS_ON_RELOCATE_2,
"BANG_PROTECT_2" = BANG_PROTECT_2,
"BLOCKS_LIGHT_2" = BLOCKS_LIGHT_2,
"DECAL_INIT_UPDATE_EXPERIENCED_2" = DECAL_INIT_UPDATE_EXPERIENCED_2,
"OMNITONGUE_2" = OMNITONGUE_2,
"SHOCKED_2" = SHOCKED_2,
"NO_MAT_REDEMPTION_2" = NO_MAT_REDEMPTION_2,
"LAVA_PROTECT_2" = LAVA_PROTECT_2,
"OVERLAY_QUEUED_2" = OVERLAY_QUEUED_2,
"RAD_PROTECT_CONTENTS_2" = RAD_PROTECT_CONTENTS_2,
"RAD_NO_CONTAMINATE_2" = RAD_NO_CONTAMINATE_2,
"IMMUNE_TO_SHUTTLECRUSH_2" = IMMUNE_TO_SHUTTLECRUSH_2,
"NO_MALF_EFFECT_2" = NO_MALF_EFFECT_2,
"CRITICAL_ATOM_2" = CRITICAL_ATOM_2,
"RANDOM_BLOCKER_2" = RANDOM_BLOCKER_2,
"ALLOW_BELT_NO_JUMPSUIT_2" = ALLOW_BELT_NO_JUMPSUIT_2,
))
DEFINE_BITFIELD(flags_ricochet, list(
"RICOCHET_SHINY" = RICOCHET_SHINY,
"RICOCHET_HARD" = RICOCHET_HARD,
))
DEFINE_BITFIELD(clothing_flags, list(
"HAS_UNDERWEAR" = HAS_UNDERWEAR,
"HAS_UNDERSHIRT" = HAS_UNDERSHIRT,
"HAS_SOCKS" = HAS_SOCKS,
))
DEFINE_BITFIELD(bodyflags, list(
"HAS_HEAD_ACCESSORY" = HAS_HEAD_ACCESSORY,
"HAS_TAIL" = HAS_TAIL,
"TAIL_OVERLAPPED" = TAIL_OVERLAPPED,
"HAS_SKIN_TONE" = HAS_SKIN_TONE,
"HAS_ICON_SKIN_TONE" = HAS_ICON_SKIN_TONE,
"HAS_SKIN_COLOR" = HAS_SKIN_COLOR,
"HAS_HEAD_MARKINGS" = HAS_HEAD_MARKINGS,
"HAS_BODY_MARKINGS" = HAS_BODY_MARKINGS,
"HAS_TAIL_MARKINGS" = HAS_TAIL_MARKINGS,
"TAIL_WAGGING" = TAIL_WAGGING,
"NO_EYES" = NO_EYES,
"HAS_ALT_HEADS" = HAS_ALT_HEADS,
"HAS_WING" = HAS_WING,
"HAS_BACK_SPINES" = HAS_BACK_SPINES,
"HAS_BODYACC_COLOR" = HAS_BODYACC_COLOR,
"BALD" = BALD,
"ALL_RPARTS" = ALL_RPARTS,
"SHAVED" = SHAVED,
))
DEFINE_BITFIELD(pass_flags, list(
"PASSTABLE" = PASSTABLE,
"PASSGLASS" = PASSGLASS,
"PASSGRILLE" = PASSGRILLE,
"PASSBLOB" = PASSBLOB,
"PASSMOB" = PASSMOB,
"LETPASSTHROW" = LETPASSTHROW,
"PASSFENCE" = PASSFENCE,
"PASSDOOR" = PASSDOOR,
"PASSGIRDER" = PASSGIRDER,
"PASSBARRICADE" = PASSBARRICADE,
"PASSTAKE" = PASSTAKE,
))
DEFINE_BITFIELD(pass_flags_self, list(
"PASSTAKE" = PASSTAKE,
"LETPASSTHROW" = LETPASSTHROW,
))
DEFINE_BITFIELD(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,
))
DEFINE_BITFIELD(mobility_flags, list(
"MOBILITY_MOVE" = MOBILITY_MOVE,
"MOBILITY_STAND" = MOBILITY_STAND,
"MOBILITY_PICKUP" = MOBILITY_PICKUP,
"MOBILITY_USE" = MOBILITY_USE,
"MOBILITY_PULL" = MOBILITY_PULL,
))
DEFINE_BITFIELD(status_flags, list(
"CANSTUN" = CANSTUN,
"CANWEAKEN" = CANWEAKEN,
"CANPARALYSE" = CANPARALYSE,
"CANPUSH" = CANPUSH,
"PASSEMOTES" = PASSEMOTES,
"GODMODE" = GODMODE,
"TERMINATOR_FORM" = TERMINATOR_FORM,
))
DEFINE_BITFIELD(ghost_flags, list(
"GHOST_CAN_REENTER" = GHOST_CAN_REENTER,
"GHOST_START_AS_OBSERVER" = GHOST_START_AS_OBSERVER,
"GHOST_RESPAWNABLE" = GHOST_RESPAWNABLE,
"GHOST_VISION" = GHOST_VISION,
"GHOST_NO_VISION" = GHOST_NO_VISION,
"GHOST_SEE_RADS" = GHOST_SEE_RADS,
"GHOST_HEALTH_SCAN" = GHOST_HEALTH_SCAN,
"GHOST_GAS_SCAN" = GHOST_GAS_SCAN,
"GHOST_PLANT_ANALYZER" = GHOST_PLANT_ANALYZER,
))