-Adds swarmer as a language, makes them only able to speak to each other

-Fixes a few structures/machines taking non brute/burn damage from attack_animal
-Adjusts girders to be a little less resistant to explosions
-Span classes all the swarmer messages, bumps their health up to 40
-Adds ability for swarmers to dismantle machines and disable cameras. Some are obviously protected.
This commit is contained in:
Ergovisavi
2015-08-25 05:48:37 -07:00
27 changed files with 281 additions and 151 deletions

View File

@@ -77,4 +77,5 @@
#define ALIEN 4
#define ROBOT 8
#define SLIME 16
#define DRONE 32
#define DRONE 32
#define SWARMER 64

View File

@@ -46,6 +46,7 @@
if(T.client)
T.client.screen -= button
qdel(button)
button = null
T.actions.Remove(src)
T.update_action_buttons()
owner = null

View File

@@ -759,6 +759,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/obj/item/weapon/reagent_containers/food/condiment/rice,
/obj/item/weapon/reagent_containers/food/condiment/milk,
/obj/item/weapon/reagent_containers/food/condiment/soymilk,
/obj/item/weapon/reagent_containers/food/condiment/saltshaker,
/obj/item/weapon/reagent_containers/food/condiment/peppermill,
/obj/item/weapon/storage/fancy/egg_box,
/obj/item/weapon/reagent_containers/food/condiment/enzyme,
/obj/item/weapon/reagent_containers/food/condiment/sugar,

View File

@@ -35,7 +35,7 @@
destination.dna.unique_enzymes = unique_enzymes
destination.dna.uni_identity = uni_identity
destination.dna.blood_type = blood_type
hardset_dna(destination, null, null, null, null, species)
hardset_dna(destination, null, null, null, null, species.type)
destination.dna.features = features
destination.dna.real_name = real_name
destination.dna.mutations = mutations

View File

@@ -38,9 +38,6 @@
Radio = new/obj/item/device/radio(src)
Radio.listening = 0
pixel_x = ((src.dir & 3)? (0) : (src.dir == 4 ? 32 : -32))
pixel_y = ((src.dir & 3)? (src.dir ==1 ? 24 : -32) : (0))
spawn(20)
for(var/obj/machinery/door/window/brigdoor/M in range(20, src))
if (M.id == src.id)

View File

@@ -311,7 +311,7 @@
/obj/machinery/porta_turret/attack_animal(mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
if(M.melee_damage_upper == 0)
if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
return
if(!(stat & BROKEN))
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>")

View File

@@ -65,9 +65,6 @@
..()
if (tagged)
overlays += "bodybag_label"
else
overlays.Cut()
/obj/structure/closet/body_bag/close()
if(..())

View File

@@ -481,4 +481,5 @@
/obj/item/weapon/storage/handle_atom_del(atom/A)
if(A in contents)
remove_from_storage(A,null)
usr = null
remove_from_storage(A, loc)

View File

@@ -246,7 +246,7 @@
/datum/barsign/emergencyrumparty
name = "The Emergency Rum Party"
icon = "emergencyrumparty"
desc = "Still serving drinks that were banned years ago."
desc = "Recently relicensed after a long closure."
/datum/barsign/combocafe
name = "The Combo Cafe"
@@ -276,7 +276,7 @@
/datum/barsign/thenet
name = "The Net"
icon = "thenet"
desc = "The sea of drinkformation." //you couldn't come up with something better?
desc = "You just seem to get caught up in it for hours."
/datum/barsign/hiddensigns

View File

@@ -239,7 +239,7 @@
qdel(src)
return
if(3.0)
if (prob(15))
if (prob(40))
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
new remains(loc)
qdel(src)

View File

@@ -79,7 +79,8 @@
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
if(M.melee_damage_upper == 0) return
if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
return
M.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \

View File

@@ -1157,7 +1157,7 @@
var/DBQuery/query_reason = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
query_reason.Execute()
if(query_reason.NextRow())
var/watch_reason = query_reason.item[3]
var/watch_reason = query_reason.item[2]
var/new_reason = input("Insert new reason", "New Reason", "[watch_reason]", null) as null|text
new_reason = sanitizeSQL(new_reason)
if(!new_reason)

View File

@@ -14,10 +14,6 @@
/mob/camera/experience_pressure_difference()
return
/mob/camera/Destroy()
..()
qdel(src)
/mob/camera/Login()
..()
update_interface()

View File

@@ -35,13 +35,16 @@
sleep(30)
playsound(get_turf(src),'sound/magic/Demon_consume.ogg', 100, 1)
sleep(30)
src << "<B>You devour [kidnapped]. Your health is fully restored.</B>"
src.adjustBruteLoss(-1000)
src.adjustFireLoss(-1000)
src.adjustOxyLoss(-1000)
src.adjustToxLoss(-1000)
kidnapped.ghostize()
qdel(kidnapped)
if(kidnapped)
src << "<B>You devour [kidnapped]. Your health is fully restored.</B>"
src.adjustBruteLoss(-1000)
src.adjustFireLoss(-1000)
src.adjustOxyLoss(-1000)
src.adjustToxLoss(-1000)
kidnapped.ghostize()
qdel(kidnapped)
else
src << "<B>You happily devour...nothing? Your meal vanished at some point!</B>"
src.notransform = 0
/mob/living/proc/phasein(obj/effect/decal/cleanable/B)

View File

@@ -95,7 +95,10 @@
jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less
Stun(3)
Weaken(3)
return shock_damage
if(override)
return override
else
return shock_damage
/mob/living/carbon/swap_hand()

View File

@@ -280,7 +280,11 @@
heart_attack = 0
if(stat == CONSCIOUS)
src << "<span class='notice'>You feel your heart beating again!</span>"
return ..(shock_damage,source,siemens_coeff,safety,override)
. = ..(shock_damage,source,siemens_coeff,safety,override)
if(.)
electrocution_animation(40)
/mob/living/carbon/human/Topic(href, href_list)
if(usr.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
@@ -801,4 +805,30 @@
H.bloody_hands = 0
H.bloody_hands_mob = null
H.update_inv_gloves()
update_icons() //apply the now updated overlays to the mob
update_icons() //apply the now updated overlays to the mob
//Turns a mob black, flashes a skeleton overlay
//Just like a cartoon!
/mob/living/carbon/human/proc/electrocution_animation(anim_duration)
//Handle mutant parts if possible
if(dna && dna.species)
dna.species.handle_mutant_bodyparts(src,"black")
dna.species.handle_hair(src,"black")
dna.species.update_color(src,"black")
overlays += "electrocuted_base"
spawn(anim_duration)
if(src)
if(dna && dna.species)
dna.species.handle_mutant_bodyparts(src)
dna.species.handle_hair(src)
dna.species.update_color(src)
overlays -= "electrocuted_base"
else //or just do a generic animation
var/list/viewing = list()
for(var/mob/M in viewers(src))
if(M.client)
viewing += M.client
flick_overlay(image(icon,src,"electrocuted_generic",MOB_LAYER+1), viewing, anim_duration)

View File

@@ -118,24 +118,35 @@
else
return "[id]"
/datum/species/proc/update_color(mob/living/carbon/human/H)
/datum/species/proc/update_color(mob/living/carbon/human/H, forced_colour)
H.remove_overlay(SPECIES_LAYER)
var/image/standing
var/g = (H.gender == FEMALE) ? "f" : "m"
if(MUTCOLORS in specflags)
if((MUTCOLORS in specflags) || use_skintones)
var/image/spec_base
var/icon_state_string = "[id]_"
if(sexes)
icon_state_string += "[g]_s"
if(use_skintones)
if(sexes)
icon_state_string = "[H.skin_tone]_[g]_s"
else
icon_state_string = "[H.skin_tone]_s"
else
icon_state_string += "_s"
if(sexes)
icon_state_string += "[g]_s"
else
icon_state_string += "_s"
spec_base = image("icon" = 'icons/mob/human.dmi', "icon_state" = icon_state_string, "layer" = -SPECIES_LAYER)
spec_base.color = "#[H.dna.features["mcolor"]]"
if(!forced_colour && !use_skintones)
spec_base.color = "#[H.dna.features["mcolor"]]"
else
spec_base.color = forced_colour
standing = spec_base
if(standing)
@@ -143,7 +154,7 @@
H.apply_overlay(SPECIES_LAYER)
/datum/species/proc/handle_hair(mob/living/carbon/human/H)
/datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour)
H.remove_overlay(HAIR_LAYER)
var/datum/sprite_accessory/S
@@ -156,13 +167,17 @@
img_facial_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER)
if(hair_color)
if(hair_color == "mutcolor")
img_facial_s.color = "#" + H.dna.features["mcolor"]
if(!forced_colour)
if(hair_color)
if(hair_color == "mutcolor")
img_facial_s.color = "#" + H.dna.features["mcolor"]
else
img_facial_s.color = "#" + hair_color
else
img_facial_s.color = "#" + hair_color
img_facial_s.color = "#" + H.facial_hair_color
else
img_facial_s.color = "#" + H.facial_hair_color
img_facial_s.color = forced_colour
img_facial_s.alpha = hair_alpha
standing += img_facial_s
@@ -184,13 +199,16 @@
img_hair_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER)
if(hair_color)
if(hair_color == "mutcolor")
img_hair_s.color = "#" + H.dna.features["mcolor"]
if(!forced_colour)
if(hair_color)
if(hair_color == "mutcolor")
img_hair_s.color = "#" + H.dna.features["mcolor"]
else
img_hair_s.color = "#" + hair_color
else
img_hair_s.color = "#" + hair_color
img_hair_s.color = "#" + H.hair_color
else
img_hair_s.color = "#" + H.hair_color
img_hair_s.color = forced_colour
img_hair_s.alpha = hair_alpha
standing += img_hair_s
@@ -246,7 +264,7 @@
return
/datum/species/proc/handle_mutant_bodyparts(mob/living/carbon/human/H)
/datum/species/proc/handle_mutant_bodyparts(mob/living/carbon/human/H, forced_colour)
var/list/bodyparts_to_add = mutant_bodyparts.Copy()
var/list/relevent_layers = list(BODY_BEHIND_LAYER, BODY_ADJ_LAYER, BODY_FRONT_LAYER)
var/list/standing = list()
@@ -359,18 +377,21 @@
I = image("icon" = 'icons/mob/mutant_bodyparts.dmi', "icon_state" = icon_string, "layer" =- layer)
if(!(H.disabilities & HUSK))
switch(S.color_src)
if(MUTCOLORS)
I.color = "#[H.dna.features["mcolor"]]"
if(HAIR)
if(hair_color == "mutcolor")
if(!forced_colour)
switch(S.color_src)
if(MUTCOLORS)
I.color = "#[H.dna.features["mcolor"]]"
else
I.color = "#[H.hair_color]"
if(FACEHAIR)
I.color = "#[H.facial_hair_color]"
if(EYECOLOR)
I.color = "#[H.eye_color]"
if(HAIR)
if(hair_color == "mutcolor")
I.color = "#[H.dna.features["mcolor"]]"
else
I.color = "#[H.hair_color]"
if(FACEHAIR)
I.color = "#[H.facial_hair_color]"
if(EYECOLOR)
I.color = "#[H.eye_color]"
else
I.color = forced_colour
standing += I
if(S.hasinner)

View File

@@ -53,7 +53,6 @@ Please contact me on #coderbus IRC. ~Carnie x
*/
/mob/living/carbon/human/proc/update_base_icon_state()
//var/race = dna ? dna.mutantrace : null
if(dna)
base_icon_state = dna.species.update_base_icon_state(src)
else
@@ -68,7 +67,6 @@ Please contact me on #coderbus IRC. ~Carnie x
//UPDATES OVERLAYS FROM OVERLAYS_STANDING
//TODO: Remove all instances where this proc is called. It used to be the fastest way to swap between standing/lying.
/mob/living/carbon/human/update_icons()
update_hud() //TODO: remove the need for this
if(overlays.len != overlays_standing.len)
@@ -79,7 +77,6 @@ Please contact me on #coderbus IRC. ~Carnie x
update_transform()
//DAMAGE OVERLAYS
//constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists
/mob/living/carbon/human/update_damage_overlays()
@@ -123,14 +120,9 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/proc/update_body()
remove_overlay(BODY_LAYER)
update_base_icon_state()
if(dna)
base_icon_state = dna.species.update_base_icon_state(src)
else
update_base_icon_state()
icon_state = "[base_icon_state]_s"
if(dna) // didn't want to have a duplicate if(dna) here, but due to the ordering of the code this was the only way
dna.species.handle_body(src)
/mob/living/carbon/human/update_fire()

View File

@@ -7,7 +7,7 @@
/obj/item/unactivated_swarmer/attack_ghost(mob/user)
var/be_swarmer = alert("Become a swarmer? (Warning, You can no longer be cloned!)",,"Yes","No")
if(be_swarmer == "No" || gc_destroyed)
if(be_swarmer == "No" || qdeleted())
return
var/mob/living/simple_animal/hostile/swarmer/S = new /mob/living/simple_animal/hostile/swarmer(get_turf(loc))
S.key = user.key
@@ -16,12 +16,13 @@
////The Mob itself////
/mob/living/simple_animal/hostile/swarmer
name = "swarmer"
name = "Swarmer"
unique_name = 1
icon = 'icons/mob/swarmer.dmi'
desc = "A robot of unknown design, they seek only to consume materials and replicate themselves indefinitely."
speak_emote = list("tones")
health = 30
maxHealth = 30
health = 40
maxHealth = 40
status_flags = CANPUSH
icon_state = "swarmer"
icon_living = "swarmer"
@@ -36,17 +37,17 @@
melee_damage_lower = 15
melee_damage_upper = 15
melee_damage_type = STAMINA
ignored_damage_types = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
ignored_damage_types = list(BRUTE = 0, BURN = 0, TOX = 1, CLONE = 1, STAMINA = 1, OXY = 1)
languages = SWARMER
environment_smash = 0
attacktext = "shocks"
attack_sound = null
attack_sound = 'sound/effects/EMPulse.ogg'
friendly = "pinches"
speed = 0
faction = list("swarmer")
AIStatus = AI_OFF
projectiletype = /obj/item/projectile/beam/disabler
pass_flags = PASSTABLE | PASSMOB
has_unlimited_silicon_privilege = 1
ventcrawler = 2
ranged = 1
projectiletype = /obj/item/projectile/beam/disabler
@@ -57,7 +58,7 @@
/mob/living/simple_animal/hostile/swarmer/Login()
..()
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>"
src << "<b>Ctrl + Click provides most of your swarmer specific interactions, such as cannibalizing metal or glass, or destroying the environment."
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."
src << "<b>Objectives:</b>"
src << "1. Consume resources and replicate until there are no more resources left."
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."
@@ -70,7 +71,7 @@
/mob/living/simple_animal/hostile/swarmer/Stat()
..()
if(statpanel("Status"))
stat("Resources",resources)
stat("Resources:",resources)
/mob/living/simple_animal/hostile/swarmer/death(gibbed)
..(gibbed)
@@ -84,6 +85,14 @@
..()
health = 0
/mob/living/simple_animal/hostile/swarmer/CanPass(atom/movable/O)
if(istype(O, /obj/item/projectile/beam/disabler))//Allows for swarmers to fight as a group without wasting their shots hitting each other
return 1
if(isswarmer(O))
return 1
..()
////CTRL CLICK FOR SWARMERS AND SWARMER_ACT()'S////
/mob/living/simple_animal/hostile/swarmer/CtrlClickOn(atom/A)
face_atom(A)
if(!isturf(loc))
@@ -92,69 +101,133 @@
return
if(!A.Adjacent(src))
return
if(isliving(A))
DisperseTarget(A)
return
if(istype(A, /obj/item))
Integrate(A)
return
if(istype(A, /turf/simulated/floor))//Stops you from disintegrating mobs to death or other assorted nonsense, as turf ex_act calls it on its contents
return
DisIntegrate(A)
A.swarmer_act(src)
return
/atom/proc/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisIntegrate(src)
/obj/item/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.Integrate(src)
/obj/item/weapon/gun/swarmer_act()//Stops you from eating the entire armory
return
/turf/simulated/floor/swarmer_act()//ex_act() on turf calls it on its contents, this is to prevent attacking mobs by DisIntegrate()'ing the floor
return
/obj/machinery/atmospherics/swarmer_act()
return
/obj/structure/disposalpipe/swarmer_act()
return
/obj/machinery/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DismantleMachine(src)
/obj/machinery/light/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisIntegrate(src)
/obj/machinery/door/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisIntegrate(src)
/obj/machinery/camera/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisIntegrate(src)
deactivate(S, 0)
/obj/machinery/particle_accelerator/control_box/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisIntegrate(src)
/obj/machinery/field/generator/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisIntegrate(src)
/obj/machinery/gravity_generator/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisIntegrate(src)
/obj/machinery/vending/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)//It's more visually interesting than dismantling the machine
S.DisIntegrate(src)
/obj/machinery/turretid/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisIntegrate(src)
/obj/machinery/chem_dispenser/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S << "<span class='warning'>The volatile chemicals in this machine would destroy us. Aborting.</span>"
/obj/machinery/nuclearbomb/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S << "<span class='warning'>This device's destruction would result in the extermination of everything in the area. Aborting.</span>"
/obj/structure/reagent_dispensers/fueltank/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S << "<span class='warning'>Destroying this object would cause a chain reaction. Aborting.</span>"
/obj/structure/cable/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S << "<span class='warning'>Disrupting the power grid would bring no benefit to us. Aborting.</span>"
/obj/machinery/portable_atmospherics/canister/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S << "<span class='warning'>An inhospitable area may be created as a result of destroying this object. Aborting.</span>"
/obj/machinery/power/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S << "<span class='warning'>Disrupting the power grid would bring no benefit to us. Aborting.</span>"
/obj/machinery/gateway/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S << "<span class='warning'>This bluespace source will be important to us later. Aborting.</span>"
/turf/simulated/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
if(locate(/turf/space) in range(1, src))
S << "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>"
return
..()
/obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
if(locate(/turf/space) in range(1, src))
S << "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>"
return
..()
/obj/item/stack/cable_coil/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)//Wiring would be too effective as a resource
S << "<span class='warning'>This object does not contain enough materials to work with.</span>"
/obj/machinery/porta_turret/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S << "<span class='warning'>Attempting to dismantle this machine would result in an immediate counterattack. Aborting.</span>"
/mob/living/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
S.DisperseTarget(src)
/mob/living/simple_animal/slime/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
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)
if(!isturf(loc))
src << "This is not a suitable location for fabrication. We need more space."
src << "<span class='warning'>This is not a suitable location for fabrication. We need more space.</span>"
if(resources >= fabrication_cost)
resources -= fabrication_cost
else
src << "You do not have the necessary resources to fabricate this object"
src << "<span class='warning'>You do not have the necessary resources to fabricate this object.</span>"
return 0
new fabrication_object(loc)
return 1
/mob/living/simple_animal/hostile/swarmer/proc/Integrate(var/obj/item/target)
if(resources >= 100)
src << "We cannot hold more materials!"
return
if(istype(target, /obj/item/weapon/gun))
src << "This object has been adjusted to resist disintegration"//Stops swarmers from devouring the entire armory in seconds
src << "<span class='warning'>We cannot hold more materials!</span>"
return
if((target.materials[MAT_METAL]) || (target.materials[MAT_GLASS]))
if(istype(target, /obj/item/stack))
if(istype(target, /obj/item/stack/cable_coil))//Wiring is just too plentiful
src << "This object does not contain enough materials to work with."
return
var/obj/item/stack/S = target
resources++
S.amount--
if(S.amount > 0)
return
resources++
do_attack_animation(target)
changeNext_move(CLICK_CD_MELEE)
if(istype(target, /obj/item/stack))
var/obj/item/stack/S = target
S.use(1)
if(S.amount)
return
qdel(target)
else
src << "This object does not contain enough materials to work with."
src << "<span class='warning'>\the [target] is incompatible with our internal matter recycler.</span>"
return
/mob/living/simple_animal/hostile/swarmer/proc/DisIntegrate(var/atom/movable/target)
if(istype(target, /turf/simulated/wall) || istype(target, /obj/structure/window))
if(locate(/turf/space) in range(1, target))
src << "Destroying this object has the potential to cause a hull breach. Aborting."
return
if(istype(target, /obj/structure/reagent_dispensers/fueltank))
src << "Destroying this object would cause a chain reaction. Aborting."
return
if(istype(target, /obj/machinery/portable_atmospherics/canister))
src << "An inhospitable area may be created as a result of destroying this object. Aborting."
return
if(istype(target, /obj/structure/cable) || istype(target, /obj/machinery/power/apc) || istype(target, /obj/machinery/power/smes))
src << "Disrupting the power grid would bring no benefit to us. Aborting."
return
if(istype(target, /obj/machinery/power/emitter))//Stop trying to release the singularity you fuck
src << "This object is too risky to destroy. Aborting."
return
new /obj/effect/effect/sparks(get_turf(target))
do_attack_animation(target)
changeNext_move(CLICK_CD_MELEE)
@@ -163,7 +236,10 @@
/mob/living/simple_animal/hostile/swarmer/proc/DisperseTarget(var/mob/living/target)
if(target != src)
src << "Attempting to remove this being from our presence."
src << "<span class='info'>Attempting to remove this being from our presence.</span>"
if(src.z != ZLEVEL_STATION)
src << "<span class='warning'>Our bluespace transceiver cannot locate a viable bluespace link, our teleportation abilities are useless in this area.</span>"
return
if(do_mob(src, target, 30))
var/cycle
for(cycle=0,cycle<100,cycle++)
@@ -185,6 +261,24 @@
break
return
/mob/living/simple_animal/hostile/swarmer/proc/DismantleMachine(var/obj/machinery/target)
do_attack_animation(target)
src << "<span class='info'>We begin to dismantle this machine. We will need to be uninterrupted.</span>"
new /obj/effect/effect/sparks(get_turf(target))
if(do_mob(src, target, 100))
src << "<span class='info'>Dismantling complete.</span>"
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(target.loc)
M.amount = 5
for(var/obj/item/I in target.component_parts)
I.loc = M.loc
new /obj/effect/effect/sparks(get_turf(target))
target.dropContents()
if(istype(target, /obj/machinery/computer))
var/obj/machinery/computer/C = target
if(C.circuit)
C.circuit.loc = M.loc
qdel(target)
/obj/effect/swarmer //Default destroyable object for swarmer constructions
name = "swarmer construction"
desc = "Debug swarmer item, this shouldn't be here. Yell at a coder."
@@ -234,7 +328,7 @@
set category = "Swarmer"
set desc = "Creates a simple trap that will non-lethally electrocute anything that steps on it. Costs 5 resources"
if(/obj/effect/swarmer/trap in loc)
src << "There is already a trap here. Aborting."
src << "<span class='warning'>There is already a trap here. Aborting.</span>"
return
Fabricate(/obj/effect/swarmer/trap, 5)
return
@@ -259,7 +353,7 @@
set category = "Swarmer"
set desc = "Creates a barricade that will stop anything but swarmers and disabler beams from passing through."
if(/obj/effect/swarmer/blockade in loc)
src << "There is already a blockade here. Aborting."
src << "<span class='warning'>There is already a blockade here. Aborting.</span>"
return
Fabricate(/obj/effect/swarmer/blockade, 5)
return
@@ -274,22 +368,21 @@
anchored = 1
/obj/effect/swarmer/blockade/CanPass(atom/movable/O)
if(istype(O, /mob/living/simple_animal/hostile/swarmer))
if(isswarmer(O))
return 1
if(istype(O, /obj/item/projectile/beam/disabler))
return 1
..()
/mob/living/simple_animal/hostile/swarmer/proc/CreateSwarmer()
set name = "Replicate"
set category = "Swarmer"
set desc = "Creates a shell for a new swarmer. Swarmers will self activate."
src << "We are attempting to replicate ourselves. We will need to stand still until the process is complete."
src << "<span class='info'>We are attempting to replicate ourselves. We will need to stand still until the process is complete.</span>"
if(resources < 50)
src << "We do not have the resources for this!"
src << "<span class='warning'>We do not have the resources for this!</span>"
return
if(!isturf(loc))
src << "This is not a suitable location for replicating ourselves. We need more room."
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))
@@ -301,10 +394,10 @@
set desc = "Attempts to repair damage to our body. You will have to remain motionless until repairs are complete."
if(!isturf(loc))
return
src << "Attempting to repair damage to our body, stand by..."
src << "<span class='info'>Attempting to repair damage to our body, stand by...</span>"
if(do_mob(src, src, 100))
adjustBruteLoss(-100)
src << "We successfully repaired ourselves."
src << "<span class='info'>We successfully repaired ourselves.</span>"
/mob/living/simple_animal/hostile/swarmer/proc/ToggleLight()
if(!luminosity)
@@ -315,9 +408,10 @@
/mob/living/simple_animal/hostile/swarmer/proc/ContactSwarmers()
var/message = input(src, "Announce to other swarmers", "Swarmer contact")
if(message)
for(var/mob/living/simple_animal/hostile/swarmer/S in world)
if(S != src)
S << "<B>Swarm communication: [message]"
for(var/mob/M in mob_list)
if(isswarmer(M) || (M in dead_mob_list))
M << "<B>Swarm communication - </b> [M] states: [message]"
////HUD NONSENSE////

View File

@@ -275,7 +275,9 @@
return valid
/mob/living/simple_animal/pet/dog/corgi/proc/update_corgi_fluff()
switch(src.inventory_head.type)
if(!inventory_head)
return
switch(inventory_head.type)
if(/obj/item/clothing/head/helmet)
name = "Sergeant [real_name]"
desc = "The ever-loyal, the ever-vigilant."

View File

@@ -181,21 +181,10 @@
src.mind.objectives += objective2
src << "<b>Objective #2</b>: [objective2.explanation_text]"
ticker.mode.traitors |= src.mind //Necessary for announcing
if(!src.giveSpells())
message_admins("Revenant was created but has no mind. Trying again in ten seconds.")
spawn(100)
if(!src.giveSpells())
message_admins("Revenant still has no mind. Deleting...")
qdel(src)
/mob/living/simple_animal/revenant/proc/giveSpells()
if(src.mind)
src.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/revenant_transmit
src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_light
src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_defile
src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_malf
return 1
return 0
mob_spell_list += new /obj/effect/proc_holder/spell/targeted/revenant_transmit
mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_light
mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_defile
mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_malf
/mob/living/simple_animal/revenant/death()
..(1)

View File

@@ -3,7 +3,7 @@
/datum/round_event_control/revenant
name = "Spawn Revenant"
typepath = /datum/round_event/revenant
weight = 20
weight = 7
max_occurrences = 3
earliest_start = 6000 //Meant to mix things up early-game.

View File

@@ -42,7 +42,7 @@
var/melee_damage_lower = 0
var/melee_damage_upper = 0
var/melee_damage_type = BRUTE //Damage type of a simple mob's melee attack, should it do damage.
var/list/ignored_damage_types = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) //Set 0 to receive that damage type, 1 to ignore
var/list/ignored_damage_types = list(BRUTE = 0, BURN = 0, TOX = 0, CLONE = 0, STAMINA = 1, OXY = 0) //Set 0 to receive that damage type, 1 to ignore
var/attacktext = "attacks"
var/attack_sound = null
var/friendly = "nuzzles" //If the mob does no damage with it's attack

View File

@@ -18,7 +18,7 @@ Contents:
U << "<span class='warning'>You don't have enough power to enable Stealth!</span>"
return
s_active=!s_active
animate(U, U.alpha = 0,time = 15)
animate(U, alpha = 0,time = 15)
U.visible_message("<span class='warning'>[U.name] vanishes into thin air!</span>", \
"<span class='notice'>You are now invisible to normal detection.</span>")
return
@@ -30,7 +30,7 @@ Contents:
return 0
if(s_active)
s_active=!s_active
animate(U, U.alpha = 255, time = 15)
animate(U, alpha = 255, time = 15)
U.visible_message("<span class='warning'>[U.name] appears from thin air!</span>", \
"<span class='notice'>You are now visible.</span>")
return 1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 831 B

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 670 B