mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
Buffs Swarmers
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
////Deactivated swarmer shell////
|
||||
/obj/item/unactivated_swarmer
|
||||
/obj/item/device/unactivated_swarmer
|
||||
name = "unactivated swarmer"
|
||||
desc = "A currently unactivated swarmer. Swarmers can self activate at any time, it would be wise to immediately dispose of this."
|
||||
icon = 'icons/mob/swarmer.dmi'
|
||||
icon_state = "swarmer_unactivated"
|
||||
origin_tech = "bluespace=4;materials=4;programming=7"
|
||||
materials = list(MAT_METAL=100, MAT_GLASS=400)
|
||||
|
||||
/obj/item/unactivated_swarmer/New()
|
||||
notify_ghosts("An unactivated swarmer has been created in [get_area(src)]!", enter_link = "<a href=?src=[UID()];ghostjoin=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK)
|
||||
/obj/item/device/unactivated_swarmer/New()
|
||||
if(!crit_fail)
|
||||
notify_ghosts("An unactivated swarmer has been created in [get_area(src)]!", enter_link = "<a href=?src=[UID()];ghostjoin=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK)
|
||||
..()
|
||||
|
||||
/obj/item/unactivated_swarmer/Topic(href, href_list)
|
||||
/obj/item/device/unactivated_swarmer/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["ghostjoin"])
|
||||
@@ -18,10 +20,29 @@
|
||||
if(istype(ghost))
|
||||
attack_ghost(ghost)
|
||||
|
||||
/obj/item/unactivated_swarmer/attack_ghost(mob/user as mob)
|
||||
/obj/item/device/unactivated_swarmer/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/screwdriver) && !crit_fail)
|
||||
user.visible_message("<span class='warning'>[usr.name] deactivates [src].</span>",
|
||||
"<span class='notice'>After some fiddling, you find a way to disable [src]'s power source.</span>",
|
||||
"<span class='italics'>You hear clicking.</span>")
|
||||
name = "deactivated swarmer"
|
||||
desc = "A shell of swarmer that was completely powered down. It no longer can activate itself."
|
||||
crit_fail = 1
|
||||
|
||||
/obj/item/device/unactivated_swarmer/attack_ghost(mob/user as mob)
|
||||
|
||||
if(crit_fail)
|
||||
to_chat(user, "<span class='warning'>This swarmer shell is completely depowered. You cannot activate it.</span>")
|
||||
return
|
||||
|
||||
var/be_swarmer = alert("Become a swarmer? (Warning, You can no longer be cloned!)",,"Yes","No")
|
||||
if(be_swarmer == "No")
|
||||
return
|
||||
|
||||
if(crit_fail)//in case it depowers while ghost is looking at yes/no
|
||||
to_chat(user, "<span class='warning'>This swarmer shell is completely depowered. You cannot activate it.</span>")
|
||||
return
|
||||
if(qdeleted(src))
|
||||
to_chat(user, "Swarmer has been occupied by someone else.")
|
||||
return
|
||||
@@ -29,6 +50,18 @@
|
||||
S.key = user.key
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/unactivated_swarmer/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
if(S.resources + 50 > S.max_resources)
|
||||
to_chat(S, "<span class='warning'>We have too many resources to reconsume this shell. Aborting.</span>")
|
||||
else
|
||||
..()
|
||||
S.resources += 49 //refund the whole thing
|
||||
|
||||
/obj/item/device/unactivated_swarmer/deactivated
|
||||
name = "deactivated swarmer"
|
||||
desc = "A shell of swarmer that was completely powered down. It no longer can activate itself."
|
||||
crit_fail = 1
|
||||
|
||||
////The Mob itself////
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer
|
||||
@@ -64,20 +97,24 @@
|
||||
mob_size = MOB_SIZE_TINY
|
||||
ventcrawler = 2
|
||||
ranged = 1
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
ranged_cooldown_time = 20
|
||||
universal_speak = 0
|
||||
universal_understand = 0
|
||||
projectilesound = 'sound/weapons/taser2.ogg'
|
||||
AIStatus = AI_OFF
|
||||
var/resources = 0 //Resource points, generated by consuming metal/glass
|
||||
var/max_resources = 100
|
||||
loot = list(/obj/effect/decal/cleanable/blood/gibs/robot, /obj/item/weapon/ore/bluespace_crystal/artificial)
|
||||
deathmessage = "The swarmer explodes with a sharp pop!"
|
||||
del_on_death = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/Login()
|
||||
..()
|
||||
to_chat(src, "<b>You are a swarmer, a weapon of a long dead civilization. Until further orders from your original masters are received, you must continue to consume and replicate.</b>")
|
||||
to_chat(src, "<b>Ctrl + Click provides most of your swarmer specific interactions, such as cannibalizing metal or glass, destroying the environment, or teleporting mobs away from you.")
|
||||
to_chat(src, "<b>Objectives:</b>")
|
||||
to_chat(src, "<b>Clicking on any object will try to consume it, either deconstructing it into its components, destroying it, or integrating any materials it has into you if successful.</b>")
|
||||
to_chat(src, "<b>Ctrl-Clicking on a mob will attempt to remove it from the area and place it in a safe environment for storage.</b>")
|
||||
to_chat(src, "<b>Prime Directives:</b>")
|
||||
to_chat(src, "1. Consume resources and replicate until there are no more resources left.")
|
||||
to_chat(src, "2. Ensure that the station is fit for invasion at a later date, do not perform actions that would render it dangerous or inhospitable.")
|
||||
to_chat(src, "3. Biological and Sentient resources will be harvested at a later date, do not harm them.")
|
||||
@@ -110,7 +147,14 @@
|
||||
real_name = "Swarmer [rand(100,999)]-[pick("kappa","sigma","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]"
|
||||
name = real_name
|
||||
|
||||
|
||||
////CTRL CLICK FOR SWARMERS AND SWARMER_ACT()'S////
|
||||
/mob/living/simple_animal/hostile/swarmer/AttackingTarget()
|
||||
if(!isliving(target))
|
||||
target.swarmer_act(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/CtrlClickOn(atom/A)
|
||||
face_atom(A)
|
||||
if(!isturf(loc))
|
||||
@@ -248,6 +292,7 @@
|
||||
/mob/living/carbon/slime/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
to_chat(S, "<span class='warning'>This biological resource is somehow resisting our bluespace transceiver. Aborting.</span>")
|
||||
|
||||
|
||||
////END CTRL CLICK FOR SWARMERS////
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/Fabricate(var/atom/fabrication_object,var/fabrication_cost = 0)
|
||||
@@ -262,7 +307,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/Integrate(var/obj/item/target)
|
||||
if(resources >= 100)
|
||||
if(resources >= max_resources)
|
||||
to_chat(src, "<span class='warning'>We cannot hold more materials!</span>")
|
||||
return
|
||||
//Check if any entries are either MAT_METAL or MAT_GLASS
|
||||
@@ -355,6 +400,7 @@
|
||||
light_range = 1
|
||||
mouse_opacity = 1
|
||||
var/health = 30
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/structure/swarmer/disintegration
|
||||
icon_state = "disintegrate"
|
||||
@@ -422,6 +468,7 @@
|
||||
desc = "A quickly assembled trap that electrifies living beings and overwhelms machine sensors. Will not retain its form if damaged enough."
|
||||
icon_state = "trap"
|
||||
light_range = 1
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
health = 10
|
||||
|
||||
/obj/structure/swarmer/trap/Crossed(var/atom/movable/AM)
|
||||
@@ -462,6 +509,7 @@
|
||||
desc = "A quickly assembled energy blockade. Will not retain its form if damaged enough, but disabler beams and swarmers pass right through."
|
||||
icon_state = "barricade"
|
||||
light_range = 1
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
health = 50
|
||||
density = 1
|
||||
anchored = 1
|
||||
@@ -484,7 +532,7 @@
|
||||
to_chat(src, "<span class='warning'>This is not a suitable location for replicating ourselves. We need more room.</span>")
|
||||
return
|
||||
if(do_mob(src, src, 100))
|
||||
if(Fabricate(/obj/item/unactivated_swarmer, 50))
|
||||
if(Fabricate(/obj/item/device/unactivated_swarmer, 50))
|
||||
playsound(loc,'sound/items/poster_being_created.ogg',50, 1, -1)
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/RepairSelf()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
return 0
|
||||
if(!the_gateway)
|
||||
return 0
|
||||
new /obj/item/unactivated_swarmer(get_turf(the_gateway))
|
||||
new /obj/item/device/unactivated_swarmer(get_turf(the_gateway))
|
||||
|
||||
|
||||
/datum/event/spawn_swarmer/proc/find_swarmer()
|
||||
|
||||
Reference in New Issue
Block a user