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
Kitchen Food Buffs #4482
Closed
Closed
Kitchen Food Buffs #4482
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
aa5dff7
Added
BurgerLUA e4af521
Merge remote-tracking branch 'upstream/development' into love
BurgerLUA 6b639ac
wew
BurgerLUA 7a56bbb
A few fixes and tweaks
BurgerLUA 229b721
Changelog
BurgerLUA fc8c023
wew
BurgerLUA 5be1fd4
oops
BurgerLUA bc5e0d5
Almost done.
BurgerLUA 749cc03
Boom. Done.
BurgerLUA f9eb308
OOPS
BurgerLUA f126854
Merge branch 'development' into love
BurgerLUA e410c85
alberyk requested changes
BurgerLUA 7143bba
Merge branch 'development' into love
BurgerLUA f0ae498
Updates
BurgerLUA 41ea480
Changes
BurgerLUA 6ffd1cf
One last change
BurgerLUA File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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 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,50 @@ | ||
/datum/modifier/food | ||
var/regen_added = 0 | ||
var/stamina_added = 0 | ||
var/nutrition_added = 0 | ||
var/original_duration = 0 | ||
|
||
/datum/modifier/food/activate() | ||
..() | ||
original_duration = duration | ||
var/mob/living/L = target | ||
if(istype(L)) | ||
regen_added = L.stamina_recovery + strength*0.03 | ||
stamina_added = L.max_stamina + strength | ||
if(strength < 0) | ||
nutrition_added = -strength | ||
L.stamina_recovery += regen_added | ||
L.max_stamina += stamina_added | ||
L.nutrition += nutrition_added | ||
|
||
/datum/modifier/food/deactivate() | ||
..() | ||
var/mob/living/L = target | ||
if(istype(L)) | ||
L.stamina_recovery -= regen_added | ||
L.max_stamina -= stamina_added | ||
L.nutrition -= nutrition_added | ||
|
||
/datum/modifier/food/custom_override(var/datum/modifier/existing) | ||
if((strength > 0 && existing.strength) > 0 || (strength < 0 && existing.strength < 0)) | ||
existing.duration += duration | ||
existing.strength += strength | ||
qdel(src) | ||
return existing | ||
else | ||
START_PROCESSING(SSmodifiers, src) | ||
LAZYADD(target.modifiers, src) | ||
activate() | ||
return src | ||
|
||
|
||
/datum/modifier/food/validity_fail(var/reason) //This is easier and smarter than making a custom check. | ||
//world << "MODIFIER VALIDITY FAIL: [reason]" | ||
|
||
if(modifier_type == MODIFIER_REAGENT) | ||
modifier_type = MODIFIER_TIMED | ||
duration = original_duration | ||
return 1 | ||
|
||
qdel(src) | ||
return 0 |
This file contains 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 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 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 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 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 |
---|---|---|
|
@@ -27,6 +27,9 @@ | |
var/metabolism_min = 0.01 //How much for the medicine to be present in the system to actually have an effect. | ||
var/list/conflicting_reagents //Reagents that conflict with this medicine, and cause adverse effects when in the blood. | ||
|
||
var/list/container_whitelist = list() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll remove the feature entirely. |
||
var/list/container_blacklist = list() | ||
|
||
/datum/reagent/proc/remove_self(var/amount) // Shortcut | ||
if (!holder) | ||
//PROCLOG_WEIRD("Null holder found. Name: [name], id: [id]") | ||
|
This file contains 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.
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.
Why exactly do we need another modifier system?
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.
It's just another file?