Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Experimentor relics rework #5683

Merged
merged 30 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1189673
Experimentor relics rework
Anorak2024 Aug 8, 2024
c5057a8
Experimentor relics rework
Anorak2024 Aug 8, 2024
286cbdf
bugfix
Anorak2024 Aug 8, 2024
f22433a
Added beer, non alcogolic beer & beer2 into perfect_mix
Anorak2024 Aug 9, 2024
4e0c3b0
bugfix
Anorak2024 Aug 12, 2024
2518b1c
Merge branch 'master220' into experimentor
Anorak2024 Aug 12, 2024
d4c1cc0
bugfix + some sprites
Anorak2024 Aug 15, 2024
d17ffe1
Merge branch 'master220' into experimentor
Anorak2024 Aug 15, 2024
3643e80
+ fauna bomb icon
Anorak2024 Aug 16, 2024
06eacf4
inhand sprites + bugfix
Anorak2024 Aug 17, 2024
34a967a
Merge branch 'master220' into experimentor
Anorak2024 Aug 17, 2024
ce3a12c
Merge branch 'master220' into experimentor
Anorak2024 Aug 18, 2024
d4d3e27
bugfix
Anorak2024 Aug 19, 2024
ac2201a
bugfix
Anorak2024 Aug 21, 2024
8ec1387
Merge branch 'master220' into experimentor
Anorak2024 Aug 21, 2024
698815f
bugfix
Anorak2024 Aug 21, 2024
738631b
new attack returns
Anorak2024 Aug 22, 2024
3489401
Merge branch 'master220' into experimentor
Anorak2024 Aug 22, 2024
0e5e1e1
bugfix
Anorak2024 Aug 23, 2024
b9d800c
bugfix
Anorak2024 Aug 24, 2024
9a01996
Update code/modules/mob/living/simple_animal/hostile/hostile.dm
Anorak2024 Aug 25, 2024
4da2310
Update code/game/objects/items/weapons/tuned_anomalous_teleporter.dm
Anorak2024 Sep 21, 2024
b623a1f
Update code/modules/research/experimentor.dm
Anorak2024 Sep 21, 2024
52a75a0
Update code/modules/research/experimentor.dm
Anorak2024 Sep 21, 2024
98c43c0
павп
Anorak2024 Sep 21, 2024
7529e3f
аыва
Anorak2024 Sep 21, 2024
d9cd0bf
Merge branch 'experimentor' of https://github.com/Anorak2024/Paradise…
Anorak2024 Sep 21, 2024
e4a4974
balance
Anorak2024 Oct 3, 2024
ca94646
fixes
Anorak2024 Oct 3, 2024
8c55b01
forgot rapidsyringe_experimental subcategory
Anorak2024 Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions code/game/objects/effects/anomalies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@
return ..()

/obj/effect/anomaly/process()
for(var/obj/item/I in get_turf(src))
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))
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)
Expand Down
29 changes: 29 additions & 0 deletions code/game/objects/items/anomaly_beacon.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/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."

/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
66 changes: 66 additions & 0 deletions code/game/objects/items/weapons/experimental_syringe_gun.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/obj/item/gun/syringe/rapidsyringe/experimental
name = "experimental syringe gun"
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
var/obj/item/reagent_containers/glass/beaker/large/processed_reagents = new
var/synth_speed = 5
var/bank_size = 100

/obj/item/gun/syringe/rapidsyringe/experimental/Initialize() {
..()
START_PROCESSING(SSobj, src)
}
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved

/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)
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
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 ATTACK_CHAIN_BLOCKED_ALL
else
balloon_alert(user, "недостаточно места!")
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
return ATTACK_CHAIN_PROCEED
else if(istype(A, /obj/item/reagent_containers/glass))
var/obj/item/reagent_containers/glass/RC = A;
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
if (!RC.reagents.reagent_list)
return ..()
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, "синтезируемый набор веществ изменен!")
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
else
return ..()

/obj/item/gun/syringe/rapidsyringe/experimental/process()
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)
if (R.can_synth)
ready_reagents.reagents.add_reagent(R.id, R.volume)

/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,
/obj/item/gun/syringe/rapidsyringe = 1,
/obj/item/stock_parts/matter_bin = 1)
time = 300
category = CAT_WEAPONRY
61 changes: 61 additions & 0 deletions code/game/objects/items/weapons/grenades/fauna_bomb.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/obj/item/grenade/fauna_bomb
name = "fauna bomb"
desc = "Эксперементальная, многоразовая граната, создающая фауну агрессивную ко всем, кроме активировавшего гранату."
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
COOLDOWN_DECLARE(fauna_bomb_cooldown)
var/mob/activator

/obj/item/grenade/fauna_bomb/attack_self(mob/user)
if(!COOLDOWN_FINISHED(src, fauna_bomb_cooldown))
to_chat(user, "<span class='warning'>[src] is still recharging!</span>")
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
return

COOLDOWN_START(src, fauna_bomb_cooldown, 60 SECONDS)
activator = user
return ..(user, FALSE)

/obj/item/grenade/fauna_bomb/prime()
active = FALSE
var/turf/T = get_turf(src)
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
playsound(T, '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)

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
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(S, pick(NORTH, SOUTH, EAST, WEST))

if(prob(40))
to_chat(activator, "<span class='warning'>[src] falls apart!</span>")
qdel(src)

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,
/obj/item/grenade/chem_grenade/adv_release = 1,
/obj/item/stack/cable_coil = 5)
time = 300
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
5 changes: 3 additions & 2 deletions code/game/objects/items/weapons/grenades/grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
if(!active && clown_check(user))
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
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)]")
Expand Down
87 changes: 87 additions & 0 deletions code/game/objects/items/weapons/tuned_anomalous_teleporter.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/obj/item/tuned_anomalous_teleporter
name = "tuned anomalous teleporter"
desc = "A portable item using blue-space technology."
icon = 'icons/obj/weapons/techrelic.dmi'
icon_state = "teleport"
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
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)
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
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
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved

/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)
var/T = (last_use + cooldown - world.time)/10
var/msg = "Wait <b>[T]</b> seconds."
to_chat(user, span_warning(msg))
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
12 changes: 11 additions & 1 deletion code/modules/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved


//These vars are related to how mobs locate and target
Expand Down Expand Up @@ -272,8 +272,18 @@
var/possible_target_distance = get_dist(targets_from, A)
if(target_dist < possible_target_distance)
Targets -= A

var/list/mob/high_priority_targets = list()
for(var/mob/T in Targets)
if (!(T.UID() in low_priority_targets))
high_priority_targets.Add(T)

if (high_priority_targets.len)
Targets = high_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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@
/mob/living/simple_animal/hostile/asteroid/hivelord/legion/death(gibbed)
visible_message("<span class='warning'>The skulls on [src] wail in anger as they flee from their dying host!</span>")
var/turf/T = get_turf(src)
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)
if(T)
Expand Down
14 changes: 14 additions & 0 deletions code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
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()

var/atom/leash // autodust on a big distance
var/leash_radius = 10

/mob/living/simple_animal/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -306,6 +310,12 @@


/mob/living/simple_animal/handle_environment(datum/gas_mixture/environment)
if (leash)
var/dist = get_dist(src, leash)
if (dist > leash_radius)
src.dust()
return

var/atmos_suitable = TRUE

var/areatemp = get_temperature(environment)
Expand Down Expand Up @@ -805,3 +815,7 @@
if(!can_collar)
return
AddElement(/datum/element/strippable, create_strippable_list(list(/datum/strippable_item/pet_collar)))

/mob/living/simple_animal/proc/set_leash(atom/A, radius)
leash = A
leash_radius = radius
Loading