mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-07-18 03:27:12 +01:00
Merge branch 'release' of https://github.com/VOREStation/VOREStation into izac
This commit is contained in:
@@ -58,8 +58,8 @@
|
||||
#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE "atom_init_success"
|
||||
///from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby"
|
||||
///Return this in response if you don't want afterattack to be called
|
||||
#define COMPONENT_NO_AFTERATTACK (1<<0)
|
||||
///Return this in response if you don't want later item attack procs to be called.
|
||||
#define COMPONENT_CANCEL_ATTACK_CHAIN (1<<0)
|
||||
///from base of atom/attack_hulk(): (/mob/living/carbon/human)
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack"
|
||||
///from base of atom/animal_attack(): (/mob/user)
|
||||
@@ -94,6 +94,7 @@
|
||||
#define COMSIG_ATOM_BUMPED "atom_bumped"
|
||||
///from base of atom/ex_act(): (severity, target)
|
||||
#define COMSIG_ATOM_EX_ACT "atom_ex_act"
|
||||
#define COMPONENT_IGNORE_EXPLOSION (1<<0)
|
||||
///from base of atom/emp_act(): (severity)
|
||||
#define COMSIG_ATOM_EMP_ACT "atom_emp_act"
|
||||
///from base of atom/fire_act(): (exposed_temperature, exposed_volume)
|
||||
@@ -225,7 +226,7 @@
|
||||
|
||||
// /atom/movable signals
|
||||
|
||||
///from base of atom/movable/Moved(): (/atom)
|
||||
///from base of atom/movable/Move(): (atom/newloc, dir, movetime)
|
||||
#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move"
|
||||
#define COMPONENT_MOVABLE_BLOCK_PRE_MOVE (1<<0)
|
||||
///from base of atom/movable/Moved(): (/atom, dir)
|
||||
@@ -778,3 +779,5 @@
|
||||
#define COMSIG_CONFLICT_ELEMENT_CHECK "conflict_element_check"
|
||||
/// A conflict was found
|
||||
#define ELEMENT_CONFLICT_FOUND (1<<0)
|
||||
//From reagents touch_x.
|
||||
#define COMSIG_REAGENTS_TOUCH "reagent_touch"
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
var/old_icon1 = T.icon
|
||||
var/old_decals = T.decals ? T.decals.Copy() : null
|
||||
|
||||
B.Destroy()
|
||||
X = B.ChangeTurf(T.type)
|
||||
X.set_dir(old_dir1)
|
||||
X.icon_state = old_icon_state1
|
||||
|
||||
@@ -191,6 +191,11 @@ The box in your backpack has an oxygen tank and gas mask in it."
|
||||
desc = "Your battery is about to die! Charge it ASAP!"
|
||||
icon_state = "c_starving"
|
||||
|
||||
/obj/screen/alert/warm
|
||||
name = "Too Warm"
|
||||
desc = "You're uncomfortably warm. Take off some clothes or tweak the thermostat a few degrees cooler."
|
||||
icon_state = "mildhot"
|
||||
|
||||
/obj/screen/alert/hot
|
||||
name = "Too Hot"
|
||||
desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit."
|
||||
@@ -199,6 +204,11 @@ The box in your backpack has an oxygen tank and gas mask in it."
|
||||
/obj/screen/alert/hot/robot
|
||||
desc = "The air around you is too hot for a humanoid. Be careful to avoid exposing them to this enviroment."
|
||||
|
||||
/obj/screen/alert/chilly
|
||||
name = "Too Chilly"
|
||||
desc = "You're uncomfortably cold. Rug up or tweak the thermostat a few degrees higher."
|
||||
icon_state = "mildcold"
|
||||
|
||||
/obj/screen/alert/cold
|
||||
name = "Too Cold"
|
||||
desc = "You're freezing cold! Get somewhere warmer and take off any insulating clothing like a space suit."
|
||||
|
||||
@@ -25,28 +25,48 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
||||
return
|
||||
return
|
||||
|
||||
// Called at the start of resolve_attackby(), before the actual attack.
|
||||
/obj/item/proc/pre_attack(atom/a, mob/user)
|
||||
return
|
||||
/**
|
||||
* Called at the start of resolve_attackby(), before the actual attack.
|
||||
*
|
||||
* Arguments:
|
||||
* * atom/A - The atom about to be hit
|
||||
* * mob/living/user - The mob doing the htting
|
||||
* * params - click params such as alt/shift etc
|
||||
*
|
||||
* See: [/obj/item/proc/melee_attack_chain]
|
||||
*/
|
||||
|
||||
/obj/item/proc/pre_attack(atom/A, mob/user, params) //do stuff before attackby!
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return TRUE
|
||||
return FALSE //return TRUE to avoid calling attackby after this proc does stuff
|
||||
|
||||
//I would prefer to rename this to attack(), but that would involve touching hundreds of files.
|
||||
/obj/item/proc/resolve_attackby(atom/A, mob/user, var/attack_modifier = 1, var/click_parameters)
|
||||
pre_attack(A, user)
|
||||
add_fingerprint(user)
|
||||
. = pre_attack(A, user, click_parameters)
|
||||
if(.) // We're returning the value of pre_attack, important if it has a special return.
|
||||
return
|
||||
return A.attackby(src, user, attack_modifier, click_parameters)
|
||||
|
||||
// No comment
|
||||
/atom/proc/attackby(obj/item/W, mob/user, var/attack_modifier, var/click_parameters)
|
||||
if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, click_parameters) & COMPONENT_NO_AFTERATTACK)
|
||||
if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, click_parameters) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/attackby(obj/item/I, mob/user, var/attack_modifier, var/click_parameters)
|
||||
if(!ismob(user))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, I, user, click_parameters) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return FALSE
|
||||
|
||||
if(can_operate(src, user) && I.do_surgery(src,user))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(attempt_vr(src,"vore_attackby",args)) return //VOREStation Add - The vore, of course.
|
||||
|
||||
return I.attack(src, user, user.zone_sel.selecting, attack_modifier)
|
||||
|
||||
// Used to get how fast a mob should attack, and influences click delay.
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
A.attack_hand(src)
|
||||
|
||||
/atom/proc/attack_hand(mob/user as mob)
|
||||
return
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
|
||||
return
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
if(!(mat_container_flags & MATCONTAINER_SILENT))
|
||||
to_chat(user, "<span class='warning'>[parent] won't accept [I]!</span>")
|
||||
return
|
||||
. = COMPONENT_NO_AFTERATTACK
|
||||
. = COMPONENT_CANCEL_ATTACK_CHAIN
|
||||
var/datum/callback/pc = precondition
|
||||
if(pc && !pc.Invoke(user))
|
||||
return
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
// It shouldn't be possible to add more matter than our max
|
||||
ASSERT((total_amount + (matter_per_sheet * sheets_to_use)) <= max_amount)
|
||||
|
||||
|
||||
// Use the amount of sheets from the stack
|
||||
if(!S.use(sheets_to_use))
|
||||
to_chat(user, "<span class='warning'>Something went wrong with your stack. Split it manually and try again.</span>")
|
||||
@@ -358,7 +358,7 @@
|
||||
if(materials[M] < (sheet_amt * SHEET_MATERIAL_AMOUNT))
|
||||
sheet_amt = round(materials[M] / SHEET_MATERIAL_AMOUNT)
|
||||
|
||||
var/obj/item/stack/S = M.stack_type
|
||||
var/obj/item/stack/S = M.stack_type
|
||||
var/max_stack_size = initial(S.max_amount)
|
||||
|
||||
var/count = 0
|
||||
|
||||
+7
-2
@@ -125,6 +125,8 @@
|
||||
/atom/proc/Bumped(AM as mob|obj)
|
||||
set waitfor = FALSE
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_BUMPED, AM)
|
||||
|
||||
// Convenience proc to see if a container is open for chemistry handling
|
||||
// returns true if open
|
||||
// false if closed
|
||||
@@ -166,6 +168,9 @@
|
||||
return
|
||||
|
||||
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return
|
||||
|
||||
P.on_hit(src, 0, def_zone)
|
||||
. = 0
|
||||
|
||||
@@ -260,8 +265,8 @@
|
||||
invisibility = new_invisibility
|
||||
return TRUE
|
||||
|
||||
/atom/proc/ex_act()
|
||||
return
|
||||
/atom/proc/ex_act(var/strength = 3)
|
||||
return (SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, strength, src) & COMPONENT_IGNORE_EXPLOSION)
|
||||
|
||||
/atom/proc/emag_act(var/remaining_charges, var/mob/user, var/emag_source)
|
||||
return -1
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
if(!loc || !newloc)
|
||||
return FALSE
|
||||
|
||||
if(SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, newloc, direct, movetime) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
|
||||
return FALSE
|
||||
|
||||
// Store this early before we might move, it's used several places
|
||||
var/atom/oldloc = loc
|
||||
|
||||
@@ -232,6 +235,9 @@
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
for (var/datum/light_source/light as anything in light_sources) // Cycle through the light sources on this atom and tell them to update.
|
||||
light.source_atom.update_light()
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, old_loc, direction)
|
||||
|
||||
return TRUE
|
||||
|
||||
/atom/movable/set_dir(newdir)
|
||||
@@ -265,6 +271,9 @@
|
||||
throwing = 0
|
||||
if(QDELETED(A))
|
||||
return
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, A)
|
||||
|
||||
A.Bumped(src)
|
||||
A.last_bumped = world.time
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/turf/unsimulated/wall/supermatter/Destroy()
|
||||
STOP_PROCESSING(SSturfs, src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/turf/unsimulated/wall/supermatter/process()
|
||||
// Only check infrequently.
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
supervisors = "the Head of Personnel"
|
||||
selection_color = "#9b633e"
|
||||
economic_modifier = 5
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_RC_announce)
|
||||
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_RC_announce)
|
||||
banned_job_species = list("digital", SPECIES_PROMETHEAN)
|
||||
|
||||
ideal_character_age = 40
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
pto_type = PTO_EXPLORATION
|
||||
dept_time_required = 20
|
||||
|
||||
access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway, access_pathfinder)
|
||||
minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway, access_pathfinder)
|
||||
access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway, access_pathfinder, access_RC_announce)
|
||||
minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway, access_pathfinder, access_RC_announce)
|
||||
outfit_type = /decl/hierarchy/outfit/job/pathfinder
|
||||
job_description = "The Pathfinder's job is to lead and manage expeditions, and is the primary authority on all off-station expeditions."
|
||||
alt_titles = list("Expedition Lead" = /datum/alt_title/expedition_lead, "Exploration Manager" = /datum/alt_title/exploration_manager)
|
||||
|
||||
@@ -1,270 +0,0 @@
|
||||
|
||||
/obj/machinery/pump
|
||||
name = "fluid pump"
|
||||
desc = "A fluid pumping machine."
|
||||
|
||||
description_info = "A machine that can pump fluid from certain turfs.<br>\
|
||||
Water can be pumped from any body of water. Certain locations or environmental\
|
||||
conditions can cause different byproducts to be produced.<br>\
|
||||
Magma or Lava can be pumped to produce mineralized fluid."
|
||||
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
|
||||
icon = 'icons/obj/machines/reagent.dmi'
|
||||
icon_state = "pump"
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/fluidpump
|
||||
|
||||
var/on = 0
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/use = 200
|
||||
var/efficiency = 1
|
||||
var/reagents_per_cycle = 40
|
||||
var/unlocked = 0
|
||||
var/open = 0
|
||||
|
||||
var/obj/item/hose_connector/output/Output
|
||||
|
||||
// Overlay cache vars.
|
||||
var/icon/liquid
|
||||
var/icon/tank
|
||||
var/icon/powerlow
|
||||
var/icon/glass
|
||||
var/icon/open_overlay
|
||||
var/icon/cell_overlay
|
||||
|
||||
/obj/machinery/pump/Initialize()
|
||||
create_reagents(200)
|
||||
. = ..()
|
||||
default_apply_parts()
|
||||
|
||||
if(ispath(cell))
|
||||
cell = new cell(src)
|
||||
|
||||
Output = new(src)
|
||||
|
||||
RefreshParts()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/pump/update_icon()
|
||||
..()
|
||||
if(!tank)
|
||||
tank = new/icon(icon, "[icon_state]-volume")
|
||||
|
||||
if(!powerlow)
|
||||
powerlow = new/icon(icon, "[icon_state]-lowpower")
|
||||
|
||||
if(!liquid)
|
||||
var/icon/cutter = new/icon(icon, "[icon_state]-volume")
|
||||
|
||||
cutter.Blend(rgb(0, 0, 0,), ICON_MULTIPLY)
|
||||
|
||||
liquid = new/icon(icon, "[icon_state]-cutting")
|
||||
|
||||
liquid.Blend(cutter,ICON_AND)
|
||||
|
||||
if(!glass)
|
||||
glass = new/icon(icon, "[icon_state]-glass")
|
||||
|
||||
glass.Blend(rgb(1,1,1,0.5), ICON_MULTIPLY)
|
||||
|
||||
if(!open_overlay)
|
||||
open_overlay = new/icon(icon, "[icon_state]-open")
|
||||
|
||||
if(!cell_overlay)
|
||||
cell_overlay = new/icon(icon, "[icon_state]-cell")
|
||||
|
||||
cut_overlays()
|
||||
add_overlay(tank)
|
||||
|
||||
if(cell && cell.charge < (use * CELLRATE / efficiency))
|
||||
add_overlay(powerlow)
|
||||
|
||||
if(reagents.total_volume >= 1)
|
||||
var/list/hextorgb = hex2rgb(reagents.get_color())
|
||||
liquid.GrayScale()
|
||||
|
||||
liquid.Blend(rgb(hextorgb[1],hextorgb[2],hextorgb[3]),ICON_MULTIPLY)
|
||||
|
||||
add_overlay(liquid)
|
||||
|
||||
add_overlay(glass)
|
||||
|
||||
if(open)
|
||||
add_overlay(open_overlay)
|
||||
|
||||
if(cell)
|
||||
add_overlay(cell_overlay)
|
||||
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-running"
|
||||
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/machinery/pump/process()
|
||||
if(Output.get_pairing())
|
||||
reagents.trans_to_holder(Output.reagents, Output.reagents.maximum_volume)
|
||||
if(prob(5))
|
||||
visible_message("<b>\The [src]</b> gurgles as it exports fluid.")
|
||||
|
||||
if(!on)
|
||||
return
|
||||
|
||||
if(!cell || (cell.charge < (use * CELLRATE / efficiency)))
|
||||
turn_off(TRUE)
|
||||
return
|
||||
|
||||
handle_pumping()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/pump/RefreshParts()
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/SM in component_parts)
|
||||
efficiency = SM.rating
|
||||
|
||||
var/total_bin_rating = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/SB in component_parts)
|
||||
total_bin_rating += SB.rating
|
||||
|
||||
reagents.maximum_volume = round(initial(reagents.maximum_volume) + 100 * total_bin_rating)
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/pump/power_change()
|
||||
if(!cell || cell.charge < (use * CELLRATE) || !anchored)
|
||||
return turn_off(TRUE)
|
||||
|
||||
return FALSE
|
||||
|
||||
|
||||
// Returns 0 on failure and 1 on success
|
||||
/obj/machinery/pump/proc/turn_on(var/loud = 0)
|
||||
if(!cell)
|
||||
return 0
|
||||
if(cell.charge < (use * CELLRATE))
|
||||
return 0
|
||||
|
||||
on = 1
|
||||
update_icon()
|
||||
if(loud)
|
||||
visible_message("<b>\The [src]</b> turns on.")
|
||||
return 1
|
||||
|
||||
/obj/machinery/pump/proc/turn_off(var/loud = 0)
|
||||
on = 0
|
||||
set_light(0, 0)
|
||||
update_icon()
|
||||
if(loud)
|
||||
visible_message("<b>\The [src]</b> shuts down.")
|
||||
|
||||
if(!on)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/pump/attack_ai(mob/user as mob)
|
||||
if(istype(user, /mob/living/silicon/robot) && Adjacent(user))
|
||||
return attack_hand(user)
|
||||
|
||||
if(on)
|
||||
turn_off(TRUE)
|
||||
else
|
||||
if(!turn_on(1))
|
||||
to_chat(user, "<span class='notice'>You try to turn on \the [src] but it does not work.</span>")
|
||||
|
||||
/obj/machinery/pump/attack_hand(mob/user as mob)
|
||||
if(open && cell)
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(cell)
|
||||
cell.loc = user.loc
|
||||
else
|
||||
cell.loc = src.loc
|
||||
|
||||
cell.add_fingerprint(user)
|
||||
cell.update_icon()
|
||||
|
||||
cell = null
|
||||
on = 0
|
||||
set_light(0)
|
||||
to_chat(user, "<span class='notice'>You remove the power cell.</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(on)
|
||||
turn_off(TRUE)
|
||||
else if(anchored)
|
||||
if(!turn_on(1))
|
||||
to_chat(user, "<span class='notice'>You try to turn on \the [src] but it does not work.</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/pump/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.is_screwdriver())
|
||||
if(!open)
|
||||
if(unlocked)
|
||||
unlocked = 0
|
||||
to_chat(user, "<span class='notice'>You screw the battery panel in place.</span>")
|
||||
else
|
||||
unlocked = 1
|
||||
to_chat(user, "<span class='notice'>You unscrew the battery panel.</span>")
|
||||
|
||||
else if(W.is_crowbar())
|
||||
if(unlocked)
|
||||
if(open)
|
||||
open = 0
|
||||
overlays = null
|
||||
to_chat(user, "<span class='notice'>You crowbar the battery panel in place.</span>")
|
||||
else
|
||||
if(unlocked)
|
||||
open = 1
|
||||
to_chat(user, "<span class='notice'>You remove the battery panel.</span>")
|
||||
|
||||
else if(W.is_wrench())
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>\The [src] is active. Turn it off before trying to move it!</span>")
|
||||
return
|
||||
default_unfasten_wrench(user, W, 2 SECONDS)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cell))
|
||||
if(open)
|
||||
if(cell)
|
||||
to_chat(user, "<span class='notice'>There is a power cell already installed.</span>")
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
to_chat(user, "<span class='notice'>You insert the power cell.</span>")
|
||||
else
|
||||
..()
|
||||
RefreshParts()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/pump/proc/handle_pumping()
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(istype(T, /turf/simulated/floor/water))
|
||||
cell.use(use * CELLRATE / efficiency)
|
||||
reagents.add_reagent("water", reagents_per_cycle)
|
||||
|
||||
if(T.temperature <= T0C)
|
||||
reagents.add_reagent("ice", round(reagents_per_cycle / 2, 0.1))
|
||||
|
||||
if((istype(T,/turf/simulated/floor/water/pool) || istype(T,/turf/simulated/floor/water/deep/pool)))
|
||||
reagents.add_reagent("chlorine", round(reagents_per_cycle / 10 * efficiency, 0.1))
|
||||
|
||||
else if(istype(T,/turf/simulated/floor/water/contaminated))
|
||||
reagents.add_reagent("vatstabilizer", round(reagents_per_cycle / 2))
|
||||
|
||||
if(T.loc.name == "Sea") // Saltwater.
|
||||
reagents.add_reagent("sodiumchloride", round(reagents_per_cycle / 10 * efficiency, 0.1))
|
||||
|
||||
for(var/turf/simulated/mineral/MT in range(5))
|
||||
if(MT.mineral)
|
||||
var/obj/effect/mineral/OR = MT.mineral
|
||||
reagents.add_reagent(OR.ore_reagent, round(reagents_per_cycle / 20 * efficiency, 0.1))
|
||||
|
||||
else if(istype(T, /turf/simulated/floor/lava))
|
||||
cell.use(use * CELLRATE / efficiency * 4)
|
||||
reagents.add_reagent("mineralizedfluid", round(reagents_per_cycle * efficiency / 2, 0.1))
|
||||
@@ -511,27 +511,37 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
if(length(heard_masked))
|
||||
for (var/mob/R in heard_masked)
|
||||
R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M, 0, name)
|
||||
if(R.is_preference_enabled(/datum/client_preference/radio_sounds))
|
||||
R << 'sound/effects/radio_common_quieter.ogg'
|
||||
|
||||
/* --- Process all the mobs that heard the voice normally (understood) --- */
|
||||
if(length(heard_normal))
|
||||
for (var/mob/R in heard_normal)
|
||||
R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M, 0, realname)
|
||||
if(R.is_preference_enabled(/datum/client_preference/radio_sounds))
|
||||
R << 'sound/effects/radio_common_quieter.ogg'
|
||||
|
||||
/* --- Process all the mobs that heard the voice normally (did not understand) --- */
|
||||
if(length(heard_voice))
|
||||
for (var/mob/R in heard_voice)
|
||||
R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M,0, vname)
|
||||
if(R.is_preference_enabled(/datum/client_preference/radio_sounds))
|
||||
R << 'sound/effects/radio_common_quieter.ogg'
|
||||
|
||||
/* --- Process all the mobs that heard a garbled voice (did not understand) --- */
|
||||
// Displays garbled message (ie "f*c* **u, **i*er!")
|
||||
if(length(heard_garbled))
|
||||
for (var/mob/R in heard_garbled)
|
||||
R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M, 1, vname)
|
||||
if(R.is_preference_enabled(/datum/client_preference/radio_sounds))
|
||||
R << 'sound/effects/radio_common_quieter.ogg'
|
||||
|
||||
/* --- Complete gibberish. Usually happens when there's a compressed message --- */
|
||||
if(length(heard_gibberish))
|
||||
for (var/mob/R in heard_gibberish)
|
||||
R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M, 1)
|
||||
if(R.is_preference_enabled(/datum/client_preference/radio_sounds))
|
||||
R << 'sound/effects/radio_common_quieter.ogg'
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
// Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called.
|
||||
var/list/sprite_sheets_obj
|
||||
|
||||
var/toolspeed = 1.0 // This is a multipler on how 'fast' a tool works. e.g. setting this to 0.5 will make the tool work twice as fast.
|
||||
var/toolspeed = 1 // This is a multipler on how 'fast' a tool works. e.g. setting this to 0.5 will make the tool work twice as fast.
|
||||
var/attackspeed = DEFAULT_ATTACK_COOLDOWN // How long click delay will be when using this, in 1/10ths of a second. Checked in the user's get_attack_speed().
|
||||
var/reach = 1 // Length of tiles it can reach, 1 is adjacent.
|
||||
var/addblends // Icon overlay for ADD highlights when applicable.
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
|
||||
if (aiOverride)
|
||||
playsound(loc, 'sound/effects/radio_common.ogg', 20, 1, 1, preference = /datum/client_preference/radio_sounds)
|
||||
//playsound(loc, 'sound/effects/radio_common.ogg', 20, 1, 1, preference = /datum/client_preference/radio_sounds)
|
||||
return ..(freq, level)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.l_ear == src || H.r_ear == src)
|
||||
playsound(loc, 'sound/effects/radio_common.ogg', 20, 1, 1, preference = /datum/client_preference/radio_sounds)
|
||||
//playsound(loc, 'sound/effects/radio_common.ogg', 20, 1, 1, preference = /datum/client_preference/radio_sounds)
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
|
||||
|
||||
@@ -212,7 +212,11 @@
|
||||
|
||||
O.set_dir(user.dir)
|
||||
O.add_fingerprint(user)
|
||||
|
||||
//VOREStation Addition Start - Let's not store things that get crafted with materials like this, they won't spawn correctly when retrieved.
|
||||
if (isobj(O))
|
||||
var/obj/P = O
|
||||
P.persist_storable = FALSE
|
||||
//VOREStation Addition End
|
||||
if (istype(O, /obj/item/stack))
|
||||
var/obj/item/stack/S = O
|
||||
S.amount = produced
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
/*
|
||||
* Plushies
|
||||
*/
|
||||
// HEY FUTURE PLUSHIE CODERS: IF YOU'RE ADDING A SNOWFLAKE PLUSH ITEM USE PATH /obj/item/toy/plushie/fluff
|
||||
// the loadout entry shouldn't be able to grab those if everything goes right
|
||||
/obj/item/toy/plushie/lizardplushie
|
||||
name = "lizard plushie"
|
||||
desc = "An adorable stuffed toy that resembles a lizardperson."
|
||||
|
||||
@@ -23,7 +23,20 @@
|
||||
applies_material_colour = 0
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
/* VOREStation Removal - We have one already
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone
|
||||
name = "sharp rock"
|
||||
desc = "The secret is to bang the rocks together, guys."
|
||||
force_divisor = 0.2
|
||||
icon_state = "rock"
|
||||
item_state = "rock"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone/set_material(var/new_material)
|
||||
var/old_name = name
|
||||
. = ..()
|
||||
name = old_name
|
||||
*/
|
||||
/obj/item/weapon/material/knife/machete/hatchet/unathiknife
|
||||
name = "duelling knife"
|
||||
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/min_x_scale = 0.9
|
||||
var/min_y_scale = 0.9
|
||||
|
||||
var/removal_tool = /obj/item/weapon/shovel
|
||||
var/harvest_tool = null // The type of item used to harvest the plant.
|
||||
var/harvest_count = 0
|
||||
var/destroy_on_harvest = FALSE
|
||||
@@ -40,23 +41,34 @@
|
||||
. = ..()
|
||||
if(harvest_count < max_harvests)
|
||||
. += get_harvestable_desc()
|
||||
if(harvest_tool)
|
||||
var/obj/item/tool = harvest_tool
|
||||
. += SPAN_NOTICE("\The [src] can be harvested with \a [initial(tool.name)].")
|
||||
|
||||
if(removal_tool)
|
||||
var/obj/item/tool = removal_tool
|
||||
. += SPAN_NOTICE("\The [src] can be removed with \a [initial(tool.name)].")
|
||||
|
||||
/obj/structure/flora/proc/get_harvestable_desc()
|
||||
return "<span class='notice'>\The [src] seems to have something hanging from it.</span>"
|
||||
|
||||
/obj/structure/flora/attackby(var/obj/item/weapon/W, var/mob/living/user)
|
||||
|
||||
if(can_harvest(W))
|
||||
var/harvest_spawn = pickweight(harvest_loot)
|
||||
var/atom/movable/AM = spawn_harvest(harvest_spawn, user)
|
||||
|
||||
if(!AM)
|
||||
to_chat(user, "<span class='notice'>You fail to harvest anything from \the [src].</span>")
|
||||
|
||||
if(AM)
|
||||
to_chat(user, SPAN_NOTICE("You harvest \the [AM] from \the [src]."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You harvest \the [AM] from \the [src].</span>")
|
||||
if(harvest_count >= max_harvests && destroy_on_harvest)
|
||||
qdel(src)
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You fail to harvest anything from \the [src]."))
|
||||
return
|
||||
|
||||
if(removal_tool && istype(W, removal_tool))
|
||||
to_chat(user, SPAN_WARNING("You start uprooting \the [src]..."))
|
||||
if(do_after(user, 30))
|
||||
visible_message(SPAN_NOTICE("\The [user] uproots and discards \the [src]!"))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
..(W, user)
|
||||
|
||||
@@ -450,6 +462,23 @@
|
||||
desc = "This is a tiny well lit decorative christmas tree."
|
||||
icon_state = "plant-xmas"
|
||||
|
||||
/obj/structure/flora/mushroom
|
||||
name = "mushroom"
|
||||
desc = "Hey, this one seems like a fun guy."
|
||||
icon_state = "mush1"
|
||||
icon = 'icons/obj/flora/mushrooms.dmi'
|
||||
harvest_loot = list(/obj/item/weapon/reagent_containers/food/snacks/mushroomslice = 1)
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
max_harvests = 2
|
||||
min_harvests = 0
|
||||
|
||||
/obj/structure/flora/mushroom/Initialize()
|
||||
. = ..()
|
||||
icon_state = "mush[rand(1,4)]"
|
||||
if(prob(50))
|
||||
adjust_scale(-1, 1)
|
||||
pixel_x = rand(-4, 4)
|
||||
|
||||
/obj/random/pottedplant
|
||||
name = "random potted plant"
|
||||
desc = "This is a random potted plant."
|
||||
@@ -486,20 +515,11 @@
|
||||
prob(1);/obj/structure/flora/pottedplant/xmas
|
||||
)
|
||||
|
||||
|
||||
/obj/structure/flora/sif
|
||||
icon = 'icons/obj/flora/sifflora.dmi'
|
||||
|
||||
/obj/structure/flora/sif/attack_hand(mob/user)
|
||||
if (user.a_intent == I_HURT)
|
||||
if(do_after(user, 5 SECONDS))
|
||||
user.visible_message("<span class='filter_notice'>\The [user] digs up \the [src.name].", "You dig up \the [src.name].</span>")
|
||||
qdel(src)
|
||||
else
|
||||
user.visible_message("<span class='filter_notice'>\The [user] pokes \the [src.name].", "You poke \the [src.name].</span>")
|
||||
|
||||
/datum/category_item/catalogue/flora/subterranean_bulbs
|
||||
name = "Sivian Flora - Subterranean Bulbs"
|
||||
name = "Sivian Flora - Cavebulbs"
|
||||
desc = "A plant which is native to Sif, it continues the trend of being a bioluminescent specimen. These plants \
|
||||
are generally suited for conditions experienced in caverns, which are generally dark and cold. It is not \
|
||||
known why this plant evolved to be bioluminescent, however this property has, unintentionally, allowed for \
|
||||
@@ -512,7 +532,7 @@
|
||||
value = CATALOGUER_REWARD_EASY
|
||||
|
||||
/obj/structure/flora/sif/subterranean
|
||||
name = "subterranean plant"
|
||||
name = "subterranean bulbs"
|
||||
desc = "This is a subterranean plant. It's bulbous ends glow faintly."
|
||||
icon_state = "glowplant"
|
||||
light_range = 2
|
||||
@@ -520,12 +540,15 @@
|
||||
light_color = "#FF6633"
|
||||
light_on = TRUE
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/subterranean_bulbs)
|
||||
harvest_loot = list(/obj/item/weapon/reagent_containers/food/snacks/grown/sif/cavebulbs = 1)
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
max_harvests = 2
|
||||
min_harvests = 0
|
||||
|
||||
/obj/structure/flora/sif/subterranean/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,2)]"
|
||||
. = ..()
|
||||
|
||||
|
||||
/datum/category_item/catalogue/flora/eyebulbs
|
||||
name = "Sivian Flora - Eyebulbs"
|
||||
desc = "A plant native to Sif. On the end of its stems are bulbs which visually resemble \
|
||||
@@ -534,10 +557,14 @@
|
||||
value = CATALOGUER_REWARD_EASY
|
||||
|
||||
/obj/structure/flora/sif/eyes
|
||||
name = "mysterious bulbs"
|
||||
desc = "This is a mysterious looking plant. They kind of look like eyeballs. Creepy."
|
||||
name = "eyebulbs"
|
||||
desc = "This is a mysterious-looking plant. They kind of look like eyeballs. Creepy."
|
||||
icon_state = "eyeplant"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/eyebulbs)
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
max_harvests = 2
|
||||
min_harvests = 0
|
||||
harvest_loot = list(/obj/item/weapon/reagent_containers/food/snacks/grown/sif/eyebulbs = 1)
|
||||
|
||||
/obj/structure/flora/sif/eyes/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,3)]"
|
||||
@@ -551,20 +578,20 @@
|
||||
value = CATALOGUER_REWARD_TRIVIAL
|
||||
|
||||
/obj/structure/flora/sif/tendrils
|
||||
name = "stocky tendrils"
|
||||
name = "wabback tendrils"
|
||||
desc = "A 'plant' made up of hardened moss. It has tiny hairs that bunch together to look like snow."
|
||||
icon_state = "grass"
|
||||
randomize_size = TRUE
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/mosstendrils)
|
||||
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
max_harvests = 1
|
||||
min_harvests = -4
|
||||
max_harvests = 3
|
||||
min_harvests = 0
|
||||
harvest_loot = list(
|
||||
/obj/item/seeds/wabback = 15,
|
||||
/obj/item/seeds/blackwabback = 1,
|
||||
/obj/item/seeds/wildwabback = 30
|
||||
)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/wabback = 15,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/blackwabback = 1,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/wildwabback = 30
|
||||
)
|
||||
|
||||
/obj/structure/flora/sif/tendrils/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,3)]"
|
||||
@@ -583,26 +610,24 @@
|
||||
value = CATALOGUER_REWARD_HARD
|
||||
|
||||
/obj/structure/flora/sif/frostbelle
|
||||
name = "gnarly shrub"
|
||||
name = "frostbelle shrub"
|
||||
desc = "A stocky plant with fins bearing luminescent veins along its branches."
|
||||
icon_state = "grass"
|
||||
icon_state = "frostbelle"
|
||||
randomize_size = TRUE
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/frostbelle)
|
||||
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
max_harvests = 2
|
||||
min_harvests = -4
|
||||
min_harvests = 0
|
||||
harvest_loot = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/frostbelle = 1
|
||||
)
|
||||
)
|
||||
|
||||
var/variantnum = null
|
||||
|
||||
/obj/structure/flora/sif/frostbelle/Initialize()
|
||||
. = ..()
|
||||
|
||||
variantnum = rand(1,3)
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/structure/flora/sif/frostbelle/update_icon()
|
||||
@@ -610,7 +635,6 @@
|
||||
|
||||
if(max_harvests > 0 && harvest_count < max_harvests)
|
||||
icon_state = "[initial(icon_state)][variantnum]"
|
||||
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
@@ -306,12 +306,12 @@
|
||||
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
max_harvests = 2
|
||||
min_harvests = -4
|
||||
min_harvests = 0
|
||||
harvest_loot = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/siffruit = 20,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sifpod = 5,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/sifpod = 5,
|
||||
/obj/item/seeds/sifbulb = 1
|
||||
)
|
||||
)
|
||||
|
||||
var/light_shift = 0
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ var/list/flooring_types
|
||||
/decl/flooring/grass/sif // Subtype for Sif's grass.
|
||||
name = "growth"
|
||||
desc = "A natural moss that has adapted to the sheer cold climate."
|
||||
flags = TURF_REMOVE_SHOVEL
|
||||
flags = 0
|
||||
icon = 'icons/turf/outdoors.dmi'
|
||||
icon_base = "grass_sif"
|
||||
build_type = /obj/item/stack/tile/grass/sif
|
||||
@@ -152,7 +152,7 @@ var/list/flooring_types
|
||||
/decl/flooring/grass/sif/forest
|
||||
name = "thick growth"
|
||||
desc = "A natural moss that has adapted to the sheer cold climate."
|
||||
flags = TURF_REMOVE_SHOVEL
|
||||
flags = 0
|
||||
icon = 'icons/turf/outdoors.dmi'
|
||||
icon_base = "grass_sif_dark"
|
||||
build_type = /obj/item/stack/tile/grass/sif/forest
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
new_holder.decals = T.decals ? T.decals.Copy() : null
|
||||
|
||||
//Set the destination to be like us
|
||||
T.Destroy()
|
||||
var/turf/simulated/shuttle/new_dest = T.ChangeTurf(my_turf.type,,1)
|
||||
new_dest.set_dir(my_turf.dir)
|
||||
new_dest.icon_state = my_turf.icon_state
|
||||
@@ -97,7 +96,7 @@
|
||||
|
||||
/turf/simulated/shuttle/Destroy()
|
||||
landed_holder = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// For joined corners touching static lighting turfs, add an overlay to cancel out that part of our lighting overlay.
|
||||
/turf/simulated/shuttle/proc/update_breaklights()
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/turf/simulated/floor/outdoors/dirt
|
||||
name = "dirt"
|
||||
desc = "Quite dirty!"
|
||||
icon_state = "dirt-dark"
|
||||
edge_blending_priority = 2
|
||||
turf_layers = list(/turf/simulated/floor/outdoors/rocks)
|
||||
initial_flooring = /decl/flooring/dirt
|
||||
/turf/simulated/floor/outdoors/dirt
|
||||
name = "dirt"
|
||||
desc = "Quite dirty!"
|
||||
icon_state = "dirt-dark"
|
||||
edge_blending_priority = 2
|
||||
turf_layers = list(/turf/simulated/floor/outdoors/rocks)
|
||||
initial_flooring = /decl/flooring/dirt
|
||||
can_dig = TRUE
|
||||
|
||||
@@ -7,6 +7,7 @@ var/list/grass_types = list(
|
||||
icon_state = "grass0"
|
||||
edge_blending_priority = 4
|
||||
initial_flooring = /decl/flooring/grass/outdoors // VOREStation Edit
|
||||
can_dig = TRUE
|
||||
turf_layers = list(
|
||||
/turf/simulated/floor/outdoors/rocks,
|
||||
/turf/simulated/floor/outdoors/dirt
|
||||
@@ -42,7 +43,6 @@ var/list/grass_types = list(
|
||||
var/tree_chance = 2
|
||||
/*
|
||||
animal_chance = 0.5
|
||||
|
||||
animal_types = list(
|
||||
/mob/living/simple_mob/animal/sif/diyaab = 10,
|
||||
/mob/living/simple_mob/animal/sif/glitterfly = 2,
|
||||
@@ -96,4 +96,3 @@ var/list/grass_types = list(
|
||||
/obj/structure/flora/sif/eyes = 5,
|
||||
/obj/structure/flora/sif/tendrils = 30
|
||||
)
|
||||
|
||||
|
||||
@@ -24,6 +24,42 @@ var/list/turf_edge_cache = list()
|
||||
|
||||
// When a turf gets demoted or promoted, this list gets adjusted. The top-most layer is the layer on the bottom of the list, due to how pop() works.
|
||||
var/list/turf_layers = list(/turf/simulated/floor/outdoors/rocks)
|
||||
var/can_dig = FALSE
|
||||
var/loot_count
|
||||
|
||||
/turf/simulated/floor/outdoors/proc/get_loot_type()
|
||||
if(loot_count && prob(60))
|
||||
return pick( \
|
||||
12;/obj/item/weapon/reagent_containers/food/snacks/worm, \
|
||||
1;/obj/item/weapon/material/knife/machete/hatchet/stone \
|
||||
)
|
||||
|
||||
/turf/simulated/floor/outdoors/Initialize(mapload)
|
||||
. = ..()
|
||||
if(can_dig && prob(33))
|
||||
loot_count = rand(1,3)
|
||||
|
||||
/turf/simulated/floor/outdoors/attackby(obj/item/C, mob/user)
|
||||
|
||||
if(can_dig && istype(C, /obj/item/weapon/shovel))
|
||||
to_chat(user, SPAN_NOTICE("\The [user] begins digging into \the [src] with \the [C]."))
|
||||
var/delay = (3 SECONDS * C.toolspeed)
|
||||
user.setClickCooldown(delay)
|
||||
if(do_after(user, delay, src))
|
||||
if(!(locate(/obj/machinery/portable_atmospherics/hydroponics/soil) in contents))
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/soil/soil = new(src)
|
||||
user.visible_message(SPAN_NOTICE("\The [src] digs \a [soil] into \the [src]."))
|
||||
else
|
||||
var/loot_type = get_loot_type()
|
||||
if(loot_type)
|
||||
loot_count--
|
||||
var/obj/item/loot = new loot_type(src)
|
||||
to_chat(user, SPAN_NOTICE("You dug up \a [loot]!"))
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("You didn't find anything of note in \the [src]."))
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/turf/simulated/floor/Initialize(mapload)
|
||||
if(is_outdoors())
|
||||
@@ -80,6 +116,7 @@ var/list/turf_edge_cache = list()
|
||||
icon_state = "mud_dark"
|
||||
edge_blending_priority = 3
|
||||
initial_flooring = /decl/flooring/mud
|
||||
can_dig = TRUE
|
||||
|
||||
/turf/simulated/floor/outdoors/rocks
|
||||
name = "rocks"
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
// this code here enables people to dig up worms from certain tiles.
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/attackby(obj/item/weapon/S as obj, mob/user as mob)
|
||||
if(istype(S, /obj/item/weapon/shovel))
|
||||
to_chat(user, "<span class='notice'>You begin to dig in \the [src] with your [S].</span>")
|
||||
if(do_after(user, 4 SECONDS * S.toolspeed))
|
||||
to_chat(user, "<span class='notice'>\The [src] has been dug up, a worm pops from the ground.</span>")
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/worm(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You decide to not finish digging in \the [src].</span>")
|
||||
else if(istype(S, /obj/item/stack/tile/floor))
|
||||
if(istype(S, /obj/item/stack/tile/floor))
|
||||
ChangeTurf(/turf/simulated/floor, preserve_outdoors = TRUE)
|
||||
return
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
@@ -45,8 +45,7 @@
|
||||
|
||||
/turf/simulated/wall/Destroy()
|
||||
STOP_PROCESSING(SSturfs, src)
|
||||
dismantle_wall(null,null,1)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/turf/simulated/wall/examine_icon()
|
||||
return icon(icon=initial(icon), icon_state=initial(icon_state))
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
var/block_tele = FALSE // If true, most forms of teleporting to or from this turf tile will fail.
|
||||
var/can_build_into_floor = FALSE // Used for things like RCDs (and maybe lattices/floor tiles in the future), to see if a floor should replace it.
|
||||
var/list/dangerous_objects // List of 'dangerous' objs that the turf holds that can cause something bad to happen when stepped on, used for AI mobs.
|
||||
var/tmp/changing_turf
|
||||
|
||||
/turf/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -42,7 +43,7 @@
|
||||
|
||||
//Lighting related
|
||||
set_luminosity(!(dynamic_lighting))
|
||||
|
||||
|
||||
if(opacity)
|
||||
directional_opacity = ALL_CARDINALS
|
||||
|
||||
@@ -58,9 +59,14 @@
|
||||
Be.multiz_turf_new(src, UP)
|
||||
|
||||
/turf/Destroy()
|
||||
. = QDEL_HINT_IWILLGC
|
||||
if (!changing_turf)
|
||||
stack_trace("Improper turf qdel. Do not qdel turfs directly.")
|
||||
changing_turf = FALSE
|
||||
cleanbot_reserved_turfs -= src
|
||||
if(connections)
|
||||
connections.erase_all()
|
||||
..()
|
||||
return QDEL_HINT_IWILLGC
|
||||
|
||||
/turf/ex_act(severity)
|
||||
return 0
|
||||
|
||||
@@ -61,49 +61,29 @@
|
||||
|
||||
cut_overlays(TRUE)
|
||||
RemoveElement(/datum/element/turf_z_transparency)
|
||||
changing_turf = TRUE
|
||||
qdel(src)
|
||||
|
||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||
if(ispath(N, /turf/simulated/floor))
|
||||
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
||||
if(old_fire)
|
||||
fire = old_fire
|
||||
W.fire = old_fire
|
||||
W.RemoveLattice()
|
||||
else if(old_fire)
|
||||
old_fire.RemoveFire()
|
||||
|
||||
if (istype(W,/turf/simulated/floor))
|
||||
W.RemoveLattice()
|
||||
if(tell_universe)
|
||||
universe.OnTurfChange(W)
|
||||
|
||||
if(tell_universe)
|
||||
universe.OnTurfChange(W)
|
||||
if(air_master)
|
||||
air_master.mark_for_update(W)
|
||||
|
||||
if(air_master)
|
||||
air_master.mark_for_update(src) //handle the addition of the new turf.
|
||||
|
||||
for(var/turf/space/S in range(W,1))
|
||||
S.update_starlight()
|
||||
|
||||
W.levelupdate()
|
||||
W.update_icon(1)
|
||||
W.post_change()
|
||||
. = W
|
||||
|
||||
else
|
||||
|
||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||
|
||||
if(old_fire)
|
||||
old_fire.RemoveFire()
|
||||
|
||||
if(tell_universe)
|
||||
universe.OnTurfChange(W)
|
||||
|
||||
if(air_master)
|
||||
air_master.mark_for_update(src)
|
||||
|
||||
for(var/turf/space/S in range(W,1))
|
||||
S.update_starlight()
|
||||
|
||||
W.levelupdate()
|
||||
W.update_icon(1)
|
||||
W.post_change()
|
||||
. = W
|
||||
for(var/turf/space/S in range(W, 1))
|
||||
S.update_starlight()
|
||||
W.levelupdate()
|
||||
W.update_icon(1)
|
||||
W.post_change()
|
||||
. = W
|
||||
|
||||
dangerous_objects = old_dangerous_objects
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/turf/unsimulated/wall/planetary/Destroy()
|
||||
SSplanets.removeTurf(src)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/turf/unsimulated/wall/planetary/proc/set_temperature(var/new_temperature)
|
||||
if(new_temperature == temperature)
|
||||
|
||||
@@ -19,6 +19,13 @@
|
||||
T.ScrapeAway()
|
||||
else*/
|
||||
vv_update_display(D, "deleted", VV_MSG_DELETED)
|
||||
qdel(D)
|
||||
|
||||
// turfs are special snowflakes that'll explode if qdel'd outside ChangeTurf
|
||||
if (isturf(D))
|
||||
var/turf/T = D
|
||||
T.ChangeTurf(world.turf)
|
||||
else
|
||||
qdel(D)
|
||||
|
||||
if(!QDELETED(D))
|
||||
vv_update_display(D, "deleted", "")
|
||||
|
||||
@@ -172,7 +172,4 @@
|
||||
corpse.adjustBruteLoss(H.getBruteLoss())
|
||||
corpse.UpdateAppearance()
|
||||
corpse.regenerate_icons()
|
||||
for(var/obj/item/organ/internal/I in corpse.internal_organs)
|
||||
var/obj/item/organ/internal/G = I
|
||||
G.Destroy()
|
||||
return
|
||||
QDEL_NULL_LIST(corpse.internal_organs)
|
||||
|
||||
@@ -851,6 +851,12 @@
|
||||
ckeywhitelist = list("pastelprincedan", "hatterhat")
|
||||
character_name = list("Masumi Maki", "Harold Robinson")
|
||||
|
||||
/datum/gear/fluff/slimecat_rd_plush
|
||||
path = /obj/item/toy/plushie/fluff/slimeowshi
|
||||
display_name = "slimecat RD plushie"
|
||||
ckeywhitelist = list("pastelprincedan")
|
||||
character_name = list("Kiyoshi Maki", "Masumi Maki")
|
||||
|
||||
// Q CKEYS
|
||||
|
||||
// R CKEYS
|
||||
|
||||
@@ -53,7 +53,11 @@
|
||||
/datum/gear/plushie/New()
|
||||
..()
|
||||
var/list/plushies = list()
|
||||
for(var/obj/item/toy/plushie/plushie_type as anything in subtypesof(/obj/item/toy/plushie) - /obj/item/toy/plushie/therapy)
|
||||
var/list/blacklisted_types = list()
|
||||
// look if theres a better way to do this im all ears
|
||||
blacklisted_types += subtypesof(/obj/item/toy/plushie/therapy)
|
||||
blacklisted_types += subtypesof(/obj/item/toy/plushie/fluff)
|
||||
for(var/obj/item/toy/plushie/plushie_type as anything in subtypesof(/obj/item/toy/plushie) - blacklisted_types)
|
||||
plushies[initial(plushie_type.name)] = plushie_type
|
||||
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(plushies))
|
||||
|
||||
|
||||
@@ -482,6 +482,12 @@
|
||||
var/efficiency = 1 - H.get_pressure_weakness(environment.return_pressure()) // You need to have a good seal for effective cooling
|
||||
var/env_temp = get_environment_temperature() //wont save you from a fire
|
||||
var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling)
|
||||
var/thermal_protection = H.get_heat_protection(env_temp) // ... unless you've got a good suit.
|
||||
|
||||
if(thermal_protection < 0.99) //For some reason, < 1 returns false if the value is 1.
|
||||
temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling)
|
||||
else
|
||||
temp_adj = min(H.bodytemperature - thermostat, max_cooling)
|
||||
|
||||
if (temp_adj < 0.5) //only cools, doesn't heat, also we don't need extreme precision
|
||||
return
|
||||
|
||||
@@ -849,6 +849,32 @@
|
||||
nutriment_desc = list("dryness" = 2, "bread" = 2)
|
||||
bitesize = 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat
|
||||
name = "fillet"
|
||||
desc = "A fillet of carp meat"
|
||||
icon_state = "fishfillet"
|
||||
filling_color = "#FFDEFE"
|
||||
center_of_mass = list("x"=17, "y"=13)
|
||||
bitesize = 6
|
||||
|
||||
var/toxin_type = "carpotoxin"
|
||||
var/toxin_amount = 3
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("seafood", 3)
|
||||
if(toxin_type && toxin_amount)
|
||||
reagents.add_reagent(toxin_type, toxin_amount)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat/fish
|
||||
desc = "A fillet of fish meat."
|
||||
toxin_type = null
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat/fish/sif
|
||||
desc = "A fillet of sivian fish meat."
|
||||
filling_color = "#2c2cff"
|
||||
color = "#2c2cff"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/crab_legs
|
||||
name = "steamed crab legs"
|
||||
desc = "Crab legs steamed and buttered to perfection. One day when the boss gets hungry..."
|
||||
@@ -873,7 +899,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/fishfingers/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 4)
|
||||
reagents.add_reagent("seafood", 4)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/zestfish
|
||||
name = "Zesty Fish"
|
||||
@@ -885,7 +911,70 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/zestfish/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 4)
|
||||
reagents.add_reagent("seafood", 4)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/mushroomslice
|
||||
name = "mushroom slice"
|
||||
desc = "A slice of mushroom."
|
||||
icon_state = "hugemushroomslice"
|
||||
filling_color = "#E0D7C5"
|
||||
center_of_mass = list("x"=17, "y"=16)
|
||||
nutriment_amt = 3
|
||||
nutriment_desc = list("raw" = 2, "mushroom" = 2)
|
||||
bitesize = 6
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/mushroomslice/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("psilocybin", 3)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tomatomeat
|
||||
name = "tomato slice"
|
||||
desc = "A slice from a huge tomato"
|
||||
icon_state = "tomatomeat"
|
||||
filling_color = "#DB0000"
|
||||
center_of_mass = list("x"=17, "y"=16)
|
||||
nutriment_amt = 3
|
||||
nutriment_desc = list("raw" = 2, "tomato" = 3)
|
||||
bitesize = 6
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/bearmeat
|
||||
name = "bear meat"
|
||||
desc = "A very manly slab of meat."
|
||||
icon_state = "bearmeat"
|
||||
filling_color = "#DB0000"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
bitesize = 3
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/bearmeat/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 12)
|
||||
reagents.add_reagent("hyperzine", 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/xenomeat
|
||||
name = "xenomeat"
|
||||
desc = "A slab of green meat. Smells like acid."
|
||||
icon_state = "xenomeat"
|
||||
filling_color = "#43DE18"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
bitesize = 6
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/xenomeat/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 6)
|
||||
reagents.add_reagent("pacid",6)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/xenomeat/spidermeat // Substitute for recipes requiring xeno meat.
|
||||
name = "spider meat"
|
||||
desc = "A slab of green meat."
|
||||
icon_state = "xenomeat"
|
||||
filling_color = "#43DE18"
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
bitesize = 6
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/xenomeat/spidermeat/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("spidertoxin",6)
|
||||
reagents.remove_reagent("pacid",6)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball
|
||||
name = "meatball"
|
||||
@@ -3857,7 +3946,8 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 1)
|
||||
reagents.add_reagent("fishbait", 9)
|
||||
reagents.add_reagent("protein", 3)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet
|
||||
name = "cutlet"
|
||||
@@ -3869,7 +3959,8 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 2)
|
||||
reagents.add_reagent("fishbait", 15)
|
||||
reagents.add_reagent("protein", 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawmeatball
|
||||
name = "raw meatball"
|
||||
@@ -3881,7 +3972,8 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawmeatball/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 2)
|
||||
reagents.add_reagent("fishbait", 30)
|
||||
reagents.add_reagent("protein", 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/hotdog
|
||||
name = "hotdog"
|
||||
|
||||
@@ -58,37 +58,6 @@
|
||||
reagents.remove_reagent("triglyceride", INFINITY)
|
||||
//Chicken is low fat. Less total calories than other meats
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat
|
||||
name = "fillet"
|
||||
desc = "A fillet of carp meat"
|
||||
icon_state = "fishfillet"
|
||||
filling_color = "#FFDEFE"
|
||||
center_of_mass = list("x"=17, "y"=13)
|
||||
bitesize = 6
|
||||
|
||||
var/toxin_type = "carpotoxin"
|
||||
var/toxin_amount = 3
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 3)
|
||||
reagents.add_reagent(toxin_type, toxin_amount)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif
|
||||
desc = "A fillet of sivian fish meat."
|
||||
filling_color = "#2c2cff"
|
||||
color = "#2c2cff"
|
||||
toxin_type = "neurotoxic_protein"
|
||||
toxin_amount = 2
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif/murkfish
|
||||
toxin_type = "murk_protein"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat/fish
|
||||
desc = "A fillet of fish meat."
|
||||
toxin_type = "neurotoxic_protein"
|
||||
toxin_amount = 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/crabmeat
|
||||
name = "crustacean legs"
|
||||
desc = "... Coffee? Is that you?"
|
||||
|
||||
@@ -185,13 +185,17 @@
|
||||
pocell.charge = pocell.maxcharge
|
||||
qdel(src)
|
||||
return
|
||||
else if(W.sharp)
|
||||
|
||||
if(W.sharp)
|
||||
|
||||
if(seed.kitchen_tag == "pumpkin") // Ugggh these checks are awful.
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
|
||||
new /obj/item/clothing/head/pumpkinhead (user.loc)
|
||||
qdel(src)
|
||||
return
|
||||
else if(seed.chems)
|
||||
|
||||
if(seed.chems)
|
||||
|
||||
if(W.sharp && W.edge && !isnull(seed.chems["woodpulp"]))
|
||||
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
|
||||
playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
|
||||
@@ -209,36 +213,49 @@
|
||||
to_chat(user, "You add the newly-formed wood to the stack. It now contains [NG.get_amount()] planks.")
|
||||
qdel(src)
|
||||
return
|
||||
else if(!isnull(seed.chems["potato"]))
|
||||
|
||||
if(seed.kitchen_tag == "sunflower")
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/rawsunflower(get_turf(src))
|
||||
to_chat(user, SPAN_NOTICE("You remove the seeds from the flower, slightly damaging them."))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(seed.kitchen_tag == "potato" || !isnull(seed.chems["potato"]))
|
||||
to_chat(user, "You slice \the [src] into sticks.")
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
else if(!isnull(seed.chems["carrotjuice"]))
|
||||
|
||||
if(!isnull(seed.chems["carrotjuice"]))
|
||||
to_chat(user, "You slice \the [src] into sticks.")
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/carrotfries(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
else if(!isnull(seed.chems["pineapplejuice"]))
|
||||
|
||||
if(!isnull(seed.chems["pineapplejuice"]))
|
||||
to_chat(user, "You slice \the [src] into rings.")
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/pineapple_ring(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
else if(!isnull(seed.chems["soymilk"]))
|
||||
|
||||
if(!isnull(seed.chems["soymilk"]))
|
||||
to_chat(user, "You roughly chop up \the [src].")
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/soydope(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
else if(seed.get_trait(TRAIT_FLESH_COLOUR))
|
||||
|
||||
if(seed.get_trait(TRAIT_FLESH_COLOUR))
|
||||
to_chat(user, "You slice up \the [src].")
|
||||
var/slices = rand(3,5)
|
||||
var/reagents_to_transfer = round(reagents.total_volume/slices)
|
||||
for(var/i=1; i<=slices; i++)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/F = new(get_turf(src),seed)
|
||||
if(reagents_to_transfer) reagents.trans_to_obj(F,reagents_to_transfer)
|
||||
if(reagents_to_transfer)
|
||||
reagents.trans_to_obj(F,reagents_to_transfer)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
. = ..()
|
||||
|
||||
@@ -3,6 +3,3 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus
|
||||
plantname = "ambrosiadeus"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sifpod
|
||||
plantname = "sifbulb"
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif
|
||||
var/seeds = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/Initialize(mapload, planttype) // Wild Sifplants have some seeds you can extract with a knife.
|
||||
. = ..()
|
||||
seeds = rand(1, 2)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/examine(mob/user)
|
||||
. = ..()
|
||||
if(seeds)
|
||||
to_chat(user, SPAN_NOTICE("You can see [seeds] seed\s in \the [src]. You might be able to extract them with a sharp object."))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/attackby(var/obj/item/weapon/W, var/mob/living/user)
|
||||
if(seed && W.sharp && seeds > 0)
|
||||
var/take_seeds = min(seeds, rand(1,2))
|
||||
seeds -= take_seeds
|
||||
to_chat(user, SPAN_NOTICE("You stick \the [W] into \the [src] and lever out [take_seeds] seed\s."))
|
||||
for(var/i = 1 to take_seeds)
|
||||
new /obj/item/seeds(get_turf(src), seed.name)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/sifpod
|
||||
plantname = "sifbulb"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/wabback
|
||||
plantname = "wabback"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/blackwabback
|
||||
plantname = "blackwabback"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/wildwabback
|
||||
plantname = "wildwabback"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/eyebulbs
|
||||
plantname = "eyebulbs"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sif/cavebulbs
|
||||
plantname = "cavebulbs"
|
||||
@@ -13,7 +13,9 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds)
|
||||
var/datum/seed/seed
|
||||
var/modified = 0
|
||||
|
||||
/obj/item/seeds/Initialize()
|
||||
/obj/item/seeds/Initialize(var/ml, var/_seed_type)
|
||||
if(_seed_type in SSplants.seeds)
|
||||
seed_type = _seed_type
|
||||
update_seed()
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/datum/seed/apple/sif
|
||||
name = "sifbulb"
|
||||
seed_name = "sivian tree"
|
||||
seed_name = "sivian pod"
|
||||
display_name = "sivian pod"
|
||||
kitchen_tag = "apple"
|
||||
chems = list("nutriment" = list(1,5),"sifsap" = list(10,20))
|
||||
|
||||
@@ -32,6 +32,16 @@
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/CanPass()
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/attackby(obj/item/O, mob/user)
|
||||
if(istype(O, /obj/item/weapon/shovel) && user.a_intent == I_HURT)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] begins filling in \the [src]."))
|
||||
if(do_after(user, 3 SECONDS) && !QDELETED(src))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] fills in \the [src]."))
|
||||
qdel(src)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
|
||||
// Holder for vine plants.
|
||||
// Icons for plants are generated as overlays, so setting it to invisible wouldn't work.
|
||||
// Hence using a blank icon.
|
||||
|
||||
@@ -45,7 +45,9 @@
|
||||
new /datum/stack_recipe("noticeboard", /obj/structure/noticeboard, 1, recycle_material = "[name]"),
|
||||
new /datum/stack_recipe("tanning rack", /obj/structure/tanning_rack, 3, one_per_turf = TRUE, time = 20, on_floor = TRUE, supplied_material = "[name]"),
|
||||
new /datum/stack_recipe("painting easel", /obj/structure/easel, 5, one_per_turf = TRUE, time = 20, on_floor = TRUE, supplied_material = "[name]"),
|
||||
new /datum/stack_recipe("painting frame", /obj/item/frame/painting, 5, one_per_turf = TRUE, time = 20, on_floor = TRUE, supplied_material = "[name]")
|
||||
new /datum/stack_recipe("painting frame", /obj/item/frame/painting, 5, one_per_turf = TRUE, time = 20, on_floor = TRUE, supplied_material = "[name]"),
|
||||
new /datum/stack_recipe("roofing tile", /obj/item/stack/tile/roofing, 3, 4, 20, recycle_material = "[name]"),
|
||||
new /datum/stack_recipe("shovel", /obj/item/weapon/shovel/wood, 2, time = 10, on_floor = TRUE, supplied_material = "[name]")
|
||||
)
|
||||
|
||||
/datum/material/wood/sif
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
|
||||
user.visible_message("<b>\The [user]</b> starts cutting hair off \the [src]", "<span class='notice'>You start cutting the hair off \the [src]</span>", "You hear the sound of a knife rubbing against flesh")
|
||||
var/scraped = 0
|
||||
while(amount > 0 && do_after(user, 2.5 SECONDS)) // 2.5s per hide
|
||||
while(amount > 0 && do_after(user, 2.5 SECONDS, user))
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
var/obj/item/stack/hairlesshide/H = null
|
||||
for(var/obj/item/stack/hairlesshide/HS in user.loc) // Could be scraping something inside a locker, hence the .loc, not get_turf
|
||||
|
||||
@@ -128,6 +128,26 @@
|
||||
edge = TRUE
|
||||
var/digspeed = 40
|
||||
|
||||
/obj/item/weapon/shovel/wood
|
||||
icon_state = "whiteshovel"
|
||||
item_state = "whiteshovel"
|
||||
var/datum/material/material
|
||||
|
||||
/obj/item/weapon/shovel/wood/Initialize(var/ml, var/_mat)
|
||||
. = ..()
|
||||
material = get_material_by_name(_mat)
|
||||
if(!istype(material))
|
||||
material = null
|
||||
else
|
||||
name = "[material.display_name] shovel"
|
||||
matter = list("[material.name]" = 50)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/shovel/wood/update_icon()
|
||||
. = ..()
|
||||
color = material ? material.icon_colour : initial(color)
|
||||
alpha = min(max(255 * material.opacity, 80), 255)
|
||||
|
||||
/obj/item/weapon/shovel/spade
|
||||
name = "spade"
|
||||
desc = "A small tool for digging and moving dirt."
|
||||
|
||||
@@ -8,31 +8,34 @@ var/list/mining_overlay_cache = list()
|
||||
density = TRUE
|
||||
opacity = 1 // YW edit. Stops all my unsimulated tiles from being seethrough.
|
||||
|
||||
/*
|
||||
/turf/unsimulated/mineral/ice
|
||||
name = "Ice wall"
|
||||
desc = "Frigid Ice that seems to be stronger then most manmade structures"
|
||||
icon = 'icons/turf/snow_new.dmi'
|
||||
icon_state = "Icerock"
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/turf/simulated/mineral //wall piece
|
||||
name = "rock"
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
icon_state = "rock"
|
||||
var/rock_side_icon_state = "rock_side"
|
||||
var/sand_icon_state = "asteroid"
|
||||
var/rock_icon_state = "rock"
|
||||
var/random_icon = 0
|
||||
oxygen = 0
|
||||
nitrogen = 0
|
||||
opacity = 1
|
||||
density = TRUE
|
||||
blocks_air = 1
|
||||
temperature = T0C
|
||||
|
||||
can_dirty = FALSE
|
||||
|
||||
var/floor_name = "sand"
|
||||
var/rock_side_icon_state = "rock_side"
|
||||
var/sand_icon_state = "asteroid"
|
||||
var/rock_icon_state = "rock"
|
||||
var/random_icon = 0
|
||||
|
||||
var/ore/mineral
|
||||
var/sand_dug
|
||||
var/mined_ore = 0
|
||||
@@ -74,6 +77,10 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
has_resources = 1
|
||||
|
||||
/turf/simulated/mineral/ChangeTurf(turf/N, tell_universe, force_lighting_update, preserve_outdoors)
|
||||
clear_ore_effects()
|
||||
. = ..()
|
||||
|
||||
// Alternative rock wall sprites.
|
||||
/turf/simulated/mineral/light
|
||||
icon_state = "rock-light"
|
||||
@@ -118,6 +125,14 @@ var/list/mining_overlay_cache = list()
|
||||
blocks_air = 0
|
||||
can_build_into_floor = TRUE
|
||||
|
||||
/turf/simulated/mineral/floor/mud
|
||||
icon_state = "mud"
|
||||
sand_icon_state = "mud"
|
||||
|
||||
/turf/simulated/mineral/floor/dirt
|
||||
icon_state = "dirt"
|
||||
sand_icon_state = "dirt"
|
||||
|
||||
//Alternative sand floor sprite.
|
||||
/turf/simulated/mineral/floor/light
|
||||
icon_state = "sand-light"
|
||||
@@ -149,6 +164,7 @@ var/list/mining_overlay_cache = list()
|
||||
opacity = 0
|
||||
blocks_air = 0
|
||||
can_build_into_floor = TRUE
|
||||
clear_ore_effects()
|
||||
update_general()
|
||||
|
||||
/turf/simulated/mineral/proc/make_wall()
|
||||
@@ -232,7 +248,7 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
//We are a sand floor
|
||||
else
|
||||
name = "sand"
|
||||
name = floor_name
|
||||
icon = 'icons/turf/flooring/asteroid.dmi'
|
||||
icon_state = sand_icon_state
|
||||
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
|
||||
/turf/simulated/Destroy()
|
||||
updateVisibility(src)
|
||||
if(zone)
|
||||
if(can_safely_remove_from_zone())
|
||||
c_copy_air()
|
||||
zone.remove(src)
|
||||
else
|
||||
zone.rebuild()
|
||||
return ..()
|
||||
|
||||
/turf/simulated/Initialize()
|
||||
|
||||
@@ -21,6 +21,16 @@
|
||||
#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point
|
||||
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
|
||||
|
||||
#define COLD_ALERT_SEVERITY_LOW 1 // Constants passed to the cold and heat alerts.
|
||||
#define COLD_ALERT_SEVERITY_MODERATE 2
|
||||
#define COLD_ALERT_SEVERITY_MAX 3
|
||||
#define ENVIRONMENT_COMFORT_MARKER_COLD 1
|
||||
|
||||
#define HOT_ALERT_SEVERITY_LOW 1
|
||||
#define HOT_ALERT_SEVERITY_MODERATE 2
|
||||
#define HOT_ALERT_SEVERITY_MAX 3
|
||||
#define ENVIRONMENT_COMFORT_MARKER_HOT 2
|
||||
|
||||
#define RADIATION_SPEED_COEFFICIENT 0.1
|
||||
#define HUMAN_COMBUSTION_TEMP 524 //524k is the sustained combustion temperature of human fat
|
||||
|
||||
@@ -564,7 +574,7 @@
|
||||
|
||||
|
||||
// Hot air hurts :(
|
||||
if((breath.temperature < species.breath_cold_level_1 || breath.temperature > species.breath_heat_level_1) && !(COLD_RESISTANCE in mutations))
|
||||
if((breath.temperature <= species.cold_discomfort_level || breath.temperature >= species.heat_discomfort_level) && !(COLD_RESISTANCE in mutations))
|
||||
|
||||
if(breath.temperature <= species.breath_cold_level_1)
|
||||
if(prob(20))
|
||||
@@ -573,27 +583,37 @@
|
||||
if(prob(20))
|
||||
to_chat(src, "<span class='danger'>You feel your face burning and a searing heat in your lungs!</span>")
|
||||
|
||||
if(breath.temperature >= species.breath_heat_level_1)
|
||||
if(breath.temperature < species.breath_heat_level_2)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Heat")
|
||||
throw_alert("temp", /obj/screen/alert/hot, 1)
|
||||
else if(breath.temperature < species.breath_heat_level_3)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Heat")
|
||||
throw_alert("temp", /obj/screen/alert/hot, 2)
|
||||
else
|
||||
if(breath.temperature >= species.heat_discomfort_level)
|
||||
|
||||
if(breath.temperature >= species.breath_heat_level_3)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Heat")
|
||||
throw_alert("temp", /obj/screen/alert/hot, 3)
|
||||
|
||||
else if(breath.temperature <= species.breath_cold_level_1)
|
||||
if(breath.temperature > species.breath_cold_level_2)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Cold")
|
||||
throw_alert("temp", /obj/screen/alert/cold, 1)
|
||||
else if(breath.temperature > species.breath_cold_level_3)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Cold")
|
||||
throw_alert("temp", /obj/screen/alert/cold, 2)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
|
||||
else if(breath.temperature >= species.breath_heat_level_2)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Heat")
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
|
||||
else if(breath.temperature >= species.breath_heat_level_1)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Heat")
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
|
||||
else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_HOT))
|
||||
throw_alert("temp", /obj/screen/alert/warm, HOT_ALERT_SEVERITY_LOW)
|
||||
else
|
||||
clear_alert("temp")
|
||||
|
||||
else if(breath.temperature <= species.cold_discomfort_level)
|
||||
|
||||
if(breath.temperature <= species.breath_cold_level_3)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Cold")
|
||||
throw_alert("temp", /obj/screen/alert/cold, 3)
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
|
||||
else if(breath.temperature <= species.breath_cold_level_2)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Cold")
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_LOW)
|
||||
else if(breath.temperature <= species.breath_cold_level_1)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Cold")
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MODERATE)
|
||||
else if(species.get_environment_discomfort(src, ENVIRONMENT_COMFORT_MARKER_COLD))
|
||||
throw_alert("temp", /obj/screen/alert/chilly, COLD_ALERT_SEVERITY_LOW)
|
||||
else
|
||||
clear_alert("temp")
|
||||
|
||||
//breathing in hot/cold air also heats/cools you a bit
|
||||
var/temp_adj = breath.temperature - bodytemperature
|
||||
@@ -605,15 +625,12 @@
|
||||
var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
|
||||
temp_adj *= relative_density
|
||||
|
||||
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
|
||||
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
|
||||
//to_world("Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]")
|
||||
bodytemperature += temp_adj
|
||||
if(temp_adj > BODYTEMP_HEATING_MAX)
|
||||
temp_adj = BODYTEMP_HEATING_MAX
|
||||
if(temp_adj < BODYTEMP_COOLING_MAX)
|
||||
temp_adj = BODYTEMP_COOLING_MAX
|
||||
|
||||
else if(breath.temperature >= species.heat_discomfort_level)
|
||||
species.get_environment_discomfort(src,"heat")
|
||||
else if(breath.temperature <= species.cold_discomfort_level)
|
||||
species.get_environment_discomfort(src,"cold")
|
||||
bodytemperature += temp_adj
|
||||
|
||||
else
|
||||
clear_alert("temp")
|
||||
@@ -690,13 +707,13 @@
|
||||
if(bodytemperature >= species.heat_level_2)
|
||||
if(bodytemperature >= species.heat_level_3)
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_3
|
||||
throw_alert("temp", /obj/screen/alert/hot, 3)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
|
||||
else
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_2
|
||||
throw_alert("temp", /obj/screen/alert/hot, 2)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MODERATE)
|
||||
else
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_1
|
||||
throw_alert("temp", /obj/screen/alert/hot, 1)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_LOW)
|
||||
|
||||
take_overall_damage(burn=burn_dam, used_weapon = "High Body Temperature")
|
||||
|
||||
|
||||
@@ -79,9 +79,6 @@
|
||||
|
||||
/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type)
|
||||
|
||||
if(!prob(10))
|
||||
return
|
||||
|
||||
/* // Commented out because clothes should not prevent you from feeling cold if your body temperature has already dropped. You can absolutely feel cold through clothing, and feel too warm without clothing. ???
|
||||
var/covered = 0 // Basic coverage can help.
|
||||
for(var/obj/item/clothing/clothes in H)
|
||||
@@ -92,11 +89,15 @@
|
||||
break
|
||||
*/
|
||||
|
||||
switch(msg_type)
|
||||
if("cold")
|
||||
to_chat(H, "<span class='danger'>[pick(cold_discomfort_strings)]</span>")
|
||||
if("heat")
|
||||
to_chat(H, "<span class='danger'>[pick(heat_discomfort_strings)]</span>")
|
||||
var/discomfort_message
|
||||
if(msg_type == ENVIRONMENT_COMFORT_MARKER_COLD && length(cold_discomfort_strings) /*&& !covered*/)
|
||||
discomfort_message = pick(cold_discomfort_strings)
|
||||
else if(msg_type == ENVIRONMENT_COMFORT_MARKER_HOT && length(heat_discomfort_strings) /*&& covered*/)
|
||||
discomfort_message = pick(heat_discomfort_strings)
|
||||
|
||||
if(discomfort_message && prob(5))
|
||||
to_chat(H, SPAN_DANGER(discomfort_message))
|
||||
return !!discomfort_message
|
||||
|
||||
/datum/species/proc/get_random_name(var/gender)
|
||||
if(!name_language)
|
||||
|
||||
@@ -263,15 +263,15 @@
|
||||
if(environment)
|
||||
switch(environment.temperature) //310.055 optimal body temp
|
||||
if(400 to INFINITY)
|
||||
throw_alert("temp", /obj/screen/alert/hot/robot, 2)
|
||||
throw_alert("temp", /obj/screen/alert/hot/robot, HOT_ALERT_SEVERITY_MODERATE)
|
||||
if(360 to 400)
|
||||
throw_alert("temp", /obj/screen/alert/hot/robot, 1)
|
||||
throw_alert("temp", /obj/screen/alert/hot/robot, HOT_ALERT_SEVERITY_LOW)
|
||||
if(260 to 360)
|
||||
clear_alert("temp")
|
||||
if(200 to 260)
|
||||
throw_alert("temp", /obj/screen/alert/cold/robot, 1)
|
||||
throw_alert("temp", /obj/screen/alert/cold/robot, COLD_ALERT_SEVERITY_LOW)
|
||||
else
|
||||
throw_alert("temp", /obj/screen/alert/cold/robot, 2)
|
||||
throw_alert("temp", /obj/screen/alert/cold/robot, COLD_ALERT_SEVERITY_MODERATE)
|
||||
|
||||
//Oxygen and fire does nothing yet!!
|
||||
// if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
|
||||
|
||||
@@ -156,10 +156,10 @@
|
||||
//Atmos effect
|
||||
if(bodytemperature < minbodytemp)
|
||||
adjustFireLoss(cold_damage_per_tick)
|
||||
throw_alert("temp", /obj/screen/alert/cold, 3)
|
||||
throw_alert("temp", /obj/screen/alert/cold, COLD_ALERT_SEVERITY_MAX)
|
||||
else if(bodytemperature > maxbodytemp)
|
||||
adjustFireLoss(heat_damage_per_tick)
|
||||
throw_alert("temp", /obj/screen/alert/hot, 3)
|
||||
throw_alert("temp", /obj/screen/alert/hot, HOT_ALERT_SEVERITY_MAX)
|
||||
else
|
||||
clear_alert("temp")
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
catalogue_data = list(/datum/category_item/catalogue/fauna/javelin)
|
||||
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/fish/sif
|
||||
|
||||
/datum/category_item/catalogue/fauna/icebass
|
||||
name = "Sivian Fauna - Glitter Bass"
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
catalogue_data = list(/datum/category_item/catalogue/fauna/icebass)
|
||||
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/fish/sif
|
||||
|
||||
var/max_red = 150
|
||||
var/min_red = 50
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
var/image/head_image
|
||||
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/fish/sif
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/rockfish/Initialize()
|
||||
. = ..()
|
||||
@@ -295,7 +295,7 @@
|
||||
|
||||
has_eye_glow = TRUE
|
||||
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/fish/sif
|
||||
|
||||
/datum/category_item/catalogue/fauna/murkin
|
||||
name = "Sivian Fauna - Murkfish"
|
||||
@@ -325,4 +325,4 @@
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif/murkfish
|
||||
|
||||
/decl/mob_organ_names/fish
|
||||
hit_zones = list("head", "body", "dorsal fin", "left pectoral fin", "right pectoral fin", "tail fin")
|
||||
hit_zones = list("head", "body", "dorsal fin", "left pectoral fin", "right pectoral fin", "tail fin")
|
||||
@@ -809,6 +809,22 @@
|
||||
do_colouration = 1
|
||||
color_blend_mode = ICON_MULTIPLY
|
||||
|
||||
/datum/sprite_accessory/ears/rabbit_swept
|
||||
name = "Rabbit Ears (swept back)"
|
||||
desc = ""
|
||||
icon = 'icons/mob/vore/ears_32x64.dmi'
|
||||
icon_state = "rabbit-swept"
|
||||
do_colouration = 1
|
||||
color_blend_mode = ICON_MULTIPLY
|
||||
|
||||
/datum/sprite_accessory/ears/antlers_large
|
||||
name = "Antlers (large)"
|
||||
desc = ""
|
||||
icon = 'icons/mob/vore/ears_32x64.dmi'
|
||||
icon_state = "antlers_large"
|
||||
do_colouration = 1
|
||||
color_blend_mode = ICON_MULTIPLY
|
||||
|
||||
/datum/sprite_accessory/ears/kittyr
|
||||
name = "kitty right only, colorable"
|
||||
icon = 'icons/mob/vore/ears_uneven.dmi'
|
||||
|
||||
@@ -103,7 +103,7 @@ var/global/ntnet_card_uid = 1
|
||||
var/holderz = get_z(holder2)
|
||||
if(!holderz) //no reception in nullspace
|
||||
return 0
|
||||
var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE)
|
||||
var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE)// VOREStation Edit - , om_range = DEFAULT_OVERMAP_RANGE)
|
||||
var/list/zlevels_in_long_range = using_map.get_map_levels(holderz, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range
|
||||
var/best = 0
|
||||
for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays)
|
||||
|
||||
@@ -199,11 +199,10 @@
|
||||
switch(status)
|
||||
if(SHIP_STATUS_LANDED)
|
||||
var/obj/effect/overmap/visitable/location = loc
|
||||
if(istype(loc, /obj/effect/overmap/visitable/sector))
|
||||
return "Landed on \the [location.name]. Use secondary thrust to get clear before activating primary engines."
|
||||
if(istype(loc, /obj/effect/overmap/visitable/ship))
|
||||
if(location.in_space)
|
||||
return "Docked with \the [location.name]. Use secondary thrust to get clear before activating primary engines."
|
||||
return "Docked with an unknown object."
|
||||
else
|
||||
return "Landed on \the [location.name]. Use secondary thrust to get clear before activating primary engines."
|
||||
if(SHIP_STATUS_TRANSIT)
|
||||
return "Maneuvering under secondary thrust."
|
||||
if(SHIP_STATUS_OVERMAP)
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
// But pick an empty z level to use
|
||||
map_z += global.using_map.get_empty_zlevel()
|
||||
. = ..()
|
||||
if(!map_z[1])
|
||||
log_and_message_admins("Could not create empty sector at [x], [y]. No available z levels to allocate.")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
testing("Temporary sector at [x],[y],[z] was created, corresponding zlevel is [english_list(map_z)].")
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/Destroy()
|
||||
@@ -22,6 +25,9 @@
|
||||
testing("Temporary sector at [x],[y] was destroyed, returning empty zlevel [map_z[1]] to map datum.")
|
||||
return ..()
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/find_z_levels()
|
||||
LAZYADD(map_z, global.using_map.get_empty_zlevel())
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/proc/is_empty(var/mob/observer)
|
||||
if(!LAZYLEN(map_z))
|
||||
log_and_message_admins("CANARY: [src] tried to check is_empty, but map_z is `[map_z || "null"]`")
|
||||
@@ -44,7 +50,10 @@
|
||||
var/obj/effect/overmap/visitable/sector/temporary/res = locate() in overmap_turf
|
||||
if(istype(res))
|
||||
return res
|
||||
return new /obj/effect/overmap/visitable/sector/temporary(overmap_turf)
|
||||
res = new /obj/effect/overmap/visitable/sector/temporary(overmap_turf)
|
||||
if(QDELETED(res))
|
||||
res = null
|
||||
return res
|
||||
|
||||
/atom/movable/proc/lost_in_space()
|
||||
for(var/atom/movable/AM in contents)
|
||||
@@ -130,8 +139,10 @@
|
||||
if(O != M && O.in_space && prob(50))
|
||||
TM = O
|
||||
break
|
||||
if(!TM)
|
||||
if(!istype(TM))
|
||||
TM = get_deepspace(M.x,M.y)
|
||||
if(!istype(TM))
|
||||
return
|
||||
nz = pick(TM.get_space_zlevels())
|
||||
|
||||
testing("spacetravel chose [nz],[ny],[nz] in sector [TM] @ ([TM.x],[TM.y],[TM.z])")
|
||||
@@ -143,5 +154,7 @@
|
||||
var/mob/D = A
|
||||
if(D.pulling)
|
||||
D.pulling.forceMove(dest)
|
||||
else
|
||||
to_world("CANARY: Could not move [A] to [nx], [ny], [nz]: [dest ? "[dest]" : "null"]")
|
||||
|
||||
M.cleanup()
|
||||
|
||||
@@ -105,11 +105,16 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/paper/Initialize(mapload)
|
||||
. = ..()
|
||||
/obj/item/weapon/paper/Initialize(mapload, var/text, var/title)
|
||||
. = ..()
|
||||
|
||||
if(mapload) // Jank, but we do this to prevent maploaded papers from somehow stacking across rounds if re-added to the board by a player.
|
||||
was_maploaded = TRUE
|
||||
if(istext(title))
|
||||
name = title
|
||||
if(istext(text))
|
||||
info = text
|
||||
|
||||
if(mapload) // Jank, but we do this to prevent maploaded papers from somehow stacking across rounds if re-added to the board by a player.
|
||||
was_maploaded = TRUE
|
||||
|
||||
/obj/item/weapon/paper/New(var/newloc, var/text, var/title)
|
||||
..()
|
||||
|
||||
@@ -24,6 +24,9 @@ var/global/list/map_count = list()
|
||||
var/floor_type = /turf/simulated/floor
|
||||
var/target_turf_type
|
||||
|
||||
var/skip_dense = FALSE
|
||||
var/keep_outside = FALSE
|
||||
|
||||
// Storage for the final iteration of the map.
|
||||
var/list/map = list() // Actual map.
|
||||
|
||||
@@ -61,11 +64,16 @@ var/global/list/map_count = list()
|
||||
rand_seed(seed)
|
||||
priority_process = 1
|
||||
|
||||
var/failed = FALSE
|
||||
for(var/i = 0;i<max_attempts;i++)
|
||||
if(generate())
|
||||
if(!do_not_announce) admin_notice("<span class='danger'>[capitalize(name)] generation completed in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</span>", R_DEBUG)
|
||||
return
|
||||
if(!do_not_announce) admin_notice("<span class='danger'>[capitalize(name)] failed to generate ([round(0.1*(world.timeofday-start_time),0.1)] seconds): could not produce sane map.</span>", R_DEBUG)
|
||||
if(!generate())
|
||||
failed = TRUE
|
||||
|
||||
if(!do_not_announce)
|
||||
if(!failed)
|
||||
admin_notice("<span class='danger'>[capitalize(name)] generation completed in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</span>", R_DEBUG)
|
||||
else
|
||||
admin_notice("<span class='danger'>[capitalize(name)] failed to generate ([round(0.1*(world.timeofday-start_time),0.1)] seconds): could not produce sane map.</span>", R_DEBUG)
|
||||
|
||||
/datum/random_map/proc/get_map_cell(var/x,var/y)
|
||||
if(!map)
|
||||
@@ -162,11 +170,11 @@ var/global/list/map_count = list()
|
||||
if(!current_cell)
|
||||
return 0
|
||||
var/turf/T = locate((origin_x-1)+x,(origin_y-1)+y,origin_z)
|
||||
if(!T || (target_turf_type && !istype(T,target_turf_type)))
|
||||
if(!T || (skip_dense && T.density) || (target_turf_type && !istype(T,target_turf_type)))
|
||||
return 0
|
||||
var/newpath = get_appropriate_path(map[current_cell])
|
||||
if(newpath)
|
||||
T.ChangeTurf(newpath)
|
||||
T.ChangeTurf(newpath, preserve_outdoors = keep_outside)
|
||||
get_additional_spawns(map[current_cell],T,get_spawn_dir(x, y))
|
||||
return T
|
||||
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
/obj/machinery/pump
|
||||
name = "fluid pump"
|
||||
desc = "A fluid pumping machine."
|
||||
|
||||
description_info = "A machine that can pump fluid from certain turfs.<br>\
|
||||
Water can be pumped from any body of water. Certain locations or environmental\
|
||||
conditions can cause different byproducts to be produced.<br>\
|
||||
Magma or Lava can be pumped to produce mineralized fluid."
|
||||
|
||||
anchored = 0
|
||||
density = 1
|
||||
|
||||
icon = 'icons/obj/machines/reagent.dmi'
|
||||
icon_state = "pump"
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/fluidpump
|
||||
active_power_usage = 200 * CELLRATE
|
||||
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/obj/item/hose_connector/output/Output = null
|
||||
var/reagents_per_cycle = 40
|
||||
var/on = 0
|
||||
var/unlocked = 0
|
||||
var/open = 0
|
||||
|
||||
/obj/machinery/pump/Initialize()
|
||||
create_reagents(200)
|
||||
. = ..()
|
||||
default_apply_parts()
|
||||
cell = default_use_hicell()
|
||||
|
||||
Output = new(src)
|
||||
|
||||
RefreshParts()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/pump/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
QDEL_NULL(Output)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/pump/RefreshParts()
|
||||
var/obj/item/weapon/stock_parts/manipulator/SM = locate() in component_parts
|
||||
active_power_usage = initial(active_power_usage) / SM.rating
|
||||
|
||||
var/motor_power = 0
|
||||
for(var/obj/item/weapon/stock_parts/motor/M in component_parts)
|
||||
motor_power += M.rating
|
||||
reagents_per_cycle = initial(reagents_per_cycle) * motor_power / 2
|
||||
|
||||
var/bin_size = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/SB in component_parts)
|
||||
bin_size += SB.rating
|
||||
|
||||
// New holder might have different volume. Transfer everything to a new holder to account for this.
|
||||
var/datum/reagents/R = new(round(initial(reagents.maximum_volume) + 100 * bin_size), src)
|
||||
src.reagents.trans_to_holder(R, src.reagents.total_volume)
|
||||
qdel(src.reagents)
|
||||
src.reagents = R
|
||||
|
||||
/obj/machinery/pump/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
add_overlay("[icon_state]-tank")
|
||||
if(!(cell?.check_charge(active_power_usage)))
|
||||
add_overlay("[icon_state]-lowpower")
|
||||
|
||||
if(reagents.total_volume >= 1)
|
||||
var/image/I = image(icon, "[icon_state]-volume")
|
||||
I.color = reagents.get_color()
|
||||
add_overlay(I)
|
||||
add_overlay("[icon_state]-glass")
|
||||
|
||||
if(open)
|
||||
add_overlay("[icon_state]-open")
|
||||
if(istype(cell))
|
||||
add_overlay("[icon_state]-cell")
|
||||
|
||||
icon_state = "[initial(icon_state)][on ? "-running" : ""]"
|
||||
|
||||
/obj/machinery/pump/process()
|
||||
if(!on)
|
||||
return
|
||||
|
||||
if(!anchored || !(cell?.use(active_power_usage)))
|
||||
set_state(FALSE)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
T.pump_reagents(reagents, reagents_per_cycle)
|
||||
update_icon()
|
||||
|
||||
if(Output.get_pairing())
|
||||
reagents.trans_to_holder(Output.reagents, Output.reagents.maximum_volume)
|
||||
if(prob(5))
|
||||
visible_message("<span class='notice'>\The [src] gurgles as it pumps fluid.</span>")
|
||||
|
||||
|
||||
// Sets the power state, if possible.
|
||||
// Returns TRUE/FALSE on power state changing
|
||||
// var/target = target power state
|
||||
// var/message = TRUE/FALSE whether to make a message about state change
|
||||
/obj/machinery/pump/proc/set_state(var/target, var/message = TRUE)
|
||||
if(target == on)
|
||||
return FALSE
|
||||
|
||||
if(!on && (!(cell?.check_charge(active_power_usage)) || !anchored))
|
||||
return FALSE
|
||||
|
||||
on = !on
|
||||
update_icon()
|
||||
if(message)
|
||||
if(on)
|
||||
message = SPAN_NOTICE("\The [src] turns on.")
|
||||
else
|
||||
message = SPAN_NOTICE("\The [src] shuts down.")
|
||||
visible_message(message)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/pump/attack_robot(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/pump/attack_ai(mob/user)
|
||||
if(!set_state(!on))
|
||||
to_chat(user, "<span class='notice'>You try to toggle \the [src] but it does not respond.</span>")
|
||||
|
||||
/obj/machinery/pump/attack_hand(mob/user)
|
||||
if(open && istype(cell))
|
||||
user.put_in_hands(cell)
|
||||
cell.add_fingerprint(user)
|
||||
cell.update_icon()
|
||||
cell = null
|
||||
set_state(FALSE)
|
||||
to_chat(user, "<span class='notice'>You remove the power cell.</span>")
|
||||
return
|
||||
|
||||
if(!set_state(!on))
|
||||
to_chat(user, "<span class='notice'>You try to toggle \the [src] but it does not respond.</span>")
|
||||
|
||||
/obj/machinery/pump/attackby(obj/item/weapon/W, mob/user)
|
||||
. = TRUE
|
||||
if(W.is_screwdriver() && !open)
|
||||
to_chat(user, SPAN_NOTICE("You [unlocked ? "screw" : "unscrew"] the battery panel."))
|
||||
unlocked = !unlocked
|
||||
|
||||
else if(W.is_crowbar() && unlocked)
|
||||
to_chat(user, open ? \
|
||||
"<span class='notice'>You crowbar the battery panel in place.</span>" : \
|
||||
"<span class='notice'>You remove the battery panel.</span>" \
|
||||
)
|
||||
open = !open
|
||||
|
||||
else if(W.is_wrench())
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>\The [src] is active. Turn it off before trying to move it!</span>")
|
||||
return FALSE
|
||||
default_unfasten_wrench(user, W, 2 SECONDS)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cell) && open)
|
||||
if(istype(cell))
|
||||
to_chat(user, "<span class='notice'>There is a power cell already installed.</span>")
|
||||
return FALSE
|
||||
user.drop_from_inventory(W, src)
|
||||
to_chat(user, "<span class='notice'>You insert the power cell.</span>")
|
||||
|
||||
else
|
||||
. = ..()
|
||||
|
||||
RefreshParts()
|
||||
update_icon()
|
||||
|
||||
|
||||
/turf/proc/pump_reagents()
|
||||
return
|
||||
|
||||
/turf/simulated/floor/lava/pump_reagents(var/datum/reagents/R, var/volume)
|
||||
. = ..()
|
||||
R.add_reagent("mineralizedfluid", round(volume / 2, 0.1))
|
||||
|
||||
|
||||
/turf/simulated/floor/water/pump_reagents(var/datum/reagents/R, var/volume)
|
||||
. = ..()
|
||||
R.add_reagent("water", round(volume, 0.1))
|
||||
|
||||
if(temperature <= T0C)
|
||||
R.add_reagent("ice", round(volume / 2, 0.1))
|
||||
|
||||
for(var/turf/simulated/mineral/M in orange(5))
|
||||
if(istype(M.mineral, /obj/effect/mineral))
|
||||
var/obj/effect/mineral/ore = M.mineral
|
||||
reagents.add_reagent(ore.ore_reagent, round(volume / 2, 0.1))
|
||||
|
||||
/turf/simulated/floor/water/pool/pump_reagents(var/datum/reagents/R, var/volume)
|
||||
. = ..()
|
||||
R.add_reagent("chlorine", round(volume / 10, 0.1))
|
||||
|
||||
/turf/simulated/floor/water/deep/pool/pump_reagents(var/datum/reagents/R, var/volume)
|
||||
. = ..()
|
||||
R.add_reagent("chlorine", round(volume / 10, 0.1))
|
||||
|
||||
/turf/simulated/floor/water/contaminated/pump_reagents(var/datum/reagents/R, var/volume)
|
||||
. = ..()
|
||||
R.add_reagent("vatstabilizer", round(volume / 2, 0.1))
|
||||
@@ -1122,14 +1122,12 @@
|
||||
name = "Neutralize Carpotoxin"
|
||||
id = "carpotoxin_neutral"
|
||||
result = "protein"
|
||||
required_reagents = list("radium" = 1, "carpotoxin" = 1, "sifsap" = 1)
|
||||
catalysts = list("sifsap" = 10)
|
||||
result_amount = 2
|
||||
required_reagents = list("enzyme" = 1, "carpotoxin" = 1, "sifsap" = 1)
|
||||
result_amount = 1
|
||||
|
||||
/decl/chemical_reaction/instant/neutralize_spidertoxin
|
||||
name = "Neutralize Spidertoxin"
|
||||
id = "spidertoxin_neutral"
|
||||
result = "protein"
|
||||
required_reagents = list("radium" = 1, "spidertoxin" = 1, "sifsap" = 1)
|
||||
catalysts = list("sifsap" = 10)
|
||||
result_amount = 2
|
||||
required_reagents = list("enzyme" = 1, "spidertoxin" = 1, "sifsap" = 1)
|
||||
result_amount = 1
|
||||
@@ -48,12 +48,15 @@
|
||||
|
||||
// This doesn't apply to skin contact - this is for, e.g. extinguishers and sprays. The difference is that reagent is not directly on the mob's skin - it might just be on their clothing.
|
||||
/datum/reagent/proc/touch_mob(var/mob/M, var/amount)
|
||||
SEND_SIGNAL(M, COMSIG_REAGENTS_TOUCH, src, amount)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/touch_obj(var/obj/O, var/amount) // Acid melting, cleaner cleaning, etc
|
||||
SEND_SIGNAL(O, COMSIG_REAGENTS_TOUCH, src, amount)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/touch_turf(var/turf/T, var/amount) // Cleaner cleaning, lube lubbing, etc, all go here
|
||||
SEND_SIGNAL(T, COMSIG_REAGENTS_TOUCH, src, amount)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_mob_life(var/mob/living/carbon/M, var/alien, var/datum/reagents/metabolism/location) // Currently, on_mob_life is called on carbons. Any interaction with non-carbon mobs (lube) will need to be done in touch_mob.
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
/datum/reagent/blood/touch_turf(var/turf/simulated/T)
|
||||
if(!istype(T) || volume < 3)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if(!data["donor"] || istype(data["donor"], /mob/living/carbon/human))
|
||||
blood_splatter(T, src, 1)
|
||||
else if(istype(data["donor"], /mob/living/carbon/alien))
|
||||
@@ -169,6 +172,8 @@
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/min_temperature = T0C + 100 // 100C, the boiling point of water
|
||||
|
||||
@@ -190,14 +195,19 @@
|
||||
T.wet_floor(1)
|
||||
|
||||
/datum/reagent/water/touch_obj(var/obj/O, var/amount)
|
||||
..()
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
|
||||
if(!cube.wrapped)
|
||||
cube.Expand()
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/cube))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/cube/cube = O
|
||||
cube.Expand()
|
||||
else
|
||||
O.water_act(amount / 5)
|
||||
|
||||
/datum/reagent/water/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
// First, kill slimes.
|
||||
if(istype(L, /mob/living/simple_mob/slime))
|
||||
@@ -252,6 +262,7 @@
|
||||
glass_desc = "Unless you are an industrial tool, this is probably not safe for consumption."
|
||||
|
||||
/datum/reagent/fuel/touch_turf(var/turf/T, var/amount)
|
||||
..()
|
||||
new /obj/effect/decal/cleanable/liquid_fuel(T, amount, FALSE)
|
||||
remove_self(amount)
|
||||
return
|
||||
@@ -261,5 +272,6 @@
|
||||
M.adjustToxLoss(4 * removed)
|
||||
|
||||
/datum/reagent/fuel/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 10) // Splashing people with welding fuel to make them easy to ignite!
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
M.ingested.remove_reagent(R.id, removed * effect)
|
||||
|
||||
/datum/reagent/carbon/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(!istype(T, /turf/space))
|
||||
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, T)
|
||||
if (!dirtoverlay)
|
||||
@@ -106,6 +107,7 @@
|
||||
allergen_factor = 0.5 //simulates mixed drinks containing less of the allergen, as they have only a single actual reagent unlike food
|
||||
|
||||
/datum/reagent/ethanol/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 15)
|
||||
|
||||
@@ -199,6 +201,7 @@
|
||||
M.hallucination = max(M.hallucination, halluci)
|
||||
|
||||
/datum/reagent/ethanol/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
var/obj/item/weapon/paper/paperaffected = O
|
||||
paperaffected.clearpaper()
|
||||
@@ -342,6 +345,7 @@
|
||||
M.adjustToxLoss(100)
|
||||
|
||||
/datum/reagent/radium/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 3)
|
||||
if(!istype(T, /turf/space))
|
||||
var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T)
|
||||
@@ -430,6 +434,7 @@
|
||||
M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit
|
||||
|
||||
/datum/reagent/acid/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(O.unacidable)
|
||||
return
|
||||
if((istype(O, /obj/item) || istype(O, /obj/effect/plant)) && (volume > meltdose))
|
||||
|
||||
@@ -170,6 +170,8 @@
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
var/hotspot = (locate(/obj/fire) in T)
|
||||
if(hotspot && !istype(T, /turf/space))
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air(T:air:total_moles)
|
||||
@@ -386,6 +388,7 @@
|
||||
allergen_type = ALLERGEN_GRAINS //Flour is made from grain
|
||||
|
||||
/datum/reagent/nutriment/flour/touch_turf(var/turf/simulated/T)
|
||||
..()
|
||||
if(!istype(T, /turf/space))
|
||||
new /obj/effect/decal/cleanable/flour(T)
|
||||
|
||||
@@ -565,6 +568,7 @@
|
||||
glass_desc = "Durian paste. It smells horrific."
|
||||
|
||||
/datum/reagent/nutriment/durian/touch_mob(var/mob/M, var/amount)
|
||||
..()
|
||||
if(iscarbon(M) && !M.isSynthetic())
|
||||
var/message = pick("Oh god, it smells disgusting here.", "What is that stench?", "That's an awful odor.")
|
||||
to_chat(M, "<span class='alien'>[message]</span>")
|
||||
@@ -574,6 +578,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/reagent/nutriment/durian/touch_turf(var/turf/T, var/amount)
|
||||
..()
|
||||
if(istype(T))
|
||||
var/obj/effect/decal/cleanable/chemcoating/C = new /obj/effect/decal/cleanable/chemcoating(T)
|
||||
C.reagents.add_reagent(id, amount)
|
||||
|
||||
@@ -346,6 +346,7 @@
|
||||
M.adjustToxLoss(3 * removed)
|
||||
|
||||
/datum/reagent/tricorlidaze/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/stack/medical/bruise_pack) && round(volume) >= 5)
|
||||
var/obj/item/stack/medical/bruise_pack/C = O
|
||||
var/packname = C.name
|
||||
@@ -1272,6 +1273,7 @@
|
||||
M.add_chemical_effect(CE_PAINKILLER, 20 * M.species.chem_strength_pain) // 5 less than paracetamol.
|
||||
|
||||
/datum/reagent/spacomycaze/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/stack/medical/crude_pack) && round(volume) >= 1)
|
||||
var/obj/item/stack/medical/crude_pack/C = O
|
||||
var/packname = C.name
|
||||
@@ -1308,10 +1310,12 @@
|
||||
M.adjustToxLoss(2 * removed)
|
||||
|
||||
/datum/reagent/sterilizine/touch_obj(var/obj/O)
|
||||
..()
|
||||
O.germ_level -= min(volume*20, O.germ_level)
|
||||
O.was_bloodied = null
|
||||
|
||||
/datum/reagent/sterilizine/touch_turf(var/turf/T)
|
||||
..()
|
||||
T.germ_level -= min(volume*20, T.germ_level)
|
||||
for(var/obj/item/I in T.contents)
|
||||
I.was_bloodied = null
|
||||
@@ -1325,6 +1329,7 @@
|
||||
//VOREstation edit end
|
||||
|
||||
/datum/reagent/sterilizine/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
if(istype(L, /mob/living/simple_mob/slime))
|
||||
var/mob/living/simple_mob/slime/S = L
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
affect_blood(M, alien, removed * 0.6)
|
||||
|
||||
/datum/reagent/modapplying/cryofluid/touch_mob(var/mob/M, var/amount)
|
||||
..()
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
for(var/I = 1 to rand(1, round(amount + 1)))
|
||||
@@ -49,6 +50,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/modapplying/cryofluid/touch_turf(var/turf/T, var/amount)
|
||||
..()
|
||||
if(istype(T, /turf/simulated/floor/water) && prob(amount))
|
||||
T.visible_message("<span class='danger'>\The [T] crackles loudly as the cryogenic fluid causes it to boil away, leaving behind a hard layer of ice.</span>")
|
||||
T.ChangeTurf(/turf/simulated/floor/outdoors/ice, 1, 1, TRUE)
|
||||
|
||||
@@ -114,14 +114,17 @@
|
||||
color_weight = 20
|
||||
|
||||
/datum/reagent/paint/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(istype(T) && !istype(T, /turf/space))
|
||||
T.color = color
|
||||
|
||||
/datum/reagent/paint/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O))
|
||||
O.color = color
|
||||
|
||||
/datum/reagent/paint/touch_mob(var/mob/M)
|
||||
..()
|
||||
if(istype(M) && !istype(M, /mob/observer)) //painting ghosts: not allowed
|
||||
M.color = color //maybe someday change this to paint only clothes and exposed body parts for human mobs.
|
||||
|
||||
@@ -267,6 +270,7 @@
|
||||
M.apply_effect(5 * removed, IRRADIATE, 0)
|
||||
|
||||
/datum/reagent/uranium/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 3)
|
||||
if(!istype(T, /turf/space))
|
||||
var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T)
|
||||
@@ -288,7 +292,7 @@
|
||||
name = "Lithium-6"
|
||||
id = "lithium6"
|
||||
description = "An isotope of lithium. It has 3 neutrons, but shares all chemical characteristics with regular lithium."
|
||||
|
||||
|
||||
/datum/reagent/helium/helium3
|
||||
name = "Helium-3"
|
||||
id = "helium3"
|
||||
@@ -321,11 +325,11 @@
|
||||
/datum/reagent/supermatter/affect_ingest(mob/living/carbon/M, alien, removed)
|
||||
. = ..()
|
||||
M.ash()
|
||||
|
||||
|
||||
/datum/reagent/supermatter/affect_blood(mob/living/carbon/M, alien, removed)
|
||||
. = ..()
|
||||
M.ash()
|
||||
|
||||
|
||||
|
||||
/datum/reagent/adrenaline
|
||||
name = "Adrenaline"
|
||||
@@ -361,6 +365,7 @@
|
||||
cult.remove_antagonist(M.mind)
|
||||
|
||||
/datum/reagent/water/holywater/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 5)
|
||||
T.holy = 1
|
||||
return
|
||||
@@ -408,6 +413,7 @@
|
||||
touch_met = 50
|
||||
|
||||
/datum/reagent/thermite/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 5)
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = T
|
||||
@@ -417,6 +423,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/thermite/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 5)
|
||||
|
||||
@@ -433,14 +440,17 @@
|
||||
touch_met = 50
|
||||
|
||||
/datum/reagent/space_cleaner/touch_mob(var/mob/M)
|
||||
..()
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.clean_blood()
|
||||
|
||||
/datum/reagent/space_cleaner/touch_obj(var/obj/O)
|
||||
..()
|
||||
O.clean_blood()
|
||||
|
||||
/datum/reagent/space_cleaner/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 1)
|
||||
if(istype(T, /turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
@@ -488,6 +498,7 @@
|
||||
M.vomit()
|
||||
|
||||
/datum/reagent/space_cleaner/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.wear_mask)
|
||||
@@ -506,6 +517,7 @@
|
||||
color = "#009CA8"
|
||||
|
||||
/datum/reagent/lube/touch_turf(var/turf/simulated/T)
|
||||
..()
|
||||
if(!istype(T))
|
||||
return
|
||||
if(volume >= 1)
|
||||
@@ -520,6 +532,7 @@
|
||||
color = "#C7FFFF"
|
||||
|
||||
/datum/reagent/silicate/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/structure/window))
|
||||
var/obj/structure/window/W = O
|
||||
W.apply_silicate(volume)
|
||||
@@ -593,9 +606,11 @@
|
||||
color = "#F2F3F4"
|
||||
|
||||
/datum/reagent/luminol/touch_obj(var/obj/O)
|
||||
..()
|
||||
O.reveal_blood()
|
||||
|
||||
/datum/reagent/luminol/touch_mob(var/mob/living/L)
|
||||
..()
|
||||
L.reveal_blood()
|
||||
|
||||
/datum/reagent/nutriment/biomass
|
||||
@@ -631,13 +646,14 @@
|
||||
M.adjustToxLoss(2 * removed)
|
||||
M.adjustCloneLoss(2 * removed)
|
||||
|
||||
/datum/reagent/fishbait
|
||||
/datum/reagent/nutriment/fishbait
|
||||
name = "Fish Bait"
|
||||
id = "fishbait"
|
||||
description = "A natural slurry that particularily appeals to fish."
|
||||
taste_description = "earthy"
|
||||
taste_description = "slimy dirt"
|
||||
reagent_state = LIQUID
|
||||
color = "#62764E"
|
||||
nutriment_factor = 15
|
||||
|
||||
//YW Edit Start
|
||||
/datum/reagent/nutriment/paper //Paper is made from cellulose. You can eat it. It doesn't fill you up very much at all.
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
/datum/reagent/toxin/neurotoxic_protein
|
||||
name = "toxic protein"
|
||||
id = "neurotoxic_protein"
|
||||
description = "A weak neurotoxic chemical commonly found in Sivian fish meat."
|
||||
description = "A weak neurotoxic chemical."
|
||||
taste_description = "fish"
|
||||
reagent_state = LIQUID
|
||||
color = "#005555"
|
||||
@@ -96,6 +96,7 @@
|
||||
var/fire_mult = 30
|
||||
|
||||
/datum/reagent/toxin/hydrophoron/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / fire_mult)
|
||||
|
||||
@@ -107,6 +108,7 @@
|
||||
/datum/reagent/toxin/hydrophoron/touch_turf(var/turf/simulated/T)
|
||||
if(!istype(T))
|
||||
return
|
||||
..()
|
||||
T.assume_gas("phoron", CEILING(volume/2, 1), T20C)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,T))
|
||||
target_tile.assume_gas("phoron", volume/2, 400+T0C)
|
||||
@@ -148,6 +150,7 @@
|
||||
skin_danger = 1
|
||||
|
||||
/datum/reagent/toxin/phoron/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 5)
|
||||
|
||||
@@ -169,6 +172,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T, var/amount)
|
||||
..()
|
||||
if(!istype(T))
|
||||
return
|
||||
T.assume_gas("volatile_fuel", amount, T20C)
|
||||
@@ -390,6 +394,7 @@
|
||||
color = "#e67819"
|
||||
|
||||
/datum/reagent/toxin/fertilizer/tannin/touch_obj(var/obj/O, var/volume)
|
||||
..()
|
||||
if(istype(O, /obj/item/stack/hairlesshide))
|
||||
var/obj/item/stack/hairlesshide/HH = O
|
||||
HH.rapidcure(round(volume))
|
||||
@@ -405,6 +410,7 @@
|
||||
strength = 4
|
||||
|
||||
/datum/reagent/toxin/plantbgone/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = T
|
||||
if(locate(/obj/effect/overlay/wallrot) in W)
|
||||
@@ -413,6 +419,7 @@
|
||||
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!</span>")
|
||||
|
||||
/datum/reagent/toxin/plantbgone/touch_obj(var/obj/O, var/volume)
|
||||
..()
|
||||
if(istype(O, /obj/effect/plant))
|
||||
qdel(O)
|
||||
else if(istype(O, /obj/effect/alien/weeds/))
|
||||
|
||||
@@ -1445,4 +1445,14 @@
|
||||
item_state = "revclaymoremob"
|
||||
force = 1
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
edge = TRUE
|
||||
|
||||
//PastelPrinceDan - Kiyoshi/Masumi Maki
|
||||
/obj/item/toy/plushie/fluff/slimeowshi
|
||||
name = "Slime-Cat Research Director plushie"
|
||||
desc = "An adorable stuffed toy that resembles a slime. It's pink, and has little cat ears, as well as a tail! Atop its head is a small beret with a Research Director's insignia."
|
||||
icon = 'icons/vore/custom_items_vr.dmi'
|
||||
icon_state = "kimeowshi"
|
||||
attack_verb = list("blorbled", "slimed", "absorbed", "glomped")
|
||||
gender = PLURAL // this seems like a good idea but probably prone to changing. todo: ask dan
|
||||
// the only reason this thought is relevant because the base slimeplush has its gender set to female
|
||||
@@ -14,6 +14,15 @@
|
||||
if(A)
|
||||
contain(A)
|
||||
|
||||
else
|
||||
for(var/obj/Ob in loc)
|
||||
if(can_contain(Ob))
|
||||
contain(Ob)
|
||||
break
|
||||
|
||||
/obj/structure/anomaly_container/proc/can_contain(var/obj/O)
|
||||
return O.is_anomalous()
|
||||
|
||||
/obj/structure/anomaly_container/attack_hand(var/mob/user)
|
||||
release()
|
||||
|
||||
@@ -37,7 +46,11 @@
|
||||
underlays.Cut()
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/machinery/artifact/MouseDrop(var/obj/structure/anomaly_container/over_object)
|
||||
if(istype(over_object) && Adjacent(over_object) && CanMouseDrop(over_object, usr))
|
||||
Bumped(usr)
|
||||
over_object.contain(src)
|
||||
/atom/MouseDrop(var/obj/structure/anomaly_container/over_object)
|
||||
. = ..()
|
||||
|
||||
if(istype(over_object))
|
||||
if(!QDELETED(src) && istype(loc, /turf) && is_anomalous() && Adjacent(over_object) && CanMouseDrop(over_object, usr))
|
||||
Bumped(usr)
|
||||
over_object.contain(src)
|
||||
|
||||
|
||||
@@ -5,42 +5,25 @@
|
||||
icon_state = "ano00"
|
||||
var/icon_num = 0
|
||||
density = TRUE
|
||||
var/datum/artifact_effect/my_effect
|
||||
var/datum/artifact_effect/secondary_effect
|
||||
var/being_used = 0
|
||||
|
||||
var/predefined_effects = FALSE
|
||||
|
||||
var/predefined_primary
|
||||
var/predefined_secondary
|
||||
|
||||
var/predefined_icon_num
|
||||
|
||||
var/predefined_triggers = FALSE
|
||||
var/datum/component/artifact_master/artifact_master = /datum/component/artifact_master
|
||||
|
||||
var/predefined_trig_primary
|
||||
var/predefined_trig_secondary
|
||||
var/being_used = 0
|
||||
|
||||
/obj/machinery/artifact/New()
|
||||
..()
|
||||
|
||||
if(predefined_effects && predefined_primary)
|
||||
my_effect = new predefined_primary(src)
|
||||
if(ispath(artifact_master))
|
||||
AddComponent(artifact_master)
|
||||
|
||||
if(predefined_secondary)
|
||||
secondary_effect = new predefined_secondary(src)
|
||||
if(prob(75))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
artifact_master = GetComponent(artifact_master)
|
||||
|
||||
else
|
||||
var/effecttype = pick(subtypesof(/datum/artifact_effect))
|
||||
my_effect = new effecttype(src)
|
||||
if(!istype(artifact_master))
|
||||
return
|
||||
|
||||
if(prob(75))
|
||||
effecttype = pick(subtypesof(/datum/artifact_effect))
|
||||
secondary_effect = new effecttype(src)
|
||||
if(prob(75))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
var/datum/artifact_effect/my_effect = artifact_master.get_primary()
|
||||
|
||||
if(!isnull(predefined_icon_num))
|
||||
icon_num = predefined_icon_num
|
||||
@@ -77,299 +60,10 @@
|
||||
if(prob(60))
|
||||
my_effect.trigger = pick(TRIGGER_TOUCH, TRIGGER_HEAT, TRIGGER_COLD, TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO)
|
||||
|
||||
if(predefined_triggers)
|
||||
if(predefined_trig_primary && my_effect)
|
||||
my_effect.trigger = predefined_trig_primary
|
||||
|
||||
if(predefined_trig_secondary && secondary_effect)
|
||||
secondary_effect.trigger = predefined_trig_secondary
|
||||
|
||||
/obj/machinery/artifact/proc/choose_effect()
|
||||
var/effect_type = tgui_input_list(usr, "What type do you want?", "Effect Type", subtypesof(/datum/artifact_effect))
|
||||
if(effect_type)
|
||||
my_effect = new effect_type(src)
|
||||
if(tgui_alert(usr, "Do you want a secondary effect?", "Second Effect", list("No", "Yes")) == "Yes")
|
||||
var/second_effect_type = tgui_input_list(usr, "What type do you want as well?", "Second Effect Type", subtypesof(/datum/artifact_effect) - effect_type)
|
||||
secondary_effect = new second_effect_type(src)
|
||||
else
|
||||
secondary_effect = null
|
||||
|
||||
|
||||
/obj/machinery/artifact/process()
|
||||
var/turf/L = loc
|
||||
if(!istype(L)) // We're inside a container or on null turf, either way stop processing effects
|
||||
return
|
||||
|
||||
if(my_effect)
|
||||
my_effect.process()
|
||||
if(secondary_effect)
|
||||
secondary_effect.process()
|
||||
|
||||
if(pulledby)
|
||||
Bumped(pulledby)
|
||||
|
||||
//if either of our effects rely on environmental factors, work that out
|
||||
var/trigger_cold = 0
|
||||
var/trigger_hot = 0
|
||||
var/trigger_phoron = 0
|
||||
var/trigger_oxy = 0
|
||||
var/trigger_co2 = 0
|
||||
var/trigger_nitro = 0
|
||||
if( (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) || (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) )
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
if(env)
|
||||
if(env.temperature < 225)
|
||||
trigger_cold = 1
|
||||
else if(env.temperature > 375)
|
||||
trigger_hot = 1
|
||||
|
||||
if(env.gas["phoron"] >= 10)
|
||||
trigger_phoron = 1
|
||||
if(env.gas["oxygen"] >= 10)
|
||||
trigger_oxy = 1
|
||||
if(env.gas["carbon_dioxide"] >= 10)
|
||||
trigger_co2 = 1
|
||||
if(env.gas["nitrogen"] >= 10)
|
||||
trigger_nitro = 1
|
||||
|
||||
//COLD ACTIVATION
|
||||
if(trigger_cold)
|
||||
if(my_effect.trigger == TRIGGER_COLD && !my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else
|
||||
if(my_effect.trigger == TRIGGER_COLD && my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
//HEAT ACTIVATION
|
||||
if(trigger_hot)
|
||||
if(my_effect.trigger == TRIGGER_HEAT && !my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else
|
||||
if(my_effect.trigger == TRIGGER_HEAT && my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
//PHORON GAS ACTIVATION
|
||||
if(trigger_phoron)
|
||||
if(my_effect.trigger == TRIGGER_PHORON && !my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else
|
||||
if(my_effect.trigger == TRIGGER_PHORON && my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
//OXYGEN GAS ACTIVATION
|
||||
if(trigger_oxy)
|
||||
if(my_effect.trigger == TRIGGER_OXY && !my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else
|
||||
if(my_effect.trigger == TRIGGER_OXY && my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
//CO2 GAS ACTIVATION
|
||||
if(trigger_co2)
|
||||
if(my_effect.trigger == TRIGGER_CO2 && !my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else
|
||||
if(my_effect.trigger == TRIGGER_CO2 && my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
//NITROGEN GAS ACTIVATION
|
||||
if(trigger_nitro)
|
||||
if(my_effect.trigger == TRIGGER_NITRO && !my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else
|
||||
if(my_effect.trigger == TRIGGER_NITRO && my_effect.activated)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
/obj/machinery/artifact/attack_hand(var/mob/user as mob)
|
||||
if (get_dist(user, src) > 1)
|
||||
to_chat(user, "<font color='red'>You can't reach [src] from here.</font>")
|
||||
return
|
||||
if(ishuman(user) && user:gloves)
|
||||
to_chat(user, "<b>You touch [src]</b> with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].")
|
||||
return
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(my_effect.trigger == TRIGGER_TOUCH)
|
||||
to_chat(user, "<b>You touch [src].</b>")
|
||||
my_effect.ToggleActivate()
|
||||
else
|
||||
to_chat(user, "<b>You touch [src],</b> [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].")
|
||||
|
||||
if(prob(25) && secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH)
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
if (my_effect.effect == EFFECT_TOUCH)
|
||||
my_effect.DoEffectTouch(user)
|
||||
|
||||
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated)
|
||||
secondary_effect.DoEffectTouch(user)
|
||||
|
||||
/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/reagent_containers/))
|
||||
if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1))
|
||||
if(my_effect.trigger == TRIGGER_WATER)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else if(W.reagents.has_reagent("sacid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1))
|
||||
if(my_effect.trigger == TRIGGER_ACID)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_ACID && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else if(W.reagents.has_reagent("phoron", 1) || W.reagents.has_reagent("thermite", 1))
|
||||
if(my_effect.trigger == TRIGGER_VOLATILE)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_VOLATILE && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else if(W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amatoxin", 1) || W.reagents.has_reagent("neurotoxin", 1))
|
||||
if(my_effect.trigger == TRIGGER_TOXIN)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOXIN && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else if(istype(W,/obj/item/weapon/melee/baton) && W:status ||\
|
||||
istype(W,/obj/item/weapon/melee/energy) ||\
|
||||
istype(W,/obj/item/weapon/melee/cultblade) ||\
|
||||
istype(W,/obj/item/weapon/card/emag) ||\
|
||||
istype(W,/obj/item/device/multitool))
|
||||
if (my_effect.trigger == TRIGGER_ENERGY)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
else if (istype(W,/obj/item/weapon/flame) && W:lit ||\
|
||||
istype(W,/obj/item/weapon/weldingtool) && W:welding)
|
||||
if(my_effect.trigger == TRIGGER_HEAT)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else
|
||||
..()
|
||||
if (my_effect.trigger == TRIGGER_FORCE && W.force >= 10)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
/obj/machinery/artifact/Bumped(M as mob|obj)
|
||||
..()
|
||||
if(istype(M,/obj))
|
||||
if(M:throwforce >= 10)
|
||||
if(my_effect.trigger == TRIGGER_FORCE)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves))
|
||||
var/warn = 0
|
||||
|
||||
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
|
||||
my_effect.ToggleActivate()
|
||||
warn = 1
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
warn = 1
|
||||
|
||||
if (my_effect.effect == EFFECT_TOUCH && prob(50))
|
||||
my_effect.DoEffectTouch(M)
|
||||
warn = 1
|
||||
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50))
|
||||
secondary_effect.DoEffectTouch(M)
|
||||
warn = 1
|
||||
|
||||
if(warn)
|
||||
to_chat(M, "<b>You accidentally touch \the [src].</b>")
|
||||
/obj/machinery/artifact/update_icon()
|
||||
..()
|
||||
|
||||
/obj/machinery/artifact/Bump(var/atom/bumped)
|
||||
if(istype(bumped,/obj))
|
||||
if(bumped:throwforce >= 10)
|
||||
if(my_effect.trigger == TRIGGER_FORCE)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
else if(ishuman(bumped) && GetAnomalySusceptibility(bumped) >= 0.5)
|
||||
var/warn = 0
|
||||
|
||||
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
|
||||
my_effect.ToggleActivate()
|
||||
warn = 1
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
warn = 1
|
||||
|
||||
if (my_effect.effect == EFFECT_TOUCH && prob(50))
|
||||
my_effect.DoEffectTouch(bumped)
|
||||
warn = 1
|
||||
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50))
|
||||
secondary_effect.DoEffectTouch(bumped)
|
||||
warn = 1
|
||||
|
||||
if(warn)
|
||||
to_chat(bumped, "<b>You accidentally touch \the [src] as it hits you.</b>")
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P)
|
||||
if(istype(P,/obj/item/projectile/bullet))
|
||||
if(my_effect.trigger == TRIGGER_FORCE)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
else if(istype(P,/obj/item/projectile/beam) ||\
|
||||
istype(P,/obj/item/projectile/ion) ||\
|
||||
istype(P,/obj/item/projectile/energy))
|
||||
if(my_effect.trigger == TRIGGER_ENERGY)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
/obj/machinery/artifact/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0) qdel(src)
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
else
|
||||
if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
if(3.0)
|
||||
if (my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
|
||||
my_effect.ToggleActivate()
|
||||
if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
return
|
||||
|
||||
/obj/machinery/artifact/Moved()
|
||||
. = ..()
|
||||
if(my_effect)
|
||||
my_effect.UpdateMove()
|
||||
if(secondary_effect)
|
||||
secondary_effect.UpdateMove()
|
||||
if(LAZYLEN(artifact_master.get_active_effects()))
|
||||
icon_state = "ano[icon_num]1"
|
||||
else
|
||||
icon_state = "ano[icon_num]0"
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
/obj/machinery/artifact/predefined
|
||||
name = "alien artifact"
|
||||
desc = "A large alien device."
|
||||
|
||||
predefined_effects = TRUE
|
||||
|
||||
predefined_primary = null
|
||||
predefined_secondary = null
|
||||
|
||||
predefined_icon_num = null
|
||||
|
||||
predefined_triggers = FALSE
|
||||
|
||||
predefined_trig_primary = null
|
||||
predefined_trig_secondary = null
|
||||
desc = "A large alien device."
|
||||
@@ -2,14 +2,12 @@
|
||||
name = "alien artifact"
|
||||
desc = "A large alien device."
|
||||
|
||||
predefined_effects = TRUE
|
||||
|
||||
predefined_primary = /datum/artifact_effect/animate_anomaly
|
||||
predefined_secondary = /datum/artifact_effect/vampire
|
||||
artifact_master = /datum/component/artifact_master/hungry_statue
|
||||
|
||||
predefined_icon_num = 14
|
||||
|
||||
predefined_triggers = TRUE
|
||||
|
||||
predefined_trig_primary = TRIGGER_OXY
|
||||
predefined_trig_secondary = TRIGGER_OXY
|
||||
/datum/component/artifact_master/hungry_statue
|
||||
make_effects = list(
|
||||
/datum/artifact_effect/animate_anomaly,
|
||||
/datum/artifact_effect/vampire
|
||||
)
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
var/obj/O = new spawn_type(get_turf(src))
|
||||
if(istype(O, /obj/machinery/artifact))
|
||||
var/obj/machinery/artifact/X = O
|
||||
if(X.my_effect)
|
||||
X.my_effect.artifact_id = artifact_find.artifact_id
|
||||
if(X.artifact_master)
|
||||
X.artifact_master.artifact_id = artifact_find.artifact_id
|
||||
O.anchored = FALSE // Anchored finds are lame.
|
||||
src.visible_message("<span class='warning'>\The [src] suddenly crumbles away.</span>")
|
||||
else
|
||||
|
||||
@@ -3,19 +3,47 @@
|
||||
var/effect = EFFECT_TOUCH
|
||||
var/effectrange = 4
|
||||
var/trigger = TRIGGER_TOUCH
|
||||
var/atom/holder
|
||||
var/datum/component/artifact_master/master
|
||||
var/activated = 0
|
||||
var/chargelevel = 0
|
||||
var/chargelevel = 1
|
||||
var/chargelevelmax = 10
|
||||
var/artifact_id = ""
|
||||
var/effect_type = 0
|
||||
|
||||
/datum/artifact_effect/New(var/atom/location)
|
||||
var/req_type = /atom/movable
|
||||
|
||||
var/image/active_effect
|
||||
var/effect_icon = 'icons/effects/effects.dmi'
|
||||
var/effect_state = "sparkles"
|
||||
var/effect_color = "#ffffff"
|
||||
|
||||
// The last time the effect was toggled.
|
||||
var/last_activation = 0
|
||||
|
||||
/datum/artifact_effect/Destroy()
|
||||
if(master)
|
||||
master = null
|
||||
..()
|
||||
holder = location
|
||||
|
||||
/datum/artifact_effect/proc/get_master_holder() // Return the effectmaster's holder, if it is set to an effectmaster. Otherwise, master is the target object.
|
||||
if(istype(master))
|
||||
return master.holder
|
||||
else
|
||||
return master
|
||||
|
||||
/datum/artifact_effect/New(var/datum/component/artifact_master/newmaster)
|
||||
..()
|
||||
|
||||
master = newmaster
|
||||
effect = rand(0, MAX_EFFECT)
|
||||
trigger = rand(0, MAX_TRIGGER)
|
||||
|
||||
if(effect_icon && effect_state)
|
||||
if(effect_state == "sparkles")
|
||||
effect_state = "sparkles_[rand(1,4)]"
|
||||
active_effect = image(effect_icon, effect_state)
|
||||
active_effect.color = effect_color
|
||||
|
||||
//this will be replaced by the excavation code later, but it's here just in case
|
||||
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
|
||||
|
||||
@@ -36,21 +64,32 @@
|
||||
|
||||
/datum/artifact_effect/proc/ToggleActivate(var/reveal_toggle = 1)
|
||||
//so that other stuff happens first
|
||||
spawn(0)
|
||||
set waitfor = FALSE
|
||||
|
||||
var/atom/target = get_master_holder()
|
||||
|
||||
if(world.time - last_activation > 1 SECOND)
|
||||
last_activation = world.time
|
||||
if(activated)
|
||||
activated = 0
|
||||
else
|
||||
activated = 1
|
||||
if(reveal_toggle && holder)
|
||||
if(istype(holder, /obj/machinery/artifact))
|
||||
var/obj/machinery/artifact/A = holder
|
||||
A.icon_state = "ano[A.icon_num][activated]"
|
||||
if(reveal_toggle && target)
|
||||
if(!isliving(target))
|
||||
target.update_icon()
|
||||
var/display_msg
|
||||
if(activated)
|
||||
display_msg = pick("momentarily glows brightly!","distorts slightly for a moment!","flickers slightly!","vibrates!","shimmers slightly for a moment!")
|
||||
else
|
||||
display_msg = pick("grows dull!","fades in intensity!","suddenly becomes very still!","suddenly becomes very quiet!")
|
||||
var/atom/toplevelholder = holder
|
||||
|
||||
if(active_effect)
|
||||
if(activated)
|
||||
target.underlays.Add(active_effect)
|
||||
else
|
||||
target.underlays.Remove(active_effect)
|
||||
|
||||
var/atom/toplevelholder = target
|
||||
while(!istype(toplevelholder.loc, /turf))
|
||||
toplevelholder = toplevelholder.loc
|
||||
toplevelholder.visible_message("<font color='red'>[bicon(toplevelholder)] [toplevelholder] [display_msg]</font>")
|
||||
|
||||
@@ -0,0 +1,421 @@
|
||||
|
||||
/*
|
||||
* Here there be the base component for artifacts.
|
||||
*/
|
||||
|
||||
/atom/proc/is_anomalous()
|
||||
return (GetComponent(/datum/component/artifact_master))
|
||||
|
||||
/atom/proc/become_anomalous()
|
||||
if(!is_anomalous())
|
||||
AddComponent(/datum/component/artifact_master)
|
||||
if(istype(src, /obj/item))
|
||||
var/obj/item/I = src
|
||||
LAZYINITLIST(I.origin_tech)
|
||||
if(prob(50))
|
||||
I.origin_tech[TECH_PRECURSOR] += 1
|
||||
else
|
||||
I.origin_tech[TECH_ARCANE] += 1
|
||||
var/rand_tech = pick(\
|
||||
TECH_MATERIAL,\
|
||||
TECH_ENGINEERING,\
|
||||
TECH_PHORON,\
|
||||
TECH_POWER,\
|
||||
TECH_BLUESPACE,\
|
||||
TECH_BIO,\
|
||||
TECH_COMBAT,\
|
||||
TECH_MAGNET,\
|
||||
TECH_DATA,\
|
||||
TECH_ILLEGAL\
|
||||
)
|
||||
LAZYSET(I.origin_tech, rand_tech, rand(4,7))
|
||||
|
||||
/datum/component/artifact_master
|
||||
var/atom/holder
|
||||
var/list/my_effects
|
||||
|
||||
dupe_type = /datum/component/artifact_master
|
||||
|
||||
var/effect_generation_chance = 100
|
||||
|
||||
var/list/make_effects
|
||||
|
||||
var/artifact_id
|
||||
|
||||
/datum/component/artifact_master/New()
|
||||
. = ..()
|
||||
holder = parent
|
||||
|
||||
if(!holder)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
my_effects = list()
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
do_setup()
|
||||
return
|
||||
|
||||
/*
|
||||
* Component System Registry.
|
||||
* Here be dragons.
|
||||
*/
|
||||
|
||||
/datum/component/artifact_master/proc/DoRegistry()
|
||||
//Melee Hit
|
||||
RegisterSignal(holder, COMSIG_PARENT_ATTACKBY, /datum/component/artifact_master/proc/on_attackby, override = FALSE)
|
||||
//Explosions
|
||||
RegisterSignal(holder, COMSIG_ATOM_EX_ACT, /datum/component/artifact_master/proc/on_exact, override = FALSE)
|
||||
//Bullets
|
||||
RegisterSignal(holder, COMSIG_ATOM_BULLET_ACT, /datum/component/artifact_master/proc/on_bullet, override = FALSE)
|
||||
|
||||
//Attackhand
|
||||
RegisterSignal(holder, COMSIG_ATOM_ATTACK_HAND, /datum/component/artifact_master/proc/on_attack_hand, override = FALSE)
|
||||
|
||||
//Bumped / Bumping
|
||||
RegisterSignal(holder, COMSIG_MOVABLE_BUMP, /datum/component/artifact_master/proc/on_bump, override = FALSE)
|
||||
RegisterSignal(holder, COMSIG_ATOM_BUMPED, /datum/component/artifact_master/proc/on_bumped, override = FALSE)
|
||||
|
||||
//Moved
|
||||
RegisterSignal(holder, COMSIG_MOVABLE_MOVED, /datum/component/artifact_master/proc/on_moved, override = FALSE)
|
||||
|
||||
//Splashed with a reagent.
|
||||
RegisterSignal(holder, COMSIG_REAGENTS_TOUCH, /datum/component/artifact_master/proc/on_reagent, override = FALSE)
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
/datum/component/artifact_master/proc/get_active_effects()
|
||||
var/list/active_effects = list()
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
if(my_effect.activated)
|
||||
active_effects |= my_effect
|
||||
|
||||
return active_effects
|
||||
|
||||
/datum/component/artifact_master/proc/add_effect()
|
||||
var/effect_type = input(usr, "What type do you want?", "Effect Type") as null|anything in subtypesof(/datum/artifact_effect)
|
||||
if(effect_type)
|
||||
var/datum/artifact_effect/my_effect = new effect_type(src)
|
||||
if(istype(holder, my_effect.req_type))
|
||||
my_effects += my_effect
|
||||
|
||||
else
|
||||
to_chat(usr, "This effect can not be applied to this atom type.")
|
||||
qdel(my_effect)
|
||||
|
||||
/datum/component/artifact_master/proc/remove_effect()
|
||||
var/to_remove_effect = input(usr, "What effect do you want to remove?", "Remove Effect") as null|anything in my_effects
|
||||
|
||||
if(to_remove_effect)
|
||||
var/datum/artifact_effect/AE = to_remove_effect
|
||||
my_effects.Remove(to_remove_effect)
|
||||
qdel(AE)
|
||||
|
||||
/datum/component/artifact_master/Destroy()
|
||||
holder = null
|
||||
for(var/datum/artifact_effect/AE in my_effects)
|
||||
AE.master = null
|
||||
qdel(AE)
|
||||
|
||||
STOP_PROCESSING(SSobj,src)
|
||||
|
||||
. = ..()
|
||||
|
||||
/datum/component/artifact_master/proc/do_setup()
|
||||
if(LAZYLEN(make_effects))
|
||||
for(var/path in make_effects)
|
||||
var/datum/artifact_effect/new_effect = new path(src)
|
||||
if(istype(holder, new_effect.req_type))
|
||||
my_effects += new_effect
|
||||
|
||||
else
|
||||
generate_effects()
|
||||
|
||||
DoRegistry()
|
||||
|
||||
/datum/component/artifact_master/proc/generate_effects()
|
||||
while(effect_generation_chance > 0)
|
||||
var/chosen_path = pick(subtypesof(/datum/artifact_effect))
|
||||
if(effect_generation_chance >= 100) // If we're above 100 percent, just cut a flat amount and add an effect.
|
||||
var/datum/artifact_effect/AE = new chosen_path(src)
|
||||
if(istype(holder, AE.req_type))
|
||||
my_effects += AE
|
||||
effect_generation_chance -= 30
|
||||
else
|
||||
AE.master = src
|
||||
qdel(AE)
|
||||
continue
|
||||
|
||||
effect_generation_chance /= 2
|
||||
|
||||
if(prob(effect_generation_chance)) // Otherwise, add effects as normal, with decreasing probability.
|
||||
my_effects += new chosen_path(src)
|
||||
|
||||
effect_generation_chance = round(effect_generation_chance)
|
||||
|
||||
/datum/component/artifact_master/proc/get_holder() // Returns the holder.
|
||||
return holder
|
||||
|
||||
/datum/component/artifact_master/proc/get_primary()
|
||||
if(LAZYLEN(my_effects))
|
||||
return my_effects[1]
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
* Trigger code.
|
||||
*/
|
||||
|
||||
/datum/component/artifact_master/proc/on_exact()
|
||||
var/severity = args[2]
|
||||
var/triggered = FALSE
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT || my_effect.trigger == TRIGGER_ENERGY)
|
||||
my_effect.ToggleActivate()
|
||||
triggered = TRUE
|
||||
if(2.0)
|
||||
if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT)
|
||||
my_effect.ToggleActivate()
|
||||
triggered = TRUE
|
||||
if(3.0)
|
||||
if (my_effect.trigger == TRIGGER_FORCE)
|
||||
my_effect.ToggleActivate()
|
||||
triggered = TRUE
|
||||
|
||||
if(triggered)
|
||||
return COMPONENT_IGNORE_EXPLOSION
|
||||
|
||||
return
|
||||
|
||||
/datum/component/artifact_master/proc/on_bullet()
|
||||
var/obj/item/projectile/P = args[2]
|
||||
var/triggered = TRUE
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
if(istype(P,/obj/item/projectile/bullet))
|
||||
if(my_effect.trigger == TRIGGER_FORCE)
|
||||
my_effect.ToggleActivate()
|
||||
triggered = TRUE
|
||||
|
||||
else if(istype(P,/obj/item/projectile/beam) ||\
|
||||
istype(P,/obj/item/projectile/ion) ||\
|
||||
istype(P,/obj/item/projectile/energy))
|
||||
if(my_effect.trigger == TRIGGER_ENERGY)
|
||||
my_effect.ToggleActivate()
|
||||
triggered = TRUE
|
||||
|
||||
if(triggered)
|
||||
return COMPONENT_CANCEL_ATTACK_CHAIN
|
||||
|
||||
return
|
||||
|
||||
/datum/component/artifact_master/proc/on_bump()
|
||||
var/atom/bumped = args[2]
|
||||
var/warn = FALSE
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
if(istype(bumped,/obj))
|
||||
if(bumped:throwforce >= 10)
|
||||
if(my_effect.trigger == TRIGGER_FORCE)
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
else if(ishuman(bumped) && GetAnomalySusceptibility(bumped) >= 0.5)
|
||||
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
|
||||
my_effect.ToggleActivate()
|
||||
warn = 1
|
||||
|
||||
if (my_effect.effect == EFFECT_TOUCH && prob(50))
|
||||
my_effect.DoEffectTouch(bumped)
|
||||
warn = 1
|
||||
|
||||
if(warn && isliving(bumped))
|
||||
to_chat(bumped, "<b>You accidentally touch \the [holder] as it hits you.</b>")
|
||||
|
||||
/datum/component/artifact_master/proc/on_bumped()
|
||||
var/atom/movable/M = args[2]
|
||||
var/warn = FALSE
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
if(istype(M,/obj))
|
||||
if(M:throwforce >= 10)
|
||||
if(my_effect.trigger == TRIGGER_FORCE)
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves))
|
||||
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
|
||||
my_effect.ToggleActivate()
|
||||
warn = 1
|
||||
|
||||
if (my_effect.effect == EFFECT_TOUCH && prob(50))
|
||||
my_effect.DoEffectTouch(M)
|
||||
warn = 1
|
||||
|
||||
if(warn && isliving(M))
|
||||
to_chat(M, "<b>You accidentally touch \the [holder].</b>")
|
||||
|
||||
/datum/component/artifact_master/proc/on_attack_hand()
|
||||
var/mob/living/user = args[2]
|
||||
if(!istype(user))
|
||||
return
|
||||
|
||||
if (get_dist(user, holder) > 1)
|
||||
to_chat(user, "<font color='red'>You can't reach [holder] from here.</font>")
|
||||
return
|
||||
if(ishuman(user) && user:gloves)
|
||||
to_chat(user, "<b>You touch [holder]</b> with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].")
|
||||
return
|
||||
|
||||
var/triggered = FALSE
|
||||
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
|
||||
if(my_effect.trigger == TRIGGER_TOUCH)
|
||||
triggered = TRUE
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
if (my_effect.effect == EFFECT_TOUCH)
|
||||
triggered = TRUE
|
||||
my_effect.DoEffectTouch(user)
|
||||
|
||||
if(triggered)
|
||||
to_chat(user, "<b>You touch [holder].</b>")
|
||||
|
||||
else
|
||||
to_chat(user, "<b>You touch [holder],</b> [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].")
|
||||
|
||||
|
||||
/datum/component/artifact_master/proc/on_attackby()
|
||||
var/obj/item/weapon/W = args[2]
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
|
||||
if (istype(W, /obj/item/weapon/reagent_containers))
|
||||
if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1))
|
||||
if(my_effect.trigger == TRIGGER_WATER)
|
||||
my_effect.ToggleActivate()
|
||||
else if(W.reagents.has_reagent("sacid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1))
|
||||
if(my_effect.trigger == TRIGGER_ACID)
|
||||
my_effect.ToggleActivate()
|
||||
else if(W.reagents.has_reagent("phoron", 1) || W.reagents.has_reagent("thermite", 1))
|
||||
if(my_effect.trigger == TRIGGER_VOLATILE)
|
||||
my_effect.ToggleActivate()
|
||||
else if(W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amatoxin", 1) || W.reagents.has_reagent("neurotoxin", 1))
|
||||
if(my_effect.trigger == TRIGGER_TOXIN)
|
||||
my_effect.ToggleActivate()
|
||||
else if(istype(W,/obj/item/weapon/melee/baton) && W:status ||\
|
||||
istype(W,/obj/item/weapon/melee/energy) ||\
|
||||
istype(W,/obj/item/weapon/melee/cultblade) ||\
|
||||
istype(W,/obj/item/weapon/card/emag) ||\
|
||||
istype(W,/obj/item/device/multitool))
|
||||
if (my_effect.trigger == TRIGGER_ENERGY)
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
else if (istype(W,/obj/item/weapon/flame) && W:lit ||\
|
||||
istype(W,/obj/item/weapon/weldingtool) && W:welding)
|
||||
if(my_effect.trigger == TRIGGER_HEAT)
|
||||
my_effect.ToggleActivate()
|
||||
else
|
||||
if (my_effect.trigger == TRIGGER_FORCE && W.force >= 10)
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
/datum/component/artifact_master/proc/on_reagent()
|
||||
var/datum/reagent/Touching = args[2]
|
||||
|
||||
var/list/water = list("hydrogen", "water")
|
||||
var/list/acid = list("sacid", "pacid", "diethylamine")
|
||||
var/list/volatile = list("phoron","thermite")
|
||||
var/list/toxic = list("toxin","cyanide","amatoxin","neurotoxin")
|
||||
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
if(Touching.id in water)
|
||||
if(my_effect.trigger == TRIGGER_WATER)
|
||||
my_effect.ToggleActivate()
|
||||
else if(Touching.id in acid)
|
||||
if(my_effect.trigger == TRIGGER_ACID)
|
||||
my_effect.ToggleActivate()
|
||||
else if(Touching.id in volatile)
|
||||
if(my_effect.trigger == TRIGGER_VOLATILE)
|
||||
my_effect.ToggleActivate()
|
||||
else if(Touching.id in toxic)
|
||||
if(my_effect.trigger == TRIGGER_TOXIN)
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
/datum/component/artifact_master/proc/on_moved()
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
if(my_effect)
|
||||
my_effect.UpdateMove()
|
||||
|
||||
/datum/component/artifact_master/process()
|
||||
if(!holder) // Some instances can be created and rapidly lose their holder, if they are destroyed rapidly on creation. IE, during excavation.
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/turf/L = holder.loc
|
||||
if(!istype(L) && !isliving(L)) // We're inside a non-mob container or on null turf, either way stop processing effects
|
||||
return
|
||||
|
||||
if(istype(holder, /atom/movable))
|
||||
var/atom/movable/HA = holder
|
||||
if(HA.pulledby)
|
||||
on_bumped(holder, HA.pulledby)
|
||||
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
if(my_effect)
|
||||
my_effect.UpdateMove()
|
||||
|
||||
//if any of our effects rely on environmental factors, work that out
|
||||
var/trigger_cold = 0
|
||||
var/trigger_hot = 0
|
||||
var/trigger_phoron = 0
|
||||
var/trigger_oxy = 0
|
||||
var/trigger_co2 = 0
|
||||
var/trigger_nitro = 0
|
||||
|
||||
var/turf/T = get_turf(holder)
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
if(env)
|
||||
if(env.temperature < 225)
|
||||
trigger_cold = 1
|
||||
else if(env.temperature > 375)
|
||||
trigger_hot = 1
|
||||
|
||||
if(env.gas["phoron"] >= 10)
|
||||
trigger_phoron = 1
|
||||
if(env.gas["oxygen"] >= 10)
|
||||
trigger_oxy = 1
|
||||
if(env.gas["carbon_dioxide"] >= 10)
|
||||
trigger_co2 = 1
|
||||
if(env.gas["nitrogen"] >= 10)
|
||||
trigger_nitro = 1
|
||||
|
||||
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||
my_effect.artifact_id = artifact_id
|
||||
|
||||
my_effect.process()
|
||||
|
||||
//COLD ACTIVATION
|
||||
if(my_effect.trigger == TRIGGER_COLD && (trigger_cold ^ my_effect.activated))
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
//HEAT ACTIVATION
|
||||
if(my_effect.trigger == TRIGGER_HEAT && (trigger_hot ^ my_effect.activated))
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
//PHORON GAS ACTIVATION
|
||||
if(my_effect.trigger == TRIGGER_PHORON && (trigger_phoron ^ my_effect.activated))
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
//OXYGEN GAS ACTIVATION
|
||||
if(my_effect.trigger == TRIGGER_OXY && (trigger_oxy ^ my_effect.activated))
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
//CO2 GAS ACTIVATION
|
||||
if(my_effect.trigger == TRIGGER_CO2 && (trigger_co2 ^ my_effect.activated))
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
//NITROGEN GAS ACTIVATION
|
||||
if(my_effect.trigger == TRIGGER_NITRO && (trigger_nitro ^ my_effect.activated))
|
||||
my_effect.ToggleActivate()
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
effect_type = EFFECT_PSIONIC
|
||||
var/mob/living/target = null
|
||||
|
||||
effect_state = "pulsing"
|
||||
effect_color = "#00c3ff"
|
||||
|
||||
/datum/artifact_effect/animate_anomaly/ToggleActivate(var/reveal_toggle = 1)
|
||||
..()
|
||||
find_target()
|
||||
@@ -13,21 +16,24 @@
|
||||
effectrange = max(3, effectrange)
|
||||
|
||||
/datum/artifact_effect/animate_anomaly/proc/find_target()
|
||||
if(!target || target.z != holder.z || get_dist(target, holder) > effectrange)
|
||||
var/atom/masterholder = get_master_holder()
|
||||
|
||||
if(!target || target.z != masterholder.z || get_dist(target, masterholder) > effectrange)
|
||||
var/mob/living/ClosestMob = null
|
||||
for(var/mob/living/L in range(effectrange, holder))
|
||||
for(var/mob/living/L in range(effectrange, get_turf(masterholder)))
|
||||
if(!L.mind)
|
||||
continue
|
||||
if(!ClosestMob)
|
||||
ClosestMob = L
|
||||
continue
|
||||
if(!L.stat)
|
||||
if(get_dist(holder, L) < get_dist(holder, ClosestMob))
|
||||
if(get_dist(masterholder, L) < get_dist(masterholder, ClosestMob))
|
||||
ClosestMob = L
|
||||
|
||||
target = ClosestMob
|
||||
|
||||
/datum/artifact_effect/animate_anomaly/DoEffectTouch(var/mob/living/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
var/obj/O = holder
|
||||
var/turf/T = get_step_away(O, user)
|
||||
|
||||
@@ -36,25 +42,23 @@
|
||||
O.visible_message("<span class='alien'>\The [holder] lurches away from [user]</span>")
|
||||
|
||||
/datum/artifact_effect/animate_anomaly/DoEffectAura()
|
||||
var/obj/O = holder
|
||||
if(!target || target.z != O.z || get_dist(target, O) > effectrange)
|
||||
target = null
|
||||
find_target()
|
||||
var/turf/T = get_step_to(O, target)
|
||||
var/obj/O = get_master_holder()
|
||||
find_target()
|
||||
|
||||
if(target && istype(T) && istype(O.loc, /turf))
|
||||
if(get_dist(O, T) > 1)
|
||||
O.Move(T)
|
||||
O.visible_message("<span class='alien'>\The [holder] lurches toward [target]</span>")
|
||||
if(!target || !istype(O))
|
||||
return
|
||||
|
||||
O.dir = get_dir(O, target)
|
||||
|
||||
if(!target || !istype(O))
|
||||
return
|
||||
|
||||
O.dir = get_dir(O, target)
|
||||
|
||||
if(istype(O.loc, /turf))
|
||||
if(get_dist(O.loc, target.loc) > 1)
|
||||
O.Move(get_step_to(O, target))
|
||||
O.visible_message("<span class='alien'>\The [O] lurches toward [target]</span>")
|
||||
|
||||
/datum/artifact_effect/animate_anomaly/DoEffectPulse()
|
||||
var/obj/O = holder
|
||||
if(!target || target.z != O.z || get_dist(target, O) > effectrange)
|
||||
target = null
|
||||
find_target()
|
||||
var/turf/T = get_step_to(O, target)
|
||||
|
||||
if(target && istype(T) && istype(O.loc, /turf))
|
||||
if(get_dist(O, T) > 1)
|
||||
O.Move(T)
|
||||
O.visible_message("<span class='alien'>\The [holder] lurches toward [target]</span>")
|
||||
DoEffectAura()
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
"OH GOD!",
|
||||
"HELP ME!")
|
||||
|
||||
effect_state = "summoning"
|
||||
effect_color = "#643232"
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
@@ -39,6 +42,7 @@
|
||||
H.dizziness += rand(3,5)
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
@@ -53,6 +57,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
name = "berserk"
|
||||
effect_type = EFFECT_PSIONIC
|
||||
|
||||
effect_state = "summoning"
|
||||
effect_color = "#5f0000"
|
||||
|
||||
/datum/artifact_effect/berserk/proc/apply_berserk(var/mob/living/L)
|
||||
if(!istype(L))
|
||||
return FALSE
|
||||
@@ -28,6 +31,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/artifact_effect/berserk/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for(var/mob/living/L in range(src.effectrange,T))
|
||||
@@ -36,6 +40,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/artifact_effect/berserk/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for(var/mob/living/L in range(src.effectrange,T))
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
"Butcher them!",
|
||||
"Feast!")
|
||||
|
||||
effect_state = "summoning"
|
||||
effect_color = "#c50303"
|
||||
|
||||
/datum/artifact_effect/cannibalfeeling/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
@@ -41,6 +44,7 @@
|
||||
H.nutrition = H.nutrition / 1.5
|
||||
|
||||
/datum/artifact_effect/cannibalfeeling/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
@@ -57,6 +61,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/cannibalfeeling/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
effect_type = EFFECT_ELECTRO
|
||||
var/last_message
|
||||
|
||||
effect_color = "#ffee06"
|
||||
|
||||
/datum/artifact_effect/cellcharge/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if(isrobot(user))
|
||||
@@ -14,6 +16,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/cellcharge/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
@@ -42,6 +45,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/cellcharge/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
effect_type = EFFECT_ELECTRO
|
||||
var/last_message
|
||||
|
||||
effect_state = "pulsing"
|
||||
effect_color = "#fbff02"
|
||||
|
||||
/datum/artifact_effect/celldrain/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
@@ -16,6 +19,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/celldrain/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
@@ -44,6 +48,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/celldrain/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
name = "cold"
|
||||
var/target_temp
|
||||
|
||||
effect_color = "#b3f6ff"
|
||||
|
||||
/datum/artifact_effect/cold/New()
|
||||
..()
|
||||
target_temp = rand(0, 250)
|
||||
@@ -10,6 +12,7 @@
|
||||
effect_type = pick(EFFECT_ORGANIC, EFFECT_BLUESPACE, EFFECT_SYNTH)
|
||||
|
||||
/datum/artifact_effect/cold/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
to_chat(user, "<font color='blue'>A chill passes up your spine!</font>")
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
@@ -17,6 +20,7 @@
|
||||
env.temperature = max(env.temperature - rand(5,50), 0)
|
||||
|
||||
/datum/artifact_effect/cold/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env && env.temperature > target_temp)
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
effect_type = EFFECT_ORGANIC
|
||||
var/severity
|
||||
|
||||
effect_state = "smoke"
|
||||
effect_color = "#77ff83"
|
||||
|
||||
/datum/artifact_effect/dnaswitch/New()
|
||||
..()
|
||||
if(effect == EFFECT_AURA)
|
||||
@@ -28,6 +31,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/dnaswitch/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for(var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
@@ -47,6 +51,7 @@
|
||||
scramble(0, H, weakness * severity)
|
||||
|
||||
/datum/artifact_effect/dnaswitch/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for(var/mob/living/carbon/human/H in range(200, T))
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
name = "electric field"
|
||||
effect_type = EFFECT_ENERGY
|
||||
|
||||
effect_color = "#ffff00"
|
||||
|
||||
/datum/artifact_effect/electric_field/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
var/list/nearby_mobs = list()
|
||||
for(var/mob/living/L in oview(effectrange, get_turf(holder)))
|
||||
if(L == user) // You're "grounded" when you contact the artifact.
|
||||
@@ -27,6 +30,7 @@
|
||||
L.electrocute_act(rand(25, 40), holder, 0.75, BP_TORSO)
|
||||
|
||||
/datum/artifact_effect/electric_field/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
var/list/nearby_mobs = list()
|
||||
for(var/mob/living/L in oview(effectrange, get_turf(holder)))
|
||||
if(!L.stat)
|
||||
@@ -48,6 +52,7 @@
|
||||
L.electrocute_act(rand(1, 10), holder, 0.75, BP_TORSO)
|
||||
|
||||
/datum/artifact_effect/electric_field/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
var/list/nearby_mobs = list()
|
||||
for(var/mob/living/L in oview(effectrange, get_turf(holder)))
|
||||
if(!L.stat)
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
name = "emp"
|
||||
effect_type = EFFECT_ELECTRO
|
||||
|
||||
effect_state = "empdisable"
|
||||
|
||||
/datum/artifact_effect/emp/New()
|
||||
..()
|
||||
effect = EFFECT_PULSE
|
||||
|
||||
/datum/artifact_effect/emp/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
empulse(T, effectrange/4, effectrange/3, effectrange/2, effectrange)
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
name = "feysight"
|
||||
effect_type = EFFECT_PSIONIC
|
||||
|
||||
effect_state = "pulsing"
|
||||
effect_color = "#00c763"
|
||||
|
||||
/datum/artifact_effect/feysight/proc/apply_modifier(var/mob/living/L)
|
||||
if(!istype(L))
|
||||
return FALSE
|
||||
@@ -28,6 +31,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/artifact_effect/feysight/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for(var/mob/living/L in range(src.effectrange,T))
|
||||
@@ -36,6 +40,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/artifact_effect/feysight/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for(var/mob/living/L in range(src.effectrange,T))
|
||||
|
||||
@@ -3,11 +3,15 @@
|
||||
var/list/created_field = list()
|
||||
effect_type = EFFECT_PARTICLE
|
||||
|
||||
effect_state = "shield-old"
|
||||
effect_color = "#00b7ff"
|
||||
|
||||
/datum/artifact_effect/forcefield/New()
|
||||
..()
|
||||
trigger = TRIGGER_TOUCH
|
||||
|
||||
/datum/artifact_effect/forcefield/ToggleActivate()
|
||||
var/atom/holder = get_master_holder()
|
||||
..()
|
||||
if(created_field.len)
|
||||
for(var/obj/effect/energy_field/F in created_field)
|
||||
@@ -35,6 +39,7 @@
|
||||
E.adjust_strength(0.25, 0)
|
||||
|
||||
/datum/artifact_effect/forcefield/UpdateMove()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(created_field.len && holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
while(created_field.len < 16)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
var/list/my_glitterflies = list()
|
||||
|
||||
effect_color = "#8cd448"
|
||||
|
||||
/datum/artifact_effect/gaia/proc/age_plantlife(var/obj/machinery/portable_atmospherics/hydroponics/Tray = null)
|
||||
if(istype(Tray) && Tray.seed)
|
||||
Tray.health += rand(1,3) * HYDRO_SPEED_MULTIPLIER
|
||||
@@ -30,6 +32,7 @@
|
||||
P.update_icon()
|
||||
|
||||
/datum/artifact_effect/gaia/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
to_chat(user, "<span class='alien'>You feel the presence of something long forgotten.</span>")
|
||||
for(var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(world.view,get_turf(holder)))
|
||||
age_plantlife(Tray)
|
||||
@@ -44,6 +47,7 @@
|
||||
age_plantlife(P)
|
||||
|
||||
/datum/artifact_effect/gaia/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
for(var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(effectrange,holder))
|
||||
age_plantlife(Tray)
|
||||
if(prob(2))
|
||||
@@ -57,6 +61,7 @@
|
||||
age_plantlife(P)
|
||||
|
||||
/datum/artifact_effect/gaia/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
for(var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(effectrange,holder))
|
||||
age_plantlife(Tray)
|
||||
if(prob(10))
|
||||
@@ -70,6 +75,7 @@
|
||||
age_plantlife(P)
|
||||
|
||||
/datum/artifact_effect/gaia/process()
|
||||
var/atom/holder = get_master_holder()
|
||||
..()
|
||||
|
||||
listclearnulls(my_glitterflies)
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
/datum/artifact_effect/gasco2
|
||||
name = "CO2 creation"
|
||||
|
||||
effect_color = "#a5a5a5"
|
||||
|
||||
/datum/artifact_effect/gasco2/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
|
||||
|
||||
/datum/artifact_effect/gasco2/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("carbon_dioxide", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasco2/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
/datum/artifact_effect/gasnitro
|
||||
name = "N2 creation"
|
||||
|
||||
effect_color = "#c2d3d8"
|
||||
|
||||
/datum/artifact_effect/gasnitro/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
|
||||
|
||||
/datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("nitrogen", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasnitro/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
|
||||
@@ -7,12 +7,14 @@
|
||||
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
|
||||
|
||||
/datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("oxygen", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasoxy/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
/datum/artifact_effect/gasphoron
|
||||
name = "phoron creation"
|
||||
|
||||
effect_color = "#c408ba"
|
||||
|
||||
/datum/artifact_effect/gasphoron/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
|
||||
|
||||
/datum/artifact_effect/gasphoron/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("phoron", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasphoron/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
|
||||
@@ -7,12 +7,14 @@
|
||||
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
|
||||
|
||||
/datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("nitrous_oxide", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gassleeping/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
"You're so happy suddenly, you almost want to dance and sing.",
|
||||
"You feel like the world is out to help you.")
|
||||
|
||||
effect_state = "summoning"
|
||||
effect_color = "#009118"
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
@@ -37,6 +40,7 @@
|
||||
H.dizziness += rand(3,5)
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
@@ -51,6 +55,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
|
||||
@@ -5,10 +5,14 @@
|
||||
|
||||
var/last_wave_pull = 0
|
||||
|
||||
effect_state = "gravisphere"
|
||||
effect_color = "#d8c3ff"
|
||||
|
||||
/datum/artifact_effect/gravity_wave/DoEffectTouch(var/mob/user)
|
||||
gravwave(user, effectrange, STAGE_TWO)
|
||||
|
||||
/datum/artifact_effect/gravity_wave/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
var/seconds_since_last_pull = max(0, round((last_wave_pull - world.time) / 10))
|
||||
|
||||
if(prob(10 + seconds_since_last_pull))
|
||||
@@ -17,6 +21,7 @@
|
||||
gravwave(get_turf(holder), effectrange, STAGE_TWO)
|
||||
|
||||
/datum/artifact_effect/gravity_wave/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
holder.visible_message("<span class='alien'>\The [holder] distorts as local gravity intensifies, and shifts toward it.</span>")
|
||||
gravwave(get_turf(holder), effectrange, STAGE_TWO)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/datum/artifact_effect/heal
|
||||
name = "heal"
|
||||
effect_type = EFFECT_ORGANIC
|
||||
effect_color = "#4649ff"
|
||||
|
||||
/datum/artifact_effect/heal/DoEffectTouch(var/mob/toucher)
|
||||
//todo: check over this properly
|
||||
@@ -33,6 +34,7 @@
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/heal/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
//todo: check over this properly
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
@@ -49,6 +51,7 @@
|
||||
C.updatehealth()
|
||||
|
||||
/datum/artifact_effect/heal/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
//todo: check over this properly
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/datum/artifact_effect/heat
|
||||
name = "heat"
|
||||
var/target_temp
|
||||
effect_color = "#ff6600"
|
||||
|
||||
/datum/artifact_effect/heat/New()
|
||||
..()
|
||||
@@ -10,6 +11,7 @@
|
||||
target_temp = rand(300, 600)
|
||||
|
||||
/datum/artifact_effect/heat/DoEffectTouch(var/mob/user)
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
to_chat(user, "<font color='red'> You feel a wave of heat travel up your spine!</font>")
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
@@ -17,6 +19,7 @@
|
||||
env.temperature += rand(5,50)
|
||||
|
||||
/datum/artifact_effect/heat/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env && env.temperature < target_temp)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
name = "hurt"
|
||||
effect_type = EFFECT_ORGANIC
|
||||
|
||||
effect_color = "#6d1212"
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)
|
||||
if(toucher)
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
@@ -20,6 +22,7 @@
|
||||
C.weakened += 6 * weakness
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/C in range(src.effectrange,T))
|
||||
@@ -35,6 +38,7 @@
|
||||
C.updatehealth()
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/C in range(effectrange, T))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user