Skip to content

Commit

Permalink
add: Experimentor relics rework (#5683)
Browse files Browse the repository at this point in the history
* Experimentor relics rework

* Experimentor relics rework

* bugfix

* Added beer, non alcogolic beer & beer2 into perfect_mix

* bugfix

* bugfix + some sprites

* + fauna bomb icon

* inhand sprites + bugfix

* bugfix

* bugfix

* bugfix

* new attack returns

* bugfix

* bugfix

* Update code/modules/mob/living/simple_animal/hostile/hostile.dm

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

* Update code/game/objects/items/weapons/tuned_anomalous_teleporter.dm

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

* Update code/modules/research/experimentor.dm

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

* Update code/modules/research/experimentor.dm

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

* павп

* аыва

* balance

* fixes

* forgot rapidsyringe_experimental subcategory

---------

Co-authored-by: Den109G <[email protected]>
  • Loading branch information
Anorak2024 and Den109G authored Oct 26, 2024
1 parent 3d96316 commit 233a9b5
Show file tree
Hide file tree
Showing 15 changed files with 563 additions and 184 deletions.
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_production/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
30 changes: 30 additions & 0 deletions code/game/objects/items/anomaly_beacon.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/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."
origin_tech = "bluespace=6"

/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_production/rapid_dupe = 1,
/obj/item/radio/beacon = 1,
/obj/item/stack/cable_coil = 5)
time = 300
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
4 changes: 2 additions & 2 deletions code/game/objects/items/devices/paicard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
item_state = "pai"
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
Expand Down Expand Up @@ -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

Expand Down
68 changes: 68 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,68 @@
/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
origin_tech = "bluespace=4;biotech=5"

/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)
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, "недостаточно места!")
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)
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, "синтезируемый набор веществ изменен!")
return ATTACK_CHAIN_BLOCKED_ALL
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_production/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
subcategory = CAT_WEAPON
64 changes: 64 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,64 @@
/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
origin_tech = "bluespace=4;biotech=5"

/obj/item/grenade/fauna_bomb/attack_self(mob/user)
if(!COOLDOWN_FINISHED(src, fauna_bomb_cooldown))
to_chat(user, span_warning("[src] is still recharging!"))
return

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

/obj/item/grenade/fauna_bomb/prime()
active = FALSE
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/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/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(new_mob, pick(NORTH, SOUTH, EAST, WEST))

if(prob(40))
to_chat(activator, span_warning("[src] falls apart!"))
qdel(src)

sleep(600)
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"
result = /obj/item/grenade/fauna_bomb
tools = list(TOOL_SCREWDRIVER)
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)
time = 300
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/grenades/grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

/obj/item/grenade/attack_self(mob/user)
if(!active && clown_check(user))
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
to_chat(user, span_warning("You prime the [name]! [det_time/10] seconds!"))
active = TRUE
update_icon(UPDATE_ICON_STATE)
add_fingerprint(user)
Expand Down
74 changes: 74 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,74 @@
/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)
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
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
origin_tech = "bluespace=5"

/obj/item/tuned_anomalous_teleporter/attack_self(mob/user)
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(!COOLDOWN_FINISHED(src, tuned_anomalous_teleporter_cooldown))
to_chat(user, span_warning("[src] is still recharging."))
return FALSE

COOLDOWN_START(src, tuned_anomalous_teleporter_cooldown, base_cooldown)

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(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.")

/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_production/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
10 changes: 10 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
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 @@ -133,6 +133,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 @@ -301,6 +305,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

if(!HAS_TRAIT(src, TRAIT_NO_BREATH))
Expand Down Expand Up @@ -789,3 +799,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

0 comments on commit 233a9b5

Please sign in to comment.