mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-01-28 01:42:50 +00:00
Adding Prefs
Adds prefs, changes knocking people over to only trigger on lightweight trait havers, and lets the biggest of guts give a big bounce.
This commit is contained in:
@@ -844,7 +844,7 @@
|
||||
|
||||
flight_vore = !flight_vore
|
||||
if(flight_vore)
|
||||
to_chat(src, "You have allowed for flight vore! Bumping into characters while flying will now trigger dropnoms!")
|
||||
to_chat(src, "You have allowed for flight vore! Bumping into characters while flying will now trigger dropnoms! Unless prefs don't match.. then you will take a tumble!")
|
||||
else
|
||||
to_chat(src, "Flight vore disabled! You will no longer engage dropnoms while in flight.")
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
|
||||
var/mob/living/prey = src
|
||||
var/fallloc = prey.loc
|
||||
if(pred.can_be_drop_pred && prey.can_be_drop_prey)
|
||||
if(pred.can_be_drop_pred && prey.can_be_drop_prey && pred.drop_vore && prey.drop_vore)
|
||||
pred.feed_grabbed_to_self_falling_nom(pred,prey)
|
||||
pred.loc = fallloc
|
||||
if(!safe_fall)
|
||||
pred.Weaken(8)
|
||||
pred.visible_message("<span class='danger'>\The [pred] falls right onto \the [prey]!</span>")
|
||||
else if(prey.can_be_drop_pred && pred.can_be_drop_prey)
|
||||
else if(prey.can_be_drop_pred && pred.can_be_drop_prey && pred.drop_vore && prey.drop_vore)
|
||||
prey.feed_grabbed_to_self_falling_nom(prey,pred)
|
||||
pred.Weaken(4)
|
||||
pred.visible_message("<span class='danger'>\The [pred] falls right into \the [prey]!</span>")
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
var/drain_finalized = 0 // Determines if the succubus drain will be KO'd/absorbed. Can be toggled on at any time.
|
||||
var/fuzzy = 0 // Preference toggle for sharp/fuzzy icon.
|
||||
var/permit_healbelly = TRUE
|
||||
var/stumble_vore = FALSE
|
||||
var/slip_vore = FALSE
|
||||
var/drop_vore = FALSE
|
||||
var/can_be_drop_prey = FALSE
|
||||
var/can_be_drop_pred = TRUE // Mobs are pred by default.
|
||||
var/allow_spontaneous_tf = FALSE // Obviously.
|
||||
@@ -238,6 +241,9 @@
|
||||
P.allow_spontaneous_tf = src.allow_spontaneous_tf
|
||||
P.step_mechanics_pref = src.step_mechanics_pref
|
||||
P.pickup_pref = src.pickup_pref
|
||||
P.drop_vore = src.drop_vore
|
||||
P.slip_vore = src.slip_vore
|
||||
P.stumble_vore = src.stumble_vore
|
||||
|
||||
var/list/serialized = list()
|
||||
for(var/obj/belly/B as anything in src.vore_organs)
|
||||
@@ -274,6 +280,9 @@
|
||||
allow_spontaneous_tf = P.allow_spontaneous_tf
|
||||
step_mechanics_pref = P.step_mechanics_pref
|
||||
pickup_pref = P.pickup_pref
|
||||
drop_vore = P.drop_vore
|
||||
slip_vore = P.slip_vore
|
||||
stumble_vore = P.stumble_vore
|
||||
|
||||
if(bellies)
|
||||
release_vore_contents(silent = TRUE)
|
||||
@@ -939,6 +948,9 @@
|
||||
dispvoreprefs += "<b>Healbelly permission:</b> [permit_healbelly ? "Allowed" : "Disallowed"]<br>"
|
||||
dispvoreprefs += "<b>Spontaneous vore prey:</b> [can_be_drop_prey ? "Enabled" : "Disabled"]<br>"
|
||||
dispvoreprefs += "<b>Spontaneous vore pred:</b> [can_be_drop_pred ? "Enabled" : "Disabled"]<br>"
|
||||
dispvoreprefs += "<b>Drop Vore:</b> [drop_vore ? "Enabled" : "Disabled"]<br>"
|
||||
dispvoreprefs += "<b>Slip Vore:</b> [slip_vore ? "Enabled" : "Disabled"]<br>"
|
||||
dispvoreprefs += "<b>Stumble Vore:</b> [stumble_vore ? "Enabled" : "Disabled"]<br>"
|
||||
dispvoreprefs += "<b>Inbelly Spawning:</b> [allow_inbelly_spawning ? "Allowed" : "Disallowed"]<br>"
|
||||
dispvoreprefs += "<b>Spontaneous transformation:</b> [allow_spontaneous_tf ? "Enabled" : "Disabled"]<br>"
|
||||
dispvoreprefs += "<b>Can be stepped on/over:</b> [step_mechanics_pref ? "Allowed" : "Disallowed"]<br>"
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
return FALSE
|
||||
if(!src.vore_selected) //Gotta have one selected as well.
|
||||
return FALSE
|
||||
if(!slip_vore || !target.slip_vore)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/can_be_slip_vored_by(var/mob/living/target)
|
||||
@@ -29,6 +31,9 @@
|
||||
return FALSE
|
||||
if(!target.vore_selected) //Gotta have one selected as well.
|
||||
return FALSE
|
||||
if(!slip_vore || !target.slip_vore)
|
||||
to_chat(src,"<span class='warning'>Pred slip_vore is [target.slip_vore] Prey slip_vore is [slip_vore]</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/Crossed(var/atom/movable/AM)
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/mob/living/proc/CanStumbleVore(mob/living/target)
|
||||
if(!can_be_drop_pred)
|
||||
return FALSE
|
||||
if(!is_vore_predator(src))
|
||||
return FALSE
|
||||
if(!target.devourable)
|
||||
return FALSE
|
||||
if(!target.can_be_drop_prey)
|
||||
return FALSE
|
||||
if(!target.stumble_vore || !stumble_vore)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/Bump(atom/movable/AM)
|
||||
//. = ..()
|
||||
if(istype(AM, /mob/living))
|
||||
@@ -10,21 +23,32 @@
|
||||
var/mob/living/AMV = AM
|
||||
if(((AMV.confused || AMV.is_blind()) && AMV.stat == CONSCIOUS && prob(50) && AMV.m_intent=="run") || AMV.flying && AMV.flight_vore)
|
||||
stumble_into(AMV)
|
||||
..()
|
||||
|
||||
/mob/living/stumble_into(mob/living/M)
|
||||
var/mob/living/carbon/human/S = src
|
||||
|
||||
playsound(src, "punch", 25, 1, -1)
|
||||
M.Weaken(4)
|
||||
Weaken(4)
|
||||
M.stop_flying()
|
||||
stop_flying()
|
||||
if(can_be_drop_pred && M.devourable && M.can_be_drop_prey)
|
||||
if(CanStumbleVore(M))
|
||||
visible_message("<span class='warning'>[M] flops carlessly into [src]!</span>")
|
||||
perform_the_nom(src,M,src,src.vore_selected,1)
|
||||
else if(M.can_be_drop_pred && src.devourable && src.can_be_drop_prey)
|
||||
else if(M.CanStumbleVore(src))
|
||||
visible_message("<span class='warning'>[M] flops carlessly into [src]!</span>")
|
||||
perform_the_nom(M,src,M,M.vore_selected,1)
|
||||
else
|
||||
visible_message("<span class='warning'>[M] flops over onto [src]!</span>")
|
||||
else if(S.species.lightweight == 1)
|
||||
visible_message("<span class='warning'>[M] carelessly bowls [src] over!</span>")
|
||||
M.forceMove(get_turf(src))
|
||||
M.apply_damage(0.5, BRUTE)
|
||||
apply_damage(0.5, BRUTE)
|
||||
Weaken(4)
|
||||
stop_flying()
|
||||
apply_damage(0.5, BRUTE)
|
||||
else if(round(weight) > 474)
|
||||
var/throwtarget = get_edge_target_turf(M, reverse_direction(M.dir))
|
||||
visible_message("<span class='warning'>[M] bounces backwards off of [src]'s plush body!</span>")
|
||||
M.throw_at(throwtarget, 2, 1)
|
||||
else
|
||||
visible_message("<span class='warning'>[M] trips over [src]!</span>")
|
||||
M.forceMove(get_turf(src))
|
||||
M.apply_damage(1, BRUTE)
|
||||
@@ -55,6 +55,11 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
var/allowmobvore = TRUE
|
||||
var/permit_healbelly = TRUE
|
||||
|
||||
// These are 'modifier' prefs, do nothing on their own but pair with drop_prey/drop_pred settings.
|
||||
var/drop_vore = FALSE
|
||||
var/stumble_vore = FALSE
|
||||
var/slip_vore = FALSE
|
||||
|
||||
var/resizable = TRUE
|
||||
var/show_vore_fx = TRUE
|
||||
var/step_mechanics_pref = FALSE
|
||||
@@ -143,6 +148,9 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
step_mechanics_pref = json_from_file["step_mechanics_pref"]
|
||||
pickup_pref = json_from_file["pickup_pref"]
|
||||
belly_prefs = json_from_file["belly_prefs"]
|
||||
drop_vore = json_from_file["drop_vore"]
|
||||
slip_vore = json_from_file["slip_vore"]
|
||||
stumble_vore = json_from_file["stumble_vore"]
|
||||
|
||||
//Quick sanitize
|
||||
if(isnull(digestable))
|
||||
@@ -177,6 +185,12 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
pickup_pref = TRUE
|
||||
if(isnull(belly_prefs))
|
||||
belly_prefs = list()
|
||||
if(isnull(drop_vore))
|
||||
drop_vore = FALSE
|
||||
if(isnull(slip_vore))
|
||||
slip_vore = FALSE
|
||||
if(isnull(stumble_vore))
|
||||
stumble_vore = FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -205,6 +219,9 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
"step_mechanics_pref" = step_mechanics_pref,
|
||||
"pickup_pref" = pickup_pref,
|
||||
"belly_prefs" = belly_prefs,
|
||||
"drop_vore" = drop_vore,
|
||||
"slip_vore" = slip_vore,
|
||||
"stumble_vore" = stumble_vore,
|
||||
)
|
||||
|
||||
//List to JSON
|
||||
|
||||
@@ -249,6 +249,9 @@
|
||||
"step_mechanics_active" = host.step_mechanics_pref,
|
||||
"pickup_mechanics_active" = host.pickup_pref,
|
||||
"noisy" = host.noisy,
|
||||
"drop_vore" = host.drop_vore,
|
||||
"slip_vore" = host.slip_vore,
|
||||
"stumble_vore" = host.stumble_vore,
|
||||
)
|
||||
|
||||
return data
|
||||
@@ -465,6 +468,18 @@
|
||||
host.noisy = !host.noisy
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("toggle_drop_vore")
|
||||
host.drop_vore = !host.drop_vore
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("toggle_slip_vore")
|
||||
host.slip_vore = !host.slip_vore
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("toggle_stumble_vore")
|
||||
host.stumble_vore = !host.stumble_vore
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/vore_look/proc/pick_from_inside(mob/user, params)
|
||||
var/atom/movable/target = locate(params["pick"])
|
||||
|
||||
@@ -789,6 +789,9 @@ const VoreUserPreferences = (props, context) => {
|
||||
step_mechanics_active,
|
||||
pickup_mechanics_active,
|
||||
noisy,
|
||||
drop_vore,
|
||||
stumble_vore,
|
||||
slip_vore,
|
||||
} = data.prefs;
|
||||
|
||||
const {
|
||||
@@ -903,6 +906,48 @@ const VoreUserPreferences = (props, context) => {
|
||||
disabled: "Spontaneous Pred Disabled",
|
||||
},
|
||||
},
|
||||
toggle_drop_vore: {
|
||||
action: "toggle_drop_vore",
|
||||
test: drop_vore,
|
||||
tooltip: {
|
||||
main: "Allows for dropnom spontaneous vore to occur. "
|
||||
+ "Note, you still need spontaneous vore pred and/or prey enabled.",
|
||||
enable: "Click here to allow for dropnoms.",
|
||||
disable: "Click here to disable dropnoms.",
|
||||
},
|
||||
content: {
|
||||
enabled: "Drop Noms Enabled",
|
||||
disabled: "Drop Noms Disabled",
|
||||
},
|
||||
},
|
||||
toggle_slip_vore: {
|
||||
action: "toggle_slip_vore",
|
||||
test: slip_vore,
|
||||
tooltip: {
|
||||
main: "Allows for slip related spontaneous vore to occur. "
|
||||
+ "Note, you still need spontaneous vore pred and/or prey enabled.",
|
||||
enable: "Click here to allow for slip vore.",
|
||||
disable: "Click here to disable slip vore.",
|
||||
},
|
||||
content: {
|
||||
enabled: "Slip Vore Enabled",
|
||||
disabled: "Slip Vore Disabled",
|
||||
},
|
||||
},
|
||||
toggle_stumble_vore: {
|
||||
action: "toggle_stumble_vore",
|
||||
test: stumble_vore,
|
||||
tooltip: {
|
||||
main: "Allows for stumble related spontaneous vore to occur. "
|
||||
+ " Note, you still need spontaneous vore pred and/or prey enabled.",
|
||||
enable: "Click here to allow for stumble vore.",
|
||||
disable: "Click here to disable stumble vore.",
|
||||
},
|
||||
content: {
|
||||
enabled: "Stumble Vore Enabled",
|
||||
disabled: "Stumble Vore Disabled",
|
||||
},
|
||||
},
|
||||
inbelly_spawning: {
|
||||
action: "toggle_allow_inbelly_spawning",
|
||||
test: allow_inbelly_spawning,
|
||||
@@ -1050,6 +1095,15 @@ const VoreUserPreferences = (props, context) => {
|
||||
<Flex.Item basis="32%" grow={1}>
|
||||
<VoreUserPreferenceItem spec={preferences.dropnom_pred} />
|
||||
</Flex.Item>
|
||||
<Flex.Item basis="32%">
|
||||
<VoreUserPreferenceItem spec={preferences.toggle_drop_vore} />
|
||||
</Flex.Item>
|
||||
<Flex.Item basis="32%">
|
||||
<VoreUserPreferenceItem spec={preferences.toggle_slip_vore} />
|
||||
</Flex.Item>
|
||||
<Flex.Item basis="32%" grow={1}>
|
||||
<VoreUserPreferenceItem spec={preferences.toggle_stumble_vore} />
|
||||
</Flex.Item>
|
||||
<Flex.Item basis="32%">
|
||||
<VoreUserPreferenceItem spec={preferences.inbelly_spawning} />
|
||||
</Flex.Item>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user