From 1189673dafa60aa8fc5efe017182bd2be88ed21c Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Thu, 8 Aug 2024 18:40:02 +0300 Subject: [PATCH 01/23] Experimentor relics rework --- code/game/objects/effects/anomalies.dm | 16 + code/game/objects/items/anomaly_beacon.dm | 26 + .../items/weapons/experimental_syringe_gun.dm | 62 ++ .../items/weapons/grenades/fauna_bomb.dm | 52 ++ .../weapons/tuned_anomalous_teleporter.dm | 84 ++ .../living/simple_animal/hostile/hostile.dm | 12 +- .../mob/living/simple_animal/simple_animal.dm | 1 + code/modules/research/experimentor.dm | 753 ++++++++++-------- paradise.dme | 4 + 9 files changed, 669 insertions(+), 341 deletions(-) create mode 100644 code/game/objects/items/anomaly_beacon.dm create mode 100644 code/game/objects/items/weapons/experimental_syringe_gun.dm create mode 100644 code/game/objects/items/weapons/grenades/fauna_bomb.dm create mode 100644 code/game/objects/items/weapons/tuned_anomalous_teleporter.dm diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index bf2cff88474..a61dd84ebe7 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -22,6 +22,7 @@ /// Do we drop a core when we're neutralized? var/drops_core = TRUE + var/list/contacted_items= list() /obj/effect/anomaly/Initialize(mapload, new_lifespan, _drops_core = TRUE) . = ..() @@ -59,6 +60,21 @@ return ..() /obj/effect/anomaly/process() + for(var/obj/item/I in get_turf(src)) + if(I.origin_tech || (I.UID() in contacted_items)) + contacted_items.Add(I.UID()) + if (istype(I, /obj/item/relict_priduction/rapid_dupe)) + var/amount = rand(1, 3) + for (var/i; i <= amount; i++) + new /obj/item/relic(get_turf(I)) + var/datum/effect_system/smoke_spread/smoke = new + smoke.set_up(5, get_turf(I)) + smoke.start() + qdel(I) + continue + if (prob(2)) + new /obj/item/relic(get_turf(I)) + qdel(I) anomalyEffect() if(death_time < world.time) if(loc) diff --git a/code/game/objects/items/anomaly_beacon.dm b/code/game/objects/items/anomaly_beacon.dm new file mode 100644 index 00000000000..918b268db6a --- /dev/null +++ b/code/game/objects/items/anomaly_beacon.dm @@ -0,0 +1,26 @@ +/obj/item/assembly/anomaly_beacon + icon = 'icons/obj/objects.dmi' + icon_state = "floor_beaconf" + name = "anomaly beacon" + desc = "A device that draws power from bluespace and creates a permanent tracking beacon." + +/obj/item/assembly/anomaly_beacon/activate() + var/obj/effect/anomaly/anomaly_path = pick(subtypesof(/obj/effect/anomaly/)) + var/newAnomaly = new anomaly_path(get_turf(src)) + notify_ghosts("[name] has an object of interest: [newAnomaly]!", title = "Something's Interesting!", source = newAnomaly, action = NOTIFY_FOLLOW) + qdel(src) + +/obj/item/assembly/anomaly_beacon/attack_self(mob/user) + activate() + +/datum/crafting_recipe/anomaly_beacon + name = "Anomaly beacon" + result = /obj/item/assembly/anomaly_beacon + tools = list(TOOL_SCREWDRIVER) + reqs = list(/obj/item/assembly/signaler/anomaly = 1, + /obj/item/relict_priduction/rapid_dupe = 1, + /obj/item/radio/beacon = 1, + /obj/item/stack/cable_coil = 5) + time = 300 + category = CAT_WEAPONRY + subcategory = CAT_WEAPON diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm new file mode 100644 index 00000000000..cfb733bc2b0 --- /dev/null +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -0,0 +1,62 @@ +/obj/item/gun/syringe/rapidsyringe/experemental + name = "experemental syringe gun" + desc = "Эксперементальный шприцемет с 6 слотами для шприцев, встроенным, самовосполняющимся хранилищем химикатов и новейшей системой автозаправки шприцев." + origin_tech = "combat=3;biotech=4,bluespace=5" + materials = list(MAT_METAL=2000, MAT_GLASS=2000, MAT_BLUESPACE=400) + var/obj/item/reagent_containers/glass/redy_reagents = new + var/obj/item/reagent_containers/processed_reagents = new + var/synth_speed = 5 + +/obj/item/gun/syringe/rapidsyringe/experemental/Initialize() { + ..() + redy_reagents.reagents.total_volume = 100 + START_PROCESSING(SSobj, src) +} + +/obj/item/gun/syringe/rapidsyringe/experemental/Destroy() + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/item/gun/syringe/rapidsyringe/experemental/attackby(obj/item/A, mob/user, params, show_msg = TRUE) + if(istype(A, /obj/item/reagent_containers/syringe)) + var/in_clip = length(syringes) + (chambered.BB ? 1 : 0) + if(in_clip < max_syringes) + if(!user.drop_transfer_item_to_loc(A, src)) + return + balloon_alert(user, "заряжено!") + syringes.Add(A) + process_chamber() // Chamber the syringe if none is already + return TRUE + else + balloon_alert(user, "недостаточно места!") + else if(istype(A, /obj/item/reagent_containers/glass)) + var/obj/item/reagent_containers/glass/RC = A; + if (!RC.list_reagents) + return ..() + redy_reagents.reagents.clear_reagents() + RC.reagents.trans_to(redy_reagents, 100) + processed_reagents.reagents = RC.reagents + var/volume = processed_reagents.reagents.total_volume + var/coeff = volume/synth_speed + for (var/datum/reagent/R in processed_reagents.reagents.reagent_list) + R.volume /= coeff + balloon_alert(user, "синтезируемый набор веществ изменен!") + else + return ..() + +/obj/item/gun/syringe/rapidsyringe/experemental/process() + for (var/obj/item/reagent_containers/syringe/S in syringes) + redy_reagents.reagents.trans_to(S, min(redy_reagents.reagents.total_volume, S.volume - S.reagents.total_volume)) + for (var/datum/reagent/R in processed_reagents.reagents.reagent_list) + redy_reagents.reagents.add_reagent(R) + +/datum/crafting_recipe/rapidsyringe_experemental + name = "Experemental syringe gun" + result = /obj/item/gun/syringe/rapidsyringe/experemental + tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH) + reqs = list(/obj/item/relict_priduction/perfect_mix = 1, + /obj/item/assembly/signaler/anomaly/vortex = 1, + /obj/item/gun/syringe/rapidsyringe = 1, + /obj/item/stock_parts/matter_bin = 1) + time = 300 + category = CAT_WEAPONRY diff --git a/code/game/objects/items/weapons/grenades/fauna_bomb.dm b/code/game/objects/items/weapons/grenades/fauna_bomb.dm new file mode 100644 index 00000000000..2610ebecf5e --- /dev/null +++ b/code/game/objects/items/weapons/grenades/fauna_bomb.dm @@ -0,0 +1,52 @@ + +// var/turf/T | This was made 14th September 2013, and has no use at all. Its being removed + +/obj/item/grenade/fauna_bomb + name = "fauna bomb" + desc = "Эксперементальная, многоразовая граната, создающая фауну агрессивную ко всем, кроме активировавшего гранату." + w_class = WEIGHT_CLASS_SMALL + icon = 'icons/obj/weapons/grenade.dmi' + icon_state = "banana" + item_state = "flashbang" + var/deliveryamt = 8 + var/amount = 3 + var/list/mobs = list(/mob/living/simple_animal/hostile/asteroid/hivelord/legion, /mob/living/simple_animal/hostile/asteroid/goliath, /mob/living/simple_animal/hostile/asteroid/marrowweaver) + var/last_use = 0 + var/cooldown = 600 + +/obj/item/grenade/fauna_bomb/attack_self(mob/user) + if (last_use + cooldown < world.time) + to_chat(user, "[src] is still recharging!") + return + last_use = world.time + return ..() + +/obj/item/grenade/fauna_bomb/prime(mob/user) + var/turf/T = get_turf(src) + playsound(T, 'sound/items/rawr.ogg', 100, TRUE) + var/faction = user.name + "_fauna_bomb" + user.faction |= faction + + for(var/i in 1 to amount) + var/mob/living/simple_animal/S = pick(mobs) + S = new S(get_turf(src)) + S.faction |= faction + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(S, pick(NORTH, SOUTH, EAST, WEST)) + + if(prob(40)) + to_chat(user, "[src] falls apart!") + qdel(src) + +/datum/crafting_recipe/tuned_anomalous_teleporter + name = "Tuned anomalous teleporter" + result = /obj/item/tuned_anomalous_teleporter + tools = list(TOOL_SCREWDRIVER) + reqs = list(/obj/item/relict_priduction/pet_spray = 1, + /obj/item/assembly/signaler/anomaly/pyro = 1, + /obj/item/grenade/chem_grenade/adv_release = 1, + /obj/item/stack/cable_coil = 5) + time = 300 + category = CAT_WEAPONRY + subcategory = CAT_WEAPON diff --git a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm new file mode 100644 index 00000000000..06f8cbdd84e --- /dev/null +++ b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm @@ -0,0 +1,84 @@ +/obj/item/tuned_anomalous_teleporter + name = "tuned anomalous teleporter" + desc = "A portable item using blue-space technology." + icon = 'icons/obj/device.dmi' + icon_state = "hand_tele" + base_icon_state = "hand_tele" + item_state = "electronic" + throwforce = 0 + w_class = WEIGHT_CLASS_SMALL + throw_speed = 3 + throw_range = 5 + materials = list(MAT_METAL=10000) + origin_tech = "magnets=3;bluespace=4" + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF + var/icon_state_inactive = "hand_tele_inactive" + var/active_portals = 0 + /// Variable contains next time hand tele can be used to make it not EMP proof + var/emp_timer = 0 + var/last_use = 0 + var/cooldown = 200 + var/tp_range = 5 + +/obj/item/tuned_anomalous_teleporter/attack_self(mob/user) + if(emp_timer > world.time) + do_sparks(5, FALSE, loc) + to_chat(user, span_warning("[src] attempts to teleport you, but abruptly shuts off.")) + return FALSE + if (world.time < last_use + cooldown) + to_chat(user, span_warning("Wait " + ((world.time - last_use)/20)) + " seconds.") + return FALSE + last_use = world.time + + var/datum/teleport/TP = new /datum/teleport() + var/crossdir = angle2dir((dir2angle(user.dir)) % 360) + var/turf/T1 = get_turf(user) + for(var/i in 1 to tp_range) + T1 = get_step(T1, crossdir) + var/datum/effect_system/smoke_spread/s1 = new + var/datum/effect_system/smoke_spread/s2 = new + s1.set_up(5, FALSE, user) + s2.set_up(5, FALSE, user) + TP.start(user, T1, FALSE, TRUE, s1, s2, 'sound/effects/phasein.ogg', ) + TP.doTeleport() + +/obj/item/tuned_anomalous_teleporter/emp_act(severity) + make_inactive(severity) + return ..() + + +/obj/item/tuned_anomalous_teleporter/proc/make_inactive(severity) + var/time = rand(10 SECONDS, 15 SECONDS) * (severity == EMP_HEAVY ? 2 : 1) + emp_timer = world.time + time + update_icon(UPDATE_ICON_STATE) + addtimer(CALLBACK(src, PROC_REF(check_inactive), emp_timer), time) + + +/obj/item/tuned_anomalous_teleporter/proc/check_inactive(current_emp_timer) + if(emp_timer != current_emp_timer) + return + update_icon(UPDATE_ICON_STATE) + + +/obj/item/tuned_anomalous_teleporter/examine(mob/user) + . = ..() + if(emp_timer > world.time) + . += span_warning("It looks inactive.") + + +/obj/item/tuned_anomalous_teleporter/update_icon_state() + icon_state = (emp_timer > world.time) ? icon_state_inactive : base_icon_state + +/datum/crafting_recipe/tuned_anomalous_teleporter + name = "Tuned anomalous teleporter" + result = /obj/item/tuned_anomalous_teleporter + tools = list(TOOL_SCREWDRIVER, TOOL_WELDER) + reqs = list(/obj/item/relict_priduction/strange_teleporter = 1, + /obj/item/assembly/signaler/anomaly/bluespace = 1, + /obj/item/gps = 1, + /obj/item/stack/ore/bluespace_crystal, + /obj/item/stack/sheet/metal = 2, + /obj/item/stack/cable_coil = 5) + time = 300 + category = CAT_MISC diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 43756a863b5..5830b18e2a8 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -264,7 +264,7 @@ return A -/mob/living/simple_animal/hostile/proc/PickTarget(list/Targets)//Step 3, pick amongst the possible, attackable targets +/mob/living/simple_animal/hostile/proc/PickTarget(list/mob/Targets)//Step 3, pick amongst the possible, attackable targets if(target != null)//If we already have a target, but are told to pick again, calculate the lowest distance between all possible, and pick from the lowest distance targets for(var/pos_targ in Targets) var/atom/A = pos_targ @@ -272,8 +272,18 @@ var/possible_target_distance = get_dist(targets_from, A) if(target_dist < possible_target_distance) Targets -= A + + var/list/mob/not_low_priority_targets = list() + for(var/mob/T in Targets) + if (!(T.UID() in low_priority_targets)) + not_low_priority_targets.Add(T) + + if (not_low_priority_targets.len) + Targets = not_low_priority_targets + if(!Targets.len)//We didnt find nothin! return + var/chosen_target = pick(Targets)//Pick the remaining targets (if any) at random return chosen_target diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index a0d0c92dd46..0b8137a1b4b 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -140,6 +140,7 @@ var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while var/SStun = 0 // stun variable + var/list/low_priority_targets = list() /mob/living/simple_animal/Initialize(mapload) . = ..() diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index d3de4f7d862..02899b74923 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -29,6 +29,7 @@ var/resetTime = 15 var/cloneMode = FALSE var/cloneCount = 0 + var/clone_next = FALSE // Clones the next inserted technological item. /// The distance to your rnd console. Useful for creative mapping. var/console_dist = 3 var/list/item_reactions = list() @@ -69,10 +70,9 @@ /obj/machinery/r_n_d/experimentor/proc/SetTypeReactions() var/probWeight = 0 for(var/I in typesof(/obj/item)) - if(istype(I,/obj/item/relic)) //does istype even work here - item_reactions["[I]"] = SCANTYPE_DISCOVER - else - item_reactions["[I]"] = pick(SCANTYPE_POKE,SCANTYPE_IRRADIATE,SCANTYPE_GAS,SCANTYPE_HEAT,SCANTYPE_COLD,SCANTYPE_OBLITERATE) + if(istype(I,/obj/item/relic)) + continue + item_reactions["[I]"] = pick(SCANTYPE_POKE,SCANTYPE_IRRADIATE,SCANTYPE_GAS,SCANTYPE_HEAT,SCANTYPE_COLD,SCANTYPE_OBLITERATE) if(ispath(I,/obj/item/stock_parts) || ispath(I,/obj/item/grenade/chem_grenade) || ispath(I,/obj/item/kitchen)) var/obj/item/tempCheck = I if(initial(tempCheck.icon_state) != null) //check it's an actual usable item, in a hacky way @@ -168,6 +168,22 @@ if(temp_tech.len == 0) to_chat(user, "You cannot experiment on this item!") return + if (clone_next) + var/techs_sum = 0 + for(var/T in temp_tech) + techs_sum += temp_tech[T] + if (istype(O, /obj/item/relic) || techs_sum > 4 && !istype(src, /obj/item/storage/backpack/holding)) + to_chat(user, "Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.") + return + + investigate_log("Experimentor has made a clone of [O]", INVESTIGATE_EXPERIMENTOR) + throwSmoke(get_turf(pick(oview(1,src)))) + for (var/i = 1; i <= badThingCoeff; i++) + visible_message("A duplicate [O] pops out!") + var/type_to_make = O.type + new type_to_make(get_turf(pick(oview(1,src)))) + clone_next = FALSE + return if(!user.drop_transfer_item_to_loc(O, src)) return loaded_item = O @@ -203,8 +219,6 @@ dat += "
Burn" dat += "
Freeze" dat += "
Destroy
" - if(istype(loaded_item,/obj/item/relic)) - dat += "
Discover
" dat += "
Eject" else dat += "Nothing loaded." @@ -218,10 +232,10 @@ /obj/machinery/r_n_d/experimentor/proc/matchReaction(matching,reaction) var/obj/item/D = matching if(D) - if(item_reactions.Find("[D.type]")) + if(istype(D, /obj/item/relic) || item_reactions.Find("[D.type]")) var/tor = item_reactions["[D.type]"] - if(tor == text2num(reaction)) - return tor + if(istype(D, /obj/item/relic) || tor == text2num(reaction)) + return text2num(reaction) else return FAIL else @@ -265,250 +279,330 @@ else counter = 1 -/obj/machinery/r_n_d/experimentor/proc/experiment(exp,obj/item/exp_on) +/obj/machinery/r_n_d/experimentor/proc/experiment(exp, obj/item/exp_on) recentlyExperimented = TRUE update_icon(UPDATE_ICON_STATE) var/chosenchem var/criticalReaction = (exp_on.type in critical_items) ? TRUE : FALSE + var/isRelict = istype(exp_on, /obj/item/relic) //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == SCANTYPE_POKE) visible_message("[src] prods at [exp_on] with mechanical arms.") - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[exp_on] is gripped in just the right way, enhancing its focus.") - badThingCoeff++ - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src] malfunctions and destroys [exp_on], lashing its arms out at nearby people!") - for(var/mob/living/m in oview(1, src)) - m.apply_damage(15,BRUTE,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) - investigate_log("Experimentor dealt minor brute to [key_name_log(m)].", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions!") - exp = SCANTYPE_OBLITERATE - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] malfunctions, throwing the [exp_on]!") - var/mob/living/target = locate(/mob/living) in oview(7,src) - if(target) - var/obj/item/throwing = loaded_item - investigate_log("Experimentor has thrown [loaded_item] at [key_name_log(target)]", INVESTIGATE_EXPERIMENTOR) - ejectItem() - if(throwing) - throwing.throw_at(target, 10, 1) + if (!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[exp_on] is gripped in just the right way, enhancing its focus.") + badThingCoeff++ + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src] malfunctions and destroys [exp_on], lashing its arms out at nearby people!") + for(var/mob/living/m in oview(1, src)) + m.apply_damage(15,BRUTE,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) + investigate_log("Experimentor dealt minor brute to [key_name_log(m)].", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions!") + exp = SCANTYPE_OBLITERATE + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] malfunctions, throwing the [exp_on]!") + var/mob/living/target = locate(/mob/living) in oview(7,src) + if(target) + var/obj/item/throwing = loaded_item + investigate_log("Experimentor has thrown [loaded_item] at [key_name_log(target)]", INVESTIGATE_EXPERIMENTOR) + ejectItem() + if(throwing) + throwing.throw_at(target, 10, 1) + else if (prob(EFFECT_PROB_VERYLOW)) + visible_message("The [exp_on] begins to vibrate!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) + ejectItem() + throwSmoke(get_turf(exp_on)) + var/obj/item/relict_priduction/strange_teleporter/R = new /obj/item/relict_priduction/strange_teleporter(get_turf(exp_on)) + R.icon_state = exp_on.icon_state + qdel(exp_on) + else + exp = FAIL //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == SCANTYPE_IRRADIATE) visible_message("[src] reflects radioactive rays at [exp_on]!") - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[exp_on] has activated an unknown subroutine!") - cloneMode = TRUE - cloneCount = badThingCoeff - investigate_log("Experimentor has made a clone of [exp_on]", INVESTIGATE_EXPERIMENTOR) - ejectItem() - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src] malfunctions, melting [exp_on] and leaking radiation!") - for(var/mob/living/m in oview(1, src)) - m.apply_effect(25,IRRADIATE) - investigate_log("Experimentor has irradiated [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) //One entry per person so we know what was irradiated. - ejectItem(TRUE) - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions, spewing toxic waste!") - for(var/turf/T in oview(1, src)) - if(!T.density) - if(prob(EFFECT_PROB_VERYHIGH)) - new /obj/effect/decal/cleanable/greenglow(T) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - var/savedName = "[exp_on]" - ejectItem(TRUE) - var/newPath = pickWeighted(valid_items) - loaded_item = new newPath(src) - visible_message("[src] malfunctions, transforming [savedName] into [loaded_item]!") - investigate_log("Experimentor has transformed [savedName] into [loaded_item]", INVESTIGATE_EXPERIMENTOR) - if(istype(loaded_item,/obj/item/grenade/chem_grenade)) - var/obj/item/grenade/chem_grenade/CG = loaded_item - CG.prime() + if (!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[exp_on] has activated an unknown subroutine!") + cloneMode = TRUE + cloneCount = badThingCoeff + investigate_log("Experimentor has made a clone of [exp_on]", INVESTIGATE_EXPERIMENTOR) + ejectItem() + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src] malfunctions, melting [exp_on] and leaking radiation!") + for(var/mob/living/m in oview(1, src)) + m.apply_effect(25,IRRADIATE) + investigate_log("Experimentor has irradiated [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) //One entry per person so we know what was irradiated. + ejectItem(TRUE) + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions, spewing toxic waste!") + for(var/turf/T in oview(1, src)) + if(!T.density) + if(prob(EFFECT_PROB_VERYHIGH)) + new /obj/effect/decal/cleanable/greenglow(T) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + var/savedName = "[exp_on]" + ejectItem(TRUE) + var/newPath = pickWeighted(valid_items) + loaded_item = new newPath(src) + visible_message("[src] malfunctions, transforming [savedName] into [loaded_item]!") + investigate_log("Experimentor has transformed [savedName] into [loaded_item]", INVESTIGATE_EXPERIMENTOR) + if(istype(loaded_item,/obj/item/grenade/chem_grenade)) + var/obj/item/grenade/chem_grenade/CG = loaded_item + CG.prime() + ejectItem() + else if (prob(EFFECT_PROB_VERYLOW)) + visible_message("The [exp_on] has activated an unknown subroutine!") + clone_next = TRUE ejectItem() + qdel(exp_on) + + var/T = rand(1, linked_console.files.known_tech.len) + var/datum/tech/KT = linked_console.files.known_tech[linked_console.files.known_tech[T]] + var/new_level = linked_console.files.UpdateTech(linked_console.files.known_tech[T], KT.level + 1) + var/tech_log = "[T] [new_level], " + if(tech_log) + investigate_log("[usr] increased tech experimentoring [loaded_item]: [tech_log]. ", INVESTIGATE_RESEARCH) + else + exp = FAIL + //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == SCANTYPE_GAS) visible_message("[src] fills its chamber with gas, [exp_on] included.") - if(prob(EFFECT_PROB_LOW) && criticalReaction) + if (!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[exp_on] achieves the perfect mix!") + new /obj/item/stack/sheet/mineral/plasma(get_turf(pick(oview(1,src)))) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src] destroys [exp_on], leaking dangerous gas!") + chosenchem = pick("carbon","radium","toxin","condensedcapsaicin","psilocybin","space_drugs","ethanol","beepskysmash") + var/datum/reagents/R = new/datum/reagents(400) + R.my_atom = src + R.add_reagent(chosenchem , 375) + investigate_log("Experimentor has released [chosenchem] smoke.", INVESTIGATE_EXPERIMENTOR) + var/datum/effect_system/smoke_spread/chem/smoke = new + smoke.set_up(R, src, TRUE) + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + smoke.start() + qdel(R) + ejectItem(TRUE) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src]'s chemical chamber has sprung a leak!") + chosenchem = pick("mutationtoxin","nanomachines","sacid") + var/datum/reagents/R = new/datum/reagents(400) + R.my_atom = src + R.add_reagent(chosenchem , 375) + var/datum/effect_system/smoke_spread/chem/smoke = new + smoke.set_up(R, src, TRUE) + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + smoke.start() + qdel(R) + ejectItem(TRUE) + warn_admins(usr, "[chosenchem] smoke") + investigate_log("Experimentor has released [chosenchem] smoke!", INVESTIGATE_EXPERIMENTOR) + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions, spewing harmless gas.>") + throwSmoke(src.loc) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] melts [exp_on], ionizing the air around it!") + empulse(src.loc, 4, 0) //change this to 4,6 once the EXPERI-Mentor is moved. + investigate_log("Experimentor has generated an Electromagnetic Pulse.", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + else if (prob(EFFECT_PROB_LOW)) visible_message("[exp_on] achieves the perfect mix!") - new /obj/item/stack/sheet/mineral/plasma(get_turf(pick(oview(1,src)))) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src] destroys [exp_on], leaking dangerous gas!") - chosenchem = pick("carbon","radium","toxin","condensedcapsaicin","psilocybin","space_drugs","ethanol","beepskysmash") - var/datum/reagents/R = new/datum/reagents(400) - R.my_atom = src - R.add_reagent(chosenchem , 375) - investigate_log("Experimentor has released [chosenchem] smoke.", INVESTIGATE_EXPERIMENTOR) - var/datum/effect_system/smoke_spread/chem/smoke = new - smoke.set_up(R, src, TRUE) - playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - smoke.start() - qdel(R) - ejectItem(TRUE) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src]'s chemical chamber has sprung a leak!") - chosenchem = pick("mutationtoxin","nanomachines","sacid") - var/datum/reagents/R = new/datum/reagents(400) - R.my_atom = src - R.add_reagent(chosenchem , 375) - var/datum/effect_system/smoke_spread/chem/smoke = new - smoke.set_up(R, src, TRUE) - playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - smoke.start() - qdel(R) - ejectItem(TRUE) - warn_admins(usr, "[chosenchem] smoke") - investigate_log("Experimentor has released [chosenchem] smoke!", INVESTIGATE_EXPERIMENTOR) - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions, spewing harmless gas.>") - throwSmoke(src.loc) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] melts [exp_on], ionizing the air around it!") - empulse(src.loc, 4, 0) //change this to 4,6 once the EXPERI-Mentor is moved. - investigate_log("Experimentor has generated an Electromagnetic Pulse.", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) + ejectItem() + throwSmoke(get_turf(exp_on)) + var/obj/item/relict_priduction/perfect_mix/R = new /obj/item/relict_priduction/perfect_mix(get_turf(exp_on)) + R.icon_state = exp_on.icon_state + qdel(exp_on) + else + exp = FAIL + //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == SCANTYPE_HEAT) visible_message("[src] raises [exp_on]'s temperature.") - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[src]'s emergency coolant system gives off a small ding!") - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - var/obj/item/reagent_containers/food/drinks/coffee/C = new /obj/item/reagent_containers/food/drinks/coffee(get_turf(pick(oview(1,src)))) - chosenchem = pick("plasma","capsaicin","ethanol") - C.reagents.remove_any(25) - C.reagents.add_reagent(chosenchem , 50) - C.name = "Cup of Suspicious Liquid" - C.desc = "It has a large hazard symbol printed on the side in fading ink." - investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - var/turf/start = get_turf(src) - var/mob/M = locate(/mob/living) in view(src, 3) - var/turf/MT = get_turf(M) - if(MT) - visible_message("[src] dangerously overheats, launching a flaming fuel orb!") - investigate_log("Experimentor has launched a fireball at [key_name_log(M)]!", INVESTIGATE_EXPERIMENTOR) - var/obj/item/projectile/magic/fireball/FB = new /obj/item/projectile/magic/fireball(start) - FB.original = MT - FB.current = start - FB.yo = MT.y - start.y - FB.xo = MT.x - start.x - FB.fire() - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions, melting [exp_on] and releasing a burst of flame!") - explosion(src.loc, -1, 0, 0, 0, 0, flame_range = 2, cause = "Experimentor Fire") - investigate_log("Experimentor started a fire.", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] malfunctions, melting [exp_on] and leaking hot air!") - var/datum/gas_mixture/env = src.loc.return_air() - var/transfer_moles = 0.25 * env.total_moles() - var/datum/gas_mixture/removed = env.remove(transfer_moles) - if(removed) - var/heat_capacity = removed.heat_capacity() - if(heat_capacity == 0 || heat_capacity == null) - heat_capacity = 1 - removed.temperature = min((removed.temperature*heat_capacity + 100000)/heat_capacity, 1000) - env.merge(removed) - air_update_turf() - investigate_log("Experimentor has released hot air.", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] malfunctions, activating its emergency coolant systems!") - throwSmoke(src.loc) - for(var/mob/living/m in oview(1, src)) - m.apply_damage(5,BURN,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) - investigate_log("Experimentor has dealt minor burn damage to [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) + if (!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[src]'s emergency coolant system gives off a small ding!") + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + var/obj/item/reagent_containers/food/drinks/coffee/C = new /obj/item/reagent_containers/food/drinks/coffee(get_turf(pick(oview(1,src)))) + chosenchem = pick("plasma","capsaicin","ethanol") + C.reagents.remove_any(25) + C.reagents.add_reagent(chosenchem , 50) + C.name = "Cup of Suspicious Liquid" + C.desc = "It has a large hazard symbol printed on the side in fading ink." + investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + var/turf/start = get_turf(src) + var/mob/M = locate(/mob/living) in view(src, 3) + var/turf/MT = get_turf(M) + if(MT) + visible_message("[src] dangerously overheats, launching a flaming fuel orb!") + investigate_log("Experimentor has launched a fireball at [key_name_log(M)]!", INVESTIGATE_EXPERIMENTOR) + var/obj/item/projectile/magic/fireball/FB = new /obj/item/projectile/magic/fireball(start) + FB.original = MT + FB.current = start + FB.yo = MT.y - start.y + FB.xo = MT.x - start.x + FB.fire() + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions, melting [exp_on] and releasing a burst of flame!") + explosion(src.loc, -1, 0, 0, 0, 0, flame_range = 2, cause = "Experimentor Fire") + investigate_log("Experimentor started a fire.", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] malfunctions, melting [exp_on] and leaking hot air!") + var/datum/gas_mixture/env = src.loc.return_air() + var/transfer_moles = 0.25 * env.total_moles() + var/datum/gas_mixture/removed = env.remove(transfer_moles) + if(removed) + var/heat_capacity = removed.heat_capacity() + if(heat_capacity == 0 || heat_capacity == null) + heat_capacity = 1 + removed.temperature = min((removed.temperature*heat_capacity + 100000)/heat_capacity, 1000) + env.merge(removed) + air_update_turf() + investigate_log("Experimentor has released hot air.", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] malfunctions, activating its emergency coolant systems!") + throwSmoke(src.loc) + for(var/mob/living/m in oview(1, src)) + m.apply_damage(5,BURN,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) + investigate_log("Experimentor has dealt minor burn damage to [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) + ejectItem() + else if(prob(EFFECT_PROB_LOW)) + visible_message("[exp_on] begins to shake, and in the distance the sound of rampaging animals arises!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) ejectItem() + throwSmoke(get_turf(exp_on)) + var/obj/item/relict_priduction/pet_spray/R = new /obj/item/relict_priduction/pet_spray(get_turf(exp_on)) + R.icon_state = exp_on.icon_state + qdel(exp_on) + else + exp = FAIL + //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == SCANTYPE_COLD) visible_message("[src] lowers [exp_on]'s temperature.") - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[src]'s emergency coolant system gives off a small ding!") - var/obj/item/reagent_containers/food/drinks/coffee/C = new /obj/item/reagent_containers/food/drinks/coffee(get_turf(pick(oview(1,src)))) - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //Ding! Your death coffee is ready! - chosenchem = pick("uranium","frostoil","ephedrine") - C.reagents.remove_any(25) - C.reagents.add_reagent(chosenchem , 50) - C.name = "Cup of Suspicious Liquid" - C.desc = "It has a large hazard symbol printed on the side in fading ink." - investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src] malfunctions, shattering [exp_on] and releasing a dangerous cloud of coolant!") - var/datum/reagents/R = new/datum/reagents(400) - R.my_atom = src - R.add_reagent("frostoil" , 375) - investigate_log("Experimentor has released frostoil gas.", INVESTIGATE_EXPERIMENTOR) - var/datum/effect_system/smoke_spread/chem/smoke = new - smoke.set_up(R, src, TRUE) - playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - smoke.start() - qdel(R) - ejectItem(TRUE) - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions, shattering [exp_on] and leaking cold air!") - var/datum/gas_mixture/env = src.loc.return_air() - var/transfer_moles = 0.25 * env.total_moles() - var/datum/gas_mixture/removed = env.remove(transfer_moles) - if(removed) - var/heat_capacity = removed.heat_capacity() - if(heat_capacity == 0 || heat_capacity == null) - heat_capacity = 1 - removed.temperature = (removed.temperature*heat_capacity - 75000)/heat_capacity - env.merge(removed) - air_update_turf() - investigate_log("Experimentor has released cold air.", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] malfunctions, releasing a flurry of chilly air as [exp_on] pops out!") - var/datum/effect_system/smoke_spread/smoke = new - smoke.set_up(1,0, src.loc, 0) - smoke.start() + if (!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[src]'s emergency coolant system gives off a small ding!") + var/obj/item/reagent_containers/food/drinks/coffee/C = new /obj/item/reagent_containers/food/drinks/coffee(get_turf(pick(oview(1,src)))) + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //Ding! Your death coffee is ready! + chosenchem = pick("uranium","frostoil","ephedrine") + C.reagents.remove_any(25) + C.reagents.add_reagent(chosenchem , 50) + C.name = "Cup of Suspicious Liquid" + C.desc = "It has a large hazard symbol printed on the side in fading ink." + investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src] malfunctions, shattering [exp_on] and releasing a dangerous cloud of coolant!") + var/datum/reagents/R = new/datum/reagents(400) + R.my_atom = src + R.add_reagent("frostoil" , 375) + investigate_log("Experimentor has released frostoil gas.", INVESTIGATE_EXPERIMENTOR) + var/datum/effect_system/smoke_spread/chem/smoke = new + smoke.set_up(R, src, TRUE) + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + smoke.start() + qdel(R) + ejectItem(TRUE) + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions, shattering [exp_on] and leaking cold air!") + var/datum/gas_mixture/env = src.loc.return_air() + var/transfer_moles = 0.25 * env.total_moles() + var/datum/gas_mixture/removed = env.remove(transfer_moles) + if(removed) + var/heat_capacity = removed.heat_capacity() + if(heat_capacity == 0 || heat_capacity == null) + heat_capacity = 1 + removed.temperature = (removed.temperature*heat_capacity - 75000)/heat_capacity + env.merge(removed) + air_update_turf() + investigate_log("Experimentor has released cold air.", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] malfunctions, releasing a flurry of chilly air as [exp_on] pops out!") + var/datum/effect_system/smoke_spread/smoke = new + smoke.set_up(1,0, src.loc, 0) + smoke.start() + ejectItem() + else if(prob(EFFECT_PROB_LOW)) + visible_message("[exp_on] emits a loud pop!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) ejectItem() + throwSmoke(get_turf(exp_on)) + var/obj/item/relict_priduction/R = new /obj/item/relict_priduction/rapid_dupe(get_turf(exp_on)) + R.icon_state = exp_on.icon_state + qdel(exp_on) + else + exp = FAIL + //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == SCANTYPE_OBLITERATE) - visible_message("[exp_on] activates the crushing mechanism, [exp_on] is destroyed!") - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!") - new /obj/item/stack/sheet/plasteel(get_turf(pick(oview(1,src)))) - if(linked_console.linked_lathe) - var/datum/component/material_container/linked_materials = linked_console.linked_lathe.GetComponent(/datum/component/material_container) - for(var/material in exp_on.materials) - linked_materials.insert_amount( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.materials[material])), material) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src]'s crusher goes way too many levels too high, crushing right through space-time!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3) - investigate_log("Experimentor has triggered the 'throw things' reaction.", INVESTIGATE_EXPERIMENTOR) - for(var/atom/movable/AM in oview(7,src)) - if(!AM.anchored) + visible_message("[exp_on] activates the crushing mechanism.") + if (!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!") + new /obj/item/stack/sheet/plasteel(get_turf(pick(oview(1,src)))) + if(linked_console.linked_lathe) + var/datum/component/material_container/linked_materials = linked_console.linked_lathe.GetComponent(/datum/component/material_container) + for(var/material in exp_on.materials) + linked_materials.insert_amount( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.materials[material])), material) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src]'s crusher goes way too many levels too high, crushing right through space-time!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3) + investigate_log("Experimentor has triggered the 'throw things' reaction.", INVESTIGATE_EXPERIMENTOR) + for(var/atom/movable/AM in oview(7,src)) + if(!AM.anchored) + spawn(0) + AM.throw_at(src,10,1) + + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src]'s crusher goes one level too high, crushing right into space-time!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3) + investigate_log("Experimentor has triggered the 'minor throw things' reaction.", INVESTIGATE_EXPERIMENTOR) + var/list/throwAt = list() + for(var/atom/movable/AM in oview(7,src)) + if(!AM.anchored) + throwAt.Add(AM) + for(var/counter = 1, counter < throwAt.len, ++counter) + var/atom/movable/cast = throwAt[counter] spawn(0) - AM.throw_at(src,10,1) - - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src]'s crusher goes one level too high, crushing right into space-time!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3) - investigate_log("Experimentor has triggered the 'minor throw things' reaction.", INVESTIGATE_EXPERIMENTOR) - var/list/throwAt = list() - for(var/atom/movable/AM in oview(7,src)) - if(!AM.anchored) - throwAt.Add(AM) - for(var/counter = 1, counter < throwAt.len, ++counter) - var/atom/movable/cast = throwAt[counter] - spawn(0) - cast.throw_at(pick(throwAt),10,1) - ejectItem(TRUE) + cast.throw_at(pick(throwAt),10,1) + ejectItem(TRUE) + else if(prob(EFFECT_PROB_LOW)) + visible_message("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!") + badThingCoeff++ + var/list/obj/item/stack/sheet/mineral/minreals = list(/obj/item/stack/sheet/mineral/diamond, /obj/item/stack/sheet/mineral/gold, /obj/item/stack/sheet/glass,/obj/item/stack/sheet/metal,/obj/item/stack/sheet/mineral/plasma,/obj/item/stack/sheet/mineral/silver,/obj/item/stack/sheet/mineral/titanium,/obj/item/stack/sheet/mineral/uranium,/obj/item/stack/sheet/mineral/tranquillite,/obj/item/stack/sheet/mineral/bananium,/obj/item/stack/sheet/mineral/mythril) + // The technical specification was "Random processed ore". Mithril fits this description. :jokerge: + // Plastinium and abductor alloy are alloys, not processed ores. + for (var/i = 1; i <= 3; ++i) + var/obj/item/stack/sheet/mineral/m0 = pick(minreals) + var/obj/item/stack/sheet/mineral/M = new m0(get_turf(exp_on)) + M.amount = 10 + qdel(exp_on) + ejectItem(TRUE) + else + exp = FAIL + //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == FAIL) var/a = pick("rumbles","shakes","vibrates","shudders") var/b = pick("crushes","spins","viscerates","smashes","insults") visible_message("[exp_on] [a], and [b], the experiment was a failure.") - if(exp == SCANTYPE_DISCOVER) - visible_message("[src] scans the [exp_on], revealing its true nature!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) - var/obj/item/relic/R = loaded_item - R.reveal() - investigate_log("Experimentor has revealed a relic with [R.realProc] effect.", INVESTIGATE_EXPERIMENTOR) - ejectItem() +// if(exp == SCANTYPE_DISCOVER) +// visible_message("[src] scans the [exp_on], revealing its true nature!") +// playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) +// var/obj/item/relic/R = loaded_item +// R.reveal() +// investigate_log("Experimentor has revealed a relic with [R.realProc] effect.", INVESTIGATE_EXPERIMENTOR) +// ejectItem() //Global reactions @@ -636,6 +730,104 @@ #undef FAIL +/obj/item/relict_priduction + name = "perfect mix" + desc = "Странный объект без эффекта и иконки. Щитспавн онли." + icon_state = "" + icon = 'icons/obj/assemblies.dmi' + origin_tech = "bluespace=3;materials=3" + var/cooldown = 0 + var/last_use = 0 + +/obj/item/relict_priduction/attack_self(mob/user) + if (world.time < last_use + cooldown) + to_chat(user, "[src] is not ready yet.") + return FALSE + last_use = world.time + return TRUE + +/obj/item/relict_priduction/perfect_mix + name = "perfect mix" + desc = "Странный объект из которого можно бесконечно заполнять емкости какой-то жидкостью." + icon_state = "infra-igniter-tank0" + icon = 'icons/obj/assemblies.dmi' + origin_tech = "materials=4" + var/datum/reagent/R + var/transfer = 10 + +/obj/item/relict_priduction/perfect_mix/New() + . = ..() + R = pick(/datum/reagent/uranium, /datum/reagent/plasma, /datum/reagent/consumable/capsaicin, /datum/reagent/consumable/frostoil, /datum/reagent/space_cleaner, /datum/reagent/consumable/drink/coffee) + +/obj/item/relict_priduction/perfect_mix/afterattack(atom/target, mob/user, proximity) + if(istype(target, /obj/item/reagent_containers/glass)) + var/obj/item/reagent_containers/glass/beaker = target + beaker.reagents.add_reagent(R.id, transfer) + to_chat(user, "You have poured 10 units of content into this.") + else + to_chat(user, "You can't pour [src]'s content into this.") + +/obj/item/relict_priduction/strange_teleporter + name = "strange teleporter" + desc = "Странный объект телепортирующий вас при активации." + icon_state = "prox-multitool2" + icon = 'icons/obj/assemblies.dmi' + origin_tech = "materials=4" + cooldown = 100 + +/obj/item/relict_priduction/strange_teleporter/attack_self(mob/user) + if (!..()) + return + to_chat(user, "[src] begins to vibrate!") + spawn(rand(10,30)) + var/turf/userturf = get_turf(user) + if(src.loc == user && is_teleport_allowed(userturf.z)) + visible_message("The [src] twists and bends, relocating itself!") + var/datum/effect_system/smoke_spread/smoke = new + smoke.set_up(5, get_turf(user)) + smoke.start() + do_teleport(user, userturf, 8, asoundin = 'sound/effects/phasein.ogg') + smoke = new + smoke.set_up(5, get_turf(user)) + smoke.start() + +/obj/item/relict_priduction/pet_spray + name = "pet spray" + desc = "Странный объект создающий враждебных существ." + icon_state = "armor-igniter-analyzer" + icon = 'icons/obj/assemblies.dmi' + origin_tech = "biotech=4" + cooldown = 600 + +/obj/item/relict_priduction/pet_spray/attack_self(mob/user) + if (!..()) + return + var/message = "[src] begins to shake, and in the distance the sound of rampaging animals arises!" + visible_message(message) + to_chat(user, message) + var/amount = rand(1,3) + var/list/A = pick(/mob/living/simple_animal/hostile/bear,/mob/living/simple_animal/hostile/poison/bees,/mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/alien,/mob/living/simple_animal/butterfly,/mob/living/simple_animal/pet/dog/corgi) + + for(var/i in 1 to amount) + var/mob/living/simple_animal/S + S = new A(get_turf(src)) + S.faction |= "petSpraySummon" + S.gold_core_spawnable = HOSTILE_SPAWN + S.low_priority_targets += user.UID() + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(S, pick(NORTH, SOUTH, EAST, WEST)) + + if(prob(60)) + to_chat(user, "[src] falls apart!") + qdel(src) + +/obj/item/relict_priduction/rapid_dupe + name = "rapid dupe" + desc = "Странный объект создающий другие странные объекты при контакте с аномалиями." + icon_state = "shock_kit" + icon = 'icons/obj/assemblies.dmi' + origin_tech = "materials=4" //////////////////////////////////SPECIAL ITEMS//////////////////////////////////////// @@ -648,127 +840,8 @@ var/realName = "defined object" var/revealed = FALSE var/realProc - var/cooldownMax = 60 - var/cooldown - var/floof /obj/item/relic/New() ..() icon_state = pick("shock_kit","armor-igniter-analyzer","infra-igniter0","infra-igniter1","radio-multitool","prox-radio1","radio-radio","timer-multitool0","radio-igniter-tank") realName = "[pick("broken","twisted","spun","improved","silly","regular","badly made")] [pick("device","object","toy","suspicious tech","gear")]" - floof = pick(/mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/dog/fox, /mob/living/simple_animal/mouse, /mob/living/simple_animal/pet/dog/pug, /mob/living/simple_animal/lizard, /mob/living/simple_animal/diona, /mob/living/simple_animal/butterfly, /mob/living/carbon/human/lesser/monkey) - - -/obj/item/relic/proc/reveal() - if(revealed) //Re-rolling your relics seems a bit overpowered, yes? - return - revealed = TRUE - name = realName - cooldownMax = rand(60,300) - realProc = pick("teleport","explode","rapidDupe","petSpray","flash","clean","floofcannon") - origin_tech = pick("engineering=[rand(2,5)]","magnets=[rand(2,5)]","plasmatech=[rand(2,5)]","programming=[rand(2,5)]","powerstorage=[rand(2,5)]") - -/obj/item/relic/attack_self(mob/user) - if(revealed) - if(cooldown) - to_chat(user, "[src] does not react!") - return - else if(src.loc == user) - cooldown = TRUE - call(src,realProc)(user) - spawn(cooldownMax) - cooldown = FALSE - else - to_chat(user, "You aren't quite sure what to do with this, yet.") - -//////////////// RELIC PROCS ///////////////////////////// - -/obj/item/relic/proc/throwSmoke(turf/where) - var/datum/effect_system/smoke_spread/smoke = new - smoke.set_up(1,0, where, 0) - smoke.start() - -/obj/item/relic/proc/floofcannon(mob/user) - playsound(src.loc, "sparks", rand(25, 50), TRUE, SHORT_RANGE_SOUND_EXTRARANGE) - var/mob/living/C = new floof(get_turf(user)) - C.throw_at(pick(oview(10,user)),10,rand(3,8)) - throwSmoke(get_turf(C)) - warn_admins(user, "Floof Cannon", 0) - -/obj/item/relic/proc/clean(mob/user) - playsound(src.loc, "sparks", rand(25, 50), TRUE, SHORT_RANGE_SOUND_EXTRARANGE) - var/obj/item/grenade/chem_grenade/cleaner/CL = new/obj/item/grenade/chem_grenade/cleaner(get_turf(user)) - CL.prime() - warn_admins(user, "Smoke", 0) - -/obj/item/relic/proc/flash(mob/user) - playsound(src.loc, "sparks", rand(25, 50), TRUE, SHORT_RANGE_SOUND_EXTRARANGE) - var/obj/item/grenade/flashbang/CB = new/obj/item/grenade/flashbang(get_turf(user)) - CB.prime() - warn_admins(user, "Flash") - -/obj/item/relic/proc/petSpray(mob/user) - var/message = "[src] begins to shake, and in the distance the sound of rampaging animals arises!" - visible_message(message) - to_chat(user, message) - var/animals = rand(1,25) - var/counter - var/list/valid_animals = list(/mob/living/simple_animal/parrot,/mob/living/simple_animal/butterfly,/mob/living/simple_animal/pet/cat,/mob/living/simple_animal/pet/dog/corgi,/mob/living/simple_animal/crab,/mob/living/simple_animal/pet/dog/fox,/mob/living/simple_animal/lizard,/mob/living/simple_animal/mouse,/mob/living/simple_animal/pet/dog/pug,/mob/living/simple_animal/hostile/bear,/mob/living/simple_animal/hostile/poison/bees,/mob/living/simple_animal/hostile/carp) - for(counter = 1; counter < animals; counter++) - var/mobType = pick(valid_animals) - new mobType(get_turf(src)) - warn_admins(user, "Mass Mob Spawn") - if(prob(60)) - to_chat(user, "[src] falls apart!") - qdel(src) - -/obj/item/relic/proc/rapidDupe(mob/user) - audible_message("[src] emits a loud pop!") - var/list/dupes = list() - var/counter - var/max = rand(5,10) - for(counter = 1; counter < max; counter++) - var/obj/item/relic/R = new src.type(get_turf(src)) - R.name = name - R.desc = desc - R.realName = realName - R.realProc = realProc - R.revealed = TRUE - dupes |= R - spawn() - R.throw_at(pick(oview(7,get_turf(src))),10,1) - counter = 0 - spawn(rand(10,100)) - for(counter = 1; counter <= dupes.len; counter++) - var/obj/item/relic/R = dupes[counter] - qdel(R) - warn_admins(user, "Rapid duplicator", 0) - -/obj/item/relic/proc/explode(mob/user) - to_chat(user, "[src] begins to heat up!") - spawn(rand(35,100)) - if(src.loc == user) - visible_message("The [src]'s top opens, releasing a powerful blast!") - explosion(user.loc, -1, rand(1,5), rand(1,5), rand(1,5), rand(1,5), flame_range = 2, cause = src) - warn_admins(user, "Explosion") - qdel(src) //Comment this line to produce a light grenade (the bomb that keeps on exploding when used)!! - -/obj/item/relic/proc/teleport(mob/user) - to_chat(user, "The [src] begins to vibrate!") - spawn(rand(10,30)) - var/turf/userturf = get_turf(user) - if(src.loc == user && is_teleport_allowed(userturf.z)) //Because Nuke Ops bringing this back on their shuttle, then looting the ERT area is 2fun4you! - visible_message("The [src] twists and bends, relocating itself!") - throwSmoke(userturf) - do_teleport(user, userturf, 8, asoundin = 'sound/effects/phasein.ogg') - throwSmoke(get_turf(user)) - warn_admins(user, "Teleport", 0) - -//Admin Warning proc for relics -/obj/item/relic/proc/warn_admins(mob/user, RelicType, priority = 1) - var/turf/T = get_turf(src) - var/log_msg = "[RelicType] relic used by [key_name_log(user)] in [COORD(T)]" - if(priority) //For truly dangerous relics that may need an admin's attention. BWOINK! - message_admins("[RelicType] relic activated by [key_name_admin(user)] in [ADMIN_COORDJMP(T)]") - add_game_logs(log_msg) - investigate_log(log_msg, INVESTIGATE_EXPERIMENTOR) diff --git a/paradise.dme b/paradise.dme index 771baf6e0bf..e74e4519e76 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1091,6 +1091,7 @@ #include "code\game\objects\effects\temporary_visuals\miscellaneous.dm" #include "code\game\objects\effects\temporary_visuals\muzzle_flashes.dm" #include "code\game\objects\effects\temporary_visuals\temporary_visual.dm" +#include "code\game\objects\items\anomaly_beacon.dm" #include "code\game\objects\items\ashtray.dm" #include "code\game\objects\items\blueprints.dm" #include "code\game\objects\items\bodybag.dm" @@ -1211,6 +1212,7 @@ #include "code\game\objects\items\weapons\dna_injector.dm" #include "code\game\objects\items\weapons\dna_upgrader.dm" #include "code\game\objects\items\weapons\dnascrambler.dm" +#include "code\game\objects\items\weapons\experimental_syringe_gun.dm" #include "code\game\objects\items\weapons\explosives.dm" #include "code\game\objects\items\weapons\extinguisher.dm" #include "code\game\objects\items\weapons\flamethrower.dm" @@ -1249,6 +1251,7 @@ #include "code\game\objects\items\weapons\syndie_RCD.dm" #include "code\game\objects\items\weapons\tape.dm" #include "code\game\objects\items\weapons\teleportation.dm" +#include "code\game\objects\items\weapons\tuned_anomalous_teleporter.dm" #include "code\game\objects\items\weapons\twohanded.dm" #include "code\game\objects\items\weapons\vending_items.dm" #include "code\game\objects\items\weapons\weaponry.dm" @@ -1261,6 +1264,7 @@ #include "code\game\objects\items\weapons\grenades\confetti.dm" #include "code\game\objects\items\weapons\grenades\custom_grenades.dm" #include "code\game\objects\items\weapons\grenades\emgrenade.dm" +#include "code\game\objects\items\weapons\grenades\fauna_bomb.dm" #include "code\game\objects\items\weapons\grenades\flashbang.dm" #include "code\game\objects\items\weapons\grenades\frag.dm" #include "code\game\objects\items\weapons\grenades\ghettobomb.dm" From c5057a86496b864ddaba7a08de3184e1cd0ef170 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Thu, 8 Aug 2024 19:09:06 +0300 Subject: [PATCH 02/23] Experimentor relics rework --- code/game/objects/items/weapons/tuned_anomalous_teleporter.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm index 06f8cbdd84e..c3e93be9428 100644 --- a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm +++ b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm @@ -27,7 +27,7 @@ to_chat(user, span_warning("[src] attempts to teleport you, but abruptly shuts off.")) return FALSE if (world.time < last_use + cooldown) - to_chat(user, span_warning("Wait " + ((world.time - last_use)/20)) + " seconds.") + to_chat(user, span_warning("Wait " + str((world.time - last_use)/20) + " seconds.") return FALSE last_use = world.time From 286cbdf1581b80e55a844d322f46439b1259d6b2 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Thu, 8 Aug 2024 20:21:41 +0300 Subject: [PATCH 03/23] bugfix --- code/game/objects/items/weapons/experimental_syringe_gun.dm | 6 +++--- .../objects/items/weapons/tuned_anomalous_teleporter.dm | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index cfb733bc2b0..d92ee83ed1a 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -9,7 +9,7 @@ /obj/item/gun/syringe/rapidsyringe/experemental/Initialize() { ..() - redy_reagents.reagents.total_volume = 100 + redy_reagents.volume = 100 START_PROCESSING(SSobj, src) } @@ -31,7 +31,7 @@ balloon_alert(user, "недостаточно места!") else if(istype(A, /obj/item/reagent_containers/glass)) var/obj/item/reagent_containers/glass/RC = A; - if (!RC.list_reagents) + if (!RC.reagents.reagent_list) return ..() redy_reagents.reagents.clear_reagents() RC.reagents.trans_to(redy_reagents, 100) @@ -48,7 +48,7 @@ for (var/obj/item/reagent_containers/syringe/S in syringes) redy_reagents.reagents.trans_to(S, min(redy_reagents.reagents.total_volume, S.volume - S.reagents.total_volume)) for (var/datum/reagent/R in processed_reagents.reagents.reagent_list) - redy_reagents.reagents.add_reagent(R) + redy_reagents.reagents.add_reagent(R.id, R.volume) /datum/crafting_recipe/rapidsyringe_experemental name = "Experemental syringe gun" diff --git a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm index c3e93be9428..6165975c020 100644 --- a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm +++ b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm @@ -27,7 +27,9 @@ to_chat(user, span_warning("[src] attempts to teleport you, but abruptly shuts off.")) return FALSE if (world.time < last_use + cooldown) - to_chat(user, span_warning("Wait " + str((world.time - last_use)/20) + " seconds.") + var/T = (last_use + cooldown - world.time)/10 + var/msg = "Wait [T] seconds." + to_chat(user, span_warning(msg)) return FALSE last_use = world.time From f22433a7f97b40fb4ef2dafbc5d7e53434d91f65 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Fri, 9 Aug 2024 14:52:58 +0300 Subject: [PATCH 04/23] Added beer, non alcogolic beer & beer2 into perfect_mix --- code/modules/research/experimentor.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 02899b74923..947fd32a9d4 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -757,7 +757,7 @@ /obj/item/relict_priduction/perfect_mix/New() . = ..() - R = pick(/datum/reagent/uranium, /datum/reagent/plasma, /datum/reagent/consumable/capsaicin, /datum/reagent/consumable/frostoil, /datum/reagent/space_cleaner, /datum/reagent/consumable/drink/coffee) + R = pick(/datum/reagent/uranium, /datum/reagent/plasma, /datum/reagent/consumable/capsaicin, /datum/reagent/consumable/frostoil, /datum/reagent/space_cleaner, /datum/reagent/consumable/drink/coffee, pick(/datum/reagent/consumable/drink/non_alcoholic_beer, /datum/reagent/consumable/ethanol/beer, /datum/reagent/beer2)) /obj/item/relict_priduction/perfect_mix/afterattack(atom/target, mob/user, proximity) if(istype(target, /obj/item/reagent_containers/glass)) From 4e0c3b03b8fc756e7b8a8cd14da0abf099a89a94 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Mon, 12 Aug 2024 11:21:59 +0300 Subject: [PATCH 05/23] bugfix --- .../items/weapons/experimental_syringe_gun.dm | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index d92ee83ed1a..2d63629c034 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -1,23 +1,23 @@ -/obj/item/gun/syringe/rapidsyringe/experemental - name = "experemental syringe gun" +/obj/item/gun/syringe/rapidsyringe/experimental + name = "experimental syringe gun" desc = "Эксперементальный шприцемет с 6 слотами для шприцев, встроенным, самовосполняющимся хранилищем химикатов и новейшей системой автозаправки шприцев." origin_tech = "combat=3;biotech=4,bluespace=5" materials = list(MAT_METAL=2000, MAT_GLASS=2000, MAT_BLUESPACE=400) - var/obj/item/reagent_containers/glass/redy_reagents = new - var/obj/item/reagent_containers/processed_reagents = new + var/obj/item/reagent_containers/glass/beaker/large/ready_reagents = new + var/obj/item/reagent_containers/glass/beaker/large/processed_reagents = new var/synth_speed = 5 + var/bank_size = 100 -/obj/item/gun/syringe/rapidsyringe/experemental/Initialize() { +/obj/item/gun/syringe/rapidsyringe/experimental/Initialize() { ..() - redy_reagents.volume = 100 START_PROCESSING(SSobj, src) } -/obj/item/gun/syringe/rapidsyringe/experemental/Destroy() +/obj/item/gun/syringe/rapidsyringe/experimental/Destroy() STOP_PROCESSING(SSobj, src) return ..() -/obj/item/gun/syringe/rapidsyringe/experemental/attackby(obj/item/A, mob/user, params, show_msg = TRUE) +/obj/item/gun/syringe/rapidsyringe/experimental/attackby(obj/item/A, mob/user, params, show_msg = TRUE) if(istype(A, /obj/item/reagent_containers/syringe)) var/in_clip = length(syringes) + (chambered.BB ? 1 : 0) if(in_clip < max_syringes) @@ -33,26 +33,23 @@ var/obj/item/reagent_containers/glass/RC = A; if (!RC.reagents.reagent_list) return ..() - redy_reagents.reagents.clear_reagents() - RC.reagents.trans_to(redy_reagents, 100) - processed_reagents.reagents = RC.reagents - var/volume = processed_reagents.reagents.total_volume - var/coeff = volume/synth_speed - for (var/datum/reagent/R in processed_reagents.reagents.reagent_list) - R.volume /= coeff + ready_reagents.reagents.clear_reagents() + processed_reagents.reagents.clear_reagents() + RC.reagents.trans_to(ready_reagents, bank_size) + ready_reagents.reagents.trans_to(processed_reagents, synth_speed) balloon_alert(user, "синтезируемый набор веществ изменен!") else return ..() -/obj/item/gun/syringe/rapidsyringe/experemental/process() +/obj/item/gun/syringe/rapidsyringe/experimental/process() for (var/obj/item/reagent_containers/syringe/S in syringes) - redy_reagents.reagents.trans_to(S, min(redy_reagents.reagents.total_volume, S.volume - S.reagents.total_volume)) + ready_reagents.reagents.trans_to(S, ready_reagents.reagents.total_volume) for (var/datum/reagent/R in processed_reagents.reagents.reagent_list) - redy_reagents.reagents.add_reagent(R.id, R.volume) + ready_reagents.reagents.add_reagent(R.id, R.volume) -/datum/crafting_recipe/rapidsyringe_experemental - name = "Experemental syringe gun" - result = /obj/item/gun/syringe/rapidsyringe/experemental +/datum/crafting_recipe/rapidsyringe_experimental + name = "Experemintal syringe gun" + result = /obj/item/gun/syringe/rapidsyringe/experimental tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH) reqs = list(/obj/item/relict_priduction/perfect_mix = 1, /obj/item/assembly/signaler/anomaly/vortex = 1, From d4c1cc0ae93618d27e9abe7360cb6cc3dd10fd3e Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Thu, 15 Aug 2024 16:36:32 +0300 Subject: [PATCH 06/23] bugfix + some sprites --- code/game/objects/items/anomaly_beacon.dm | 4 +- .../items/weapons/experimental_syringe_gun.dm | 5 ++- .../items/weapons/grenades/fauna_bomb.dm | 35 ++++++++++++------ .../weapons/tuned_anomalous_teleporter.dm | 4 +- .../mob/living/simple_animal/simple_animal.dm | 13 +++++++ code/modules/research/experimentor.dm | 9 ++--- icons/obj/weapons/techrelic.dmi | Bin 0 -> 1258 bytes 7 files changed, 48 insertions(+), 22 deletions(-) create mode 100644 icons/obj/weapons/techrelic.dmi diff --git a/code/game/objects/items/anomaly_beacon.dm b/code/game/objects/items/anomaly_beacon.dm index 918b268db6a..718b00204c8 100644 --- a/code/game/objects/items/anomaly_beacon.dm +++ b/code/game/objects/items/anomaly_beacon.dm @@ -1,6 +1,6 @@ /obj/item/assembly/anomaly_beacon - icon = 'icons/obj/objects.dmi' - icon_state = "floor_beaconf" + icon = 'icons/obj/weapons/techrelic.dmi' + icon_state = "beacon" name = "anomaly beacon" desc = "A device that draws power from bluespace and creates a permanent tracking beacon." diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index 2d63629c034..50d045c2522 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -2,6 +2,8 @@ name = "experimental syringe gun" desc = "Эксперементальный шприцемет с 6 слотами для шприцев, встроенным, самовосполняющимся хранилищем химикатов и новейшей системой автозаправки шприцев." origin_tech = "combat=3;biotech=4,bluespace=5" + icon = 'icons/obj/weapons/techrelic.dmi' + icon_state = "strynggun" materials = list(MAT_METAL=2000, MAT_GLASS=2000, MAT_BLUESPACE=400) var/obj/item/reagent_containers/glass/beaker/large/ready_reagents = new var/obj/item/reagent_containers/glass/beaker/large/processed_reagents = new @@ -45,7 +47,8 @@ for (var/obj/item/reagent_containers/syringe/S in syringes) ready_reagents.reagents.trans_to(S, ready_reagents.reagents.total_volume) for (var/datum/reagent/R in processed_reagents.reagents.reagent_list) - ready_reagents.reagents.add_reagent(R.id, R.volume) + if (R.can_synth) + ready_reagents.reagents.add_reagent(R.id, R.volume) /datum/crafting_recipe/rapidsyringe_experimental name = "Experemintal syringe gun" diff --git a/code/game/objects/items/weapons/grenades/fauna_bomb.dm b/code/game/objects/items/weapons/grenades/fauna_bomb.dm index 2610ebecf5e..488ea3917de 100644 --- a/code/game/objects/items/weapons/grenades/fauna_bomb.dm +++ b/code/game/objects/items/weapons/grenades/fauna_bomb.dm @@ -10,38 +10,49 @@ item_state = "flashbang" var/deliveryamt = 8 var/amount = 3 - var/list/mobs = list(/mob/living/simple_animal/hostile/asteroid/hivelord/legion, /mob/living/simple_animal/hostile/asteroid/goliath, /mob/living/simple_animal/hostile/asteroid/marrowweaver) var/last_use = 0 var/cooldown = 600 + var/mob/activator /obj/item/grenade/fauna_bomb/attack_self(mob/user) - if (last_use + cooldown < world.time) + if (last_use + cooldown > world.time) to_chat(user, "[src] is still recharging!") return + last_use = world.time + activator = user return ..() -/obj/item/grenade/fauna_bomb/prime(mob/user) +/obj/item/grenade/fauna_bomb/prime() + active = FALSE var/turf/T = get_turf(src) playsound(T, 'sound/items/rawr.ogg', 100, TRUE) - var/faction = user.name + "_fauna_bomb" - user.faction |= faction + var/faction = activator.name + "_fauna_bomb" + activator.faction |= faction + var/list/mob/living/simple_animal/mobs = list() + + var/mob/living/simple_animal/S = pick(/mob/living/simple_animal/hostile/asteroid/hivelord/legion, /mob/living/simple_animal/hostile/asteroid/goliath, /mob/living/simple_animal/hostile/asteroid/marrowweaver) for(var/i in 1 to amount) - var/mob/living/simple_animal/S = pick(mobs) - S = new S(get_turf(src)) - S.faction |= faction + var/mob/living/simple_animal/S1 = new S(get_turf(src)) + mobs.Add(S1) + S1.set_anchor(activator, 10) + S1.faction |= faction if(prob(50)) for(var/j = 1, j <= rand(1, 3), j++) step(S, pick(NORTH, SOUTH, EAST, WEST)) if(prob(40)) - to_chat(user, "[src] falls apart!") + to_chat(activator, "[src] falls apart!") qdel(src) -/datum/crafting_recipe/tuned_anomalous_teleporter - name = "Tuned anomalous teleporter" - result = /obj/item/tuned_anomalous_teleporter + sleep(600) + for (var/mob/M in mobs) + M.dust() + +/datum/crafting_recipe/fauna_bomb + name = "Fauna bomb" + result = /obj/item/grenade/fauna_bomb tools = list(TOOL_SCREWDRIVER) reqs = list(/obj/item/relict_priduction/pet_spray = 1, /obj/item/assembly/signaler/anomaly/pyro = 1, diff --git a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm index 6165975c020..70358becbb5 100644 --- a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm +++ b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm @@ -1,8 +1,8 @@ /obj/item/tuned_anomalous_teleporter name = "tuned anomalous teleporter" desc = "A portable item using blue-space technology." - icon = 'icons/obj/device.dmi' - icon_state = "hand_tele" + icon = 'icons/obj/weapons/techrelic.dmi' + icon_state = "teleport" base_icon_state = "hand_tele" item_state = "electronic" throwforce = 0 diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 0b8137a1b4b..01323ae0a02 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -142,6 +142,9 @@ var/list/low_priority_targets = list() + var/atom/anchor // autodust on a big distance + var/anchor_radius = 10 + /mob/living/simple_animal/Initialize(mapload) . = ..() GLOB.simple_animals[AIStatus] += src @@ -321,6 +324,12 @@ /mob/living/simple_animal/handle_environment(datum/gas_mixture/environment) + if (anchor) + var/dist = get_dist(src, anchor) + if (dist > anchor_radius) + src.dust() + return + var/atmos_suitable = TRUE var/areatemp = get_temperature(environment) @@ -810,3 +819,7 @@ if(!can_collar) return AddElement(/datum/element/strippable, create_strippable_list(list(/datum/strippable_item/pet_collar))) + +/mob/living/simple_animal/proc/set_anchor(atom/A, radius) + anchor = A + anchor_radius = radius diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 947fd32a9d4..021750c8a77 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -415,8 +415,7 @@ playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) ejectItem() throwSmoke(get_turf(exp_on)) - var/obj/item/relict_priduction/perfect_mix/R = new /obj/item/relict_priduction/perfect_mix(get_turf(exp_on)) - R.icon_state = exp_on.icon_state + new /obj/item/relict_priduction/perfect_mix(get_turf(exp_on)) qdel(exp_on) else exp = FAIL @@ -749,8 +748,8 @@ /obj/item/relict_priduction/perfect_mix name = "perfect mix" desc = "Странный объект из которого можно бесконечно заполнять емкости какой-то жидкостью." - icon_state = "infra-igniter-tank0" - icon = 'icons/obj/assemblies.dmi' + icon_state = "beaker" + icon = 'icons/obj/weapons/techrelic.dmi' origin_tech = "materials=4" var/datum/reagent/R var/transfer = 10 @@ -806,7 +805,7 @@ visible_message(message) to_chat(user, message) var/amount = rand(1,3) - var/list/A = pick(/mob/living/simple_animal/hostile/bear,/mob/living/simple_animal/hostile/poison/bees,/mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/alien,/mob/living/simple_animal/butterfly,/mob/living/simple_animal/pet/dog/corgi) + var/A = pick(/mob/living/simple_animal/hostile/bear,/mob/living/simple_animal/hostile/poison/bees,/mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/alien,/mob/living/simple_animal/butterfly,/mob/living/simple_animal/pet/dog/corgi) for(var/i in 1 to amount) var/mob/living/simple_animal/S diff --git a/icons/obj/weapons/techrelic.dmi b/icons/obj/weapons/techrelic.dmi new file mode 100644 index 0000000000000000000000000000000000000000..16fe3a648f485ec65fbb532da7f22df556e0dc2d GIT binary patch literal 1258 zcmV004jp0{{R3ySJPfuDxLQMbv{{Z~&0A~L_K0ZD^NqTvC z5fKqtRCFUFBLG)MYpR*Rz`!q8PeUgo;s5{u0d!JMQvg8b*k%9#0Hk_USad{Xb7OL8 zaCB*JZU6vyoKseCa&`CgQ*iP1Rd>iYoKc(@Sw!X@+Vg6e6^jq~@d+17}G@K~#90?V5pdnm`mq2~ZJ{h%B1bSV5DTO#lA_`<4a8xVw+KY_aV- zOfs1q@Ld7Hxr65s1VKC&PmVo`kG#Hbp70bP9@!q7?|C8Ozaf5Nxji-?U14lLdVs$> zU?h25Kb7d#7~6Z{G>U!Sk9B*w_JP?4L14ALX?_$=r?DVZzlG8LENq#n))?D+Q5?0z z$`=^f!zpm#Aw5A51VIo4K@k5sNsA+I9dF*E9AWFN^QH6WmU((R!PXBDaB&{6PzJE` zK(@?*Wu}W@_N*utElI)#_hSBP{qnM2=@KBGd1=v-dWrz|`mDywc(&ZE^L)Ko!k;n& z@8dfI;4I&6w{VVY0^H@ZR{>x09VB=GVE%5mt5fj|_m=?$3}6BnP^b>!eZC2h!&EMJ z7XJ=#ak}MP?^he?F9TSSuzgvTdzKVT5kUB|+E=B)!`5YW?fF3fd+2yPLJYA8GWi?# zodN6|kSPPOb3m^sWMmVf>A+ zcTIrokR5va%YY<32TWC$5%J$9pw>45yZ#*Dz}L+YyxOkoH(V^YJFnRTX|iSe{hn>L zpVBQW%hKqps`~2XKoQ`moQ?VJfcXN>o`vBua<>=r#U)QS9rN{oXSj~RZ2+!g&&mKc zUIx&E`FaAJJCa24A+_{F1gx(V5(nORdiC%GK@bE%5X66gcwFJ3A6W?fu>N^e(5F7^ z`a5eM#*#?)aFk_#XY0dhOLQI3w!a&y{|jgFyC9xj2ej?)2J8RA*?aw9)Vn&MqMuuB z%>5lK2A}7c&ufnc{H^|ORWF13UIEYj+(s;h{%$1}gU7Zv^?wjhavSi{&&dJ${tojt z{a-lyA<+fw(cii7R{>9_(@j9@{%)xL4+5S(K0i)30ljv6oBnQq{!aw_{P;8m)Z^NF z@=gbbSlsI#G+-3BH)GYk*tWkLp#P(1SP6n42!bHSCY+f2xw^lbjQDkJ5=@N!oN!{D zu?S)Bn7+|UIT`I6FV@eY{hed9{ajD)99=)x*E>hoF7@@!sRIN^K%WBY(e-nEy>oQ^ zTwm`TZ9mu3J4e)C!OuWbe_{RI9{>x0y#eQ#`#Ib@2kGZf?;fn5qyCN{2x0_&0n4$; Uh#jS>NB{r;07*qoM6N<$f*d_gX8-^I literal 0 HcmV?d00001 From 3643e80cef5ac2592c4e263b156bc8ac9b9817a3 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Fri, 16 Aug 2024 09:11:03 +0300 Subject: [PATCH 07/23] + fauna bomb icon --- .../items/weapons/grenades/fauna_bomb.dm | 5 ++--- icons/obj/weapons/techrelic.dmi | Bin 1258 -> 1632 bytes 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/weapons/grenades/fauna_bomb.dm b/code/game/objects/items/weapons/grenades/fauna_bomb.dm index 488ea3917de..f7d1754676a 100644 --- a/code/game/objects/items/weapons/grenades/fauna_bomb.dm +++ b/code/game/objects/items/weapons/grenades/fauna_bomb.dm @@ -5,9 +5,8 @@ name = "fauna bomb" desc = "Эксперементальная, многоразовая граната, создающая фауну агрессивную ко всем, кроме активировавшего гранату." w_class = WEIGHT_CLASS_SMALL - icon = 'icons/obj/weapons/grenade.dmi' - icon_state = "banana" - item_state = "flashbang" + icon = 'icons/obj/weapons/techrelic.dmi' + icon_state = "bomb" var/deliveryamt = 8 var/amount = 3 var/last_use = 0 diff --git a/icons/obj/weapons/techrelic.dmi b/icons/obj/weapons/techrelic.dmi index 16fe3a648f485ec65fbb532da7f22df556e0dc2d..0c1ef200b3555446190f47087a5b2ed8a83b966a 100644 GIT binary patch delta 1353 zcmV-P1-AO?3E&Kn7Y?8Z0{{R3yb+fl0002YktKg-85tRsm6i4(GMfM))z#JJ*OO{$ zYHLgpoM-^{V*ph^7yq#U{Br>Re*iC6PeplWV*mw6HWC1~=|@LLh=_>a02csy#WXiR zC@3s=0ROV?elmGw#0d!JMQvg8b*k%9#0I`w3nSYRKZBl-25_UZ%2tCG7+msbt z{anDI2>^woTuv9|2yOrX1cgaNK~#90?V1U9+C~&c6{N5lBP75Brhu2q7K@1s^^!Dk zlmGvt`bHzMgqeA&N1UO}yE^f)bCKTXkq|!Lk>d~qL7WyJj_grN$ni`12_Ia`@(Mrgq=n>8c)Wfu+a%6 z0e`q3Pezlm#>3v@$-ZY-99W_2>uZR?H;ym9;(lj9xCt0a1B9D^N}mP{e+tN8C0H9y zTfjGVd2@Ng^7`!nXD6Wa8run|@>xJ-s+kC^!tb?dQY*b$^F>lm5@E|1MAk%+cQ+!|w%* zqUa!?aer4-{|5o1yZgK7AfS`&Z-3I?7100jfcJOz+JI_~?H%z+2d9{S)}3g;N-g^^ zmVFkR_ICyJfAkD1K@bE%5QJ^Kvc8{7`n$5lKiA4`S=-NX$6sR$4^~I_7p;(G%@W6e zZi1P|`Z=_}i{t5RK2?t}^vZrNr+4D{bg@`Wr!&O_Q?Kgh^7?pM{N=B&$@T?qwFeVSJsJS}1-?1) zn>ha0x0wG}uy?S24)x#Sx4*w98w`*f-_)c19O~mA;`rZx#M0xNdc2>*{N_y}*T$Y8 z2!bF8f*?*FtiQ7i*5BC%>*s8P_H(vD`#H;`{oZP&?B^^a`n{+1dPb${=PZNwbCwbP zUb2FUe$Fy!zqeW``#HPh=;!Q`qo1=3-p|)qaN!|6K@bE%5ClOG|2j#FBX1pV z-l7~~>#g&p^XHa%dON|^4-jy19AYA!Up$Z{%Za5vR>&D zAf9^sWMmVf>A+cTIrokR5va%YY<32TWC$5%J$9pw>45 zyZ#*Dz}L+YyxOkoH(V^YJFnRTX|iSe{hn>LpVBQW%hKqps`~2XKoQ`moQ?VJfcXN> zo`vCmGIF;U^Tj1kHy!i!fM>Xl!EFGpW6#O}HeLqMgZX*_oI8?4@gcSJLjE5KwX(@Y2u80s8(9^EUloIQt>d1?mD><6t_2H)xFrZzZ;-` z|D$JE34$O9f*{5woS6H$y1$!@_;qa(OpN`UaAKXY2x0G-zR^lK8SNV{*3Y5+ony59 zTu<*DT|d{?J4e?p_4UrF0|ZDwp91R9^>cl_b9DV&U+)}kKiAVcN7P@z&p=auVg217 z01JS<0q2E}@I9;~0E{*E9S2x0_&0n4$;h#jS>NB{r;07*qoM6N<$f+uU< AbpQYW From 06eacf4e0853dd2abea148f57dc2a889fe5e5319 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Sat, 17 Aug 2024 20:34:40 +0300 Subject: [PATCH 08/23] inhand sprites + bugfix --- code/game/objects/items/anomaly_beacon.dm | 3 +++ .../items/weapons/experimental_syringe_gun.dm | 3 +++ .../items/weapons/grenades/fauna_bomb.dm | 5 ++++- .../objects/items/weapons/grenades/grenade.dm | 5 +++-- .../weapons/tuned_anomalous_teleporter.dm | 5 +++-- .../simple_animal/hostile/mining/hivelord.dm | 2 ++ code/modules/research/experimentor.dm | 3 +++ .../mob/inhands/relics_production/inhandl.dmi | Bin 0 -> 740 bytes .../mob/inhands/relics_production/inhandr.dmi | Bin 0 -> 740 bytes icons/obj/weapons/techrelic.dmi | Bin 1632 -> 1601 bytes 10 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 icons/mob/inhands/relics_production/inhandl.dmi create mode 100644 icons/mob/inhands/relics_production/inhandr.dmi diff --git a/code/game/objects/items/anomaly_beacon.dm b/code/game/objects/items/anomaly_beacon.dm index 718b00204c8..56fe3dd14a3 100644 --- a/code/game/objects/items/anomaly_beacon.dm +++ b/code/game/objects/items/anomaly_beacon.dm @@ -1,6 +1,9 @@ /obj/item/assembly/anomaly_beacon icon = 'icons/obj/weapons/techrelic.dmi' icon_state = "beacon" + item_state = "beacon" + lefthand_file = 'icons/mob/inhands/relics_production/inhandl.dmi' + righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' name = "anomaly beacon" desc = "A device that draws power from bluespace and creates a permanent tracking beacon." diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index 50d045c2522..22c1cf85cc7 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -3,6 +3,9 @@ desc = "Эксперементальный шприцемет с 6 слотами для шприцев, встроенным, самовосполняющимся хранилищем химикатов и новейшей системой автозаправки шприцев." origin_tech = "combat=3;biotech=4,bluespace=5" icon = 'icons/obj/weapons/techrelic.dmi' + item_state = "strynggun" + lefthand_file = 'icons/mob/inhands/relics_production/inhandl.dmi' + righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' icon_state = "strynggun" materials = list(MAT_METAL=2000, MAT_GLASS=2000, MAT_BLUESPACE=400) var/obj/item/reagent_containers/glass/beaker/large/ready_reagents = new diff --git a/code/game/objects/items/weapons/grenades/fauna_bomb.dm b/code/game/objects/items/weapons/grenades/fauna_bomb.dm index f7d1754676a..08283dbf464 100644 --- a/code/game/objects/items/weapons/grenades/fauna_bomb.dm +++ b/code/game/objects/items/weapons/grenades/fauna_bomb.dm @@ -7,6 +7,9 @@ w_class = WEIGHT_CLASS_SMALL icon = 'icons/obj/weapons/techrelic.dmi' icon_state = "bomb" + item_state = "bomb" + lefthand_file = 'icons/mob/inhands/relics_production/inhandl.dmi' + righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' var/deliveryamt = 8 var/amount = 3 var/last_use = 0 @@ -20,7 +23,7 @@ last_use = world.time activator = user - return ..() + return ..(user, FALSE) /obj/item/grenade/fauna_bomb/prime() active = FALSE diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index e440961a233..3b8fa23f12e 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -54,11 +54,12 @@ . += span_warning("[src] is set for instant detonation.") -/obj/item/grenade/attack_self(mob/user) +/obj/item/grenade/attack_self(mob/user, should_update_icon = TRUE) if(!active && clown_check(user)) to_chat(user, "You prime the [name]! [det_time/10] seconds!") active = TRUE - update_icon(UPDATE_ICON_STATE) + if (should_update_icon) + update_icon(UPDATE_ICON_STATE) add_fingerprint(user) var/turf/bombturf = get_turf(src) message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]") diff --git a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm index 70358becbb5..6325e64eed6 100644 --- a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm +++ b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm @@ -3,8 +3,9 @@ desc = "A portable item using blue-space technology." icon = 'icons/obj/weapons/techrelic.dmi' icon_state = "teleport" - base_icon_state = "hand_tele" - item_state = "electronic" + lefthand_file = 'icons/mob/inhands/relics_production/inhandl.dmi' + righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' + item_state = "teleport" throwforce = 0 w_class = WEIGHT_CLASS_SMALL throw_speed = 3 diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm index 54a19a1a0fe..6ea2b0b0d02 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm @@ -209,6 +209,8 @@ /mob/living/simple_animal/hostile/asteroid/hivelord/legion/death(gibbed) visible_message("The skulls on [src] wail in anger as they flee from their dying host!") var/turf/T = get_turf(src) + if (T == null) // When legion dusts T = null. Maybe not onli this way. + return for(var/i in 1 to 2) new /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/weaken(T) if(T) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 021750c8a77..23e96f228b2 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -749,7 +749,10 @@ name = "perfect mix" desc = "Странный объект из которого можно бесконечно заполнять емкости какой-то жидкостью." icon_state = "beaker" + item_state = "beaker" icon = 'icons/obj/weapons/techrelic.dmi' + lefthand_file = 'icons/mob/inhands/relics_production/inhandl.dmi' + righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' origin_tech = "materials=4" var/datum/reagent/R var/transfer = 10 diff --git a/icons/mob/inhands/relics_production/inhandl.dmi b/icons/mob/inhands/relics_production/inhandl.dmi new file mode 100644 index 0000000000000000000000000000000000000000..9a95b0f2c2ed8b638ea4cc05ae936e4b1b0862c3 GIT binary patch literal 740 zcmV004jp0{{R3ySC@d%_ zFJxq77#J8nK0a{~rT=aIK0ZnRMgR92|4&a^LPAW3gPAZZOYwq3&;S4c0d!JMQvg8b z*k%9#0E>E5Sad{Xb7OL8aCB*JZU6vyoKseCa&`CgQ*iP1GC)ttc@!6~s0~ zQI?#aM_5^YZW2L7#U(|RdFkn;gpDgn%}FiDFDk*MP+7s%&jsvl0KVKvWZB8#MF0Q+ zo=HSORCt{2+ih=xFcgO2ZdE8RPDKWa=>PwjD<)gAjMH|u%q8B}*JB?atDjC#DF6Tf z;F}jKI$^PFoAGMJrHBCuvX#=)r_@mqVt_Au6_T#kS-y@dm}f$OUW=otoe4_UMV=LL z1+!cT(1kcs#suA;{eE;&=&0X`9N^40VHY^1#Pzcc#en#1000000Pvj3>d_6{s=6*8 z-NB`-H=Fv8?r?TZ=G~pWZMSdfyUZ04wq(ZBakn?S1^WD`A+H%%!3(}c$u0gzKL7v# z008hnmAoQzjM8Wh{@0YXxFWM7_t}7WXOZ^(;EkxJCEol+O(W-7fBIJuY0!3U-?004jp0{{R3ySGC)ttc@!6~s0~ zQkI{aL{L$2Nl|59dU|OdL6s$`IjIHtMJ0soO-)SB$7!Cjf~%hk*xLZ(IY?ym5+w%! z00EpyL_t(|obA}lc7i|*fMLXfx1u8>DvG}UV-~t-tu-MGNIgCOx6O6XRiX$0003xA zYQrRnrFud<)$8ACZNp7Ta;cgyO_ErPr_IMnTc((j9X_lp}|3OQVQW{kG-N7*0lq8l0RssM3004mh zVk)1=l+bwML_CqzA-#5M9g>?ff0;H%yvHA^38}SP>sY_*xYaG?h*yW?x?=AOZyoZP zSajO!%i3+EBVHX6%l5_LXx^{>jicsCofhjSFUq`(>>Hl)C@+iri5vY?o=aaw`KeQl zudAN5(EY6QIbc>;Rfu|0VC7gF0ssI20MO`h_8NuXnJ;9j>S;Z^FZ@36>~-7QxxPJ| z^h$p`^gnyKOVxM7i`bwX;OynDa(|<%++c{aSMQ%#Z7|;1E8OdE2mk;8003Un5VyT& zsv`aF^Y{C^iyUj)-t6Hsjc<2XIphZUe&RF5tLpt4At5{EnbjZzdXu+!jr{-s9en`Z WgAn2MUk^C|0000n;_Zt6XWMofIT0%lh zk&GBlFIP_>Ia2?O0J<>_YXJcN&t?S?9X3&G|F1g$X8-^H{{Z~&85tRsm6i4(GMfM) z)z#JJ*OO{$YHLgpoM-@5Ko|C70ROQ7{Br>Re*lruAr;){_#OZN00DGTPE!Ct=GbNc z006F&3ITC{&{jmA)2$_lQ2F5plF0A(#*!t7YGVgLXHY)M2xRCt{2nhR6gI1qr<*iB-b2M#$N zHDE%VIB^ol5jfy_Ev5heN8L)YLvE0?2~?Gt+s^}kQ}V4=Ysq$|J7$a^2%=hivg}c6 zNdB66hEE>ik@494jQNQFjQILH$7A!O0j|CC0zP(u4M}xn-KZm_z zYTFY8K@bE%5SB?ws_B#DqC^?u+z&1;OD+blBV2n37_I|`$^>pbOGl$&Ns^?M^DJe9 zQOSTQ5;*oe0It&UcnsI5CV^8AOAG-i2LeW_EpY2unvRk*n@lEInv7CK0^zfNNoMlX zEX$@QKh35lKbcOa6SaqcbX{PoOpvY%)cT@8y_W@QeNmvw!>(@>sJuot3e@?sK&>wd z)cLYNq-9*m42q{o&=bj)4f*=TjunX3|a}3s> za}C;`**`xir9EM-dA;EH~%wXH2 z{ka@Q!wy`}m)GhEEPJd!$FGl=vslhmo51~_h>ve>%s!4+D~&JubCc_nQv0GmCks^l-#MRO#pe$X59jgnTDbz2ebJvQ3RGN! zaF3NMIA5qHSj@^5)cJA+wZ2$Er7!w(vOraT?s1tHFD~WF{PFd8?*B%-e{*B@zQ0;& zJl3CkWck;BzKP>2JW5|uWw7nh{@iz#Kgsdmo^t-@Z}xb9?tA|9<5?V#Kr!C7$NO{n xPdWbiXRaJ?+cUI3x4ua_YXJcN&t@nnFC_q8aS^2j5gj&BYyWNj z6#`=aMgJHW821|g|F1h_WMofIT0%lh|Ns90{O2N#5I*0L;}8TvoE9IB>`_X{@k{y%A6&#E`(yJR$3y%_#Fq{C$L6Ci zu^$SFc{st; z7Z9+u8PJjjF!O-l4uH0=ilFylr_;)4G{V9?pWp3WT=crC1c(ovW+$WRNCLdq`w5QE z{C2+=1igM6z7-i*9=|gHuJXZP0N1!8z`MME$zg3agaj7=%pVSiNh;>!emkH8140ge z4Cu&C;ro0VAb_b%EEf9>VEl3mnA&&y!fywJoklnsPsXFL(Fr91xF1hOld;Cb-s8!> zXIC6pq3i2wh`~3GFTUb_XF#|K7)k?#n}AB61`K}+$Y3Q{8%|rmH+Fe*dBgJh?Eq&d zp!6Es38?Z}KxZ!?AI5H2Z$h$qC z&u@9E>6lLjoWp$#J_g`Eb}kKI;za;8m`^6awIgUq-lT@Uh=9qRLU07Hy}WXNc!D4Z zf*=Uu7l1#maMF(~cqK3ScdDRIeVFxk#@?$5DyoO04EsA%?^QD@`vFb+yQ2C(uU@<5 z)av^IP5ZmT`aiFJn>-kGD-S5?=em7;e+Qe!2La}T#G?WKRe#q_wnBZbfSZ1<&o@nf z*X5hWWBcp+KL{u|47ly*!~k`Fe}{RK{?DubE>H!`(cc}z?*)va=pdkRe^*rh2LYqI z`@85Mpp)%y(%%)(|M7tLclX+WYL4w4@ks}#n19xtXuwJ>`!JS$7Mu2W1@wRP3@bqp z1VIplZM?F+pG*3?vc*5w%5GWP&vD0JV+#*fNB0-4kY&vh$AE5vnaBEnIkdlv>DLqHvSL;8uK6+ZOpHyDm&*k*- zY!N-byu3U|%LnNS8G3bpKbObC7CZm|002ovPDHLkV1hCh#pD10 From d4d3e27061fda382e3dd4cc8a6992ce6442cc867 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Mon, 19 Aug 2024 07:07:19 +0300 Subject: [PATCH 09/23] bugfix --- code/modules/research/experimentor.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index f198093506c..596c2e89890 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -578,8 +578,7 @@ else if(prob(EFFECT_PROB_LOW)) visible_message("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!") badThingCoeff++ - var/list/obj/item/stack/sheet/mineral/minreals = list(/obj/item/stack/sheet/mineral/diamond, /obj/item/stack/sheet/mineral/gold, /obj/item/stack/sheet/glass,/obj/item/stack/sheet/metal,/obj/item/stack/sheet/mineral/plasma,/obj/item/stack/sheet/mineral/silver,/obj/item/stack/sheet/mineral/titanium,/obj/item/stack/sheet/mineral/uranium,/obj/item/stack/sheet/mineral/tranquillite,/obj/item/stack/sheet/mineral/bananium,/obj/item/stack/sheet/mineral/mythril) - // The technical specification was "Random processed ore". Mithril fits this description. :jokerge: + var/list/obj/item/stack/sheet/mineral/minreals = list(/obj/item/stack/sheet/mineral/diamond, /obj/item/stack/sheet/mineral/gold, /obj/item/stack/sheet/glass,/obj/item/stack/sheet/metal,/obj/item/stack/sheet/mineral/plasma,/obj/item/stack/sheet/mineral/silver,/obj/item/stack/sheet/mineral/titanium,/obj/item/stack/sheet/mineral/uranium,/obj/item/stack/sheet/mineral/tranquillite,/obj/item/stack/sheet/mineral/bananium) // Plastinium and abductor alloy are alloys, not processed ores. for (var/i = 1; i <= 3; ++i) var/obj/item/stack/sheet/mineral/m0 = pick(minreals) From ac2201ab4f4021e5a1bc549d813cf63b033c9679 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Wed, 21 Aug 2024 23:29:08 +0300 Subject: [PATCH 10/23] bugfix --- code/game/objects/effects/anomalies.dm | 28 +++++++++---------- .../items/weapons/experimental_syringe_gun.dm | 2 +- .../items/weapons/grenades/fauna_bomb.dm | 10 ++----- .../living/simple_animal/hostile/hostile.dm | 12 ++++---- .../simple_animal/hostile/mining/hivelord.dm | 2 +- code/modules/research/experimentor.dm | 25 +++++++++++------ 6 files changed, 41 insertions(+), 38 deletions(-) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index a61dd84ebe7..15588283fee 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -22,7 +22,6 @@ /// Do we drop a core when we're neutralized? var/drops_core = TRUE - var/list/contacted_items= list() /obj/effect/anomaly/Initialize(mapload, new_lifespan, _drops_core = TRUE) . = ..() @@ -61,20 +60,21 @@ /obj/effect/anomaly/process() for(var/obj/item/I in get_turf(src)) - if(I.origin_tech || (I.UID() in contacted_items)) - contacted_items.Add(I.UID()) - if (istype(I, /obj/item/relict_priduction/rapid_dupe)) - var/amount = rand(1, 3) - for (var/i; i <= amount; i++) - new /obj/item/relic(get_turf(I)) - var/datum/effect_system/smoke_spread/smoke = new - smoke.set_up(5, get_turf(I)) - smoke.start() - qdel(I) - continue - if (prob(2)) + if(!I.origin_tech) + continue + if (istype(I, /obj/item/relict_priduction/rapid_dupe)) + var/amount = rand(1, 3) + for (var/i; i <= amount; i++) new /obj/item/relic(get_turf(I)) - qdel(I) + var/datum/effect_system/smoke_spread/smoke = new + smoke.set_up(5, get_turf(I)) + smoke.start() + qdel(I) + continue + if (prob(2)) + new /obj/item/relic(get_turf(I)) + qdel(I) + anomalyEffect() if(death_time < world.time) if(loc) diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index 22c1cf85cc7..f749fb3db6a 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -1,7 +1,7 @@ /obj/item/gun/syringe/rapidsyringe/experimental name = "experimental syringe gun" desc = "Эксперементальный шприцемет с 6 слотами для шприцев, встроенным, самовосполняющимся хранилищем химикатов и новейшей системой автозаправки шприцев." - origin_tech = "combat=3;biotech=4,bluespace=5" + origin_tech = "combat=3;biotech=4;bluespace=5" icon = 'icons/obj/weapons/techrelic.dmi' item_state = "strynggun" lefthand_file = 'icons/mob/inhands/relics_production/inhandl.dmi' diff --git a/code/game/objects/items/weapons/grenades/fauna_bomb.dm b/code/game/objects/items/weapons/grenades/fauna_bomb.dm index 08283dbf464..6eb7800f159 100644 --- a/code/game/objects/items/weapons/grenades/fauna_bomb.dm +++ b/code/game/objects/items/weapons/grenades/fauna_bomb.dm @@ -1,6 +1,3 @@ - -// var/turf/T | This was made 14th September 2013, and has no use at all. Its being removed - /obj/item/grenade/fauna_bomb name = "fauna bomb" desc = "Эксперементальная, многоразовая граната, создающая фауну агрессивную ко всем, кроме активировавшего гранату." @@ -12,16 +9,15 @@ righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' var/deliveryamt = 8 var/amount = 3 - var/last_use = 0 - var/cooldown = 600 + COOLDOWN_DECLARE(fauna_bomb_cooldown) var/mob/activator /obj/item/grenade/fauna_bomb/attack_self(mob/user) - if (last_use + cooldown > world.time) + if(!COOLDOWN_FINISHED(src, fauna_bomb_cooldown)) to_chat(user, "[src] is still recharging!") return - last_use = world.time + COOLDOWN_START(src, fauna_bomb_cooldown, 60 SECONDS) activator = user return ..(user, FALSE) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 5830b18e2a8..edc8dda4aa5 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -37,7 +37,7 @@ var/ranged_ignores_vision = FALSE //if it'll fire ranged attacks even if it lacks vision on its target, only works with environment smash var/check_friendly_fire = 0 // Should the ranged mob check for friendlies when shooting var/retreat_distance = null //If our mob runs from players when they're too close, set in tile distance. By default, mobs do not retreat. - var/minimum_distance = 1 //Minimum approach distance, so ranged mobs chase targets down, but still keep their distance set in tiles to the target, set higher to make mobs keep distance + var/minimum_distance = 1 //Minimum approach distance, so ranged mobs chase targets down, but still keep their distance set in tiles to the target, set \er to make mobs keep distance //These vars are related to how mobs locate and target @@ -264,7 +264,7 @@ return A -/mob/living/simple_animal/hostile/proc/PickTarget(list/mob/Targets)//Step 3, pick amongst the possible, attackable targets +/mob/living/simple_animal/hostile/proc/PickTarget(list/Targets)//Step 3, pick amongst the possible, attackable targets if(target != null)//If we already have a target, but are told to pick again, calculate the lowest distance between all possible, and pick from the lowest distance targets for(var/pos_targ in Targets) var/atom/A = pos_targ @@ -273,13 +273,13 @@ if(target_dist < possible_target_distance) Targets -= A - var/list/mob/not_low_priority_targets = list() + var/list/mob/high_priority_targets = list() for(var/mob/T in Targets) if (!(T.UID() in low_priority_targets)) - not_low_priority_targets.Add(T) + high_priority_targets.Add(T) - if (not_low_priority_targets.len) - Targets = not_low_priority_targets + if (high_priority_targets.len) + Targets = high_priority_targets if(!Targets.len)//We didnt find nothin! return diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm index 6ea2b0b0d02..9fb15d20123 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm @@ -209,7 +209,7 @@ /mob/living/simple_animal/hostile/asteroid/hivelord/legion/death(gibbed) visible_message("The skulls on [src] wail in anger as they flee from their dying host!") var/turf/T = get_turf(src) - if (T == null) // When legion dusts T = null. Maybe not onli this way. + if (!T) // When legion dusts T = null. Maybe not onli this way. return for(var/i in 1 to 2) new /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/weaken(T) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 596c2e89890..e7fa3297241 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -174,7 +174,7 @@ for(var/T in temp_tech) techs_sum += temp_tech[T] if (istype(O, /obj/item/relic) || techs_sum > 4 && !istype(src, /obj/item/storage/backpack/holding)) - to_chat(user, "Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.") + to_chat(user, span_notice("Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.")) return investigate_log("Experimentor has made a clone of [O]", INVESTIGATE_EXPERIMENTOR) @@ -735,14 +735,14 @@ icon_state = "" icon = 'icons/obj/assemblies.dmi' origin_tech = "bluespace=3;materials=3" - var/cooldown = 0 - var/last_use = 0 + var/cooldown = 5 SECONDS + COOLDOWN_DECLARE(relict_priduction_cooldown) /obj/item/relict_priduction/attack_self(mob/user) - if (world.time < last_use + cooldown) + if(!COOLDOWN_FINISHED(src, relict_priduction_cooldown)) to_chat(user, "[src] is not ready yet.") return FALSE - last_use = world.time + COOLDOWN_START(src, relict_priduction_cooldown, cooldown) return TRUE /obj/item/relict_priduction/perfect_mix @@ -775,7 +775,7 @@ icon_state = "prox-multitool2" icon = 'icons/obj/assemblies.dmi' origin_tech = "materials=4" - cooldown = 100 + cooldown = 10 SECONDS /obj/item/relict_priduction/strange_teleporter/attack_self(mob/user) if (!..()) @@ -799,7 +799,7 @@ icon_state = "armor-igniter-analyzer" icon = 'icons/obj/assemblies.dmi' origin_tech = "biotech=4" - cooldown = 600 + cooldown = 60 SECONDS /obj/item/relict_priduction/pet_spray/attack_self(mob/user) if (!..()) @@ -808,11 +808,18 @@ visible_message(message) to_chat(user, message) var/amount = rand(1,3) - var/A = pick(/mob/living/simple_animal/hostile/bear,/mob/living/simple_animal/hostile/poison/bees,/mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/alien,/mob/living/simple_animal/butterfly,/mob/living/simple_animal/pet/dog/corgi) + var/list/possible_mobs = list(/mob/living/simple_animal/hostile/bear, + /mob/living/simple_animal/hostile/poison/bees, + /mob/living/simple_animal/hostile/carp, + /mob/living/simple_animal/hostile/alien, + /mob/living/simple_animal/butterfly, + /mob/living/simple_animal/pet/dog/corgi + ) + var/mob/to_spawn = pick(possible_mobs) for(var/i in 1 to amount) var/mob/living/simple_animal/S - S = new A(get_turf(src)) + S = new to_spawn(get_turf(src)) S.faction |= "petSpraySummon" S.gold_core_spawnable = HOSTILE_SPAWN S.low_priority_targets += user.UID() From 698815f4ad94c07119c33c1e90ab811ba9ed6047 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Wed, 21 Aug 2024 23:55:33 +0300 Subject: [PATCH 11/23] bugfix --- .../items/weapons/grenades/fauna_bomb.dm | 2 +- .../mob/living/simple_animal/simple_animal.dm | 16 +++++------ code/modules/research/experimentor.dm | 28 +++++++++---------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/code/game/objects/items/weapons/grenades/fauna_bomb.dm b/code/game/objects/items/weapons/grenades/fauna_bomb.dm index 6eb7800f159..cfac2ac920c 100644 --- a/code/game/objects/items/weapons/grenades/fauna_bomb.dm +++ b/code/game/objects/items/weapons/grenades/fauna_bomb.dm @@ -34,7 +34,7 @@ for(var/i in 1 to amount) var/mob/living/simple_animal/S1 = new S(get_turf(src)) mobs.Add(S1) - S1.set_anchor(activator, 10) + S1.set_leash(activator, 10) S1.faction |= faction if(prob(50)) for(var/j = 1, j <= rand(1, 3), j++) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 7c298568d23..18dc81754fe 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -142,8 +142,8 @@ var/list/low_priority_targets = list() - var/atom/anchor // autodust on a big distance - var/anchor_radius = 10 + var/atom/leash // autodust on a big distance + var/leash_radius = 10 /mob/living/simple_animal/Initialize(mapload) . = ..() @@ -310,9 +310,9 @@ /mob/living/simple_animal/handle_environment(datum/gas_mixture/environment) - if (anchor) - var/dist = get_dist(src, anchor) - if (dist > anchor_radius) + if (leash) + var/dist = get_dist(src, leash) + if (dist > leash_radius) src.dust() return @@ -816,6 +816,6 @@ return AddElement(/datum/element/strippable, create_strippable_list(list(/datum/strippable_item/pet_collar))) -/mob/living/simple_animal/proc/set_anchor(atom/A, radius) - anchor = A - anchor_radius = radius +/mob/living/simple_animal/proc/set_leash(atom/A, radius) + leash = A + leash_radius = radius diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index b1e88545d77..d11c1745965 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -151,16 +151,16 @@ if(loaded_item) to_chat(user, span_warning("The [name] is already loaded.")) return ATTACK_CHAIN_PROCEED - if(!checkCircumstances(O)) - to_chat(user, span_warning("The [O.name] is not yet valid for [src] and must be completed.")) + if(!checkCircumstances(I)) + to_chat(user, span_warning("The [I.name] is not yet valid for [src] and must be completed.")) return ATTACK_CHAIN_PROCEED - if(!O.origin_tech) - to_chat(user, span_warning("The [O.name] has no technological origin.")) + if(!I.origin_tech) + to_chat(user, span_warning("The [I.name] has no technological origin.")) return ATTACK_CHAIN_PROCEED - if(!O.origin_tech) - to_chat(user, span_warning("The [O.name] has no technological origin.")) + if(!I.origin_tech) + to_chat(user, span_warning("The [I.name] has no technological origin.")) return ATTACK_CHAIN_PROCEED - var/list/temp_tech = ConvertReqString2List(O.origin_tech) + var/list/temp_tech = ConvertReqString2List(I.origin_tech) if(temp_tech.len == 0) to_chat(user, "You cannot experiment on this item!") return @@ -168,22 +168,22 @@ var/techs_sum = 0 for(var/T in temp_tech) techs_sum += temp_tech[T] - if (istype(O, /obj/item/relic) || techs_sum > 4 && !istype(src, /obj/item/storage/backpack/holding)) + if (istype(I, /obj/item/relic) || techs_sum > 4 && !istype(src, /obj/item/storage/backpack/holding)) to_chat(user, span_notice("Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.")) return - investigate_log("Experimentor has made a clone of [O]", INVESTIGATE_EXPERIMENTOR) + investigate_log("Experimentor has made a clone of [I]", INVESTIGATE_EXPERIMENTOR) throwSmoke(get_turf(pick(oview(1,src)))) for (var/i = 1; i <= badThingCoeff; i++) - visible_message("A duplicate [O] pops out!") - var/type_to_make = O.type + visible_message("A duplicate [I] pops out!") + var/type_to_make = I.type new type_to_make(get_turf(pick(oview(1,src)))) clone_next = FALSE return - if(!user.drop_transfer_item_to_loc(O, src)) + if(!user.drop_transfer_item_to_loc(I, src)) return - loaded_item = O - to_chat(user, span_notice("You have added [O] to [src].")) + loaded_item = I + to_chat(user, span_notice("You have added [I] to [src].")) flick("h_lathe_load", src) return ATTACK_CHAIN_BLOCKED_ALL From 738631bfb3d8ea895bb08a012240bed5d2b8269c Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Thu, 22 Aug 2024 22:27:15 +0300 Subject: [PATCH 12/23] new attack returns --- .../objects/items/weapons/experimental_syringe_gun.dm | 4 ++-- code/modules/research/experimentor.dm | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index f749fb3db6a..ad12cd4d4ef 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -27,11 +27,11 @@ var/in_clip = length(syringes) + (chambered.BB ? 1 : 0) if(in_clip < max_syringes) if(!user.drop_transfer_item_to_loc(A, src)) - return + return ..() balloon_alert(user, "заряжено!") syringes.Add(A) process_chamber() // Chamber the syringe if none is already - return TRUE + return ATTACK_CHAIN_BLOCKED_ALL else balloon_alert(user, "недостаточно места!") else if(istype(A, /obj/item/reagent_containers/glass)) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index d11c1745965..b9407726643 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -163,25 +163,25 @@ var/list/temp_tech = ConvertReqString2List(I.origin_tech) if(temp_tech.len == 0) to_chat(user, "You cannot experiment on this item!") - return + return ATTACK_CHAIN_PROCEED if (clone_next) var/techs_sum = 0 for(var/T in temp_tech) techs_sum += temp_tech[T] if (istype(I, /obj/item/relic) || techs_sum > 4 && !istype(src, /obj/item/storage/backpack/holding)) to_chat(user, span_notice("Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.")) - return + return ATTACK_CHAIN_PROCEED investigate_log("Experimentor has made a clone of [I]", INVESTIGATE_EXPERIMENTOR) throwSmoke(get_turf(pick(oview(1,src)))) for (var/i = 1; i <= badThingCoeff; i++) - visible_message("A duplicate [I] pops out!") + visible_message(span_notice("A duplicate [I] pops out!")) var/type_to_make = I.type new type_to_make(get_turf(pick(oview(1,src)))) clone_next = FALSE - return + return ATTACK_CHAIN_PROCEED if(!user.drop_transfer_item_to_loc(I, src)) - return + return ATTACK_CHAIN_PROCEED loaded_item = I to_chat(user, span_notice("You have added [I] to [src].")) flick("h_lathe_load", src) From 0e5e1e115faf144b5e7b2a7f5c5521d65ec52cd1 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Fri, 23 Aug 2024 10:32:34 +0300 Subject: [PATCH 13/23] bugfix --- .../objects/items/weapons/experimental_syringe_gun.dm | 1 + code/modules/research/experimentor.dm | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index ad12cd4d4ef..7069a37e926 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -34,6 +34,7 @@ return ATTACK_CHAIN_BLOCKED_ALL else balloon_alert(user, "недостаточно места!") + return ATTACK_CHAIN_PROCEED else if(istype(A, /obj/item/reagent_containers/glass)) var/obj/item/reagent_containers/glass/RC = A; if (!RC.reagents.reagent_list) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index b9407726643..676b598a48a 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -157,14 +157,8 @@ if(!I.origin_tech) to_chat(user, span_warning("The [I.name] has no technological origin.")) return ATTACK_CHAIN_PROCEED - if(!I.origin_tech) - to_chat(user, span_warning("The [I.name] has no technological origin.")) - return ATTACK_CHAIN_PROCEED - var/list/temp_tech = ConvertReqString2List(I.origin_tech) - if(temp_tech.len == 0) - to_chat(user, "You cannot experiment on this item!") - return ATTACK_CHAIN_PROCEED if (clone_next) + var/list/temp_tech = ConvertReqString2List(I.origin_tech) var/techs_sum = 0 for(var/T in temp_tech) techs_sum += temp_tech[T] From b9d800c1a81db572d114a9a9a9843c2f1956c031 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Sat, 24 Aug 2024 10:38:34 +0300 Subject: [PATCH 14/23] bugfix --- .../items/weapons/experimental_syringe_gun.dm | 10 ++--- .../items/weapons/grenades/fauna_bomb.dm | 26 ++++++------ .../objects/items/weapons/grenades/grenade.dm | 7 ++-- .../weapons/tuned_anomalous_teleporter.dm | 40 ++++++------------- 4 files changed, 35 insertions(+), 48 deletions(-) diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index 7069a37e926..de7f1881de8 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -13,16 +13,15 @@ var/synth_speed = 5 var/bank_size = 100 -/obj/item/gun/syringe/rapidsyringe/experimental/Initialize() { - ..() +/obj/item/gun/syringe/rapidsyringe/experimental/Initialize() + . = ..() START_PROCESSING(SSobj, src) -} /obj/item/gun/syringe/rapidsyringe/experimental/Destroy() STOP_PROCESSING(SSobj, src) return ..() -/obj/item/gun/syringe/rapidsyringe/experimental/attackby(obj/item/A, mob/user, params, show_msg = TRUE) +/obj/item/gun/syringe/rapidsyringe/experimental/attackby(obj/item/A, mob/user) if(istype(A, /obj/item/reagent_containers/syringe)) var/in_clip = length(syringes) + (chambered.BB ? 1 : 0) if(in_clip < max_syringes) @@ -36,7 +35,7 @@ balloon_alert(user, "недостаточно места!") return ATTACK_CHAIN_PROCEED else if(istype(A, /obj/item/reagent_containers/glass)) - var/obj/item/reagent_containers/glass/RC = A; + var/obj/item/reagent_containers/glass/RC = A if (!RC.reagents.reagent_list) return ..() ready_reagents.reagents.clear_reagents() @@ -44,6 +43,7 @@ RC.reagents.trans_to(ready_reagents, bank_size) ready_reagents.reagents.trans_to(processed_reagents, synth_speed) balloon_alert(user, "синтезируемый набор веществ изменен!") + return ATTACK_CHAIN_BLOCKED_ALL else return ..() diff --git a/code/game/objects/items/weapons/grenades/fauna_bomb.dm b/code/game/objects/items/weapons/grenades/fauna_bomb.dm index cfac2ac920c..0282caaac60 100644 --- a/code/game/objects/items/weapons/grenades/fauna_bomb.dm +++ b/code/game/objects/items/weapons/grenades/fauna_bomb.dm @@ -14,7 +14,7 @@ /obj/item/grenade/fauna_bomb/attack_self(mob/user) if(!COOLDOWN_FINISHED(src, fauna_bomb_cooldown)) - to_chat(user, "[src] is still recharging!") + to_chat(user, span_warning("[src] is still recharging!")) return COOLDOWN_START(src, fauna_bomb_cooldown, 60 SECONDS) @@ -23,30 +23,32 @@ /obj/item/grenade/fauna_bomb/prime() active = FALSE - var/turf/T = get_turf(src) - playsound(T, 'sound/items/rawr.ogg', 100, TRUE) + playsound(get_turf(src), 'sound/items/rawr.ogg', 100, TRUE) var/faction = activator.name + "_fauna_bomb" activator.faction |= faction var/list/mob/living/simple_animal/mobs = list() - var/mob/living/simple_animal/S = pick(/mob/living/simple_animal/hostile/asteroid/hivelord/legion, /mob/living/simple_animal/hostile/asteroid/goliath, /mob/living/simple_animal/hostile/asteroid/marrowweaver) + var/mob/living/simple_animal/spawn_mob_type = pick(/mob/living/simple_animal/hostile/asteroid/hivelord/legion, /mob/living/simple_animal/hostile/asteroid/goliath, /mob/living/simple_animal/hostile/asteroid/marrowweaver) for(var/i in 1 to amount) - var/mob/living/simple_animal/S1 = new S(get_turf(src)) - mobs.Add(S1) - S1.set_leash(activator, 10) - S1.faction |= faction + var/mob/living/simple_animal/new_mob = new spawn_mob_type(get_turf(src)) + mobs.Add(new_mob) + new_mob.set_leash(activator, 10) + new_mob.faction |= faction if(prob(50)) for(var/j = 1, j <= rand(1, 3), j++) - step(S, pick(NORTH, SOUTH, EAST, WEST)) + step(new_mob, pick(NORTH, SOUTH, EAST, WEST)) if(prob(40)) - to_chat(activator, "[src] falls apart!") + to_chat(activator, span_warning("[src] falls apart!")) qdel(src) sleep(600) - for (var/mob/M in mobs) - M.dust() + for (var/mob/mob in mobs) + mob.dust() + +/obj/item/grenade/fauna_bomb/update_icon_state() + return /datum/crafting_recipe/fauna_bomb name = "Fauna bomb" diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 3b8fa23f12e..14a9965c3bd 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -54,12 +54,11 @@ . += span_warning("[src] is set for instant detonation.") -/obj/item/grenade/attack_self(mob/user, should_update_icon = TRUE) +/obj/item/grenade/attack_self(mob/user) if(!active && clown_check(user)) - to_chat(user, "You prime the [name]! [det_time/10] seconds!") + to_chat(user, span_warning("You prime the [name]! [det_time/10] seconds!")) active = TRUE - if (should_update_icon) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_ICON_STATE) add_fingerprint(user) var/turf/bombturf = get_turf(src) message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]") diff --git a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm index 6325e64eed6..bd136db1b0c 100644 --- a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm +++ b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm @@ -14,25 +14,25 @@ origin_tech = "magnets=3;bluespace=4" armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF - var/icon_state_inactive = "hand_tele_inactive" - var/active_portals = 0 /// Variable contains next time hand tele can be used to make it not EMP proof var/emp_timer = 0 - var/last_use = 0 - var/cooldown = 200 - var/tp_range = 5 + COOLDOWN_DECLARE(tuned_anomalous_teleporter_cooldown) // declare cooldown for teleportations + COOLDOWN_DECLARE(emp_cooldown) // declare cooldown for EMP + var/base_cooldown = 20 SECONDS // cooldown for teleportations + var/emp_cooldown_min = 10 SECONDS // min cooldown for emp + var/emp_cooldown_max = 15 SECONDS // max cooldown for emp + var/tp_range = 5 // range of teleportations /obj/item/tuned_anomalous_teleporter/attack_self(mob/user) - if(emp_timer > world.time) + if(!COOLDOWN_FINISHED(src, emp_cooldown)) do_sparks(5, FALSE, loc) to_chat(user, span_warning("[src] attempts to teleport you, but abruptly shuts off.")) return FALSE - if (world.time < last_use + cooldown) - var/T = (last_use + cooldown - world.time)/10 - var/msg = "Wait [T] seconds." - to_chat(user, span_warning(msg)) + if(!COOLDOWN_FINISHED(src, tuned_anomalous_teleporter_cooldown)) + to_chat(user, span_warning("[src] is still recharging.")) return FALSE - last_use = world.time + + COOLDOWN_START(src, tuned_anomalous_teleporter_cooldown, base_cooldown) var/datum/teleport/TP = new /datum/teleport() var/crossdir = angle2dir((dir2angle(user.dir)) % 360) @@ -50,29 +50,15 @@ make_inactive(severity) return ..() - /obj/item/tuned_anomalous_teleporter/proc/make_inactive(severity) - var/time = rand(10 SECONDS, 15 SECONDS) * (severity == EMP_HEAVY ? 2 : 1) - emp_timer = world.time + time - update_icon(UPDATE_ICON_STATE) - addtimer(CALLBACK(src, PROC_REF(check_inactive), emp_timer), time) - - -/obj/item/tuned_anomalous_teleporter/proc/check_inactive(current_emp_timer) - if(emp_timer != current_emp_timer) - return - update_icon(UPDATE_ICON_STATE) - + var/time = rand(emp_cooldown_min, emp_cooldown_max) * (severity == EMP_HEAVY ? 2 : 1) + COOLDOWN_START(src, emp_cooldown, time) /obj/item/tuned_anomalous_teleporter/examine(mob/user) . = ..() if(emp_timer > world.time) . += span_warning("It looks inactive.") - -/obj/item/tuned_anomalous_teleporter/update_icon_state() - icon_state = (emp_timer > world.time) ? icon_state_inactive : base_icon_state - /datum/crafting_recipe/tuned_anomalous_teleporter name = "Tuned anomalous teleporter" result = /obj/item/tuned_anomalous_teleporter From 9a019969e528b0484327a3e2cbfb0463ea2fea09 Mon Sep 17 00:00:00 2001 From: Anorak2020 <145682013+Anorak2024@users.noreply.github.com> Date: Sun, 25 Aug 2024 10:17:22 +0300 Subject: [PATCH 15/23] Update code/modules/mob/living/simple_animal/hostile/hostile.dm Co-authored-by: Den109G <87372121+Den109G@users.noreply.github.com> --- code/modules/mob/living/simple_animal/hostile/hostile.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b5372956734..0246eb1d927 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -37,7 +37,7 @@ var/ranged_ignores_vision = FALSE //if it'll fire ranged attacks even if it lacks vision on its target, only works with environment smash var/check_friendly_fire = 0 // Should the ranged mob check for friendlies when shooting var/retreat_distance = null //If our mob runs from players when they're too close, set in tile distance. By default, mobs do not retreat. - var/minimum_distance = 1 //Minimum approach distance, so ranged mobs chase targets down, but still keep their distance set in tiles to the target, set \er to make mobs keep distance + var/minimum_distance = 1 //Minimum approach distance, so ranged mobs chase targets down, but still keep their distance set in tiles to the target, set higher to make mobs keep distance //These vars are related to how mobs locate and target From 4da2310d5132f5b5b9e433e12a378ccefd725eb5 Mon Sep 17 00:00:00 2001 From: Anorak2020 <145682013+Anorak2024@users.noreply.github.com> Date: Sat, 21 Sep 2024 20:27:14 +0300 Subject: [PATCH 16/23] Update code/game/objects/items/weapons/tuned_anomalous_teleporter.dm Co-authored-by: Den109G <87372121+Den109G@users.noreply.github.com> --- code/game/objects/items/weapons/tuned_anomalous_teleporter.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm index bd136db1b0c..d10004a78a1 100644 --- a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm +++ b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm @@ -12,7 +12,7 @@ throw_range = 5 materials = list(MAT_METAL=10000) origin_tech = "magnets=3;bluespace=4" - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 30, BIO = 0, RAD = 0, FIRE = 100, ACID = 100) resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /// Variable contains next time hand tele can be used to make it not EMP proof var/emp_timer = 0 From b623a1fc2cf1f5b68a20a780d2b1a4915b814d2b Mon Sep 17 00:00:00 2001 From: Anorak2020 <145682013+Anorak2024@users.noreply.github.com> Date: Sat, 21 Sep 2024 20:28:39 +0300 Subject: [PATCH 17/23] Update code/modules/research/experimentor.dm Co-authored-by: Den109G <87372121+Den109G@users.noreply.github.com> --- code/modules/research/experimentor.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 676b598a48a..35d0652ab23 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -761,7 +761,7 @@ lefthand_file = 'icons/mob/inhands/relics_production/inhandl.dmi' righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' origin_tech = "materials=4" - var/datum/reagent/R + var/datum/reagent/inner_reagent var/transfer = 10 /obj/item/relict_priduction/perfect_mix/New() From 52a75a09e5b9d2eff25d66f3a38051215460046d Mon Sep 17 00:00:00 2001 From: Anorak2020 <145682013+Anorak2024@users.noreply.github.com> Date: Sat, 21 Sep 2024 20:30:24 +0300 Subject: [PATCH 18/23] Update code/modules/research/experimentor.dm Co-authored-by: Den109G <87372121+Den109G@users.noreply.github.com> --- code/modules/research/experimentor.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 35d0652ab23..3f08dbd5d02 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -157,7 +157,7 @@ if(!I.origin_tech) to_chat(user, span_warning("The [I.name] has no technological origin.")) return ATTACK_CHAIN_PROCEED - if (clone_next) + if(clone_next) var/list/temp_tech = ConvertReqString2List(I.origin_tech) var/techs_sum = 0 for(var/T in temp_tech) From 98c43c05692cae84567cbe6e070d01f110456890 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Sat, 21 Sep 2024 20:51:33 +0300 Subject: [PATCH 19/23] =?UTF-8?q?=D0=BF=D0=B0=D0=B2=D0=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/modules/research/experimentor.dm | 630 +++++++++++++------------- 1 file changed, 317 insertions(+), 313 deletions(-) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 35d0652ab23..8c75d10dbb0 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -157,12 +157,12 @@ if(!I.origin_tech) to_chat(user, span_warning("The [I.name] has no technological origin.")) return ATTACK_CHAIN_PROCEED - if (clone_next) + if(clone_next) var/list/temp_tech = ConvertReqString2List(I.origin_tech) var/techs_sum = 0 for(var/T in temp_tech) techs_sum += temp_tech[T] - if (istype(I, /obj/item/relic) || techs_sum > 4 && !istype(src, /obj/item/storage/backpack/holding)) + if(istype(I, /obj/item/relic) || techs_sum > 4 && !istype(src, /obj/item/storage/backpack/holding)) to_chat(user, span_notice("Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.")) return ATTACK_CHAIN_PROCEED @@ -287,331 +287,335 @@ else counter = 1 +/obj/machinery/r_n_d/experimentor/proc/scan_poke(exp, obj/item/exp_on, chosenchem, criticalReaction, isRelict) + visible_message("[src] prods at [exp_on] with mechanical arms.") + if(!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[exp_on] is gripped in just the right way, enhancing its focus.") + badThingCoeff++ + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src] malfunctions and destroys [exp_on], lashing its arms out at nearby people!") + for(var/mob/living/m in oview(1, src)) + m.apply_damage(15,BRUTE,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) + investigate_log("Experimentor dealt minor brute to [key_name_log(m)].", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions!") + exp = SCANTYPE_OBLITERATE + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] malfunctions, throwing the [exp_on]!") + var/mob/living/target = locate(/mob/living) in oview(7,src) + if(target) + var/obj/item/throwing = loaded_item + investigate_log("Experimentor has thrown [loaded_item] at [key_name_log(target)]", INVESTIGATE_EXPERIMENTOR) + ejectItem() + if(throwing) + throwing.throw_at(target, 10, 1) + else if(prob(EFFECT_PROB_VERYLOW)) + visible_message("The [exp_on] begins to vibrate!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) + ejectItem() + throwSmoke(get_turf(exp_on)) + var/obj/item/relict_priduction/strange_teleporter/teleporter = new /obj/item/relict_priduction/strange_teleporter(get_turf(exp_on)) + teleporter.icon_state = exp_on.icon_state + qdel(exp_on) + else + exp = FAIL + + +/obj/machinery/r_n_d/experimentor/proc/scan_irradiate(exp, obj/item/exp_on, chosenchem, criticalReaction, isRelict) + visible_message("[src] reflects radioactive rays at [exp_on]!") + if(!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[exp_on] has activated an unknown subroutine!") + cloneMode = TRUE + cloneCount = badThingCoeff + investigate_log("Experimentor has made a clone of [exp_on]", INVESTIGATE_EXPERIMENTOR) + ejectItem() + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src] malfunctions, melting [exp_on] and leaking radiation!") + for(var/mob/living/m in oview(1, src)) + m.apply_effect(25,IRRADIATE) + investigate_log("Experimentor has irradiated [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) //One entry per person so we know what was irradiated. + ejectItem(TRUE) + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions, spewing toxic waste!") + for(var/turf/T in oview(1, src)) + if(!T.density) + if(prob(EFFECT_PROB_VERYHIGH)) + new /obj/effect/decal/cleanable/greenglow(T) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + var/savedName = "[exp_on]" + ejectItem(TRUE) + var/newPath = pickWeighted(valid_items) + loaded_item = new newPath(src) + visible_message("[src] malfunctions, transforming [savedName] into [loaded_item]!") + investigate_log("Experimentor has transformed [savedName] into [loaded_item]", INVESTIGATE_EXPERIMENTOR) + if(istype(loaded_item,/obj/item/grenade/chem_grenade)) + var/obj/item/grenade/chem_grenade/CG = loaded_item + CG.prime() + ejectItem() + else if(prob(EFFECT_PROB_VERYLOW)) + visible_message("The [exp_on] has activated an unknown subroutine!") + clone_next = TRUE + ejectItem() + qdel(exp_on) + + var/T = rand(1, linked_console.files.known_tech.len) + var/datum/tech/KT = linked_console.files.known_tech[linked_console.files.known_tech[T]] + var/new_level = linked_console.files.UpdateTech(linked_console.files.known_tech[T], KT.level + 1) + var/tech_log = "[T] [new_level], " + if(tech_log) + investigate_log("[usr] increased tech experimentoring [loaded_item]: [tech_log]. ", INVESTIGATE_RESEARCH) + else + exp = FAIL + + +/obj/machinery/r_n_d/experimentor/proc/scan_gas(exp, obj/item/exp_on, chosenchem, criticalReaction, isRelict) + visible_message("[src] fills its chamber with gas, [exp_on] included.") + if(!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[exp_on] achieves the perfect mix!") + new /obj/item/stack/sheet/mineral/plasma(get_turf(pick(oview(1,src)))) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src] destroys [exp_on], leaking dangerous gas!") + chosenchem = pick("carbon","radium","toxin","condensedcapsaicin","psilocybin","space_drugs","ethanol","beepskysmash") + var/datum/reagents/inner_reagent = new/datum/reagents(400) + inner_reagent.my_atom = src + inner_reagent.add_reagent(chosenchem , 375) + investigate_log("Experimentor has released [chosenchem] smoke.", INVESTIGATE_EXPERIMENTOR) + var/datum/effect_system/smoke_spread/chem/smoke = new + smoke.set_up(inner_reagent, src, TRUE) + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + smoke.start() + qdel(inner_reagent) + ejectItem(TRUE) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src]'s chemical chamber has sprung a leak!") + chosenchem = pick("mutationtoxin","nanomachines","sacid") + var/datum/reagents/inner_reagent = new/datum/reagents(400) + inner_reagent.my_atom = src + inner_reagent.add_reagent(chosenchem , 375) + var/datum/effect_system/smoke_spread/chem/smoke = new + smoke.set_up(inner_reagent, src, TRUE) + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + smoke.start() + qdel(inner_reagent) + ejectItem(TRUE) + warn_admins(usr, "[chosenchem] smoke") + investigate_log("Experimentor has released [chosenchem] smoke!", INVESTIGATE_EXPERIMENTOR) + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions, spewing harmless gas.>") + throwSmoke(src.loc) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] melts [exp_on], ionizing the air around it!") + empulse(src.loc, 4, 0) //change this to 4,6 once the EXPERI-Mentor is moved. + investigate_log("Experimentor has generated an Electromagnetic Pulse.", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + else if(prob(EFFECT_PROB_LOW)) + visible_message("[exp_on] achieves the perfect mix!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) + ejectItem() + throwSmoke(get_turf(exp_on)) + new /obj/item/relict_priduction/perfect_mix(get_turf(exp_on)) + qdel(exp_on) + else + exp = FAIL + + +/obj/machinery/r_n_d/experimentor/proc/scan_heat(exp, obj/item/exp_on, chosenchem, criticalReaction, isRelict) + visible_message("[src] raises [exp_on]'s temperature.") + if(!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[src]'s emergency coolant system gives off a small ding!") + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + var/obj/item/reagent_containers/food/drinks/coffee/C = new /obj/item/reagent_containers/food/drinks/coffee(get_turf(pick(oview(1,src)))) + chosenchem = pick("plasma","capsaicin","ethanol") + C.reagents.remove_any(25) + C.reagents.add_reagent(chosenchem , 50) + C.name = "Cup of Suspicious Liquid" + C.desc = "It has a large hazard symbol printed on the side in fading ink." + investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + var/turf/start = get_turf(src) + var/mob/M = locate(/mob/living) in view(src, 3) + var/turf/MT = get_turf(M) + if(MT) + visible_message("[src] dangerously overheats, launching a flaming fuel orb!") + investigate_log("Experimentor has launched a fireball at [key_name_log(M)]!", INVESTIGATE_EXPERIMENTOR) + var/obj/item/projectile/magic/fireball/FB = new /obj/item/projectile/magic/fireball(start) + FB.original = MT + FB.current = start + FB.yo = MT.y - start.y + FB.xo = MT.x - start.x + FB.fire() + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions, melting [exp_on] and releasing a burst of flame!") + explosion(src.loc, -1, 0, 0, 0, 0, flame_range = 2, cause = "Experimentor Fire") + investigate_log("Experimentor started a fire.", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] malfunctions, melting [exp_on] and leaking hot air!") + var/datum/gas_mixture/env = src.loc.return_air() + var/transfer_moles = 0.25 * env.total_moles() + var/datum/gas_mixture/removed = env.remove(transfer_moles) + if(removed) + var/heat_capacity = removed.heat_capacity() + if(heat_capacity == 0 || heat_capacity == null) + heat_capacity = 1 + removed.temperature = min((removed.temperature*heat_capacity + 100000)/heat_capacity, 1000) + env.merge(removed) + air_update_turf() + investigate_log("Experimentor has released hot air.", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] malfunctions, activating its emergency coolant systems!") + throwSmoke(src.loc) + for(var/mob/living/m in oview(1, src)) + m.apply_damage(5,BURN,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) + investigate_log("Experimentor has dealt minor burn damage to [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) + ejectItem() + else if(prob(EFFECT_PROB_LOW)) + visible_message("[exp_on] begins to shake, and in the distance the sound of rampaging animals arises!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) + ejectItem() + throwSmoke(get_turf(exp_on)) + var/obj/item/relict_priduction/pet_spray/R = new /obj/item/relict_priduction/pet_spray(get_turf(exp_on)) + R.icon_state = exp_on.icon_state + qdel(exp_on) + else + exp = FAIL +п + +/obj/machinery/r_n_d/experimentor/proc/scan_cold(exp, obj/item/exp_on, chosenchem, criticalReaction, isRelict) + visible_message("[src] lowers [exp_on]'s temperature.") + if(!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[src]'s emergency coolant system gives off a small ding!") + var/obj/item/reagent_containers/food/drinks/coffee/C = new /obj/item/reagent_containers/food/drinks/coffee(get_turf(pick(oview(1,src)))) + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //Ding! Your death coffee is ready! + chosenchem = pick("uranium","frostoil","ephedrine") + C.reagents.remove_any(25) + C.reagents.add_reagent(chosenchem , 50) + C.name = "Cup of Suspicious Liquid" + C.desc = "It has a large hazard symbol printed on the side in fading ink." + investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src] malfunctions, shattering [exp_on] and releasing a dangerous cloud of coolant!") + var/datum/reagents/inner_reagent = new/datum/reagents(400) + inner_reagent.my_atom = src + inner_reagent.add_reagent("frostoil" , 375) + investigate_log("Experimentor has released frostoil gas.", INVESTIGATE_EXPERIMENTOR) + var/datum/effect_system/smoke_spread/chem/smoke = new + smoke.set_up(inner_reagent, src, TRUE) + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + smoke.start() + qdel(inner_reagent) + ejectItem(TRUE) + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src] malfunctions, shattering [exp_on] and leaking cold air!") + var/datum/gas_mixture/env = src.loc.return_air() + var/transfer_moles = 0.25 * env.total_moles() + var/datum/gas_mixture/removed = env.remove(transfer_moles) + if(removed) + var/heat_capacity = removed.heat_capacity() + if(heat_capacity == 0 || heat_capacity == null) + heat_capacity = 1 + removed.temperature = (removed.temperature*heat_capacity - 75000)/heat_capacity + env.merge(removed) + air_update_turf() + investigate_log("Experimentor has released cold air.", INVESTIGATE_EXPERIMENTOR) + ejectItem(TRUE) + if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) + visible_message("[src] malfunctions, releasing a flurry of chilly air as [exp_on] pops out!") + var/datum/effect_system/smoke_spread/smoke = new + smoke.set_up(1,0, src.loc, 0) + smoke.start() + ejectItem() + else if(prob(EFFECT_PROB_LOW)) + visible_message("[exp_on] emits a loud pop!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) + ejectItem() + throwSmoke(get_turf(exp_on)) + var/obj/item/relict_priduction/R = new /obj/item/relict_priduction/rapid_dupe(get_turf(exp_on)) + R.icon_state = exp_on.icon_state + qdel(exp_on) + else + exp = FAIL + + +/obj/machinery/r_n_d/experimentor/proc/scan_obliterate(exp, obj/item/exp_on, chosenchem, criticalReaction, isRelict) + visible_message("[exp_on] activates the crushing mechanism.") + if(!isRelict) + if(prob(EFFECT_PROB_LOW) && criticalReaction) + visible_message("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!") + new /obj/item/stack/sheet/plasteel(get_turf(pick(oview(1,src)))) + if(linked_console.linked_lathe) + var/datum/component/material_container/linked_materials = linked_console.linked_lathe.GetComponent(/datum/component/material_container) + for(var/material in exp_on.materials) + linked_materials.insert_amount( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.materials[material])), material) + if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) + visible_message("[src]'s crusher goes way too many levels too high, crushing right through space-time!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3) + investigate_log("Experimentor has triggered the 'throw things' reaction.", INVESTIGATE_EXPERIMENTOR) + for(var/atom/movable/AM in oview(7,src)) + if(!AM.anchored) + spawn(0) + AM.throw_at(src,10,1) + + if(prob(EFFECT_PROB_LOW-badThingCoeff)) + visible_message("[src]'s crusher goes one level too high, crushing right into space-time!") + playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3) + investigate_log("Experimentor has triggered the 'minor throw things' reaction.", INVESTIGATE_EXPERIMENTOR) + var/list/throwAt = list() + for(var/atom/movable/AM in oview(7,src)) + if(!AM.anchored) + throwAt.Add(AM) + for(var/counter = 1, counter < throwAt.len, ++counter) + var/atom/movable/cast = throwAt[counter] + spawn(0) + cast.throw_at(pick(throwAt),10,1) + ejectItem(TRUE) + else if(prob(EFFECT_PROB_LOW)) + visible_message("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!") + badThingCoeff++ + var/list/obj/item/stack/sheet/mineral/minreals = list(/obj/item/stack/sheet/mineral/diamond, /obj/item/stack/sheet/mineral/gold, /obj/item/stack/sheet/glass,/obj/item/stack/sheet/metal,/obj/item/stack/sheet/mineral/plasma,/obj/item/stack/sheet/mineral/silver,/obj/item/stack/sheet/mineral/titanium,/obj/item/stack/sheet/mineral/uranium,/obj/item/stack/sheet/mineral/tranquillite,/obj/item/stack/sheet/mineral/bananium) + // Plastinium and abductor alloy are alloys, not processed ores. + for (var/i = 1; i <= 3; ++i) + var/obj/item/stack/sheet/mineral/m0 = pick(minreals) + var/obj/item/stack/sheet/mineral/M = new m0(get_turf(exp_on)) + M.amount = 10 + qdel(exp_on) + ejectItem(TRUE) + else + exp = FAIL + + /obj/machinery/r_n_d/experimentor/proc/experiment(exp, obj/item/exp_on) recentlyExperimented = TRUE update_icon(UPDATE_ICON_STATE) var/chosenchem var/criticalReaction = (exp_on.type in critical_items) ? TRUE : FALSE var/isRelict = istype(exp_on, /obj/item/relic) - //////////////////////////////////////////////////////////////////////////////////////////////// + if(exp == SCANTYPE_POKE) - visible_message("[src] prods at [exp_on] with mechanical arms.") - if (!isRelict) - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[exp_on] is gripped in just the right way, enhancing its focus.") - badThingCoeff++ - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src] malfunctions and destroys [exp_on], lashing its arms out at nearby people!") - for(var/mob/living/m in oview(1, src)) - m.apply_damage(15,BRUTE,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) - investigate_log("Experimentor dealt minor brute to [key_name_log(m)].", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions!") - exp = SCANTYPE_OBLITERATE - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] malfunctions, throwing the [exp_on]!") - var/mob/living/target = locate(/mob/living) in oview(7,src) - if(target) - var/obj/item/throwing = loaded_item - investigate_log("Experimentor has thrown [loaded_item] at [key_name_log(target)]", INVESTIGATE_EXPERIMENTOR) - ejectItem() - if(throwing) - throwing.throw_at(target, 10, 1) - else if (prob(EFFECT_PROB_VERYLOW)) - visible_message("The [exp_on] begins to vibrate!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) - ejectItem() - throwSmoke(get_turf(exp_on)) - var/obj/item/relict_priduction/strange_teleporter/R = new /obj/item/relict_priduction/strange_teleporter(get_turf(exp_on)) - R.icon_state = exp_on.icon_state - qdel(exp_on) - else - exp = FAIL - //////////////////////////////////////////////////////////////////////////////////////////////// + scan_poke(exp, exp_on, chosenchem, criticalReaction, isRelict) if(exp == SCANTYPE_IRRADIATE) - visible_message("[src] reflects radioactive rays at [exp_on]!") - if (!isRelict) - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[exp_on] has activated an unknown subroutine!") - cloneMode = TRUE - cloneCount = badThingCoeff - investigate_log("Experimentor has made a clone of [exp_on]", INVESTIGATE_EXPERIMENTOR) - ejectItem() - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src] malfunctions, melting [exp_on] and leaking radiation!") - for(var/mob/living/m in oview(1, src)) - m.apply_effect(25,IRRADIATE) - investigate_log("Experimentor has irradiated [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) //One entry per person so we know what was irradiated. - ejectItem(TRUE) - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions, spewing toxic waste!") - for(var/turf/T in oview(1, src)) - if(!T.density) - if(prob(EFFECT_PROB_VERYHIGH)) - new /obj/effect/decal/cleanable/greenglow(T) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - var/savedName = "[exp_on]" - ejectItem(TRUE) - var/newPath = pickWeighted(valid_items) - loaded_item = new newPath(src) - visible_message("[src] malfunctions, transforming [savedName] into [loaded_item]!") - investigate_log("Experimentor has transformed [savedName] into [loaded_item]", INVESTIGATE_EXPERIMENTOR) - if(istype(loaded_item,/obj/item/grenade/chem_grenade)) - var/obj/item/grenade/chem_grenade/CG = loaded_item - CG.prime() - ejectItem() - else if (prob(EFFECT_PROB_VERYLOW)) - visible_message("The [exp_on] has activated an unknown subroutine!") - clone_next = TRUE - ejectItem() - qdel(exp_on) - - var/T = rand(1, linked_console.files.known_tech.len) - var/datum/tech/KT = linked_console.files.known_tech[linked_console.files.known_tech[T]] - var/new_level = linked_console.files.UpdateTech(linked_console.files.known_tech[T], KT.level + 1) - var/tech_log = "[T] [new_level], " - if(tech_log) - investigate_log("[usr] increased tech experimentoring [loaded_item]: [tech_log]. ", INVESTIGATE_RESEARCH) - else - exp = FAIL - - //////////////////////////////////////////////////////////////////////////////////////////////// + scan_irradiate(exp, exp_on, chosenchem, criticalReaction, isRelict) if(exp == SCANTYPE_GAS) - visible_message("[src] fills its chamber with gas, [exp_on] included.") - if (!isRelict) - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[exp_on] achieves the perfect mix!") - new /obj/item/stack/sheet/mineral/plasma(get_turf(pick(oview(1,src)))) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src] destroys [exp_on], leaking dangerous gas!") - chosenchem = pick("carbon","radium","toxin","condensedcapsaicin","psilocybin","space_drugs","ethanol","beepskysmash") - var/datum/reagents/R = new/datum/reagents(400) - R.my_atom = src - R.add_reagent(chosenchem , 375) - investigate_log("Experimentor has released [chosenchem] smoke.", INVESTIGATE_EXPERIMENTOR) - var/datum/effect_system/smoke_spread/chem/smoke = new - smoke.set_up(R, src, TRUE) - playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - smoke.start() - qdel(R) - ejectItem(TRUE) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src]'s chemical chamber has sprung a leak!") - chosenchem = pick("mutationtoxin","nanomachines","sacid") - var/datum/reagents/R = new/datum/reagents(400) - R.my_atom = src - R.add_reagent(chosenchem , 375) - var/datum/effect_system/smoke_spread/chem/smoke = new - smoke.set_up(R, src, TRUE) - playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - smoke.start() - qdel(R) - ejectItem(TRUE) - warn_admins(usr, "[chosenchem] smoke") - investigate_log("Experimentor has released [chosenchem] smoke!", INVESTIGATE_EXPERIMENTOR) - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions, spewing harmless gas.>") - throwSmoke(src.loc) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] melts [exp_on], ionizing the air around it!") - empulse(src.loc, 4, 0) //change this to 4,6 once the EXPERI-Mentor is moved. - investigate_log("Experimentor has generated an Electromagnetic Pulse.", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - else if (prob(EFFECT_PROB_LOW)) - visible_message("[exp_on] achieves the perfect mix!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) - ejectItem() - throwSmoke(get_turf(exp_on)) - new /obj/item/relict_priduction/perfect_mix(get_turf(exp_on)) - qdel(exp_on) - else - exp = FAIL - - //////////////////////////////////////////////////////////////////////////////////////////////// + scan_gas(exp, exp_on, chosenchem, criticalReaction, isRelict) if(exp == SCANTYPE_HEAT) - visible_message("[src] raises [exp_on]'s temperature.") - if (!isRelict) - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[src]'s emergency coolant system gives off a small ding!") - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - var/obj/item/reagent_containers/food/drinks/coffee/C = new /obj/item/reagent_containers/food/drinks/coffee(get_turf(pick(oview(1,src)))) - chosenchem = pick("plasma","capsaicin","ethanol") - C.reagents.remove_any(25) - C.reagents.add_reagent(chosenchem , 50) - C.name = "Cup of Suspicious Liquid" - C.desc = "It has a large hazard symbol printed on the side in fading ink." - investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - var/turf/start = get_turf(src) - var/mob/M = locate(/mob/living) in view(src, 3) - var/turf/MT = get_turf(M) - if(MT) - visible_message("[src] dangerously overheats, launching a flaming fuel orb!") - investigate_log("Experimentor has launched a fireball at [key_name_log(M)]!", INVESTIGATE_EXPERIMENTOR) - var/obj/item/projectile/magic/fireball/FB = new /obj/item/projectile/magic/fireball(start) - FB.original = MT - FB.current = start - FB.yo = MT.y - start.y - FB.xo = MT.x - start.x - FB.fire() - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions, melting [exp_on] and releasing a burst of flame!") - explosion(src.loc, -1, 0, 0, 0, 0, flame_range = 2, cause = "Experimentor Fire") - investigate_log("Experimentor started a fire.", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] malfunctions, melting [exp_on] and leaking hot air!") - var/datum/gas_mixture/env = src.loc.return_air() - var/transfer_moles = 0.25 * env.total_moles() - var/datum/gas_mixture/removed = env.remove(transfer_moles) - if(removed) - var/heat_capacity = removed.heat_capacity() - if(heat_capacity == 0 || heat_capacity == null) - heat_capacity = 1 - removed.temperature = min((removed.temperature*heat_capacity + 100000)/heat_capacity, 1000) - env.merge(removed) - air_update_turf() - investigate_log("Experimentor has released hot air.", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] malfunctions, activating its emergency coolant systems!") - throwSmoke(src.loc) - for(var/mob/living/m in oview(1, src)) - m.apply_damage(5,BURN,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) - investigate_log("Experimentor has dealt minor burn damage to [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) - ejectItem() - else if(prob(EFFECT_PROB_LOW)) - visible_message("[exp_on] begins to shake, and in the distance the sound of rampaging animals arises!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) - ejectItem() - throwSmoke(get_turf(exp_on)) - var/obj/item/relict_priduction/pet_spray/R = new /obj/item/relict_priduction/pet_spray(get_turf(exp_on)) - R.icon_state = exp_on.icon_state - qdel(exp_on) - else - exp = FAIL - - //////////////////////////////////////////////////////////////////////////////////////////////// + scan_heat(exp, exp_on, chosenchem, criticalReaction, isRelict) if(exp == SCANTYPE_COLD) - visible_message("[src] lowers [exp_on]'s temperature.") - if (!isRelict) - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[src]'s emergency coolant system gives off a small ding!") - var/obj/item/reagent_containers/food/drinks/coffee/C = new /obj/item/reagent_containers/food/drinks/coffee(get_turf(pick(oview(1,src)))) - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //Ding! Your death coffee is ready! - chosenchem = pick("uranium","frostoil","ephedrine") - C.reagents.remove_any(25) - C.reagents.add_reagent(chosenchem , 50) - C.name = "Cup of Suspicious Liquid" - C.desc = "It has a large hazard symbol printed on the side in fading ink." - investigate_log("Experimentor has made a cup of [chosenchem] coffee.", INVESTIGATE_EXPERIMENTOR) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src] malfunctions, shattering [exp_on] and releasing a dangerous cloud of coolant!") - var/datum/reagents/R = new/datum/reagents(400) - R.my_atom = src - R.add_reagent("frostoil" , 375) - investigate_log("Experimentor has released frostoil gas.", INVESTIGATE_EXPERIMENTOR) - var/datum/effect_system/smoke_spread/chem/smoke = new - smoke.set_up(R, src, TRUE) - playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - smoke.start() - qdel(R) - ejectItem(TRUE) - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src] malfunctions, shattering [exp_on] and leaking cold air!") - var/datum/gas_mixture/env = src.loc.return_air() - var/transfer_moles = 0.25 * env.total_moles() - var/datum/gas_mixture/removed = env.remove(transfer_moles) - if(removed) - var/heat_capacity = removed.heat_capacity() - if(heat_capacity == 0 || heat_capacity == null) - heat_capacity = 1 - removed.temperature = (removed.temperature*heat_capacity - 75000)/heat_capacity - env.merge(removed) - air_update_turf() - investigate_log("Experimentor has released cold air.", INVESTIGATE_EXPERIMENTOR) - ejectItem(TRUE) - if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) - visible_message("[src] malfunctions, releasing a flurry of chilly air as [exp_on] pops out!") - var/datum/effect_system/smoke_spread/smoke = new - smoke.set_up(1,0, src.loc, 0) - smoke.start() - ejectItem() - else if(prob(EFFECT_PROB_LOW)) - visible_message("[exp_on] emits a loud pop!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) - ejectItem() - throwSmoke(get_turf(exp_on)) - var/obj/item/relict_priduction/R = new /obj/item/relict_priduction/rapid_dupe(get_turf(exp_on)) - R.icon_state = exp_on.icon_state - qdel(exp_on) - else - exp = FAIL - - //////////////////////////////////////////////////////////////////////////////////////////////// + scan_cold(exp, exp_on, chosenchem, criticalReaction, isRelict) if(exp == SCANTYPE_OBLITERATE) - visible_message("[exp_on] activates the crushing mechanism.") - if (!isRelict) - if(prob(EFFECT_PROB_LOW) && criticalReaction) - visible_message("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!") - new /obj/item/stack/sheet/plasteel(get_turf(pick(oview(1,src)))) - if(linked_console.linked_lathe) - var/datum/component/material_container/linked_materials = linked_console.linked_lathe.GetComponent(/datum/component/material_container) - for(var/material in exp_on.materials) - linked_materials.insert_amount( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.materials[material])), material) - if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) - visible_message("[src]'s crusher goes way too many levels too high, crushing right through space-time!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3) - investigate_log("Experimentor has triggered the 'throw things' reaction.", INVESTIGATE_EXPERIMENTOR) - for(var/atom/movable/AM in oview(7,src)) - if(!AM.anchored) - spawn(0) - AM.throw_at(src,10,1) - - if(prob(EFFECT_PROB_LOW-badThingCoeff)) - visible_message("[src]'s crusher goes one level too high, crushing right into space-time!") - playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3) - investigate_log("Experimentor has triggered the 'minor throw things' reaction.", INVESTIGATE_EXPERIMENTOR) - var/list/throwAt = list() - for(var/atom/movable/AM in oview(7,src)) - if(!AM.anchored) - throwAt.Add(AM) - for(var/counter = 1, counter < throwAt.len, ++counter) - var/atom/movable/cast = throwAt[counter] - spawn(0) - cast.throw_at(pick(throwAt),10,1) - ejectItem(TRUE) - else if(prob(EFFECT_PROB_LOW)) - visible_message("[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!") - badThingCoeff++ - var/list/obj/item/stack/sheet/mineral/minreals = list(/obj/item/stack/sheet/mineral/diamond, /obj/item/stack/sheet/mineral/gold, /obj/item/stack/sheet/glass,/obj/item/stack/sheet/metal,/obj/item/stack/sheet/mineral/plasma,/obj/item/stack/sheet/mineral/silver,/obj/item/stack/sheet/mineral/titanium,/obj/item/stack/sheet/mineral/uranium,/obj/item/stack/sheet/mineral/tranquillite,/obj/item/stack/sheet/mineral/bananium) - // Plastinium and abductor alloy are alloys, not processed ores. - for (var/i = 1; i <= 3; ++i) - var/obj/item/stack/sheet/mineral/m0 = pick(minreals) - var/obj/item/stack/sheet/mineral/M = new m0(get_turf(exp_on)) - M.amount = 10 - qdel(exp_on) - ejectItem(TRUE) - else - exp = FAIL + scan_obliterate(exp, exp_on, chosenchem, criticalReaction, isRelict) - //////////////////////////////////////////////////////////////////////////////////////////////// if(exp == FAIL) var/a = pick("rumbles","shakes","vibrates","shudders") var/b = pick("crushes","spins","viscerates","smashes","insults") visible_message("[exp_on] [a], and [b], the experiment was a failure.") -// if(exp == SCANTYPE_DISCOVER) -// visible_message("[src] scans the [exp_on], revealing its true nature!") -// playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) -// var/obj/item/relic/R = loaded_item -// R.reveal() -// investigate_log("Experimentor has revealed a relic with [R.realProc] effect.", INVESTIGATE_EXPERIMENTOR) -// ejectItem() - - //Global reactions - if(prob(EFFECT_PROB_VERYLOW) && prob(13)) visible_message("Experimentor draws the life essence of those nearby!") for(var/mob/living/m in view(4,src)) @@ -766,12 +770,12 @@ /obj/item/relict_priduction/perfect_mix/New() . = ..() - R = pick(/datum/reagent/uranium, /datum/reagent/plasma, /datum/reagent/consumable/capsaicin, /datum/reagent/consumable/frostoil, /datum/reagent/space_cleaner, /datum/reagent/consumable/drink/coffee, pick(/datum/reagent/consumable/drink/non_alcoholic_beer, /datum/reagent/consumable/ethanol/beer, /datum/reagent/beer2)) + inner_reagent = pick(/datum/reagent/uranium, /datum/reagent/plasma, /datum/reagent/consumable/capsaicin, /datum/reagent/consumable/frostoil, /datum/reagent/space_cleaner, /datum/reagent/consumable/drink/coffee, pick(/datum/reagent/consumable/drink/non_alcoholic_beer, /datum/reagent/consumable/ethanol/beer, /datum/reagent/beer2)) /obj/item/relict_priduction/perfect_mix/afterattack(atom/target, mob/user, proximity) if(istype(target, /obj/item/reagent_containers/glass)) var/obj/item/reagent_containers/glass/beaker = target - beaker.reagents.add_reagent(R.id, transfer) + beaker.reagents.add_reagent(inner_reagent.id, transfer) to_chat(user, "You have poured 10 units of content into this.") else to_chat(user, "You can't pour [src]'s content into this.") @@ -785,7 +789,7 @@ cooldown = 10 SECONDS /obj/item/relict_priduction/strange_teleporter/attack_self(mob/user) - if (!..()) + if(!..()) return to_chat(user, "[src] begins to vibrate!") spawn(rand(10,30)) @@ -809,7 +813,7 @@ cooldown = 60 SECONDS /obj/item/relict_priduction/pet_spray/attack_self(mob/user) - if (!..()) + if(!..()) return var/message = "[src] begins to shake, and in the distance the sound of rampaging animals arises!" visible_message(message) From 7529e3f9f6bff9c022d09c2d6c4795aa5c7df1f0 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Sat, 21 Sep 2024 20:51:41 +0300 Subject: [PATCH 20/23] =?UTF-8?q?=D0=B0=D1=8B=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/modules/research/experimentor.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 8c75d10dbb0..1a84680346b 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -485,7 +485,7 @@ qdel(exp_on) else exp = FAIL -п + /obj/machinery/r_n_d/experimentor/proc/scan_cold(exp, obj/item/exp_on, chosenchem, criticalReaction, isRelict) visible_message("[src] lowers [exp_on]'s temperature.") From e4a4974d6eec09fd083dc3542a0c1f49f927f810 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Thu, 3 Oct 2024 08:50:48 +0300 Subject: [PATCH 21/23] balance --- code/game/objects/effects/anomalies.dm | 2 +- code/game/objects/items/anomaly_beacon.dm | 3 +- .../items/weapons/experimental_syringe_gun.dm | 3 +- .../items/weapons/grenades/fauna_bomb.dm | 3 +- .../weapons/tuned_anomalous_teleporter.dm | 3 +- code/modules/research/experimentor.dm | 56 +++++++++++-------- 6 files changed, 42 insertions(+), 28 deletions(-) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index f73bf1e2cf3..5f15b415f03 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -62,7 +62,7 @@ for(var/obj/item/I in get_turf(src)) if(!I.origin_tech) continue - if (istype(I, /obj/item/relict_priduction/rapid_dupe)) + if (istype(I, /obj/item/relict_production/rapid_dupe)) var/amount = rand(1, 3) for (var/i; i <= amount; i++) new /obj/item/relic(get_turf(I)) diff --git a/code/game/objects/items/anomaly_beacon.dm b/code/game/objects/items/anomaly_beacon.dm index 56fe3dd14a3..113136a524a 100644 --- a/code/game/objects/items/anomaly_beacon.dm +++ b/code/game/objects/items/anomaly_beacon.dm @@ -6,6 +6,7 @@ righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' name = "anomaly beacon" desc = "A device that draws power from bluespace and creates a permanent tracking beacon." + origin_tech = "bluespace=6" /obj/item/assembly/anomaly_beacon/activate() var/obj/effect/anomaly/anomaly_path = pick(subtypesof(/obj/effect/anomaly/)) @@ -21,7 +22,7 @@ result = /obj/item/assembly/anomaly_beacon tools = list(TOOL_SCREWDRIVER) reqs = list(/obj/item/assembly/signaler/anomaly = 1, - /obj/item/relict_priduction/rapid_dupe = 1, + /obj/item/relict_production/rapid_dupe = 1, /obj/item/radio/beacon = 1, /obj/item/stack/cable_coil = 5) time = 300 diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index de7f1881de8..baa2832dce1 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -12,6 +12,7 @@ var/obj/item/reagent_containers/glass/beaker/large/processed_reagents = new var/synth_speed = 5 var/bank_size = 100 + origin_tech = "bluespace=4;biotech=5" /obj/item/gun/syringe/rapidsyringe/experimental/Initialize() . = ..() @@ -58,7 +59,7 @@ name = "Experemintal syringe gun" result = /obj/item/gun/syringe/rapidsyringe/experimental tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH) - reqs = list(/obj/item/relict_priduction/perfect_mix = 1, + reqs = list(/obj/item/relict_production/perfect_mix = 1, /obj/item/assembly/signaler/anomaly/vortex = 1, /obj/item/gun/syringe/rapidsyringe = 1, /obj/item/stock_parts/matter_bin = 1) diff --git a/code/game/objects/items/weapons/grenades/fauna_bomb.dm b/code/game/objects/items/weapons/grenades/fauna_bomb.dm index 0282caaac60..6ca2c4314be 100644 --- a/code/game/objects/items/weapons/grenades/fauna_bomb.dm +++ b/code/game/objects/items/weapons/grenades/fauna_bomb.dm @@ -11,6 +11,7 @@ var/amount = 3 COOLDOWN_DECLARE(fauna_bomb_cooldown) var/mob/activator + origin_tech = "bluespace=4;biotech=5" /obj/item/grenade/fauna_bomb/attack_self(mob/user) if(!COOLDOWN_FINISHED(src, fauna_bomb_cooldown)) @@ -54,7 +55,7 @@ name = "Fauna bomb" result = /obj/item/grenade/fauna_bomb tools = list(TOOL_SCREWDRIVER) - reqs = list(/obj/item/relict_priduction/pet_spray = 1, + reqs = list(/obj/item/relict_production/pet_spray = 1, /obj/item/assembly/signaler/anomaly/pyro = 1, /obj/item/grenade/chem_grenade/adv_release = 1, /obj/item/stack/cable_coil = 5) diff --git a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm index d10004a78a1..620ea5f9222 100644 --- a/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm +++ b/code/game/objects/items/weapons/tuned_anomalous_teleporter.dm @@ -22,6 +22,7 @@ var/emp_cooldown_min = 10 SECONDS // min cooldown for emp var/emp_cooldown_max = 15 SECONDS // max cooldown for emp var/tp_range = 5 // range of teleportations + origin_tech = "bluespace=5" /obj/item/tuned_anomalous_teleporter/attack_self(mob/user) if(!COOLDOWN_FINISHED(src, emp_cooldown)) @@ -63,7 +64,7 @@ name = "Tuned anomalous teleporter" result = /obj/item/tuned_anomalous_teleporter tools = list(TOOL_SCREWDRIVER, TOOL_WELDER) - reqs = list(/obj/item/relict_priduction/strange_teleporter = 1, + reqs = list(/obj/item/relict_production/strange_teleporter = 1, /obj/item/assembly/signaler/anomaly/bluespace = 1, /obj/item/gps = 1, /obj/item/stack/ore/bluespace_crystal, diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 1a84680346b..9e582453deb 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -162,10 +162,20 @@ var/techs_sum = 0 for(var/T in temp_tech) techs_sum += temp_tech[T] - if(istype(I, /obj/item/relic) || techs_sum > 4 && !istype(src, /obj/item/storage/backpack/holding)) - to_chat(user, span_notice("Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.")) + if(istype(I, /obj/item/relic) || techs_sum > 4 && !istype(I, /obj/item/storage/backpack/holding)) + to_chat(user, span_warning("Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.")) return ATTACK_CHAIN_PROCEED + if (I.contents) + to_chat(user, span_warning("Предмет должен быть цельным.")) + return ATTACK_CHAIN_PROCEED + + if (I.type in subtypesof(/obj/item/stack)) + var/obj/item/stack/stack = I + if (stack.amount > 1) + to_chat(user, span_warning("Предмет должен быть цельным.")) + return ATTACK_CHAIN_PROCEED + investigate_log("Experimentor has made a clone of [I]", INVESTIGATE_EXPERIMENTOR) throwSmoke(get_turf(pick(oview(1,src)))) for (var/i = 1; i <= badThingCoeff; i++) @@ -316,7 +326,7 @@ playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) ejectItem() throwSmoke(get_turf(exp_on)) - var/obj/item/relict_priduction/strange_teleporter/teleporter = new /obj/item/relict_priduction/strange_teleporter(get_turf(exp_on)) + var/obj/item/relict_production/strange_teleporter/teleporter = new /obj/item/relict_production/strange_teleporter(get_turf(exp_on)) teleporter.icon_state = exp_on.icon_state qdel(exp_on) else @@ -417,7 +427,7 @@ playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) ejectItem() throwSmoke(get_turf(exp_on)) - new /obj/item/relict_priduction/perfect_mix(get_turf(exp_on)) + new /obj/item/relict_production/perfect_mix(get_turf(exp_on)) qdel(exp_on) else exp = FAIL @@ -480,7 +490,7 @@ playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) ejectItem() throwSmoke(get_turf(exp_on)) - var/obj/item/relict_priduction/pet_spray/R = new /obj/item/relict_priduction/pet_spray(get_turf(exp_on)) + var/obj/item/relict_production/pet_spray/R = new /obj/item/relict_production/pet_spray(get_turf(exp_on)) R.icon_state = exp_on.icon_state qdel(exp_on) else @@ -537,7 +547,7 @@ playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 3, -1) ejectItem() throwSmoke(get_turf(exp_on)) - var/obj/item/relict_priduction/R = new /obj/item/relict_priduction/rapid_dupe(get_turf(exp_on)) + var/obj/item/relict_production/R = new /obj/item/relict_production/rapid_dupe(get_turf(exp_on)) R.icon_state = exp_on.icon_state qdel(exp_on) else @@ -740,23 +750,23 @@ #undef FAIL -/obj/item/relict_priduction +/obj/item/relict_production name = "perfect mix" desc = "Странный объект без эффекта и иконки. Щитспавн онли." icon_state = "" icon = 'icons/obj/assemblies.dmi' origin_tech = "bluespace=3;materials=3" var/cooldown = 5 SECONDS - COOLDOWN_DECLARE(relict_priduction_cooldown) + COOLDOWN_DECLARE(relict_production_cooldown) -/obj/item/relict_priduction/attack_self(mob/user) - if(!COOLDOWN_FINISHED(src, relict_priduction_cooldown)) +/obj/item/relict_production/attack_self(mob/user) + if(!COOLDOWN_FINISHED(src, relict_production_cooldown)) to_chat(user, "[src] is not ready yet.") return FALSE - COOLDOWN_START(src, relict_priduction_cooldown, cooldown) + COOLDOWN_START(src, relict_production_cooldown, cooldown) return TRUE -/obj/item/relict_priduction/perfect_mix +/obj/item/relict_production/perfect_mix name = "perfect mix" desc = "Странный объект из которого можно бесконечно заполнять емкости какой-то жидкостью." icon_state = "beaker" @@ -764,15 +774,15 @@ icon = 'icons/obj/weapons/techrelic.dmi' lefthand_file = 'icons/mob/inhands/relics_production/inhandl.dmi' righthand_file = 'icons/mob/inhands/relics_production/inhandr.dmi' - origin_tech = "materials=4" + origin_tech = "materials=4;bluespace=3" var/datum/reagent/inner_reagent var/transfer = 10 -/obj/item/relict_priduction/perfect_mix/New() +/obj/item/relict_production/perfect_mix/New() . = ..() inner_reagent = pick(/datum/reagent/uranium, /datum/reagent/plasma, /datum/reagent/consumable/capsaicin, /datum/reagent/consumable/frostoil, /datum/reagent/space_cleaner, /datum/reagent/consumable/drink/coffee, pick(/datum/reagent/consumable/drink/non_alcoholic_beer, /datum/reagent/consumable/ethanol/beer, /datum/reagent/beer2)) -/obj/item/relict_priduction/perfect_mix/afterattack(atom/target, mob/user, proximity) +/obj/item/relict_production/perfect_mix/afterattack(atom/target, mob/user, proximity) if(istype(target, /obj/item/reagent_containers/glass)) var/obj/item/reagent_containers/glass/beaker = target beaker.reagents.add_reagent(inner_reagent.id, transfer) @@ -780,15 +790,15 @@ else to_chat(user, "You can't pour [src]'s content into this.") -/obj/item/relict_priduction/strange_teleporter +/obj/item/relict_production/strange_teleporter name = "strange teleporter" desc = "Странный объект телепортирующий вас при активации." icon_state = "prox-multitool2" icon = 'icons/obj/assemblies.dmi' - origin_tech = "materials=4" + origin_tech = "materials=4;bluespace=4" cooldown = 10 SECONDS -/obj/item/relict_priduction/strange_teleporter/attack_self(mob/user) +/obj/item/relict_production/strange_teleporter/attack_self(mob/user) if(!..()) return to_chat(user, "[src] begins to vibrate!") @@ -804,15 +814,15 @@ smoke.set_up(5, get_turf(user)) smoke.start() -/obj/item/relict_priduction/pet_spray +/obj/item/relict_production/pet_spray name = "pet spray" desc = "Странный объект создающий враждебных существ." icon_state = "armor-igniter-analyzer" icon = 'icons/obj/assemblies.dmi' - origin_tech = "biotech=4" + origin_tech = "biotech=5" cooldown = 60 SECONDS -/obj/item/relict_priduction/pet_spray/attack_self(mob/user) +/obj/item/relict_production/pet_spray/attack_self(mob/user) if(!..()) return var/message = "[src] begins to shake, and in the distance the sound of rampaging animals arises!" @@ -842,12 +852,12 @@ to_chat(user, "[src] falls apart!") qdel(src) -/obj/item/relict_priduction/rapid_dupe +/obj/item/relict_production/rapid_dupe name = "rapid dupe" desc = "Странный объект создающий другие странные объекты при контакте с аномалиями." icon_state = "shock_kit" icon = 'icons/obj/assemblies.dmi' - origin_tech = "materials=4" + origin_tech = "materials=5" //////////////////////////////////SPECIAL ITEMS//////////////////////////////////////// From ca946466770779da6ecc8e8759ce2799f2e580d6 Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Thu, 3 Oct 2024 12:57:18 +0300 Subject: [PATCH 22/23] fixes --- code/game/objects/items/devices/paicard.dm | 4 ++-- code/modules/research/experimentor.dm | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 31e55f2f79c..e9b3dc9cbb8 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -5,7 +5,7 @@ item_state = "electronic" w_class = WEIGHT_CLASS_SMALL slot_flags = ITEM_SLOT_BELT - origin_tech = "programming=2" + origin_tech = "programming=3;powerstorage=2" // Or it will be cloned in the experimentor var/request_cooldown = 5 // five seconds var/last_request var/obj/item/radio/headset/radio @@ -531,7 +531,7 @@ icon = 'icons/obj/pda.dmi' icon_state = "pai-spai" w_class = WEIGHT_CLASS_TINY - origin_tech = "programming=2;syndicate=2" + origin_tech = "programming=3;syndicate=2" // Or it will be cloned in the experimentor var/extra_memory = 50 var/used = TRUE diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 9e582453deb..78594494b1d 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -145,29 +145,31 @@ if(disabled) to_chat(user, span_warning("The [name] is offline.")) return ATTACK_CHAIN_PROCEED + if(!linked_console) to_chat(user, span_warning("The [name] should be linked to an R&D console first.")) return ATTACK_CHAIN_PROCEED + if(loaded_item) to_chat(user, span_warning("The [name] is already loaded.")) return ATTACK_CHAIN_PROCEED + if(!checkCircumstances(I)) to_chat(user, span_warning("The [I.name] is not yet valid for [src] and must be completed.")) return ATTACK_CHAIN_PROCEED + if(!I.origin_tech) to_chat(user, span_warning("The [I.name] has no technological origin.")) return ATTACK_CHAIN_PROCEED + if(clone_next) var/list/temp_tech = ConvertReqString2List(I.origin_tech) var/techs_sum = 0 for(var/T in temp_tech) techs_sum += temp_tech[T] - if(istype(I, /obj/item/relic) || techs_sum > 4 && !istype(I, /obj/item/storage/backpack/holding)) - to_chat(user, span_warning("Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.")) - return ATTACK_CHAIN_PROCEED - if (I.contents) - to_chat(user, span_warning("Предмет должен быть цельным.")) + if(istype(I, /obj/item/relic) || (techs_sum > 4 || isstorage(I)) && !istype(I, /obj/item/storage/backpack/holding)) + to_chat(user, span_warning("Этот предмет слишком сложен для копирования. Попробуйте вставить что-то попроще.")) return ATTACK_CHAIN_PROCEED if (I.type in subtypesof(/obj/item/stack)) @@ -182,10 +184,13 @@ visible_message(span_notice("A duplicate [I] pops out!")) var/type_to_make = I.type new type_to_make(get_turf(pick(oview(1,src)))) + clone_next = FALSE return ATTACK_CHAIN_PROCEED + if(!user.drop_transfer_item_to_loc(I, src)) return ATTACK_CHAIN_PROCEED + loaded_item = I to_chat(user, span_notice("You have added [I] to [src].")) flick("h_lathe_load", src) From 8c55b0162e114bdc03930f1b43697bff803154cf Mon Sep 17 00:00:00 2001 From: Anorak2024 Date: Mon, 14 Oct 2024 21:07:05 +0300 Subject: [PATCH 23/23] forgot rapidsyringe_experimental subcategory --- code/game/objects/items/weapons/experimental_syringe_gun.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/items/weapons/experimental_syringe_gun.dm b/code/game/objects/items/weapons/experimental_syringe_gun.dm index baa2832dce1..e6095af7b03 100644 --- a/code/game/objects/items/weapons/experimental_syringe_gun.dm +++ b/code/game/objects/items/weapons/experimental_syringe_gun.dm @@ -65,3 +65,4 @@ /obj/item/stock_parts/matter_bin = 1) time = 300 category = CAT_WEAPONRY + subcategory = CAT_WEAPON