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
targeted item abilities #45
Conversation
…rs to 1 var that spells and item abilities share
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 |
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.
Not sure if this stuff will compile due to indentation.
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.
Indentation looks fine to me?
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.
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 |
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.
Is this no longer a datum? Might want to type it.
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.
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.
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.
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) |
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.
delete
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.
i just pushed an update that fixed this
did some stuff with the smoke
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