-
Notifications
You must be signed in to change notification settings - Fork 20
The Freelancer's Hall: Freifechters [PORT] #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
atomicplan666
wants to merge
11
commits into
Furnace-Chronicles:main
Choose a base branch
from
atomicplan666:fighting-styles
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0bf0177
initial
atomicplan666 0e40349
shirt+pants sprite fixes
atomicplan666 f85c90f
couple fixes
atomicplan666 09df72a
sprite +WIL removal
atomicplan666 cba2992
im a silly goober
atomicplan666 a97c2d9
master skill for all freifs
atomicplan666 3295cdc
fixes lancer and sabrist shirts
atomicplan666 d69cc1f
FIXES THE PADDED FENCING SHIRT ONCE AND FOR ALL
atomicplan666 cd21477
scabbard and grenzel longsword fixes
atomicplan666 30fa001
remove redundant trait apply
atomicplan666 092ed11
adds missing intents
atomicplan666 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,152 @@ | ||
| /datum/component/armour_filtering | ||
| dupe_mode = COMPONENT_DUPE_ALLOWED | ||
| var/required_trait | ||
| var/additive | ||
| var/positive | ||
|
|
||
| /datum/component/armour_filtering/Initialize(skill_trait, positive_bonus, bonus_additive = FALSE) | ||
| . = ..() | ||
| if(!isitem(parent)) | ||
| return COMPONENT_INCOMPATIBLE | ||
| required_trait = skill_trait | ||
| additive = bonus_additive | ||
|
|
||
| RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip)) | ||
| RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop)) | ||
|
|
||
| /datum/component/armour_filtering/positive | ||
| positive = TRUE | ||
|
|
||
| /datum/component/armour_filtering/negative | ||
| positive = FALSE | ||
|
|
||
| /datum/component/armour_filtering/proc/on_equip() | ||
| SIGNAL_HANDLER | ||
| var/obj/item/I = parent | ||
| var/mob/living/carbon/human/user | ||
|
|
||
| if(ishuman(I.loc)) | ||
| user = I.loc | ||
|
|
||
| if(!user) | ||
| return | ||
| if(!HAS_TRAIT(user, required_trait)) | ||
| return | ||
|
|
||
| if(!isclothing(I)) | ||
| return | ||
| var/obj/item/clothing/worn_thing = I | ||
| spawn(0) | ||
| if(!(worn_thing.item_flags & IN_INVENTORY)) | ||
| return | ||
| if(worn_thing.item_flags & IN_STORAGE) | ||
| return | ||
| var/list/obj/item/held_list = user.get_held_items() | ||
| for(var/obj/item/held_thing in held_list) | ||
| if(held_thing == parent) | ||
| return | ||
| handle_boons(user, TRUE) | ||
|
|
||
| return | ||
|
|
||
| /datum/component/armour_filtering/proc/on_drop() | ||
| SIGNAL_HANDLER | ||
| var/obj/item/I = parent | ||
| var/mob/living/carbon/human/user | ||
|
|
||
| if(ishuman(I.loc)) | ||
| user = I.loc | ||
|
|
||
| if(!user) | ||
| return | ||
| if(!HAS_TRAIT(user, required_trait)) | ||
| return | ||
|
|
||
| handle_boons(user, FALSE) | ||
|
|
||
| for(var/thing in user.contents) | ||
| if(!isclothing(thing)) | ||
| return | ||
| var/obj/item/clothing/worn_thing = thing | ||
| if(worn_thing == I) | ||
| continue | ||
| if(!(worn_thing.item_flags & IN_INVENTORY)) | ||
| return | ||
| if(worn_thing.item_flags & IN_STORAGE) | ||
| return | ||
| var/list/datum/component/armour_filtering/comps = worn_thing.GetComponents(/datum/component/armour_filtering) | ||
| if(!comps) | ||
| continue | ||
| for(var/datum/component/armour_filtering/af_comp in comps) | ||
| if(af_comp.required_trait != required_trait) | ||
| continue | ||
| if(af_comp.positive != positive) | ||
| continue | ||
| if(!af_comp.additive) | ||
| handle_boons(user, TRUE) | ||
| return | ||
| if(af_comp.positive) | ||
| ADD_TRAIT(user, TRAIT_ARMOUR_LIKED, TRAIT_GENERIC) | ||
| else | ||
| ADD_TRAIT(user, TRAIT_ARMOUR_DISLIKED, TRAIT_GENERIC) | ||
|
|
||
| return | ||
|
|
||
|
|
||
| /datum/component/armour_filtering/proc/handle_boons(mob/living/carbon/human/user, equip) | ||
| if(equip) | ||
| if(!positive) | ||
| to_chat(user, span_info("[parent] is not to my liking. ([required_trait])")) | ||
| if(HAS_TRAIT(user, TRAIT_ARMOUR_DISLIKED) && !additive) | ||
| to_chat(user, span_info("...yet, another piece of my armour is on my mind.")) | ||
| return | ||
| ADD_TRAIT(user, TRAIT_ARMOUR_DISLIKED, TRAIT_GENERIC) | ||
| else | ||
| to_chat(user, span_info("[parent] fits me well. ([required_trait])")) | ||
| if(HAS_TRAIT(user, TRAIT_ARMOUR_LIKED) && !additive) | ||
| to_chat(user, span_info("..yet another piece of my armour is on my mind.")) | ||
| return | ||
| ADD_TRAIT(user, TRAIT_ARMOUR_LIKED, TRAIT_GENERIC) | ||
| trait_boon_equip(user) | ||
| return | ||
|
|
||
| if(!positive) | ||
| to_chat(user, span_info("Free at last of [parent]. ([required_trait])")) | ||
| if(HAS_TRAIT(user, TRAIT_ARMOUR_DISLIKED)) | ||
| REMOVE_TRAIT(user, TRAIT_ARMOUR_DISLIKED, TRAIT_GENERIC) | ||
| else | ||
| to_chat(user, span_info("I miss [parent] already. ([required_trait])")) | ||
| if(HAS_TRAIT(user, TRAIT_ARMOUR_LIKED)) | ||
| REMOVE_TRAIT(user, TRAIT_ARMOUR_LIKED, TRAIT_GENERIC) | ||
| trait_boon_drop(user) | ||
| return | ||
|
|
||
|
|
||
| /* | ||
| TRAIT UNIQUE PROCS | ||
| */ | ||
|
|
||
|
|
||
| /datum/component/armour_filtering/proc/trait_boon_equip(mob/living/carbon/human/user) | ||
| if(HAS_TRAIT(user, TRAIT_FENCERDEXTERITY)) | ||
| if(!positive) | ||
| user.dropItemToGround(parent, TRUE, TRUE) | ||
| if(!HAS_TRAIT(user, TRAIT_ARMOUR_DISLIKED)) | ||
| return | ||
| REMOVE_TRAIT(user, TRAIT_ARMOUR_DISLIKED, TRAIT_GENERIC) | ||
| return | ||
|
|
||
| if(HAS_TRAIT(user, TRAIT_PSYDONIAN_GRIT)) | ||
| if(positive) | ||
| user.apply_status_effect(/datum/status_effect/buff/psydonic_endurance) | ||
| return | ||
| return | ||
|
|
||
| /datum/component/armour_filtering/proc/trait_boon_drop(mob/living/carbon/human/user) | ||
| if(HAS_TRAIT(user, TRAIT_PSYDONIAN_GRIT)) | ||
| if(positive) | ||
| if(!user.has_status_effect(/datum/status_effect/buff/psydonic_endurance)) | ||
| return | ||
| user.remove_status_effect(/datum/status_effect/buff/psydonic_endurance) | ||
| return | ||
| return | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| /datum/component/skill_blessed | ||
| dupe_mode = COMPONENT_DUPE_UNIQUE | ||
| var/required_trait | ||
| var/datum/skill/weapon_skill | ||
| var/skill_amount | ||
| var/original_skill | ||
| var/mob/living/carbon/human/original_user | ||
| var/unique | ||
|
|
||
| /datum/component/skill_blessed/Initialize(skill_trait, skillgiven_type, skillgiven_amount, trait_unique = FALSE) | ||
| . = ..() | ||
| if(!isitem(parent)) | ||
| return COMPONENT_INCOMPATIBLE | ||
| required_trait = skill_trait | ||
| weapon_skill = skillgiven_type | ||
| skill_amount = skillgiven_amount | ||
| unique = trait_unique | ||
|
|
||
| RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip)) | ||
| RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop)) | ||
| RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_obj_examine)) | ||
|
|
||
| /datum/component/skill_blessed/proc/on_equip() | ||
| SIGNAL_HANDLER | ||
| var/obj/item/I = parent | ||
| var/mob/living/carbon/human/user | ||
|
|
||
| if(ishuman(I.loc)) | ||
| user = I.loc | ||
| else if(ishuman(I.loc.loc)) | ||
| user = I.loc.loc | ||
|
|
||
| if(!user) | ||
| return | ||
| if(!HAS_TRAIT(user, required_trait)) | ||
| return | ||
|
|
||
| var/list/obj/item/held_list = user.get_held_items() | ||
| for(var/obj/item/held_thing in held_list) | ||
| if(held_thing == parent) | ||
| give_skill(user) | ||
| return | ||
| remove_skill(user) | ||
|
|
||
| /datum/component/skill_blessed/proc/on_drop() | ||
| SIGNAL_HANDLER | ||
|
|
||
| if(!original_user) | ||
| return | ||
| if(!ishuman(original_user)) | ||
| return | ||
|
|
||
| if(!HAS_TRAIT(original_user, required_trait)) | ||
| return | ||
| if(!HAS_TRAIT(original_user, TRAIT_SKILLBLESSED)) | ||
| return | ||
|
|
||
| for(var/obj/item/held_thing in original_user.get_held_items()) | ||
| if(istype(held_thing, parent.type)) | ||
| return | ||
|
|
||
| remove_skill(original_user) | ||
|
|
||
| /datum/component/skill_blessed/proc/on_obj_examine(datum/source, mob/M) | ||
| if(!HAS_TRAIT(M, required_trait)) | ||
| return | ||
| to_chat(M, span_green("[parent] and I are well acquainted. ([required_trait])")) | ||
|
|
||
|
|
||
| /datum/component/skill_blessed/proc/give_skill(mob/user) | ||
| if(!HAS_TRAIT(user, required_trait)) | ||
| return | ||
| if(HAS_TRAIT(user, TRAIT_SKILLBLESSED)) | ||
| to_chat(user, span_warning("My mind is already focused on a different weapon.")) | ||
| return | ||
|
|
||
| to_chat(user, span_info("[parent] and I are old friends. ([required_trait])")) | ||
| original_skill = user.get_skill_level(weapon_skill) | ||
| user.adjust_skillrank_up_to(weapon_skill, skill_amount, silent = TRUE) | ||
| ADD_TRAIT(user, TRAIT_SKILLBLESSED, TRAIT_GENERIC) | ||
|
|
||
| original_user = user | ||
| if(unique) | ||
| trait_unique_equip(user) | ||
|
|
||
| return | ||
|
|
||
| /datum/component/skill_blessed/proc/remove_skill(mob/user) | ||
| if(!HAS_TRAIT(user, required_trait)) | ||
| return | ||
| if(!HAS_TRAIT(original_user, TRAIT_SKILLBLESSED)) | ||
| return | ||
|
|
||
| var/datum/component/skill_blessed/other_skill | ||
|
|
||
| for(var/obj/item/held_thing in user.get_held_items()) | ||
| if(held_thing == parent) | ||
| return | ||
| var/list/datum/component/skill_blessed/comps = held_thing.GetComponents(/datum/component/skill_blessed) | ||
| if(!comps) | ||
| continue | ||
| for(var/datum/component/skill_blessed/sb_comp in comps) | ||
| if(!HAS_TRAIT(user, sb_comp.required_trait)) | ||
| continue | ||
| other_skill = sb_comp | ||
| break | ||
|
|
||
| user.adjust_skillrank_down_to(weapon_skill, original_skill, silent = TRUE) | ||
| to_chat(user, span_info("Another tyme, old friend. ([required_trait])")) | ||
| REMOVE_TRAIT(user, TRAIT_SKILLBLESSED, TRAIT_GENERIC) | ||
|
|
||
| if(unique) | ||
| trait_unique_drop(user) | ||
| if(original_user) | ||
| original_user = null | ||
| if(original_skill) | ||
| original_skill = null | ||
| if(other_skill) | ||
| other_skill.on_equip() | ||
|
|
||
| return | ||
|
|
||
|
|
||
| /* | ||
| TRAIT UNIQUE PROCS | ||
| */ | ||
|
|
||
|
|
||
| /datum/component/skill_blessed/proc/trait_unique_equip(mob/user) | ||
| if(HAS_TRAIT(user, TRAIT_SABRIST)) | ||
| var/obj/item/rogueweapon/sword/sabre/steppesman/shashka = parent | ||
| for(var/datum/intent/sword/sab_intent in shashka.possible_item_intents) | ||
| sab_intent.accuracy_modifier += 10 | ||
| return | ||
|
|
||
| /datum/component/skill_blessed/proc/trait_unique_drop(mob/user) | ||
| if(HAS_TRAIT(user, TRAIT_SABRIST)) | ||
| var/obj/item/rogueweapon/sword/sabre/steppesman/shashka = parent | ||
| for(var/datum/intent/sword/sab_intent in shashka.possible_item_intents) | ||
| sab_intent.accuracy_modifier = initial(sab_intent.accuracy_modifier) | ||
| return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what the
armor_filteringcomponent is doing?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright I'll take a deeper look when I have time