-
Notifications
You must be signed in to change notification settings - Fork 58
Biting Tutorial #732
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
FalloutFalcon
wants to merge
8
commits into
DarkPack13:master
Choose a base branch
from
FalloutFalcon:biting-tutorial
base: master
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
Biting Tutorial #732
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
32a8f61
tutorial for biting
FalloutFalcon 59831c4
yea
FalloutFalcon 84a5af2
client check. just to make sure it doesnt proc on an npc or afk perso…
FalloutFalcon bb8671b
Merge branch 'master' into biting-tutorial
buffyuwu f133013
Update modular_darkpack/modules/blood_drinking/code/bite_tutorial.dm
buffyuwu d643798
Update modular_darkpack/modules/blood_drinking/code/bite_tutorial.dm
buffyuwu 531c423
Update modular_darkpack/modules/blood_drinking/code/bite_tutorial.dm
buffyuwu 509ab09
Merge branch 'master' of https://github.com/DarkPack13/SecondCity int…
FalloutFalcon 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| // This is the new signals file for every signal vampire related in WOD13 | ||
| // New signals related to vampires and things vampires do should be defined here | ||
|
|
||
| ///called in bloodsucking.dm at the end of /mob/living/carbon/human/proc/drinksomeblood | ||
| ///called in bloodsucking.dm at the end of /mob/living/carbon/human/proc/drinksomeblood: (mob/drunk_from, mob/living/carbon/human/drinker) | ||
| #define COMSIG_MOB_VAMPIRE_SUCKED "mob_vampire_sucked" | ||
| ///vampire suck resisted | ||
| #define COMPONENT_RESIST_VAMPIRE_KISS (1<<0) | ||
|
|
||
| ///called in bloodsucking.dm at the end of /mob/living/carbon/human/proc/drinksomeblood: (mob/living/carbon/human/drinker, mob/drunk_from) | ||
| #define COMSIG_MOB_VAMPIRE_SUCKING "mob_vampire_sucking" |
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
75 changes: 75 additions & 0 deletions
75
modular_darkpack/modules/blood_drinking/code/bite_tutorial.dm
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,75 @@ | ||
| #define STAGE_GRAB_VICTIM "STAGE_GRAB_VICTIM" | ||
| #define STAGE_PRESS_BITE "STAGE_PRESS_BITE" | ||
| #define STAGE_RELEASE_VICTIM "STAGE_RELEASE_VICTIM" | ||
|
|
||
| /// Tutorial for showing how to switch hands. | ||
| /// Fired when clicking on an item with another item with an empty inactive hand. | ||
| /datum/tutorial/bite_prey | ||
| // grandfather_date = "2023-01-07" | ||
|
|
||
| var/stage = STAGE_GRAB_VICTIM | ||
|
|
||
| /datum/tutorial/bite_prey/Destroy(force) | ||
| return ..() | ||
|
|
||
| /datum/tutorial/bite_prey/perform(list/modifiers) | ||
| addtimer(CALLBACK(src, PROC_REF(show_instructions)), 0.5 SECONDS) | ||
|
|
||
| RegisterSignal(user, COMSIG_MOVABLE_SET_GRAB_STATE, PROC_REF(on_grab)) | ||
| RegisterSignal(user, COMSIG_MOB_VAMPIRE_SUCKING, PROC_REF(on_bite)) | ||
| RegisterSignal(user, COMSIG_ATOM_NO_LONGER_PULLING, PROC_REF(on_release)) | ||
|
|
||
| /datum/tutorial/bite_prey/perform_completion_effects_with_delay() | ||
| UnregisterSignal(user, list(COMSIG_MOVABLE_SET_GRAB_STATE, COMSIG_MOB_VAMPIRE_SUCKING, COMSIG_ATOM_NO_LONGER_PULLING)) | ||
| return 0 | ||
|
|
||
| /datum/tutorial/bite_prey/proc/show_instructions() | ||
| if(QDELETED(src)) | ||
| return | ||
|
|
||
| switch(stage) | ||
| if(STAGE_GRAB_VICTIM) | ||
| show_instruction("Pull the NPC twice to initiate an aggressive grab.") | ||
| if(STAGE_PRESS_BITE) | ||
| show_instruction(keybinding_message( | ||
| /datum/keybinding/human/bite, | ||
| "While grabbing, take the NPC somewhere private and press '%KEY%' to bite the NPC. This will start restoring your blood pool.", | ||
| "Set a key to bite", | ||
| )) | ||
| if(STAGE_RELEASE_VICTIM) | ||
| show_instruction(keybinding_message( | ||
| /datum/keybinding/mob/stop_pulling, | ||
| "Press '%KEY%' to release your victim and stop feeding.", | ||
| "Click '<b>Pull</b>' to stop feeding!.", | ||
| )) | ||
|
|
||
| /datum/tutorial/bite_prey/proc/on_grab(mob/living/source, newstate) | ||
| SIGNAL_HANDLER | ||
|
|
||
| if((newstate >= GRAB_AGGRESSIVE) && isnpc(source.pulling)) | ||
| stage = STAGE_PRESS_BITE | ||
| show_instructions() | ||
| /* | ||
| else if(stage == STAGE_PRESS_BITE) | ||
| stage = STAGE_GRAB_VICTIM | ||
| show_instructions() | ||
| */ | ||
|
|
||
| /datum/tutorial/bite_prey/proc/on_bite(mob/living/carbon/human/drinker, mob/drunk_from) | ||
| SIGNAL_HANDLER | ||
|
|
||
| stage = STAGE_RELEASE_VICTIM | ||
| show_instructions() | ||
|
|
||
| /datum/tutorial/bite_prey/proc/on_release() | ||
| SIGNAL_HANDLER | ||
|
|
||
| if(stage == STAGE_PRESS_BITE) | ||
| stage = STAGE_GRAB_VICTIM | ||
| show_instructions() | ||
| else if(stage == STAGE_RELEASE_VICTIM) | ||
| complete() | ||
|
|
||
| #undef STAGE_RELEASE_VICTIM | ||
| #undef STAGE_PRESS_BITE | ||
| #undef STAGE_GRAB_VICTIM |
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
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.
surely there's a better way than having a check for this each splat_life() tick???
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.
If u have one ill try 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.
is this how /tg/ handles 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.
tg doesnt need to listen to things around it, they just call it directly in the attack_chain code for the hand tutorials lol.
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.
cant we instead just trigger it from grabbing an npc, or perhaps when bloodpool enters hungry state via TRAIT_NEEDS_BLOOD so that it isn't running on every life tick?
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.
Once it finds and tries an npc once, it wont get past !tutorial_shown so i dont reallllly see the issue tbh.
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.
This could trigger off of a mob bump, mob grab, or on_gain even, NOT on splat_life
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.
All of those require a player input and my idea is it should happen just walking past npcs when you meet the criteria. Im really not sure why its a massive deal, its one if statement for
tutorial_shownfor the majority of the time. As once its shown once, or they already completed it a previous round, it wont badger them anymore.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.
its stilll a constant if check in life()