Skip to content

Commit

Permalink
Merge pull request #1 from TS-Rogue-Star/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Michab02 authored Apr 30, 2024
2 parents 8d7a8f2 + f87c95b commit 09b4745
Show file tree
Hide file tree
Showing 16 changed files with 20,289 additions and 20 deletions.
1 change: 1 addition & 0 deletions code/__defines/planets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define WEATHER_FALLOUT_TEMP "short-term fallout" // Nuclear fallout that actually ends. Firework-only
#define WEATHER_CONFETTI "confetti" // Firework-only
#define WEATHER_ECLIPSE "eclipse" //RS ADD
#define WEATHER_FOG_ECLIPSE "foggy eclipse" //RS ADD

#define MOON_PHASE_NEW_MOON "new moon"
#define MOON_PHASE_WAXING_CRESCENT "waxing crescent"
Expand Down
45 changes: 41 additions & 4 deletions code/modules/client/preference_setup/vore/07_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@
#define ORGANICS 1
#define SYNTHETICS 2

//RS EDIT START - MOVED FROM _traits.dm
#define TRAIT_TYPE_NEGATIVE -1
#define TRAIT_TYPE_NEUTRAL 0
#define TRAIT_TYPE_POSITIVE 1

#define TRAIT_VARCHANGE_LESS_BETTER -1
#define TRAIT_VARCHANGE_ALWAYS_OVERRIDE 0
#define TRAIT_VARCHANGE_MORE_BETTER 1

#define TRAIT_PREF_TYPE_BOOLEAN 1
#define TRAIT_PREF_TYPE_COLOR 2
#define TRAIT_PREF_TYPE_STRING 3

#define TRAIT_NO_VAREDIT_TARGET 0
#define TRAIT_VAREDIT_TARGET_SPECIES 1
#define TRAIT_VAREDIT_TARGET_MOB 2
//RS EDIT END

var/global/list/valid_bloodreagents = list("iron","copper","phoron","silver","gold","slimejelly") //allowlist-based so people don't make their blood restored by alcohol or something really silly. use reagent IDs!

/datum/preferences
Expand All @@ -30,6 +48,8 @@ var/global/list/valid_bloodreagents = list("iron","copper","phoron","silver","go
var/dirty_synth = 0 //Are you a synth
var/gross_meatbag = 0 //Where'd I leave my Voight-Kampff test kit?

var/trait_injection_verb = "bites" //RS EDIT

/datum/preferences/proc/get_custom_bases_for_species(var/new_species)
if (!new_species)
new_species = species
Expand Down Expand Up @@ -62,10 +82,12 @@ var/global/list/valid_bloodreagents = list("iron","copper","phoron","silver","go
. += "<li>- [pref_list[2]]:"
var/link = " <a href='?src=\ref[src];clicked_trait_pref=[trait.type];pref=[identifier]'>"
switch (pref_list[1])
if (1) //TRAIT_PREF_TYPE_BOOLEAN
if (TRAIT_PREF_TYPE_BOOLEAN) //TRAIT_PREF_TYPE_BOOLEAN
. += link + (trait_prefs[identifier] ? "Enabled" : "Disabled")
if (2) //TRAIT_PREF_TYPE_COLOR
if (TRAIT_PREF_TYPE_COLOR) //TRAIT_PREF_TYPE_COLOR
. += " " + color_square(hex = trait_prefs[identifier]) + link + "Change"
if (TRAIT_PREF_TYPE_STRING) //RS ADD
. += link + "[trait_prefs[identifier]]" //RS ADD
. += "</a></li>"
. += "</ul>"
if (altered)
Expand Down Expand Up @@ -98,12 +120,25 @@ var/global/list/valid_bloodreagents = list("iron","copper","phoron","silver","go
if (!(preference in trait_prefs))
trait_prefs[preference] = instance.default_value_for_pref(preference) //won't be called at all often
switch(instance.has_preferences[preference][1])
if (1) //TRAIT_PREF_TYPE_BOOLEAN
if (TRAIT_PREF_TYPE_BOOLEAN) //TRAIT_PREF_TYPE_BOOLEAN
trait_prefs[preference] = !trait_prefs[preference]
if (2) //TRAIT_PREF_TYPE_COLOR
if (TRAIT_PREF_TYPE_COLOR) //TRAIT_PREF_TYPE_COLOR
var/new_color = input(user, "Choose the color for this trait preference:", "Trait Preference", trait_prefs[preference]) as color|null
if (new_color)
trait_prefs[preference] = new_color
//RS ADD START
if (TRAIT_PREF_TYPE_STRING)
var/new_verb = html_encode(tgui_input_text(user,"Enter text for this trait preference:","Trait Text Entry"))

if(!new_verb)
to_chat(user, "<span class = 'warning'>No text entered.</span>")
return

if(length(new_verb) > 40 || length(new_verb) < 3)
to_chat(user, "<span class = 'warning'>Entered text length invalid (must be longer than 2, no more than than 40).</span>")
return
trait_prefs[preference] = new_verb
//RS ADD END

// Definition of the stuff for Ears
/datum/category_item/player_setup_item/vore/traits
Expand All @@ -130,6 +165,7 @@ var/global/list/valid_bloodreagents = list("iron","copper","phoron","silver","go

S["custom_heat"] >> pref.custom_heat
S["custom_cold"] >> pref.custom_cold
S["trait_injection_verb"] >> pref.trait_injection_verb //RS ADD

/datum/category_item/player_setup_item/vore/traits/save_character(var/savefile/S)
S["custom_species"] << pref.custom_species
Expand All @@ -151,6 +187,7 @@ var/global/list/valid_bloodreagents = list("iron","copper","phoron","silver","go

S["custom_heat"] << pref.custom_heat
S["custom_cold"] << pref.custom_cold
S["trait_injection_verb"] << pref.trait_injection_verb //RS ADD

/datum/category_item/player_setup_item/vore/traits/sanitize_character()
if(!pref.pos_traits) pref.pos_traits = list()
Expand Down
51 changes: 50 additions & 1 deletion code/modules/eventkit/RS-event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
if(!check_rights(R_FUN))
return
var/list/possible_verbs = list(
/mob/living/proc/blue_shift
/mob/living/proc/blue_shift,
/mob/living/proc/vore_leap_attack

)

var/choice = tgui_input_list(usr, "Which verb would you like to add/remove?", "Event Verb", possible_verbs)
Expand Down Expand Up @@ -56,3 +58,50 @@
sparks.start()
visible_message("<span class='warning'>Electrical sparks manifest from nowhere around \the [src]!</span>")
qdel(sparks)

/mob/living/proc/vore_leap_attack()
set name = "Leap"
set desc = "Leap at a target, eating or stunning them!"
set category = "Abilities"
set waitfor = FALSE

var/list/targets = list()
for(var/mob/living/L in view(world.view, get_turf(src)))
if(L == src)
continue
if(!isliving(L))
continue
if(!L.devourable || !L.throw_vore)
continue
targets += L

if(!targets.len)
to_chat(src, span("warning","There are no valid targets in range."))

var/mob/living/choice = tgui_input_list(src, "Pick a target! (Only those with viable mechanical prefs are included)", "Target Choice", targets)

if(!choice)
return

visible_message(span("warning","\The [src]tenses up in preparation to leap!"))
to_chat(choice, span("danger","\The [src] focuses on you!"))
// Telegraph, since getting stunned suddenly feels bad.
do_windup_animation(choice, 1 SECOND)
sleep(1 SECOND) // For the telegraphing.

if(choice.z != z) //Make sure you haven't disappeared to somewhere we can't go
return FALSE

// Do the actual leap.
status_flags |= LEAPING // Lets us pass over everything.
visible_message(span("critical","\The [src] leaps at \the [choice]!"))
throw_at(get_step(choice, get_turf(src)), 7, 1, src)
playsound(src, 'sound/weapons/spiderlunge.ogg', 75, 1)

sleep(5) // For the throw to complete. It won't hold up the AI ticker due to waitfor being false.

if(status_flags & LEAPING)
status_flags &= ~LEAPING // Revert special passage ability.

if(Adjacent(choice)) //We leapt at them but we didn't manage to hit them, let's see if we're next to them
choice.Weaken(2) //get knocked down, idiot
9 changes: 6 additions & 3 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1615,9 +1615,12 @@
if(isSynthetic())
return 0
//RS ADD START
if(!species.digest_pain && (isbelly(src.loc) || istype(src.loc, /turf/simulated/floor/water/digestive_enzymes)))
var/obj/belly/b = src.loc
if(b.digest_mode == DM_DIGEST || b.digest_mode == DM_SELECT)
if(!species.digest_pain)
if(isbelly(src.loc))
var/obj/belly/b = src.loc
if(b.digest_mode == DM_DIGEST || b.digest_mode == DM_SELECT)
return FALSE
else if(istype(src.loc, /turf/simulated/floor/water/digestive_enzymes))
return FALSE
//RS ADD END
for(var/datum/modifier/M in modifiers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1529,3 +1529,115 @@

if(Adjacent(target)) //We leapt at them but we didn't manage to hit them, let's see if we're next to them
target.Weaken(2) //get knocked down, idiot

//RS ADD START
/mob/living/proc/injection() // Allows the user to inject reagents into others somehow, like stinging, or biting.
set name = "Injection"
set category = "Abilities"
set desc = "Inject another being with something!"

if(stat || paralysis || weakened || stunned || world.time < last_special) //Epic copypasta from tongue grabbing.
to_chat(src, "<span class='warning'>You can't do that in your current state.</span>")
return

last_special = world.time + 10 //Anti-spam.

if (!istype(src, /mob/living))
to_chat(src, "<span class='warning'>It doesn't work that way.</span>")
return

var/list/choices = list("Inject")

if(trait_injection_reagents.len > 1)
choices += "Change reagent"
else if(!trait_injection_selected)
trait_injection_selected = trait_injection_reagents[1]

choices += "Change amount"
choices += "Change verb"

var/choice = tgui_alert(src, "Do you wish to inject somebody, or adjust settings?", "Selection List", choices)

if(choice == "Change reagent")
var/reagent_choice = tgui_input_list(usr, "Choose which reagent to inject!", "Select reagent", trait_injection_reagents)
if(reagent_choice)
trait_injection_selected = reagent_choice
to_chat(src, "<span class='notice'>You prepare to inject [trait_injection_amount] units of [trait_injection_selected ? "[trait_injection_selected]" : "...nothing. Select a reagent before trying to inject anything."]</span>")
return
if(choice == "Change amount")
var/amount_choice = tgui_input_number(usr, "How much of the reagent do you want to inject? (Up to 5 units)", "How much?", trait_injection_amount, 5, 0)
if(amount_choice)
trait_injection_amount = amount_choice
to_chat(src, "<span class='notice'>You prepare to inject [trait_injection_amount] units of [trait_injection_selected ? "[trait_injection_selected]" : "...nothing. Select a reagent before trying to inject anything."]</span>")
return
if(choice == "Change verb")
var/verb_choice = tgui_input_text(usr, "Choose the percieved manner of injection, such as 'bite' or 'sting', don't be misleading or abusive.", "How are you injecting?", trait_injection_verb, max_length = 60) //Whoaa there cowboy don't put a novel in there.
if(verb_choice)
trait_injection_verb = verb_choice
to_chat(src, "<span class='notice'>You will [trait_injection_verb] your targets.</span>")
return
else
var/list/targets = list() //IF IT IS NOT BROKEN. DO NOT FIX IT. AND KEEP COPYPASTING IT

for(var/mob/living/carbon/L in living_mobs(1, TRUE)) //Noncarbons don't even process reagents so don't bother listing others.
if(!istype(L, /mob/living/carbon))
continue
if(L == src) //no getting high off your own supply, get a nif or something, nerd.
continue
if(!L.resizable && (trait_injection_selected == "macrocillin" || trait_injection_selected == "microcillin" || trait_injection_selected == "normalcillin")) // If you're using a size reagent, ignore those with pref conflicts.
continue
targets += L

if(!(targets.len))
to_chat(src, "<span class='notice'>No eligible targets found.</span>")
return

var/mob/living/target = tgui_input_list(src, "Please select a target.", "Victim", targets)

if(!target)
return

if(!istype(target, /mob/living/carbon)) //Safety.
to_chat(src, "<span class='warning'>That won't work on that kind of creature! (Only works on crew/monkeys)</span>")
return

if(target.isSynthetic())
to_chat(src, "<span class='notice'>There's no getting past that outer shell.</span>")
return

if(!trait_injection_selected)
to_chat(src, "<span class='notice'>You need to select a reagent.</span>")
return

if(!trait_injection_verb)
to_chat(src, "<span class='notice'>Somehow, you forgot your means of injecting. (Select a verb!)</span>")
return

if(do_after(src, 5, target))
add_attack_logs(src,target,"Injection trait ([trait_injection_selected], [trait_injection_amount])")
if(target.reagents)
target.reagents.add_reagent(trait_injection_selected, trait_injection_amount)
var/ourmsg = "<span class='warning'>[usr] [trait_injection_verb] [target] "
switch(zone_sel.selecting)
if(BP_HEAD)
ourmsg += "on the head!"
if(BP_TORSO)
ourmsg += "on the chest!"
if(BP_GROIN)
ourmsg += "on the groin!"
if(BP_R_ARM, BP_L_ARM)
ourmsg += "on the arm!"
if(BP_R_HAND, BP_L_HAND)
ourmsg += "on the hand!"
if(BP_R_LEG, BP_L_LEG)
ourmsg += "on the leg!"
if(BP_R_FOOT, BP_L_FOOT)
ourmsg += "on the foot!"
if("mouth")
ourmsg += "on the mouth!"
if("eyes")
ourmsg += "on the eyes!"
ourmsg += "</span>"
visible_message(ourmsg)

//RS ADD END
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#define TRAIT_PREF_TYPE_BOOLEAN 1
#define TRAIT_PREF_TYPE_COLOR 2
#define TRAIT_PREF_TYPE_STRING 3

#define TRAIT_NO_VAREDIT_TARGET 0
#define TRAIT_VAREDIT_TARGET_SPECIES 1
Expand Down
Loading

0 comments on commit 09b4745

Please sign in to comment.