Skip to content

Commit

Permalink
Removes swiftness, add speed potions back as oil slick potions (#20939)
Browse files Browse the repository at this point in the history
* Removes swiftness, add speed potions back as oil potions

* no shorting, icon update on mob

* early and forgotten returns

* ramon oil colours

* Update code/modules/research/xenobiology/xenobiology.dm

Co-authored-by: Luc <[email protected]>

* no more slipery vehicles, now slippery tables

* just because it compiled the first time doesn't mean the second list will compile idiot

* icons my hated

* bottle4

* cleaner up

* qwerty my man what you doin: s34n 2023

---------

Co-authored-by: Luc <[email protected]>
  • Loading branch information
Qwertytoforty and lewcc authored Aug 16, 2023
1 parent ba8ee65 commit aad8529
Show file tree
Hide file tree
Showing 14 changed files with 120 additions and 52 deletions.
2 changes: 2 additions & 0 deletions code/__HELPERS/trait_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// An advanced surgical tool. If a surgical tool has this flag, it will be able to automatically repeat steps until they succeed.
#define TRAIT_ADVANCED_SURGICAL "advanced_surgical"

///An item that is oiled. If sprayed with water, it's slowdown reverts to normal.
#define TRAIT_OIL_SLICKED "oil_slicked"

//
// common trait sources
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/genetics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ GLOBAL_VAR_INIT(monkeyblock, DNA_SE_LENGTH) // Monkey block will always be the D
GLOBAL_VAR_INIT(breathlessblock, 0)
GLOBAL_VAR_INIT(remoteviewblock, 0)
GLOBAL_VAR_INIT(regenerateblock, 0)
GLOBAL_VAR_INIT(increaserunblock, 0)
GLOBAL_VAR_INIT(remotetalkblock, 0)
GLOBAL_VAR_INIT(morphblock, 0)
GLOBAL_VAR_INIT(coldblock, 0)
Expand Down
20 changes: 0 additions & 20 deletions code/game/dna/mutations/mutation_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@
H.adjustBruteLoss(-1, FALSE)
H.adjustFireLoss(-1)

/datum/mutation/increaserun
name = "Super Speed"
activation_messages = list("You feel swift and unencumbered.")
deactivation_messages = list("You feel slow.")
instability = GENE_INSTABILITY_MINOR
traits_to_add = list(TRAIT_IGNORESLOWDOWN)

/datum/mutation/increaserun/New()
..()
block = GLOB.increaserunblock

/datum/mutation/increaserun/can_activate(mob/M, flags)
if(!..())
return FALSE
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.dna.species && H.dna.species.speed_mod && !(flags & MUTCHK_FORCED))
return FALSE
return TRUE

/datum/mutation/heat_resist
name = "Heat Resistance"
activation_messages = list("Your skin is icy to the touch.")
Expand Down
1 change: 0 additions & 1 deletion code/game/gamemodes/setupgame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
GLOB.breathlessblock = getAssignedBlock("BREATHLESS", numsToAssign, DNA_HARD_BOUNDS, good=1)
GLOB.remoteviewblock = getAssignedBlock("REMOTEVIEW", numsToAssign, DNA_HARDER_BOUNDS, good=1)
GLOB.regenerateblock = getAssignedBlock("REGENERATE", numsToAssign, DNA_HARDER_BOUNDS, good=1)
GLOB.increaserunblock = getAssignedBlock("INCREASERUN", numsToAssign, DNA_HARDER_BOUNDS, good=1)
GLOB.remotetalkblock = getAssignedBlock("REMOTETALK", numsToAssign, DNA_HARDER_BOUNDS, good=1)
GLOB.morphblock = getAssignedBlock("MORPH", numsToAssign, DNA_HARDER_BOUNDS, good=1)
GLOB.coldblock = getAssignedBlock("COLD", numsToAssign, good=1)
Expand Down
20 changes: 20 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -877,3 +877,23 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons

/obj/item/proc/remove_tape()
return

/obj/item/water_act(volume, temperature, source, method)
. = ..()
if(HAS_TRAIT(src, TRAIT_OIL_SLICKED))
slowdown = initial(slowdown)
remove_atom_colour(FIXED_COLOUR_PRIORITY)
REMOVE_TRAIT(src, TRAIT_OIL_SLICKED, "potion")
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
H.regenerate_icons()

/obj/item/cleaning_act(mob/user, atom/cleaner, cleanspeed, text_verb, text_description, text_targetname)
. = ..()
if(HAS_TRAIT(src, TRAIT_OIL_SLICKED))
slowdown = initial(slowdown)
remove_atom_colour(FIXED_COLOUR_PRIORITY)
REMOVE_TRAIT(src, TRAIT_OIL_SLICKED, "potion")
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
H.regenerate_icons()
22 changes: 0 additions & 22 deletions code/game/objects/items/weapons/dna_injector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -286,28 +286,6 @@
block = GLOB.regenerateblock
..()

/obj/item/dnainjector/runfast
name = "DNA-Injector (Increase Run)"
desc = "Running Man."
datatype = DNA2_BUF_SE
value = 0xFFF
forcedmutation = TRUE

/obj/item/dnainjector/runfast/Initialize()
block = GLOB.increaserunblock
..()

/obj/item/dnainjector/antirunfast
name = "DNA-Injector (Anti-Increase Run)"
desc = "Walking Man."
datatype = DNA2_BUF_SE
value = 0x001
forcedmutation = TRUE

/obj/item/dnainjector/antirunfast/Initialize()
block = GLOB.increaserunblock
..()

/obj/item/dnainjector/morph
name = "DNA-Injector (Morph)"
desc = "A total makeover."
Expand Down
17 changes: 16 additions & 1 deletion code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
var/framestackamount = 2
var/deconstruction_ready = TRUE
var/flipped = FALSE
///If this is true, the table will have items slide off it when placed.
var/slippery = FALSE
/// The minimum level of environment_smash required for simple animals to be able to one-shot this.
var/minimum_env_smash = ENVIRONMENT_SMASH_WALLS

Expand Down Expand Up @@ -235,7 +237,12 @@
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
item_placed(I)
if(slippery)
step_away(I, user)
visible_message("<span class='warning'>[I] slips right off [src]!</span>")
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1)
else //Don't want slippery moving tables to have the item attached to them if it slides off.
item_placed(I)
else
return ..()

Expand Down Expand Up @@ -402,6 +409,14 @@
return 1


/obj/structure/table/water_act(volume, temperature, source, method)
. = ..()
if(HAS_TRAIT(src, TRAIT_OIL_SLICKED))
slippery = initial(slippery)
remove_atom_colour(FIXED_COLOUR_PRIORITY)
REMOVE_TRAIT(src, TRAIT_OIL_SLICKED, "potion")


/*
* Glass Tables
*/
Expand Down
3 changes: 0 additions & 3 deletions code/modules/antagonists/wishgranter/wishgranter_avatar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
H.dna.SetSEState(GLOB.teleblock, TRUE)
singlemutcheck(H, GLOB.teleblock, MUTCHK_FORCED)

H.dna.SetSEState(GLOB.increaserunblock, TRUE)
singlemutcheck(H, GLOB.increaserunblock, MUTCHK_FORCED)

H.dna.SetSEState(GLOB.breathlessblock, TRUE)
singlemutcheck(H, GLOB.breathlessblock, MUTCHK_FORCED)

Expand Down
17 changes: 13 additions & 4 deletions code/modules/clothing/shoes/magboots.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
STOP_PROCESSING(SSobj, src)
return ..()

/obj/item/clothing/shoes/magboots/water_act(volume, temperature, source, method)
. = ..()
if(magpulse && slowdown_active > SHOES_SLOWDOWN)
slowdown = slowdown_active

/obj/item/clothing/shoes/magboots/atmos
desc = "Magnetic boots, made to withstand gusts of space wind over 500kmph."
name = "atmospheric magboots"
icon_state = "atmosmagboots0"
magboot_state = "atmosmagboots"

/obj/item/clothing/shoes/magboots/attack_self(mob/user)
/obj/item/clothing/shoes/magboots/attack_self(mob/user, forced = FALSE)
toggle_magpulse(user, forced)

/obj/item/clothing/shoes/magboots/proc/toggle_magpulse(mob/user, forced)
if(magpulse)
START_PROCESSING(SSobj, src) //Gravboots
flags &= ~NOSLIP
Expand All @@ -34,7 +42,8 @@
slowdown = slowdown_active
magpulse = !magpulse
icon_state = "[magboot_state][magpulse]"
to_chat(user, "You [magpulse ? "enable" : "disable"] the [magpulse_name].")
if(!forced)
to_chat(user, "You [magpulse ? "enable" : "disable"] the [magpulse_name].")
user.update_inv_shoes() //so our mob-overlays update
user.update_gravity(user.mob_has_gravity())
for(var/X in actions)
Expand Down Expand Up @@ -194,7 +203,7 @@
if(ishuman(loc))
var/mob/living/carbon/human/user = loc
to_chat(user, "<span class='warning'>[src] has ran out of charge, and turned off!</span>")
attack_self(user)
attack_self(user, TRUE)
else
cell.use(power_consumption_rate)

Expand Down Expand Up @@ -258,7 +267,7 @@
style.remove(H)
if(magpulse)
to_chat(user, "<span class='notice'>As [src] are removed, they deactivate.</span>")
attack_self(user)
attack_self(user, TRUE)

/obj/item/clothing/shoes/magboots/gravity/item_action_slot_check(slot)
if(slot == slot_shoes)
Expand Down
11 changes: 11 additions & 0 deletions code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,17 @@ emp_act
/mob/living/carbon/human/water_act(volume, temperature, source, method = REAGENT_TOUCH)
. = ..()
dna.species.water_act(src, volume, temperature, source, method)
if(method != REAGENT_TOUCH)
return

for(var/obj/O in list(head, wear_suit, l_hand, r_hand))
O.water_act(src, volume, temperature, source, method)
if((head?.flags & THICKMATERIAL) && (wear_suit?.flags & THICKMATERIAL)) // fully pierce proof clothing is also water proof!
return
for(var/obj/O in list(w_uniform, shoes, belt, gloves, glasses, l_ear, r_ear, wear_id, wear_pda, r_store, l_store, s_store))
O.water_act(src, volume, temperature, source, method)



/mob/living/carbon/human/attackby(obj/item/I, mob/user, params)
if(SEND_SIGNAL(src, COMSIG_HUMAN_ATTACKED, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
Expand Down
14 changes: 14 additions & 0 deletions code/modules/reagents/chemistry/recipes/slime_extracts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,20 @@
log_game("[who] triggered an oil slime explosion at [COORD(extract_turf)].")
explosion(extract_turf, 1, 3, 6)

/datum/chemical_reaction/oil_slick
name = "Oil Potion"
id = "O_potion"
result = null
required_reagents = list("blood" = 1)
result_amount = 1
required_container = /obj/item/slime_extract/oil
required_other = TRUE

/datum/chemical_reaction/oil_slick/on_reaction(datum/reagents/holder)
SSblackbox.record_feedback("tally", "slime_cores_used", 1, type)
var/obj/item/slimepotion/oil_slick/P = new /obj/item/slimepotion/oil_slick
P.forceMove(get_turf(holder.my_atom))

//Light Pink
/datum/chemical_reaction/slimepotion2
name = "Slime Potion 2"
Expand Down
43 changes: 43 additions & 0 deletions code/modules/research/xenobiology/xenobiology.dm
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,49 @@
if(loc == usr && loc.Adjacent(over_object))
afterattack(over_object, usr, TRUE)

/obj/item/slimepotion/oil_slick
name = "slime oil potion"
desc = "A potent chemical mix that will remove the slowdown from any item by reducing friction. Doesn't mix well with water."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle4"
origin_tech = "biotech=5"

/obj/item/slimepotion/oil_slick/afterattack(obj/O, mob/user, proximity_flag)
if(!proximity_flag)
return
..()
if(!isitem(O))
if(!istype(O, /obj/structure/table))
to_chat(user, "<span class='warning'>The potion can only be used on items!</span>")
return
var/obj/structure/table/T = O
if(T.slippery)
to_chat(user, "<span class='warning'>[T] can luckily not be made any slippier!</span>")
return
to_chat(user, "<span class='warning'>You go to place the potion on [T], but before you know it, your hands are moving on your own!</span>") //Speed table must remain.
T.slippery = TRUE
else
var/obj/item/I = O
if(I.slowdown <= 0)
to_chat(user, "<span class='warning'>[I] can't be made any faster!</span>")
return
I.slowdown = 0

to_chat(user, "<span class='notice'>You slather the oily gunk over [O], making it slick and slippery.</span>")
O.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
O.add_atom_colour("#6e6e86", FIXED_COLOUR_PRIORITY)
ADD_TRAIT(O, TRAIT_OIL_SLICKED, "potion")
if(ishuman(O.loc))
var/mob/living/carbon/human/H = O.loc
H.regenerate_icons()
qdel(src)

/obj/item/slimepotion/oil_slick/MouseDrop(obj/over_object)
if(usr.incapacitated())
return
if(loc == usr && loc.Adjacent(over_object))
afterattack(over_object, usr, TRUE)

/obj/effect/timestop
anchored = TRUE
name = "chronofield"
Expand Down
1 change: 1 addition & 0 deletions code/modules/vehicle/vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,4 @@
/obj/vehicle/zap_act(power, zap_flags)
zap_buckle_check(power)
return ..()

Binary file modified icons/obj/chemical.dmi
Binary file not shown.

0 comments on commit aad8529

Please sign in to comment.