Skip to content

Commit

Permalink
Adds a bunch of miscellainous stuff i made (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wollywoger authored Jan 28, 2024
1 parent 60968f5 commit 67083f8
Show file tree
Hide file tree
Showing 31 changed files with 248 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"**/.pnp.*": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"files.eol": "\n",
"files.insertFinalNewline": true,
Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#define DNA_UNI_IDENTITY_BLOCKS 7

/// This number needs to equal the total number of DNA blocks
#define DNA_FEATURE_BLOCKS 19
#define DNA_FEATURE_BLOCKS 20

#define DNA_MUTANT_COLOR_BLOCK 1
#define DNA_ETHEREAL_COLOR_BLOCK 2
Expand All @@ -61,6 +61,7 @@
#define DNA_ARM_WINGS_BLOCK 17 // NON-MODULE CHANGE
#define DNA_AVIAN_EARS_BLOCK 18 // NON-MODULE CHANGE
#define DNA_AVIAN_TAIL_BLOCK 19 // NON-MODULE CHANGE
#define DNA_FEATHER_COLOR_BLOCK 20 // NON-MODULE CHANGE

#define DNA_SEQUENCE_LENGTH 4
#define DNA_MUTATION_BLOCKS 8
Expand Down Expand Up @@ -94,6 +95,7 @@
/// Similar to NOEYESPRITES but only excludes the eyeless overlay
#define NOEYEHOLES 19


//organ slots
#define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator"
#define ORGAN_SLOT_APPENDIX "appendix"
Expand Down
1 change: 1 addition & 0 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, GLOB.pod_hair_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/head_tentacles, GLOB.head_tentacles_list) //NON-MODULE CHANGE
init_sprite_accessory_subtypes(/datum/sprite_accessory/arm_wings, GLOB.arm_wings_list) //NON-MODULE CHANGE
init_sprite_accessory_subtypes(/datum/sprite_accessory/arm_wingsopen, GLOB.arm_wingsopen_list) //NON-MODULE CHANGE
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/avian, GLOB.tails_list_avian) //NON-MODULE CHANGE
init_sprite_accessory_subtypes(/datum/sprite_accessory/plumage, GLOB.avian_ears_list) //NON-MODULE CHANGE
//Species
Expand Down
1 change: 1 addition & 0 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"head_tentacles" = pick(GLOB.head_tentacles_list), // Non-Module Changes from here on, see above
"arm_wings" = pick(GLOB.arm_wings_list),
"tail_avian" = pick(GLOB.tails_list_avian),
"feathers" = "#[pick("7F","FF")][pick("7F","FF")][pick("7F","FF")]",
"ears_avian" = pick(GLOB.avian_ears_list), // end Non-Module Changes
))

Expand Down
6 changes: 6 additions & 0 deletions code/datums/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
L[DNA_AVIAN_TAIL_BLOCK] = construct_block(GLOB.tails_list_avian.Find(features["tail_avian"]), GLOB.tails_list_avian.len)
if(features["ears_avian"]) // NON-MODULE CHANGE
L[DNA_AVIAN_EARS_BLOCK] = construct_block(GLOB.avian_ears_list.Find(features["ears_avian"]), GLOB.avian_ears_list.len)
if(features["feathers"]) // NON-MODULE CHANGE
L[DNA_MUTANT_COLOR_BLOCK] = sanitize_hexcolor(features["feathers"], include_crunch = FALSE)

for(var/blocknum in 1 to DNA_FEATURE_BLOCKS)
. += L[blocknum] || random_string(GET_UI_BLOCK_LEN(blocknum), GLOB.hex_characters)
Expand Down Expand Up @@ -371,6 +373,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
set_uni_feature_block(blocknumber, construct_block(GLOB.tails_list_avian.Find(features["tail_avian"]), GLOB.tails_list_avian.len))
if(DNA_AVIAN_EARS_BLOCK) // NON-MODULE CHANGE
set_uni_feature_block(blocknumber, construct_block(GLOB.avian_ears_list.Find(features["ears_avian"]), GLOB.avian_ears_list.len))
if(DNA_FEATHER_COLOR_BLOCK) // NON-MODULE CHANGE
set_uni_feature_block(blocknumber, sanitize_hexcolor(features["feathers"], include_crunch = FALSE))


//Please use add_mutation or activate_mutation instead
Expand Down Expand Up @@ -652,6 +656,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
dna.features["tail_avian"] = GLOB.tails_list_avian[deconstruct_block(get_uni_feature_block(features, DNA_AVIAN_TAIL_BLOCK), GLOB.tails_list_avian.len)]
if(dna.features["ears_avian"]) // NON-MODULE CHANGE
dna.features["ears_avian"] = GLOB.avian_ears_list[deconstruct_block(get_uni_feature_block(features, DNA_AVIAN_EARS_BLOCK), GLOB.avian_ears_list.len)]
if(dna.features["feathers"]) // NON-MODULE CHANGE
dna.features["feathers"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_FEATHER_COLOR_BLOCK))

for(var/obj/item/organ/external/external_organ in organs)
external_organ.mutate_feature(features, src)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/human/dummy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
target.dna.features["arm_wings"] = "Monochrome" // NON-MODULE CHANGE
target.dna.features["tail_avian"] = "Eagle" // NON-MODULE CHANGE
target.dna.features["ears_avian"] = "Hermes" // NON-MODULE CHANGE
target.dna.features["feathers"] = "#FF3B76" //NON-MODULE CHANGE


/// Provides a dummy that is consistently bald, white, naked, etc.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions maplestation_modules/code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// --Adds the trait for the cardcollector quirk
#define TRAIT_CARDCOLLECTOR "cardcollector"

// -- increases damage from weapons with the "sharpness" trait. Such as the chef's knife, or a claymore.
#define TRAIT_SHARPNESS_VULNERABLE "sharpnessvulnerable"

// -- used for species that use the "feathers" dna to color stuff. Necessary to allow access to its color setter pref.
#define TRAIT_FEATHERED "feathers"

///Gives positive mood on drinking anything caffeinated, kinda generic so people can like coffee, tea, energy drinks, whatever.
#define TRAIT_CAFFEINE_LOVER "caffeine_lover"
101 changes: 74 additions & 27 deletions maplestation_modules/code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
@@ -1,54 +1,101 @@
// Baseball sheathe
/obj/item/storage/belt/baseball
// Sheathe Base Type
/obj/item/storage/belt/sheathe
icon = 'maplestation_modules/icons/obj/clothing/belts.dmi'
lefthand_file = 'maplestation_modules/icons/mob/inhands/clothes/belts_lefthand.dmi'
righthand_file = 'maplestation_modules/icons/mob/inhands/clothes/belts_righthand.dmi'
worn_icon = 'maplestation_modules/icons/mob/clothing/belt.dmi'
name = "Bat Sheath"
desc = "A modified archery quiver meant to make offhand carrying of bats quick and easy."
name = "Sheathe Basetype Item"
desc = "Whoa there buddy! You've got the Sheathe Basetype, if you're looking for the captain's sheathe, try /obj/item/storage/belt/sabre !" // this will be changed when i bother to post this refactor to tg
var/altclick_tip = "Altclick to draw the ITEM"
icon_state = "baseball_pack"
inhand_icon_state = "baseball_pack"
worn_icon_state = "baseball_pack"
w_class = WEIGHT_CLASS_BULKY
content_overlays = TRUE
var/storable_items = list()
var/max_weight_class = WEIGHT_CLASS_HUGE

/obj/item/storage/belt/baseball/Initialize(mapload)
/obj/item/storage/belt/sheathe/Initialize(mapload)
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
atom_storage.max_slots = 1
atom_storage.max_specific_storage = WEIGHT_CLASS_HUGE
atom_storage.set_holdable(list(
/obj/item/melee/baseball_bat,
/obj/item/melee/baseball_bat/homerun,
/obj/item/melee/baseball_bat/barbed,
/obj/item/melee/baseball_bat/ablative,
/obj/item/melee/baseball_bat/golden,
))

/obj/item/storage/belt/baseball/examine(mob/user)
atom_storage.max_specific_storage = max_weight_class
atom_storage.set_holdable(storable_items)

/obj/item/storage/belt/sheathe/examine(mob/user)
. = ..()
if(length(contents))
. += span_notice("Alt-click it to quickly draw the bat.")

/obj/item/storage/belt/baseball/update_icon_state()
. = ..()
worn_icon_state = initial(worn_icon_state)
for(var/obj/item/melee/baseball_bat/bat in contents)
worn_icon_state += "[bat.belt_sprite]"
. += span_notice(altclick_tip)

/obj/item/storage/belt/baseball/AltClick(mob/user)
/obj/item/storage/belt/sheathe/AltClick(mob/user)
if(!user.can_perform_action(src, NEED_HANDS|FORBID_TELEKINESIS_REACH))
return
if(length(contents))
var/obj/item/bat = contents[1]
user.balloon_alert_to_viewers("unsheathes bat")
user.put_in_hands(bat)
var/obj/item/sheatheditem = contents[1]
user.balloon_alert_to_viewers("unsheathes [sheatheditem]")
user.put_in_hands(sheatheditem)
update_icon()
else
balloon_alert(user, "empty!")

/obj/item/storage/belt/sheathe/update_icon_state()
icon_state = initial(icon_state)
inhand_icon_state = initial(inhand_icon_state)
worn_icon_state = initial(worn_icon_state)
return ..()

/obj/item/storage/belt/sheathe/maugrimsheathe
icon = 'maplestation_modules/icons/obj/clothing/belts.dmi'
lefthand_file = 'maplestation_modules/icons/mob/inhands/clothes/belts_lefthand.dmi'
righthand_file = 'maplestation_modules/icons/mob/inhands/clothes/belts_righthand.dmi'
worn_icon = 'maplestation_modules/icons/mob/clothing/belt.dmi'
name = "Maugrim's Sheathe"
desc = "A sheathe"
altclick_tip = "Altclick to draw the sword"
icon_state = "maugrim_sheathe"
inhand_icon_state = "maugrim_sheathe"
worn_icon_state = "maugrim_sheathe"
w_class = WEIGHT_CLASS_BULKY
content_overlays = TRUE
storable_items = list(/obj/item/melee/sabre/maugrim)
max_weight_class = WEIGHT_CLASS_HUGE

/obj/item/storage/belt/sheathe/maugrimsheathe/update_icon_state()
. = ..()
if(length(contents))
icon_state += "-sword"
inhand_icon_state += "-sword"
worn_icon_state += "-sword"

// baseball bat sheathe
/obj/item/storage/belt/sheathe/baseball
icon = 'maplestation_modules/icons/obj/clothing/belts.dmi'
lefthand_file = 'maplestation_modules/icons/mob/inhands/clothes/belts_lefthand.dmi'
righthand_file = 'maplestation_modules/icons/mob/inhands/clothes/belts_righthand.dmi'
worn_icon = 'maplestation_modules/icons/mob/clothing/belt.dmi'
name = "Bat Sheath"
desc = "A modified archery quiver meant to make offhand carrying of bats quick and easy."
altclick_tip = "Altclick to draw the bat"
icon_state = "baseball_pack"
inhand_icon_state = "baseball_pack"
worn_icon_state = "baseball_pack"
w_class = WEIGHT_CLASS_BULKY
content_overlays = TRUE
storable_items = list(/obj/item/melee/baseball_bat,
/obj/item/melee/baseball_bat/homerun,
/obj/item/melee/baseball_bat/barbed,
/obj/item/melee/baseball_bat/ablative,
/obj/item/melee/baseball_bat/golden,
)
max_weight_class = WEIGHT_CLASS_HUGE

/obj/item/storage/belt/sheathe/baseball/update_icon_state()
. = ..()
for(var/obj/item/melee/baseball_bat/bat in contents)
worn_icon_state += "[bat.belt_sprite]"

// Add to leather recipes
// We should genericize this in the future for modular recipes in general
/obj/item/stack/sheet/leather/get_main_recipes()
. = ..()
. += list(new /datum/stack_recipe("bat sheathe", /obj/item/storage/belt/baseball, 4))
. += list(new /datum/stack_recipe("bat sheathe", /obj/item/storage/belt/sheathe/baseball, 4))
32 changes: 32 additions & 0 deletions maplestation_modules/code/game/objects/items/weaponry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,35 @@
if(mapload && !paperweight_spawned && istype(get_area(src), /area/station/medical/psychology))
new /obj/item/melee/psych_rock(loc)
paperweight_spawned = TRUE

/obj/item/melee/sabre/maugrim
name = "Maugrim"
desc = "Hilda Brandt's longsword. It was christened after slaying a space-werewolf of the same name." // todo
force = 20
block_chance = 33
armour_penetration = 10
icon_state = "maugrim"
icon = 'maplestation_modules/icons/obj/weapons.dmi'
inhand_icon_state = "maugrim"
lefthand_file = 'maplestation_modules/icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'maplestation_modules/icons/mob/inhands/weapons/swords_righthand.dmi'

/obj/item/melee/sabre/gehenna // matthew's sword when he's asset protection
name = "Gehenna"
desc = "The christened blade of Matthew Scoria."
icon_state = "amber_blade"
icon = 'maplestation_modules/icons/obj/weapons.dmi'
worn_icon_state = "amber_blade"
worn_icon = 'maplestation_modules/icons/mob/clothing/belt.dmi'
inhand_icon_state = "amber_blade"
lefthand_file = 'maplestation_modules/icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'maplestation_modules/icons/mob/inhands/weapons/swords_righthand.dmi'
// this is seperate from the null rod- this will have no anti-magic and higher stats to compensate for it being used by a command member who refuses to use energy guns
force = 20
sharpness = SHARP_EDGED
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_SUITSTORE
block_chance = 25
armour_penetration = 20
w_class = WEIGHT_CLASS_HUGE
attack_verb_continuous = list("stabs", "cuts", "slashes", "power attacks")
attack_verb_simple = list("stab", "cut", "slash", "power attack")
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,31 @@
/datum/preference/choiced/ornithid_wings/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["arm_wings"] = value

/datum/preference/choiced/ornithid_wings/compile_constant_data()
var/list/data = ..()

data[SUPPLEMENTAL_FEATURE_KEY] = "feather_color"

return data

/datum/preference/color/feather_color
savefile_key = "feather_color"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SUPPLEMENTAL_FEATURES

/datum/preference/color/feather_color/is_accessible(datum/preferences/preferences) // TEMP: done before the Q1 2024 upstream
if(!..(preferences))
return FALSE

var/species_type = preferences.read_preference(/datum/preference/choiced/species)
var/datum/species/species = new species_type
return (TRAIT_FEATHERED in species.inherent_traits)


/datum/preference/color/feather_color/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["feathers"] = value


/datum/preference/choiced/tail_avian
savefile_key = "feature_avian_tail"
savefile_identifier = PREFERENCE_CHARACTER
Expand Down
7 changes: 7 additions & 0 deletions maplestation_modules/code/modules/clothing/suits/armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
icon_state = "blueshift"
inhand_icon_state = "armor"

/obj/item/clothing/suit/armor/vest/asset_protection/clanjacket
name = "Armored Clan Jacket" // yes, a character item outside of story_content, because i'm a special boy
desc = "A red and gold jacket, embroidered with iconography of the Scoria Clan of Spectra. This one has been weaved with highly-protective fabrics."
icon = 'maplestation_modules/icons/obj/clothing/suit.dmi'
icon_state = "sclanjacket"
worn_icon = 'maplestation_modules/icons/mob/clothing/suit.dmi'

// Subtype of the toggle icon component (i know, ew) for GAGS items
/datum/component/toggle_icon/greyscale
/// Config when toggled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,30 @@
/obj/item/hatchet, //This is a jacket for real lumberjacks
)

/obj/item/clothing/suit/chesedjacket // no toggle for this- yet
/obj/item/clothing/suit/toggle/chesedjacket
name = "Well-Kept Jacket"
desc = "A tidily kept blue jacket, hand tailored and made by someone with a clear dedication to their craft."
icon = 'maplestation_modules/icons/obj/clothing/suit.dmi'
icon_state = "chesed_jacket"
worn_icon = 'maplestation_modules/icons/mob/clothing/suit.dmi'
blood_overlay_type = "armor"
clothing_traits = list(TRAIT_CAFFEINE_LOVER)

/obj/item/clothing/suit/cyrilcloak
name = "Claw-Sewn Cloak"
desc = "A warm cloak hand sewn by a tailor's hand. Its meant for cold winter climates, not brooding in a dark corner, mind you."
icon = 'maplestation_modules/icons/obj/clothing/suit.dmi'
icon_state = "bluecloak"
worn_icon = 'maplestation_modules/icons/mob/clothing/suit.dmi'
blood_overlay_type = "armor"
body_parts_covered = CHEST|GROIN|ARMS
cold_protection = CHEST|GROIN|ARMS
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT

/obj/item/clothing/suit/matthewjacket
name = "Embroidered Clan Jacket"
desc = "A red and gold jacket, embroidered with iconography of the Scoria Clan of Spectra."
icon = 'maplestation_modules/icons/obj/clothing/suit.dmi'
icon_state = "sclanjacket"
worn_icon = 'maplestation_modules/icons/mob/clothing/suit.dmi'
blood_overlay_type = "armor"
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
icon = 'maplestation_modules/icons/obj/clothing/under/ornithid_clothes.dmi'
worn_icon = 'maplestation_modules/icons/mob/clothing/under/ornithid_clothes.dmi'
icon_state = "arbiter_suit"
can_adjust = FALSE

/obj/item/clothing/under/chesedsuit
name = "blue waistcoat"
Expand All @@ -75,3 +76,4 @@
icon_state = "chesed_suit"
clothing_traits = list(TRAIT_CAFFEINE_LOVER)


Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,12 @@

/datum/loadout_item/suit/chesed_jacket
name = "Well-Kept Jacket"
item_path = /obj/item/clothing/suit/chesedjacket
item_path = /obj/item/clothing/suit/toggle/chesedjacket

/datum/loadout_item/suit/cyrilcloak
name = "Claw-Sewn Cloak"
item_path = /obj/item/clothing/suit/cyrilcloak

/datum/loadout_item/suit/scoriajacket
name = "Embroidered Clan Jacket"
item_path = /obj/item/clothing/suit/matthewjacket
Loading

0 comments on commit 67083f8

Please sign in to comment.