mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Merge remote-tracking branch 'tgstation/master' into upstream-2025-11-29
# Conflicts: # _maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm # _maps/RandomRuins/SpaceRuins/garbagetruck2.dmm # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # _maps/map_files/tramstation/tramstation.dmm # code/_onclick/hud/new_player.dm # code/datums/components/squashable.dm # code/datums/diseases/advance/symptoms/heal.dm # code/datums/diseases/chronic_illness.dm # code/datums/status_effects/buffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/stamcrit.dm # code/game/machinery/computer/crew.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/wall_mounted.dm # code/game/turfs/closed/indestructible.dm # code/modules/admin/view_variables/filterrific.dm # code/modules/antagonists/heretic/influences.dm # code/modules/cargo/orderconsole.dm # code/modules/client/preferences.dm # code/modules/events/space_vines/vine_mutations.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/carbon/human/death.dm # code/modules/mob/living/carbon/human/species_types/jellypeople.dm # code/modules/mob/living/damage_procs.dm # code/modules/mob/living/living.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mob_spawn/mob_spawn.dm # code/modules/projectiles/ammunition/energy/laser.dm # code/modules/projectiles/guns/ballistic/launchers.dm # code/modules/projectiles/guns/energy/laser.dm # code/modules/reagents/chemistry/machinery/chem_dispenser.dm # code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/medicine_reagents.dm # code/modules/surgery/healing.dm # code/modules/unit_tests/designs.dm # icons/mob/inhands/items_lefthand.dmi # icons/mob/inhands/items_righthand.dmi # tgui/packages/tgui/interfaces/ChemDispenser.tsx
This commit is contained in:
@@ -190,19 +190,6 @@
|
||||
)
|
||||
departmental_flags = DEPARTMENT_BITFLAG_SERVICE
|
||||
|
||||
/datum/design/soup_pot
|
||||
name = "Soup Pot"
|
||||
id = "souppot"
|
||||
build_type = AUTOLATHE | PROTOLATHE | AWAY_LATHE
|
||||
materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT*5, /datum/material/bluespace =SMALL_MATERIAL_AMOUNT*4)
|
||||
category = list(RND_CATEGORY_INITIAL, RND_CATEGORY_EQUIPMENT)
|
||||
build_path = /obj/item/reagent_containers/cup/soup_pot
|
||||
category = list(
|
||||
RND_CATEGORY_INITIAL,
|
||||
RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_KITCHEN,
|
||||
)
|
||||
departmental_flags = DEPARTMENT_BITFLAG_SERVICE
|
||||
|
||||
/datum/design/bowl
|
||||
name = "Bowl"
|
||||
id = "bowl"
|
||||
@@ -616,6 +603,21 @@
|
||||
)
|
||||
departmental_flags = DEPARTMENT_BITFLAG_SERVICE
|
||||
|
||||
/datum/design/telescreen_monastery
|
||||
name = "Monastery Telescreen"
|
||||
id = "telescreen_monastery"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(
|
||||
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5,
|
||||
/datum/material/glass = SHEET_MATERIAL_AMOUNT * 2.5,
|
||||
)
|
||||
build_path = /obj/item/wallframe/telescreen/monastery
|
||||
category = list(
|
||||
RND_CATEGORY_INITIAL,
|
||||
RND_CATEGORY_CONSTRUCTION + RND_SUBCATEGORY_CONSTRUCTION_MOUNTS,
|
||||
)
|
||||
departmental_flags = DEPARTMENT_BITFLAG_SERVICE
|
||||
|
||||
/datum/design/entertainment_radio
|
||||
name = "Entertainment Radio"
|
||||
id = "radio_entertainment"
|
||||
|
||||
@@ -290,17 +290,23 @@
|
||||
var/list/boostable_nodes = list()
|
||||
|
||||
/datum/scientific_partner/proc/purchase_boost(datum/techweb/purchasing_techweb, datum/techweb_node/node)
|
||||
if(!allowed_to_boost(purchasing_techweb, node.id))
|
||||
var/possible_boost = allowed_to_boost(purchasing_techweb, node.id)
|
||||
if(!possible_boost)
|
||||
return FALSE
|
||||
purchasing_techweb.boost_techweb_node(node, list(TECHWEB_POINT_TYPE_GENERIC = boostable_nodes[node.id]))
|
||||
purchasing_techweb.scientific_cooperation[type] -= boostable_nodes[node.id] * SCIENTIFIC_COOPERATION_PURCHASE_MULTIPLIER
|
||||
if(possible_boost == SCIPAPER_ALREADY_BOUGHT) /// Refund the original price
|
||||
purchasing_techweb.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = boostable_nodes[node.id]))
|
||||
return SCIPAPER_ALREADY_BOUGHT
|
||||
return TRUE
|
||||
|
||||
/datum/scientific_partner/proc/allowed_to_boost(datum/techweb/purchasing_techweb, node_id)
|
||||
if(purchasing_techweb.scientific_cooperation[type] < (boostable_nodes[node_id] * SCIENTIFIC_COOPERATION_PURCHASE_MULTIPLIER)) // Too expensive
|
||||
return FALSE
|
||||
if(!(node_id in purchasing_techweb.get_available_nodes())) // Not currently available
|
||||
return FALSE
|
||||
if((TECHWEB_POINT_TYPE_GENERIC in purchasing_techweb.boosted_nodes[node_id]) && (purchasing_techweb.boosted_nodes[node_id][TECHWEB_POINT_TYPE_GENERIC] >= boostable_nodes[node_id])) // Already bought or we have a bigger discount
|
||||
return FALSE
|
||||
if(node_id in purchasing_techweb.researched_nodes)
|
||||
return SCIPAPER_ALREADY_BOUGHT
|
||||
if(!(node_id in purchasing_techweb.get_available_nodes())) // Not currently available
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
TECHWEB_NODE_CYBER_ORGANS = TECHWEB_TIER_2_POINTS,
|
||||
TECHWEB_NODE_CYBER_ORGANS_UPGRADED = TECHWEB_TIER_3_POINTS,
|
||||
TECHWEB_NODE_MEDBAY_EQUIP_ADV = TECHWEB_TIER_3_POINTS,
|
||||
TECHWEB_NODE_CYTOLOGY = TECHWEB_TIER_3_POINTS,
|
||||
TECHWEB_NODE_CYTOLOGY = TECHWEB_TIER_2_POINTS,
|
||||
TECHWEB_NODE_BORG_MEDICAL = TECHWEB_TIER_3_POINTS,
|
||||
TECHWEB_NODE_COMBAT_IMPLANTS = TECHWEB_TIER_4_POINTS,
|
||||
)
|
||||
|
||||
@@ -558,10 +558,6 @@
|
||||
if(experiment.type != paper_to_add.experiment_path)
|
||||
continue
|
||||
|
||||
experiment.completed = TRUE
|
||||
var/announcetext = complete_experiment(experiment)
|
||||
if(length(GLOB.experiment_handlers))
|
||||
var/datum/component/experiment_handler/handler = GLOB.experiment_handlers[1]
|
||||
handler.announce_message_to_all(announcetext)
|
||||
experiment.finish_experiment(linked_web_override = src)
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
if(host.completed_experiments[experiment_type]) //do we have this discount_experiment unlocked?
|
||||
actual_costs[cost_type] -= discount_experiments[experiment_type]
|
||||
|
||||
if(host.boosted_nodes[id]) // Boosts should be subservient to experiments. Discount from boosts are capped when costs fall below 250.
|
||||
if(host.boosted_nodes[id]) // Boosts should be subservient to experiments.
|
||||
var/list/boostlist = host.boosted_nodes[id]
|
||||
for(var/booster in boostlist)
|
||||
if(actual_costs[booster])
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
"hyper_cell",
|
||||
)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS)
|
||||
required_experiments = list(/datum/experiment/scanning/points/machinery_tiered_scan/tier2_any)
|
||||
discount_experiments = list(/datum/experiment/scanning/points/machinery_tiered_scan/tier2_any = TECHWEB_TIER_3_POINTS)
|
||||
announce_channels = list(RADIO_CHANNEL_ENGINEERING)
|
||||
|
||||
|
||||
|
||||
@@ -92,6 +92,12 @@
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_1_POINTS)
|
||||
announce_channels = list(RADIO_CHANNEL_SERVICE)
|
||||
|
||||
/datum/techweb_node/consoles/New()
|
||||
var/has_monastery = CHECK_MAP_JOB_CHANGE(JOB_CHAPLAIN, "has_monastery")
|
||||
if(has_monastery)
|
||||
design_ids += "telescreen_monastery"
|
||||
return ..()
|
||||
|
||||
/datum/techweb_node/gaming
|
||||
id = TECHWEB_NODE_GAMING
|
||||
display_name = "Gaming"
|
||||
@@ -146,7 +152,6 @@
|
||||
"oven",
|
||||
"stove",
|
||||
"range",
|
||||
"souppot",
|
||||
"processor",
|
||||
"gibber",
|
||||
"monkey_recycler",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"surgery_wing_reconstruction",
|
||||
)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_2_POINTS)
|
||||
required_experiments = list(/datum/experiment/autopsy/human)
|
||||
discount_experiments = list(/datum/experiment/autopsy/human = TECHWEB_TIER_2_POINTS)
|
||||
announce_channels = list(RADIO_CHANNEL_MEDICAL)
|
||||
|
||||
/datum/techweb_node/surgery_exp
|
||||
|
||||
@@ -142,24 +142,27 @@ To add a crossbreed:
|
||||
. = ..()
|
||||
reagents.flags = DRAWABLE // Cannot be refilled, since it's basically an autoinjector!
|
||||
|
||||
/obj/item/slimecrossbeaker/autoinjector/attack(mob/living/M, mob/user)
|
||||
/obj/item/slimecrossbeaker/autoinjector/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
if(!iscarbon(interacting_with))
|
||||
return NONE
|
||||
var/mob/living/carbon/injecting_mob = interacting_with
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, span_warning("[src] is empty!"))
|
||||
return
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
if(self_use_only && M != user)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(self_use_only && injecting_mob != user)
|
||||
to_chat(user, span_warning("This can only be used on yourself."))
|
||||
return
|
||||
if(reagents.total_volume && (ignore_flags || M.try_inject(user, injection_flags = INJECT_TRY_SHOW_ERROR_MESSAGE)))
|
||||
reagents.trans_to(M, reagents.total_volume, transferred_by = user)
|
||||
if(user != M)
|
||||
to_chat(M, span_warning("[user] presses [src] against you!"))
|
||||
to_chat(user, span_notice("You press [src] against [M], injecting [M.p_them()]."))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(reagents.total_volume && (ignore_flags || injecting_mob.try_inject(user, injection_flags = INJECT_TRY_SHOW_ERROR_MESSAGE)))
|
||||
reagents.trans_to(injecting_mob, reagents.total_volume, transferred_by = user)
|
||||
if(user != injecting_mob)
|
||||
to_chat(injecting_mob, span_warning("[user] presses [src] against you!"))
|
||||
to_chat(user, span_notice("You press [src] against [injecting_mob], injecting [injecting_mob.p_them()]."))
|
||||
else
|
||||
to_chat(user, span_notice("You press [src] against yourself, and it flattens against you!"))
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
else
|
||||
to_chat(user, span_warning("There's no place to stick [src]!"))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
/obj/item/slimecrossbeaker/autoinjector/regenpack
|
||||
ignore_flags = TRUE //It is, after all, intended to heal.
|
||||
|
||||
@@ -8,7 +8,6 @@ Slimecrossing Potions
|
||||
/obj/item/slimepotion/extract_cloner
|
||||
name = "extract cloning potion"
|
||||
desc = "A more powerful version of the extract enhancer potion, capable of cloning regular slime extracts."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potgold"
|
||||
|
||||
/obj/item/slimepotion/extract_cloner/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
@@ -35,16 +34,19 @@ Slimecrossing Potions
|
||||
/obj/item/slimepotion/peacepotion
|
||||
name = "pacification potion"
|
||||
desc = "A light pink solution of chemicals, smelling like liquid peace. And mercury salts."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potlightpink"
|
||||
|
||||
/obj/item/slimepotion/peacepotion/attack(mob/living/peace_target, mob/user)
|
||||
/obj/item/slimepotion/peacepotion/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(. & ITEM_INTERACT_ANY_BLOCKER)
|
||||
return .
|
||||
var/mob/living/peace_target = interacting_with
|
||||
if(!isliving(peace_target) || peace_target.stat == DEAD)
|
||||
to_chat(user, span_warning("[src] only works on the living."))
|
||||
return ..()
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(ismegafauna(peace_target))
|
||||
to_chat(user, span_warning("[src] does not work on beings of pure evil!"))
|
||||
return ..()
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(peace_target != user)
|
||||
peace_target.visible_message(span_danger("[user] starts to feed [peace_target] [src]!"),
|
||||
span_userdanger("[user] starts to feed you [src]!"))
|
||||
@@ -53,7 +55,7 @@ Slimecrossing Potions
|
||||
span_danger("You start to drink [src]!"))
|
||||
|
||||
if(!do_after(user, 10 SECONDS, target = peace_target))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(peace_target != user)
|
||||
to_chat(user, span_notice("You feed [peace_target] [src]!"))
|
||||
else
|
||||
@@ -64,44 +66,48 @@ Slimecrossing Potions
|
||||
var/mob/living/carbon/peaceful_carbon = peace_target
|
||||
peaceful_carbon.gain_trauma(/datum/brain_trauma/severe/pacifism, TRAUMA_RESILIENCE_SURGERY)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
//Love potion - Charged Pink
|
||||
/obj/item/slimepotion/lovepotion
|
||||
name = "love potion"
|
||||
desc = "A pink chemical mix thought to inspire feelings of love."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potpink"
|
||||
|
||||
/obj/item/slimepotion/lovepotion/attack(mob/living/love_target, mob/user)
|
||||
/obj/item/slimepotion/lovepotion/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(. & ITEM_INTERACT_ANY_BLOCKER)
|
||||
return .
|
||||
var/mob/living/love_target = interacting_with
|
||||
if(!isliving(love_target) || love_target.stat == DEAD)
|
||||
to_chat(user, span_warning("The love potion only works on living things, sicko!"))
|
||||
return ..()
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(ismegafauna(love_target))
|
||||
to_chat(user, span_warning("The love potion does not work on beings of pure evil!"))
|
||||
return ..()
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(user == love_target)
|
||||
to_chat(user, span_warning("You can't drink the love potion. What are you, a narcissist?"))
|
||||
return ..()
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(love_target.has_status_effect(/datum/status_effect/in_love))
|
||||
to_chat(user, span_warning("[love_target] is already lovestruck!"))
|
||||
return ..()
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
love_target.visible_message(span_danger("[user] starts to feed [love_target] a love potion!"),
|
||||
span_userdanger("[user] starts to feed you a love potion!"))
|
||||
|
||||
if(!do_after(user, 5 SECONDS, target = love_target))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
to_chat(user, span_notice("You feed [love_target] the love potion!"))
|
||||
to_chat(love_target, span_notice("You develop feelings for [user], and anyone [user.p_they()] like[user.p_s()]."))
|
||||
love_target.faction |= "[REF(user)]"
|
||||
love_target.apply_status_effect(/datum/status_effect/in_love, user)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
//Pressure potion - Charged Dark Blue
|
||||
/obj/item/slimepotion/spaceproof
|
||||
name = "slime pressurization potion"
|
||||
desc = "A potent chemical sealant that will render any article of clothing airtight. Has two uses."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potblack"
|
||||
var/uses = 2
|
||||
|
||||
@@ -138,14 +144,12 @@ Slimecrossing Potions
|
||||
/obj/item/slimepotion/enhancer/max
|
||||
name = "extract maximizer"
|
||||
desc = "An extremely potent chemical mix that will maximize a slime extract's uses."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potcerulean"
|
||||
|
||||
//Lavaproofing potion - Charged Red
|
||||
/obj/item/slimepotion/lavaproof
|
||||
name = "slime lavaproofing potion"
|
||||
desc = "A strange, reddish goo said to repel lava as if it were water, without reducing flammability. Has two uses."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potyellow"
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
var/uses = 2
|
||||
@@ -180,7 +184,6 @@ Slimecrossing Potions
|
||||
/obj/item/slimepotion/slime_reviver
|
||||
name = "slime revival potion"
|
||||
desc = "Infused with plasma and compressed gel, this brings dead slimes back to life."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potgrey"
|
||||
|
||||
/obj/item/slimepotion/slime_reviver/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
@@ -211,20 +214,17 @@ Slimecrossing Potions
|
||||
/obj/item/slimepotion/slime/chargedstabilizer
|
||||
name = "slime omnistabilizer"
|
||||
desc = "An extremely potent chemical mix that will stop a slime from mutating completely."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potcyan"
|
||||
|
||||
/obj/item/slimepotion/slime/chargedstabilizer/attack(mob/living/basic/slime/stabilize_target, mob/user)
|
||||
if(!isslime(stabilize_target))
|
||||
to_chat(user, span_warning("The stabilizer only works on slimes!"))
|
||||
return ..()
|
||||
if(stabilize_target.stat)
|
||||
/obj/item/slimepotion/slime/chargedstabilizer/interact_with_slime(mob/living/basic/slime/interacting_slime, mob/living/user, list/modifiers)
|
||||
if(interacting_slime.stat)
|
||||
to_chat(user, span_warning("The slime is dead!"))
|
||||
return
|
||||
if(stabilize_target.mutation_chance == 0)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(interacting_slime.mutation_chance == 0)
|
||||
to_chat(user, span_warning("The slime already has no chance of mutating!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
to_chat(user, span_notice("You feed the slime the omnistabilizer. It will not mutate this cycle!"))
|
||||
stabilize_target.mutation_chance = 0
|
||||
interacting_slime.mutation_chance = 0
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
@@ -98,34 +98,39 @@
|
||||
status_type = STATUS_EFFECT_UNIQUE
|
||||
duration = STATUS_EFFECT_PERMANENT //Will remove self when block breaks.
|
||||
alert_type = /atom/movable/screen/alert/status_effect/freon/stasis
|
||||
tick_interval = STATUS_EFFECT_NO_TICK
|
||||
/// The cube we will place our mob into.
|
||||
var/obj/structure/ice_stasis/cube
|
||||
/// Whether or not this version of the status effect can be resisted out of.
|
||||
var/resistable = TRUE
|
||||
|
||||
/datum/status_effect/frozenstasis/on_apply()
|
||||
if(resistable)
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESIST, PROC_REF(breakCube))
|
||||
cube = new /obj/structure/ice_stasis(get_turf(owner))
|
||||
owner.forceMove(cube)
|
||||
RegisterSignal(cube, COMSIG_QDELETING, PROC_REF(clear_effect))
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(has_escaped))
|
||||
if(resistable)
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESIST, PROC_REF(clear_effect))
|
||||
ADD_TRAIT(owner, TRAIT_GODMODE, TRAIT_STATUS_EFFECT(id))
|
||||
return ..()
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/frozenstasis/tick(seconds_between_ticks)
|
||||
if(!cube || owner.loc != cube)
|
||||
owner.remove_status_effect(src)
|
||||
|
||||
/datum/status_effect/frozenstasis/proc/breakCube()
|
||||
/datum/status_effect/frozenstasis/proc/clear_effect(...)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
owner.remove_status_effect(src)
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/frozenstasis/proc/has_escaped(...)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(owner.loc != cube)
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/frozenstasis/on_remove()
|
||||
if(cube)
|
||||
qdel(cube)
|
||||
REMOVE_TRAIT(owner, TRAIT_GODMODE, TRAIT_STATUS_EFFECT(id))
|
||||
if(resistable)
|
||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
|
||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||
UnregisterSignal(cube, COMSIG_QDELETING)
|
||||
QDEL_NULL(cube)
|
||||
|
||||
/datum/status_effect/frozenstasis/irresistable
|
||||
resistable = FALSE
|
||||
@@ -182,10 +187,10 @@
|
||||
|
||||
/datum/status_effect/slime_clone_decay/tick(seconds_between_ticks)
|
||||
var/need_mob_update
|
||||
need_mob_update = owner.adjustToxLoss(1, updating_health = FALSE)
|
||||
need_mob_update += owner.adjustOxyLoss(1, updating_health = FALSE)
|
||||
need_mob_update += owner.adjustBruteLoss(1, updating_health = FALSE)
|
||||
need_mob_update += owner.adjustFireLoss(1, updating_health = FALSE)
|
||||
need_mob_update = owner.adjust_tox_loss(1, updating_health = FALSE)
|
||||
need_mob_update += owner.adjust_oxy_loss(1, updating_health = FALSE)
|
||||
need_mob_update += owner.adjust_brute_loss(1, updating_health = FALSE)
|
||||
need_mob_update += owner.adjust_fire_loss(1, updating_health = FALSE)
|
||||
if(need_mob_update)
|
||||
owner.updatehealth()
|
||||
owner.color = "#007BA7"
|
||||
@@ -207,7 +212,7 @@
|
||||
|
||||
/datum/status_effect/bloodchill/tick(seconds_between_ticks)
|
||||
if(prob(50))
|
||||
owner.adjustFireLoss(2)
|
||||
owner.adjust_fire_loss(2)
|
||||
|
||||
/datum/status_effect/bloodchill/on_remove()
|
||||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/bloodchill)
|
||||
@@ -223,7 +228,7 @@
|
||||
|
||||
/datum/status_effect/bonechill/tick(seconds_between_ticks)
|
||||
if(prob(50))
|
||||
owner.adjustFireLoss(1)
|
||||
owner.adjust_fire_loss(1)
|
||||
owner.set_jitter_if_lower(6 SECONDS)
|
||||
owner.adjust_bodytemperature(-10)
|
||||
if(ishuman(owner))
|
||||
@@ -245,7 +250,7 @@
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/rebreathing/tick(seconds_between_ticks)
|
||||
owner.adjustOxyLoss(-6, 0) //Just a bit more than normal breathing.
|
||||
owner.adjust_oxy_loss(-6, 0) //Just a bit more than normal breathing.
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
//////////////////CONSUMING EXTRACTS///////////////////
|
||||
@@ -521,17 +526,17 @@
|
||||
healed_last_tick = FALSE
|
||||
var/need_mob_update = FALSE
|
||||
|
||||
if(owner.getBruteLoss() > 0)
|
||||
need_mob_update += owner.adjustBruteLoss(-0.2, updating_health = FALSE)
|
||||
if(owner.get_brute_loss() > 0)
|
||||
need_mob_update += owner.adjust_brute_loss(-0.2, updating_health = FALSE)
|
||||
healed_last_tick = TRUE
|
||||
|
||||
if(owner.getFireLoss() > 0)
|
||||
need_mob_update += owner.adjustFireLoss(-0.2, updating_health = FALSE)
|
||||
if(owner.get_fire_loss() > 0)
|
||||
need_mob_update += owner.adjust_fire_loss(-0.2, updating_health = FALSE)
|
||||
healed_last_tick = TRUE
|
||||
|
||||
if(owner.getToxLoss() > 0)
|
||||
if(owner.get_tox_loss() > 0)
|
||||
// Forced, so slimepeople are healed as well.
|
||||
need_mob_update += owner.adjustToxLoss(-0.2, updating_health = FALSE, forced = TRUE)
|
||||
need_mob_update += owner.adjust_tox_loss(-0.2, updating_health = FALSE, forced = TRUE)
|
||||
healed_last_tick = TRUE
|
||||
|
||||
if(need_mob_update)
|
||||
@@ -1003,11 +1008,11 @@
|
||||
return
|
||||
|
||||
var/list/healing_types = list()
|
||||
if(owner.getBruteLoss() > 0)
|
||||
if(owner.get_brute_loss() > 0)
|
||||
healing_types += BRUTE
|
||||
if(owner.getFireLoss() > 0)
|
||||
if(owner.get_fire_loss() > 0)
|
||||
healing_types += BURN
|
||||
if(owner.getToxLoss() > 0)
|
||||
if(owner.get_tox_loss() > 0)
|
||||
healing_types += TOX
|
||||
|
||||
if(length(healing_types))
|
||||
|
||||
@@ -110,13 +110,13 @@ Slimecrossing Weapons
|
||||
return FALSE
|
||||
charge_timer = 0
|
||||
var/mob/living/M = loc
|
||||
if(istype(M) && HAS_TRAIT(M, TRAIT_NOBLOOD) && M.stat == CONSCIOUS)
|
||||
charges ++
|
||||
if(istype(M) && !CAN_HAVE_BLOOD(M) && M.stat == CONSCIOUS)
|
||||
charges++
|
||||
M.apply_damage(5, BRUTE)
|
||||
else
|
||||
if(istype(M) && M.blood_volume >= 20)
|
||||
if(istype(M) && M.get_blood_volume() >= 20)
|
||||
charges++
|
||||
M.blood_volume -= 20
|
||||
M.adjust_blood_volume(-20)
|
||||
if(charges == 1)
|
||||
recharge_newshot()
|
||||
return TRUE
|
||||
|
||||
@@ -100,7 +100,7 @@ Burning extracts:
|
||||
if(istype(C))
|
||||
C.electrocute_act(25,src)
|
||||
else
|
||||
M.adjustFireLoss(25)
|
||||
M.adjust_fire_loss(25)
|
||||
to_chat(M, span_danger("You feel a sharp electrical pulse!"))
|
||||
..()
|
||||
|
||||
|
||||
@@ -59,28 +59,29 @@ Consuming extracts:
|
||||
/obj/item/slime_cookie/proc/do_effect(mob/living/M, mob/user)
|
||||
return
|
||||
|
||||
/obj/item/slime_cookie/attack(mob/living/M, mob/user)
|
||||
/obj/item/slime_cookie/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
if(!isliving(interacting_with))
|
||||
return NONE
|
||||
var/mob/living/living_mob = interacting_with
|
||||
var/fed = FALSE
|
||||
if(M == user)
|
||||
M.visible_message(span_notice("[user] eats [src]!"), span_notice("You eat [src]."))
|
||||
if(living_mob == user)
|
||||
living_mob.visible_message(span_notice("[user] eats [src]!"), span_notice("You eat [src]."))
|
||||
fed = TRUE
|
||||
else
|
||||
M.visible_message(span_danger("[user] tries to force [M] to eat [src]!"), span_userdanger("[user] tries to force you to eat [src]!"))
|
||||
if(do_after(user, 2 SECONDS, target = M))
|
||||
living_mob.visible_message(span_danger("[user] tries to force [living_mob] to eat [src]!"), span_userdanger("[user] tries to force you to eat [src]!"))
|
||||
if(do_after(user, 2 SECONDS, target = living_mob))
|
||||
fed = TRUE
|
||||
M.visible_message(span_danger("[user] forces [M] to eat [src]!"), span_warning("[user] forces you to eat [src]."))
|
||||
living_mob.visible_message(span_danger("[user] forces [living_mob] to eat [src]!"), span_warning("[user] forces you to eat [src]."))
|
||||
if(fed)
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(!istype(H) || !HAS_TRAIT(H, TRAIT_AGEUSIA))
|
||||
to_chat(M, span_notice("Tastes like [taste]."))
|
||||
playsound(get_turf(M), 'sound/items/eatfood.ogg', 20, TRUE)
|
||||
if(!HAS_TRAIT(living_mob, TRAIT_AGEUSIA))
|
||||
to_chat(living_mob, span_notice("You can taste [taste]."))
|
||||
playsound(get_turf(living_mob), 'sound/items/eatfood.ogg', 20, TRUE)
|
||||
if(nutrition)
|
||||
M.reagents.add_reagent(/datum/reagent/consumable/nutriment,nutrition)
|
||||
do_effect(M, user)
|
||||
living_mob.reagents.add_reagent(/datum/reagent/consumable/nutriment, nutrition)
|
||||
do_effect(living_mob, user)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
/obj/item/slimecross/consuming/grey
|
||||
colour = SLIME_TYPE_GREY
|
||||
@@ -121,11 +122,11 @@ Consuming extracts:
|
||||
|
||||
/obj/item/slime_cookie/purple/do_effect(mob/living/M, mob/user)
|
||||
var/need_mob_update = FALSE
|
||||
need_mob_update += M.adjustBruteLoss(-5, updating_health = FALSE)
|
||||
need_mob_update += M.adjustFireLoss(-5, updating_health = FALSE)
|
||||
need_mob_update += M.adjustToxLoss(-5, updating_health = FALSE, forced = TRUE) //To heal slimepeople.
|
||||
need_mob_update += M.adjustOxyLoss(-5, updating_health = FALSE)
|
||||
need_mob_update += M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5)
|
||||
need_mob_update += M.adjust_brute_loss(-5, updating_health = FALSE)
|
||||
need_mob_update += M.adjust_fire_loss(-5, updating_health = FALSE)
|
||||
need_mob_update += M.adjust_tox_loss(-5, updating_health = FALSE, forced = TRUE) //To heal slimepeople.
|
||||
need_mob_update += M.adjust_oxy_loss(-5, updating_health = FALSE)
|
||||
need_mob_update += M.adjust_organ_loss(ORGAN_SLOT_BRAIN, -5)
|
||||
if(need_mob_update)
|
||||
M.updatehealth()
|
||||
|
||||
@@ -346,7 +347,7 @@ Consuming extracts:
|
||||
playsound(get_turf(M), 'sound/effects/splat.ogg', 10, TRUE)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.blood_volume += 25 //Half a vampire drain.
|
||||
C.adjust_blood_volume(25) //Half a vampire drain.
|
||||
|
||||
/obj/item/slimecross/consuming/green
|
||||
colour = SLIME_TYPE_GREEN
|
||||
|
||||
@@ -254,9 +254,9 @@ Regenerative extracts:
|
||||
carbon_dummy.real_name = carbon_target.real_name
|
||||
carbon_target.dna.copy_dna(carbon_dummy.dna, COPY_DNA_SE|COPY_DNA_SPECIES)
|
||||
carbon_dummy.updateappearance(mutcolor_update = TRUE)
|
||||
dummy.adjustBruteLoss(target.getBruteLoss())
|
||||
dummy.adjustFireLoss(target.getFireLoss())
|
||||
dummy.adjustToxLoss(target.getToxLoss())
|
||||
dummy.adjust_brute_loss(target.get_brute_loss())
|
||||
dummy.adjust_fire_loss(target.get_fire_loss())
|
||||
dummy.adjust_tox_loss(target.get_tox_loss())
|
||||
dummy.death()
|
||||
|
||||
/obj/item/slimecross/regenerative/lightpink
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
|
||||
for(var/mob/living/basic/slime/potioned_slime in eye_turf)
|
||||
xeno_console.spit_atom(xeno_console.current_potion, eye_turf)
|
||||
xeno_console.current_potion.attack(potioned_slime, living_owner)
|
||||
xeno_console.current_potion.interact_with_slime(potioned_slime, living_owner)
|
||||
xeno_console.xeno_hud.update_potion(xeno_console.current_potion)
|
||||
break
|
||||
|
||||
|
||||
@@ -61,18 +61,20 @@
|
||||
*
|
||||
* By using a valid core on a living adult slime, then feeding it nine more of the same type, you can mutate it into more useful items. Not every slime type has an implemented core cross.
|
||||
*/
|
||||
/obj/item/slime_extract/attack(mob/living/basic/slime/target_slime, mob/user)
|
||||
if(!isslime(target_slime))
|
||||
return ..()
|
||||
/obj/item/slime_extract/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
var/mob/living/basic/slime/target_slime = interacting_with
|
||||
if(!istype(target_slime))
|
||||
return NONE
|
||||
|
||||
if(target_slime.stat)
|
||||
to_chat(user, span_warning("The slime is dead!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(target_slime.life_stage != SLIME_LIFE_STAGE_ADULT)
|
||||
to_chat(user, span_warning("The slime must be an adult to cross its core!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(target_slime.crossbreed_modification && target_slime.crossbreed_modification != crossbreed_modification)
|
||||
to_chat(user, span_warning("The slime is already being crossed with a different extract!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
if(!target_slime.crossbreed_modification)
|
||||
target_slime.crossbreed_modification = crossbreed_modification
|
||||
@@ -84,6 +86,7 @@
|
||||
|
||||
if(target_slime.applied_crossbreed_amount >= SLIME_EXTRACT_CROSSING_REQUIRED)
|
||||
target_slime.spawn_corecross()
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/**
|
||||
* Effect when activated by selfsustaining crossbreed or rainbow slime
|
||||
@@ -257,7 +260,7 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
switch(activation_type)
|
||||
if(SLIME_ACTIVATE_MINOR)
|
||||
user.adjust_nutrition(50)
|
||||
user.blood_volume += 50
|
||||
user.adjust_blood_volume(50)
|
||||
to_chat(user, span_notice("You activate [src], and your body is refilled with fresh slime jelly!"))
|
||||
return 150
|
||||
|
||||
@@ -447,7 +450,7 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
/obj/item/slime_extract/lightpink/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
if(SLIME_ACTIVATE_MINOR)
|
||||
var/obj/item/slimepotion/slime/renaming/O = new(null, 1)
|
||||
var/obj/item/slimepotion/renaming/O = new(null, 1)
|
||||
if(!user.put_in_active_hand(O))
|
||||
O.forceMove(user.drop_location())
|
||||
playsound(user, 'sound/effects/splat.ogg', 50, TRUE)
|
||||
@@ -455,7 +458,7 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
return 150
|
||||
|
||||
if(SLIME_ACTIVATE_MAJOR)
|
||||
var/obj/item/slimepotion/slime/sentience/O = new(null, 1)
|
||||
var/obj/item/slimepotion/sentience/O = new(null, 1)
|
||||
if(!user.put_in_active_hand(O))
|
||||
O.forceMove(user.drop_location())
|
||||
playsound(user, 'sound/effects/splat.ogg', 50, TRUE)
|
||||
@@ -674,49 +677,59 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
/obj/item/slimepotion
|
||||
name = "slime potion"
|
||||
desc = "A hard yet gelatinous capsule excreted by a slime, containing mysterious substances."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/slimepotion/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
if(is_reagent_container(interacting_with))
|
||||
to_chat(user, span_warning("You cannot transfer [src] to [interacting_with]! \
|
||||
It appears the potion must be given directly to a slime to absorb.") )
|
||||
It appears the potion must be given directly to a slime or other object to absorb.") )
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
return NONE
|
||||
|
||||
/obj/item/slimepotion/slime/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(. & ITEM_INTERACT_ANY_BLOCKER)
|
||||
return .
|
||||
if(isslime(interacting_with))
|
||||
return interact_with_slime(interacting_with, user, modifiers)
|
||||
else
|
||||
to_chat(user, span_warning("It appears [src] must be given directly to a slime to absorb."))
|
||||
return NONE
|
||||
|
||||
/obj/item/slimepotion/slime/proc/interact_with_slime(mob/living/basic/slime/interacting_slime, mob/living/user, list/modifiers)
|
||||
return
|
||||
|
||||
/obj/item/slimepotion/slime/docility
|
||||
name = "docility potion"
|
||||
desc = "A potent chemical mix that nullifies a slime's hunger, causing it to become docile and tame."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potsilver"
|
||||
|
||||
/obj/item/slimepotion/slime/docility/attack(mob/living/basic/slime/target_slime, mob/user)
|
||||
if(!isslime(target_slime))
|
||||
to_chat(user, span_warning("The potion only works on slimes!"))
|
||||
return ..()
|
||||
if(target_slime.stat)
|
||||
/obj/item/slimepotion/slime/docility/interact_with_slime(mob/living/basic/slime/interacting_slime, mob/living/user, list/modifiers)
|
||||
if(interacting_slime.stat)
|
||||
to_chat(user, span_warning("The slime is dead!"))
|
||||
return
|
||||
if(target_slime.ai_controller?.clear_blackboard_key(BB_SLIME_RABID)) //Stops being rabid, but doesn't become truly docile.
|
||||
to_chat(target_slime, span_warning("You absorb the potion, and your rabid hunger finally settles to a normal desire to feed."))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(interacting_slime.ai_controller?.clear_blackboard_key(BB_SLIME_RABID)) //Stops being rabid, but doesn't become truly docile.
|
||||
to_chat(interacting_slime, span_warning("You absorb the potion, and your rabid hunger finally settles to a normal desire to feed."))
|
||||
to_chat(user, span_notice("You feed the slime the potion, calming its rabid rage."))
|
||||
target_slime.set_default_behaviour()
|
||||
interacting_slime.set_default_behaviour()
|
||||
qdel(src)
|
||||
return
|
||||
target_slime.set_pacified_behaviour()
|
||||
to_chat(target_slime, span_warning("You absorb the potion and feel your intense desire to feed melt away."))
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
interacting_slime.set_pacified_behaviour()
|
||||
to_chat(interacting_slime, span_warning("You absorb the potion and feel your intense desire to feed melt away."))
|
||||
to_chat(user, span_notice("You feed the slime the potion, removing its hunger and calming it."))
|
||||
var/newname = sanitize_name(tgui_input_text(user, "Would you like to give the slime a name?", "Name your new pet", "Pet Slime", MAX_NAME_LEN))
|
||||
|
||||
if (!newname)
|
||||
newname = "Pet Slime"
|
||||
target_slime.name = newname
|
||||
target_slime.real_name = newname
|
||||
interacting_slime.name = newname
|
||||
interacting_slime.real_name = newname
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/slimepotion/slime/sentience
|
||||
/obj/item/slimepotion/sentience
|
||||
name = "intelligence potion"
|
||||
desc = "A miraculous chemical mix that grants human like intelligence to living beings."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potpink"
|
||||
/// Are we being offered to a mob, and therefore is a ghost poll currently in progress for the sentient mob?
|
||||
var/being_used = FALSE
|
||||
@@ -724,34 +737,40 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
/// Reason for offering potion. This will be displayed in the poll alert to ghosts.
|
||||
var/potion_reason
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/examine(mob/user)
|
||||
/obj/item/slimepotion/sentience/examine(mob/user)
|
||||
. = ..()
|
||||
. += span_notice("Alt-click to set potion offer reason. [potion_reason ? "Current reason: [span_warning(potion_reason)]" : null]")
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/Initialize(mapload)
|
||||
/obj/item/slimepotion/sentience/Initialize(mapload)
|
||||
register_context()
|
||||
return ..()
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
/obj/item/slimepotion/sentience/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
context[SCREENTIP_CONTEXT_ALT_LMB] = "Set potion offer reason"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/click_alt(mob/living/user)
|
||||
/obj/item/slimepotion/sentience/click_alt(mob/living/user)
|
||||
potion_reason = tgui_input_text(user, "Enter reason for offering potion", "Intelligence Potion", potion_reason, max_length = MAX_MESSAGE_LEN, multiline = TRUE)
|
||||
return CLICK_ACTION_SUCCESS
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/attack(mob/living/dumb_mob, mob/user)
|
||||
if(being_used || !isliving(dumb_mob))
|
||||
return
|
||||
/obj/item/slimepotion/sentience/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(. & ITEM_INTERACT_ANY_BLOCKER)
|
||||
return .
|
||||
if(!isliving(interacting_with))
|
||||
return NONE
|
||||
var/mob/living/dumb_mob = interacting_with
|
||||
if(being_used)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(dumb_mob.ckey) //only works on animals that aren't player controlled
|
||||
balloon_alert(user, "already sentient!")
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(dumb_mob.stat)
|
||||
balloon_alert(user, "it's dead!")
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(!dumb_mob.compare_sentience_type(sentience_type)) // Will also return false if not a basic or simple mob, which are the only two we want anyway
|
||||
balloon_alert(user, "invalid creature!")
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
balloon_alert(user, "offering...")
|
||||
being_used = TRUE
|
||||
var/mob/chosen_one = SSpolling.poll_ghosts_for_target(
|
||||
@@ -765,9 +784,10 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
chat_text_border_icon = src,
|
||||
)
|
||||
on_poll_concluded(user, dumb_mob, chosen_one)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/// Assign the chosen ghost to the mob
|
||||
/obj/item/slimepotion/slime/sentience/proc/on_poll_concluded(mob/user, mob/living/dumb_mob, mob/dead/observer/ghost)
|
||||
/obj/item/slimepotion/sentience/proc/on_poll_concluded(mob/user, mob/living/dumb_mob, mob/dead/observer/ghost)
|
||||
if(isnull(ghost))
|
||||
balloon_alert(user, "try again later!")
|
||||
being_used = FALSE
|
||||
@@ -786,19 +806,19 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
after_success(user, dumb_mob)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/proc/after_success(mob/living/user, mob/living/smart_mob)
|
||||
/obj/item/slimepotion/sentience/proc/after_success(mob/living/user, mob/living/smart_mob)
|
||||
return
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/nuclear
|
||||
/obj/item/slimepotion/sentience/nuclear
|
||||
name = "syndicate intelligence potion"
|
||||
desc = "A miraculous chemical mix that grants human like intelligence to living beings. It has been modified with Syndicate technology to also grant an internal radio implant to the target and authenticate with identification systems."
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/nuclear/after_success(mob/living/user, mob/living/smart_mob)
|
||||
/obj/item/slimepotion/sentience/nuclear/after_success(mob/living/user, mob/living/smart_mob)
|
||||
var/obj/item/implant/radio/syndicate/imp = new(src)
|
||||
imp.implant(smart_mob, user)
|
||||
smart_mob.AddComponent(/datum/component/simple_access, list(ACCESS_SYNDICATE, ACCESS_MAINT_TUNNELS))
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/nuclear/dangerous_horse
|
||||
/obj/item/slimepotion/sentience/nuclear/dangerous_horse
|
||||
name = "dangerous pony potion"
|
||||
desc = "A miraculous chemical mix that grants human like intelligence to pony beings. It has been modified with Syndicate technology to also grant an internal radio implant to the pony and authenticate with identification systems"
|
||||
sentience_type = SENTIENCE_PONY
|
||||
@@ -806,7 +826,6 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
/obj/item/slimepotion/transference
|
||||
name = "consciousness transference potion"
|
||||
desc = "A strange slime-based chemical that, when used, allows the user to transfer their consciousness to a lesser being."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potorange"
|
||||
var/prompted = 0
|
||||
var/animal_type = SENTIENCE_ORGANIC
|
||||
@@ -815,8 +834,10 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
. = ..()
|
||||
if(. & ITEM_INTERACT_ANY_BLOCKER)
|
||||
return .
|
||||
if(!isliving(interacting_with))
|
||||
return NONE
|
||||
var/mob/living/switchy_mob = interacting_with
|
||||
if(prompted || !isliving(switchy_mob))
|
||||
if(prompted)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(switchy_mob.ckey) //much like sentience, these will not work on something that is already player controlled
|
||||
balloon_alert(user, "already sentient!")
|
||||
@@ -861,83 +882,72 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
/obj/item/slimepotion/slime/steroid
|
||||
name = "slime steroid"
|
||||
desc = "A potent chemical mix that will cause a baby slime to generate more extract."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potred"
|
||||
|
||||
/obj/item/slimepotion/slime/steroid/attack(mob/living/basic/slime/target, mob/user)
|
||||
if(!isslime(target))//If target is not a slime.
|
||||
to_chat(user, span_warning("The steroid only works on baby slimes!"))
|
||||
return ..()
|
||||
if(target.life_stage == SLIME_LIFE_STAGE_ADULT) //Can't steroidify adults
|
||||
/obj/item/slimepotion/slime/steroid/interact_with_slime(mob/living/basic/slime/interacting_slime, mob/living/user, list/modifiers)
|
||||
if(interacting_slime.life_stage == SLIME_LIFE_STAGE_ADULT) //Can't steroidify adults
|
||||
to_chat(user, span_warning("Only baby slimes can use the steroid!"))
|
||||
return
|
||||
if(target.stat)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(interacting_slime.stat)
|
||||
to_chat(user, span_warning("The slime is dead!"))
|
||||
return
|
||||
if(target.cores >= 5)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(interacting_slime.cores >= 5)
|
||||
to_chat(user, span_warning("The slime already has the maximum amount of extract!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
to_chat(user, span_notice("You feed the slime the steroid. It will now produce one more extract."))
|
||||
target.cores++
|
||||
interacting_slime.cores++
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/slimepotion/enhancer
|
||||
name = "extract enhancer"
|
||||
desc = "A potent chemical mix that will give a slime extract an additional use."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potpurple"
|
||||
|
||||
/obj/item/slimepotion/slime/stabilizer
|
||||
name = "slime stabilizer"
|
||||
desc = "A potent chemical mix that will reduce the chance of a slime mutating."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potcyan"
|
||||
|
||||
/obj/item/slimepotion/slime/stabilizer/attack(mob/living/basic/slime/target_slime, mob/user)
|
||||
if(!isslime(target_slime))
|
||||
to_chat(user, span_warning("The stabilizer only works on slimes!"))
|
||||
return ..()
|
||||
if(target_slime.stat)
|
||||
/obj/item/slimepotion/slime/stabilizer/interact_with_slime(mob/living/basic/slime/interacting_slime, mob/living/user, list/modifiers)
|
||||
if(interacting_slime.stat)
|
||||
to_chat(user, span_warning("The slime is dead!"))
|
||||
return
|
||||
if(target_slime.mutation_chance == 0)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(interacting_slime.mutation_chance == 0)
|
||||
to_chat(user, span_warning("The slime already has no chance of mutating!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
to_chat(user, span_notice("You feed the slime the stabilizer. It is now less likely to mutate."))
|
||||
target_slime.mutation_chance = clamp(target_slime.mutation_chance-15,0,100)
|
||||
interacting_slime.mutation_chance = clamp(interacting_slime.mutation_chance-15,0,100)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/slimepotion/slime/mutator
|
||||
name = "slime mutator"
|
||||
desc = "A potent chemical mix that will increase the chance of a slime mutating."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potgreen"
|
||||
|
||||
/obj/item/slimepotion/slime/mutator/attack(mob/living/basic/slime/target_slime, mob/user)
|
||||
if(!isslime(target_slime))
|
||||
to_chat(user, span_warning("The mutator only works on slimes!"))
|
||||
return ..()
|
||||
if(target_slime.stat)
|
||||
/obj/item/slimepotion/slime/mutator/interact_with_slime(mob/living/basic/slime/interacting_slime, mob/living/user, list/modifiers)
|
||||
if(interacting_slime.stat)
|
||||
to_chat(user, span_warning("The slime is dead!"))
|
||||
return
|
||||
if(target_slime.mutator_used)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(interacting_slime.mutator_used)
|
||||
to_chat(user, span_warning("This slime has already consumed a mutator, any more would be far too unstable!"))
|
||||
return
|
||||
if(target_slime.mutation_chance == 100)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(interacting_slime.mutation_chance == 100)
|
||||
to_chat(user, span_warning("The slime is already guaranteed to mutate!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
to_chat(user, span_notice("You feed the slime the mutator. It is now more likely to mutate."))
|
||||
target_slime.mutation_chance = clamp(target_slime.mutation_chance+12,0,100)
|
||||
target_slime.mutator_used = TRUE
|
||||
interacting_slime.mutation_chance = clamp(interacting_slime.mutation_chance+12,0,100)
|
||||
interacting_slime.mutator_used = TRUE
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/slimepotion/speed
|
||||
name = "slime speed potion"
|
||||
desc = "A potent chemical mix that will remove the slowdown from any item."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potred"
|
||||
|
||||
/obj/item/slimepotion/speed/interact_with_atom(obj/interacting_with, mob/living/user, list/modifiers)
|
||||
@@ -946,7 +956,7 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
return .
|
||||
if(!isobj(interacting_with))
|
||||
to_chat(user, span_warning("The potion can only be used on objects!"))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
return NONE
|
||||
|
||||
if(HAS_TRAIT(interacting_with, TRAIT_SPEED_POTIONED))
|
||||
to_chat(user, span_warning("[interacting_with] can't be made any faster!"))
|
||||
@@ -978,7 +988,6 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
/obj/item/slimepotion/fireproof
|
||||
name = "slime chill potion"
|
||||
desc = "A potent chemical mix that will fireproof any article of clothing. Has three uses."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potblue"
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/uses = 3
|
||||
@@ -993,7 +1002,7 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
var/obj/item/clothing/clothing = interacting_with
|
||||
if(!istype(clothing))
|
||||
to_chat(user, span_warning("The potion can only be used on clothing!"))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
return NONE
|
||||
if(clothing.max_heat_protection_temperature >= FIRE_IMMUNITY_MAX_TEMP_PROTECT)
|
||||
to_chat(user, span_warning("The [clothing] is already fireproof!"))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
@@ -1012,80 +1021,98 @@ GLOBAL_LIST_INIT(slime_extract_auto_activate_reactions, init_slime_auto_activate
|
||||
/obj/item/slimepotion/genderchange
|
||||
name = "gender change potion"
|
||||
desc = "An interesting chemical mix that changes the biological gender of what its applied to. Cannot be used on things that lack gender entirely."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potrainbow"
|
||||
|
||||
/obj/item/slimepotion/genderchange/attack(mob/living/L, mob/user)
|
||||
if(!istype(L) || L.stat == DEAD)
|
||||
/obj/item/slimepotion/genderchange/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(. & ITEM_INTERACT_ANY_BLOCKER)
|
||||
return .
|
||||
if(!isliving(interacting_with))
|
||||
return NONE
|
||||
var/mob/living/living_mob = interacting_with
|
||||
if(living_mob.stat == DEAD)
|
||||
to_chat(user, span_warning("The potion can only be used on living things!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
if(L.gender != MALE && L.gender != FEMALE)
|
||||
if(living_mob.gender != MALE && living_mob.gender != FEMALE)
|
||||
to_chat(user, span_warning("The potion can only be used on gendered things!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
if(L.gender == MALE)
|
||||
L.gender = FEMALE
|
||||
L.visible_message(span_boldnotice("[L] suddenly looks more feminine!"), span_boldwarning("You suddenly feel more feminine!"))
|
||||
if(living_mob.gender == MALE)
|
||||
living_mob.gender = FEMALE
|
||||
living_mob.visible_message(span_boldnotice("[living_mob] suddenly looks more feminine!"), span_boldwarning("You suddenly feel more feminine!"))
|
||||
else
|
||||
L.gender = MALE
|
||||
L.visible_message(span_boldnotice("[L] suddenly looks more masculine!"), span_boldwarning("You suddenly feel more masculine!"))
|
||||
L.regenerate_icons()
|
||||
living_mob.gender = MALE
|
||||
living_mob.visible_message(span_boldnotice("[living_mob] suddenly looks more masculine!"), span_boldwarning("You suddenly feel more masculine!"))
|
||||
living_mob.regenerate_icons()
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/slimepotion/slime/renaming
|
||||
/obj/item/slimepotion/renaming
|
||||
name = "renaming potion"
|
||||
desc = "A potion that allows a self-aware being to change what name it subconsciously presents to the world."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potbrown"
|
||||
|
||||
var/being_used = FALSE
|
||||
|
||||
/obj/item/slimepotion/slime/renaming/attack(mob/living/M, mob/user)
|
||||
if(being_used || !ismob(M))
|
||||
return
|
||||
if(!M.ckey) //only works on animals that aren't player controlled
|
||||
to_chat(user, span_warning("[M] is not self aware, and cannot pick its own name."))
|
||||
return
|
||||
/obj/item/slimepotion/renaming/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(. & ITEM_INTERACT_ANY_BLOCKER)
|
||||
return .
|
||||
if(!isliving(interacting_with))
|
||||
return NONE
|
||||
var/mob/living/renaming_mob = interacting_with
|
||||
if(being_used)
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(!renaming_mob.ckey) //only works on animals that aren't player controlled
|
||||
to_chat(user, span_warning("[renaming_mob] is not self aware, and cannot pick its own name."))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
being_used = TRUE
|
||||
|
||||
to_chat(user, span_notice("You offer [src] to [user]..."))
|
||||
|
||||
var/new_name = sanitize_name(tgui_input_text(M, "What would you like your name to be?", "Input a name", M.real_name, MAX_NAME_LEN))
|
||||
var/new_name = sanitize_name(tgui_input_text(renaming_mob, "What would you like your name to be?", "Input a name", renaming_mob.real_name, MAX_NAME_LEN))
|
||||
|
||||
if(!new_name || QDELETED(src) || QDELETED(M) || new_name == M.real_name || !M.Adjacent(user))
|
||||
if(!new_name || QDELETED(src) || QDELETED(renaming_mob) || new_name == renaming_mob.real_name || !renaming_mob.Adjacent(user))
|
||||
being_used = FALSE
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
M.visible_message(span_notice("[span_name("[M]")] has a new name, [span_name("[new_name]")]."), span_notice("Your old name of [span_name("[M.real_name]")] fades away, and your new name [span_name("[new_name]")] anchors itself in your mind."))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] used [src] on [ADMIN_LOOKUPFLW(M)], letting them rename themselves into [new_name].")
|
||||
user.log_message("used [src] on [key_name(M)], letting them rename themselves into [new_name].", LOG_GAME)
|
||||
renaming_mob.visible_message(span_notice("[span_name("[renaming_mob]")] has a new name, [span_name("[new_name]")]."), span_notice("Your old name of [span_name("[renaming_mob.real_name]")] fades away, and your new name [span_name("[new_name]")] anchors itself in your mind."))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] used [src] on [ADMIN_LOOKUPFLW(renaming_mob)], letting them rename themselves into [new_name].")
|
||||
user.log_message("used [src] on [key_name(renaming_mob)], letting them rename themselves into [new_name].", LOG_GAME)
|
||||
|
||||
// pass null as first arg to not update records or ID/PDA
|
||||
M.fully_replace_character_name(null, new_name)
|
||||
renaming_mob.fully_replace_character_name(null, new_name)
|
||||
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/slimepotion/slime/slimeradio
|
||||
/obj/item/slimepotion/slimeradio
|
||||
name = "bluespace radio potion"
|
||||
desc = "A strange chemical that grants those who ingest it the ability to broadcast and receive subscape radio waves."
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
icon_state = "potbluespace"
|
||||
|
||||
/obj/item/slimepotion/slime/slimeradio/attack(mob/living/radio_head, mob/user)
|
||||
if(!isanimal_or_basicmob(radio_head))
|
||||
to_chat(user, span_warning("[radio_head] is too complex for the potion!"))
|
||||
return
|
||||
/obj/item/slimepotion/slimeradio/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(. & ITEM_INTERACT_ANY_BLOCKER)
|
||||
return .
|
||||
if(!isliving(interacting_with))
|
||||
return NONE
|
||||
if(!isanimal_or_basicmob(interacting_with))
|
||||
to_chat(user, span_warning("[interacting_with] is too complex for the potion!"))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
var/mob/living/radio_head = interacting_with
|
||||
if(radio_head.stat)
|
||||
to_chat(user, span_warning("[radio_head] is dead!"))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
to_chat(user, span_notice("You feed the potion to [radio_head]."))
|
||||
to_chat(radio_head, span_notice("Your mind tingles as you are fed the potion. You can hear radio waves now!"))
|
||||
var/obj/item/implant/radio/slime/imp = new(src)
|
||||
imp.implant(radio_head, user)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
///Definitions for slime products that don't have anywhere else to go (Floor tiles, blueprints).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user