Skip to content
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

targeted item abilities #45

Merged
merged 3 commits into from Apr 2, 2020

Conversation

Adharainspace
Copy link
Contributor

@Adharainspace Adharainspace commented Apr 2, 2020

About the PR

this is mostly behind the scenes work, so not anything hugely gameplay changing. this is partially a code cleanup in WorkInProgress/AbilityItem.dm, i didn't do a whole lot to it, but i think i made it a bit tidier. the big main thing is that i added the functionality to make targeted item abilities. so that whole system is a lot more robust (and i plan on using it for some upcoming content later). i also cleaned up a lot of usr:targeting_spell because targeting_spell is a variable on /mob so in pretty much every case, mob has that variable.

Why's this needed?

this adds some pretty cool functionality to item abilities for the future potentially, and also cleans up a bit of code

@ZeWaka ZeWaka added C-Feature A new feature or enhancements to existing features C-Code-Quality Cleans up code, refactors things to be more readable or intuitive labels Apr 2, 2020
@Adharainspace
Copy link
Contributor Author

Adharainspace commented Apr 2, 2020

IMPORTANT - BIGGEST GAMEPLAY RAMMIFICATION: YOU CAN NO LONGER TOGGLE INTERNALS WHEN CUFFED OR STUNNED

@@ -489,47 +510,49 @@
else
usr.client.view = "15x15"
icon_state = "airoff"
..()

////////////////////////////////////////////////////////////

/* this version moves the center of your view */

/obj/ability_button/scope_toggle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this stuff will compile due to indentation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation looks fine to me?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is fine and it compiles, i want to call back to parent if either conditional runs, not just if only one or the other runs

@@ -12,7 +12,8 @@

var/datum/abilityHolder/abilityHolder = null
var/datum/bioHolder/bioHolder = null
var/datum/targetable/targeting_spell = null

var/targeting_ability = null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this no longer a datum? Might want to type it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think of it as an union type for /datum/targetable and /obj/ability_button, ZeWaka! I'll do some refactoring to give it a proper type after we merge this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zewaka its no longer typed bc i was trying to stay away from adding more vars to mob. the only code that relied on it being typed im pretty sure i fixed with an istype, and thats probably less of a performance hit than having an extra var on every mob in the game

code/mob.dm Outdated
@@ -2871,3 +2900,5 @@
src.mind.damned = 1

return 1

// /mob/proc/set_targeting_ability(var/path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just pushed an update that fixed this

@pali6 pali6 merged commit 24313c6 into goonstation:master Apr 2, 2020
@Adharainspace Adharainspace deleted the feature/targeted-item-abils branch August 1, 2020 01:17
Mister-Moriarty pushed a commit to Mister-Moriarty/goonstation that referenced this pull request Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Code-Quality Cleans up code, refactors things to be more readable or intuitive C-Feature A new feature or enhancements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants