[MIRROR] Fixes to more Initialize procs (#2733)
* Fixes to more Initialize procs * Update ai_monitored.dm * Update cleanable.dm * Update instruments.dm * Update musician.dm * Update noticeboard.dm * Update mimic.dm * Update interactive.dm
This commit is contained in:
committed by
Poojawa
parent
b4c27d5533
commit
e4db027692
@@ -158,7 +158,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/airalarm/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/airalarm/ui_status(mob/user)
|
||||
|
||||
@@ -130,5 +130,5 @@
|
||||
/obj/machinery/meter/turf
|
||||
|
||||
/obj/machinery/meter/turf/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
src.target = loc
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
var/static/arena_reset = FALSE
|
||||
|
||||
/obj/machinery/capture_the_flag/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!ctf_object_typecache)
|
||||
ctf_object_typecache = typecacheof(list(
|
||||
/turf,
|
||||
@@ -614,7 +614,7 @@
|
||||
icon_state = "barrier0"
|
||||
|
||||
/obj/effect/ctf/dead_barricade/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
|
||||
CTF.dead_barricades += src
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
/obj/item/gun/energy/laser/chameleon/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
projectile_copy_vars = list("name", "icon", "icon_state", "item_state", "speed", "color", "hitsound", "forcedodge", "impact_effect_type", "range", "suppressed", "hitsound_wall", "impact_effect_type", "pass_flags")
|
||||
chameleon_projectile_vars = list("name" = "practice laser", "icon" = 'icons/obj/projectiles.dmi', "icon_state" = "laser")
|
||||
gun_copy_vars = list("fire_sound", "burst_size", "fire_delay")
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/head/helmet/sec
|
||||
can_flashlight = 1
|
||||
@@ -195,7 +195,7 @@
|
||||
flags_2 = NONE
|
||||
|
||||
/obj/item/clothing/head/helmet/knight/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/head/helmet/knight/blue
|
||||
icon_state = "knight_blue"
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
var/list/mutations = list()
|
||||
|
||||
/obj/structure/spacevine/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/structure/spacevine/examine(mob/user)
|
||||
|
||||
@@ -99,7 +99,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
|
||||
var/active = TRUE //qdelery
|
||||
|
||||
/obj/effect/hallucination/simple/Initialize(mapload, var/mob/living/carbon/T)
|
||||
..()
|
||||
. = ..()
|
||||
target = T
|
||||
current_image = GetImage()
|
||||
if(target.client)
|
||||
@@ -206,7 +206,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
|
||||
image_state = "alienh_pounce"
|
||||
|
||||
/obj/effect/hallucination/simple/xeno/Initialize(mapload, mob/living/carbon/T)
|
||||
..()
|
||||
. = ..()
|
||||
name = "alien hunter ([rand(1, 1000)])"
|
||||
|
||||
/obj/effect/hallucination/simple/xeno/throw_impact(A)
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
var/timer = 0
|
||||
|
||||
/mob/living/simple_animal/shade/howling_ghost/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
icon_state = pick("ghost","ghostian","ghostian2","ghostking","ghost1","ghost2")
|
||||
icon_living = icon_state
|
||||
status_flags |= GODMODE
|
||||
@@ -194,7 +194,7 @@
|
||||
var/timer
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/insane/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
timer = rand(5,15)
|
||||
status_flags = (status_flags | GODMODE)
|
||||
return
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/area/starting_area
|
||||
|
||||
/mob/camera/aiEye/remote/base_construction/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
starting_area = get_area(loc)
|
||||
|
||||
/mob/camera/aiEye/remote/base_construction/setLoc(var/t)
|
||||
@@ -54,7 +54,7 @@
|
||||
RCD = new(src)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/base_construction/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
if(mapload) //Map spawned consoles have a filled RCD and stocked special structures
|
||||
RCD.matter = RCD.max_matter
|
||||
fans_remaining = 4
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
SSblackbox.add_details("wisp_lantern","Returned")
|
||||
|
||||
/obj/item/device/wisp_lantern/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
wisp = new(src)
|
||||
|
||||
/obj/item/device/wisp_lantern/Destroy()
|
||||
@@ -242,7 +242,7 @@
|
||||
teleport_color = "#FD3F48"
|
||||
|
||||
/obj/item/device/warp_cube/red/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!linked)
|
||||
var/obj/item/device/warp_cube/blue = new(src.loc)
|
||||
linked = blue
|
||||
@@ -397,7 +397,7 @@
|
||||
desc = "Somehow, it's in two places at once."
|
||||
|
||||
/obj/item/device/shared_storage/red/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!bag)
|
||||
var/obj/item/storage/backpack/shared/S = new(src)
|
||||
var/obj/item/device/shared_storage/blue = new(src.loc)
|
||||
@@ -703,7 +703,7 @@
|
||||
var/list/mob/dead/observer/spirits
|
||||
|
||||
/obj/item/melee/ghost_sword/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
spirits = list()
|
||||
START_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list |= src
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
var/datum/action/innate/minedrone/dump_ore/dump_ore_action
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
toggle_light_action = new()
|
||||
toggle_light_action.Grant(src)
|
||||
toggle_mode_action = new()
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/ore/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
var/value = 1
|
||||
|
||||
/obj/item/coin/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
/mob/living/brain/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
create_dna(src)
|
||||
stored_dna.initialize_dna(random_blood_type())
|
||||
if(isturf(loc)) //not spawned in an MMI or brain organ (most likely adminspawned)
|
||||
|
||||
@@ -149,7 +149,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
|
||||
to_chat(user, msg)
|
||||
|
||||
/obj/item/device/mmi/posibrain/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
brainmob = new(src)
|
||||
var/new_name
|
||||
if(!LAZYLEN(possible_names))
|
||||
|
||||
@@ -34,7 +34,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
|
||||
|
||||
handcrafting = new()
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/create_internal_organs()
|
||||
if(!(NOHUNGER in dna.species.species_traits))
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
faction += "hostile"
|
||||
|
||||
/mob/living/carbon/human/interactive/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
set_species(/datum/species/synth)
|
||||
|
||||
@@ -1591,7 +1591,7 @@
|
||||
TRAITS |= TRAIT_ROBUST
|
||||
TRAITS |= TRAIT_MEAN
|
||||
faction += "bot_angry"
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/interactive/friendly/Initialize()
|
||||
TRAITS |= TRAIT_FRIENDLY
|
||||
@@ -1599,7 +1599,7 @@
|
||||
faction += "bot_friendly"
|
||||
faction += "neutral"
|
||||
functions -= "combat"
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/interactive/greytide/Initialize()
|
||||
TRAITS |= TRAIT_ROBUST
|
||||
@@ -1610,7 +1610,7 @@
|
||||
targetInterestShift = 2 // likewise
|
||||
faction += "bot_grey"
|
||||
graytide = 1
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
//Walk softly and carry a big stick
|
||||
/mob/living/carbon/human/interactive/robust/Initialize()
|
||||
@@ -1618,4 +1618,4 @@
|
||||
TRAITS |= TRAIT_ROBUST
|
||||
TRAITS |= TRAIT_SMART
|
||||
faction += "bot_power"
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
aggressive = TRUE
|
||||
|
||||
/mob/living/carbon/monkey/angry/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(prob(10))
|
||||
var/obj/item/clothing/head/helmet/justice/escape/helmet = new(src)
|
||||
equip_to_slot_or_del(helmet,slot_head)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
else
|
||||
name = pick(pet_monkey_names)
|
||||
gender = pick(MALE, FEMALE)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
//These have to be after the parent new to ensure that the monkey
|
||||
//bodyparts are actually created before we try to equip things to
|
||||
|
||||
@@ -824,7 +824,7 @@
|
||||
var/set_module = /obj/item/robot_module/syndicate
|
||||
|
||||
/mob/living/silicon/robot/syndicate/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
cell.maxcharge = 25000
|
||||
cell.charge = 25000
|
||||
radio = new /obj/item/device/radio/borg/syndicate(src)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/obj/screen/alert/instealthalert
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/assassin/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
stealthcooldown = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/assassin/Life()
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/bees/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
generate_bee_visuals()
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@
|
||||
|
||||
|
||||
/obj/item/queen_bee/bought/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
queen = new(src)
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
search_objects = 2
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
wanted_objects = typecacheof(/obj/mecha/combat, ignore_root_path=TRUE)
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/nanotrasen //nanotrasen are syndies! no it's just a weird path.
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(spawn_mecha_type)
|
||||
var/obj/mecha/M = new spawn_mecha_type (get_turf(src))
|
||||
if(istype(M))
|
||||
|
||||
@@ -105,11 +105,10 @@ Difficulty: Hard
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
for(var/mob/living/simple_animal/hostile/megafauna/bubblegum/B in GLOB.mob_list)
|
||||
if(B != src)
|
||||
qdel(src) //There can be only one
|
||||
return
|
||||
return INITIALIZE_HINT_QDEL //There can be only one
|
||||
var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new
|
||||
AddSpell(bloodspell)
|
||||
if(istype(loc, /obj/effect/dummy/slaughter))
|
||||
|
||||
@@ -93,7 +93,7 @@ Difficulty: Very Hard
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
internal = new/obj/item/device/gps/internal/colossus(src)
|
||||
|
||||
/obj/effect/temp_visual/at_shield
|
||||
|
||||
@@ -1,268 +1,268 @@
|
||||
/mob/living/simple_animal/hostile/mimic
|
||||
name = "crate"
|
||||
desc = "A rectangular steel crate."
|
||||
icon = 'icons/obj/crates.dmi'
|
||||
icon_state = "crate"
|
||||
icon_living = "crate"
|
||||
|
||||
response_help = "touches"
|
||||
response_disarm = "pushes"
|
||||
response_harm = "hits"
|
||||
speed = 0
|
||||
maxHealth = 250
|
||||
health = 250
|
||||
gender = NEUTER
|
||||
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 8
|
||||
melee_damage_upper = 12
|
||||
attacktext = "attacks"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
emote_taunt = list("growls")
|
||||
speak_emote = list("creaks")
|
||||
taunt_chance = 30
|
||||
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
|
||||
faction = list("mimic")
|
||||
move_to_delay = 9
|
||||
gold_core_spawnable = 1
|
||||
del_on_death = 1
|
||||
|
||||
// Aggro when you try to open them. Will also pickup loot when spawns and drop it when dies.
|
||||
/mob/living/simple_animal/hostile/mimic/crate
|
||||
attacktext = "bites"
|
||||
speak_emote = list("clatters")
|
||||
stop_automated_movement = 1
|
||||
wander = 0
|
||||
/mob/living/simple_animal/hostile/mimic
|
||||
name = "crate"
|
||||
desc = "A rectangular steel crate."
|
||||
icon = 'icons/obj/crates.dmi'
|
||||
icon_state = "crate"
|
||||
icon_living = "crate"
|
||||
|
||||
response_help = "touches"
|
||||
response_disarm = "pushes"
|
||||
response_harm = "hits"
|
||||
speed = 0
|
||||
maxHealth = 250
|
||||
health = 250
|
||||
gender = NEUTER
|
||||
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 8
|
||||
melee_damage_upper = 12
|
||||
attacktext = "attacks"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
emote_taunt = list("growls")
|
||||
speak_emote = list("creaks")
|
||||
taunt_chance = 30
|
||||
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
|
||||
faction = list("mimic")
|
||||
move_to_delay = 9
|
||||
gold_core_spawnable = 1
|
||||
del_on_death = 1
|
||||
|
||||
// Aggro when you try to open them. Will also pickup loot when spawns and drop it when dies.
|
||||
/mob/living/simple_animal/hostile/mimic/crate
|
||||
attacktext = "bites"
|
||||
speak_emote = list("clatters")
|
||||
stop_automated_movement = 1
|
||||
wander = 0
|
||||
var/attempt_open = FALSE
|
||||
|
||||
// Pickup loot
|
||||
/mob/living/simple_animal/hostile/mimic/crate/Initialize(mapload)
|
||||
..()
|
||||
if(mapload) //eat shit
|
||||
for(var/obj/item/I in loc)
|
||||
I.loc = src
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/DestroySurroundings()
|
||||
..()
|
||||
if(prob(90))
|
||||
icon_state = "[initial(icon_state)]open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/ListTargets()
|
||||
if(attempt_open)
|
||||
return ..()
|
||||
return ..(1)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/FindTarget()
|
||||
. = ..()
|
||||
if(.)
|
||||
trigger()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget()
|
||||
. = ..()
|
||||
if(.)
|
||||
icon_state = initial(icon_state)
|
||||
if(prob(15) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.Knockdown(40)
|
||||
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", \
|
||||
"<span class='userdanger'>\The [src] knocks you down!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/proc/trigger()
|
||||
if(!attempt_open)
|
||||
visible_message("<b>[src]</b> starts to move!")
|
||||
|
||||
// Pickup loot
|
||||
/mob/living/simple_animal/hostile/mimic/crate/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload) //eat shit
|
||||
for(var/obj/item/I in loc)
|
||||
I.loc = src
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/DestroySurroundings()
|
||||
..()
|
||||
if(prob(90))
|
||||
icon_state = "[initial(icon_state)]open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/ListTargets()
|
||||
if(attempt_open)
|
||||
return ..()
|
||||
return ..(1)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/FindTarget()
|
||||
. = ..()
|
||||
if(.)
|
||||
trigger()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget()
|
||||
. = ..()
|
||||
if(.)
|
||||
icon_state = initial(icon_state)
|
||||
if(prob(15) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.Knockdown(40)
|
||||
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", \
|
||||
"<span class='userdanger'>\The [src] knocks you down!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/proc/trigger()
|
||||
if(!attempt_open)
|
||||
visible_message("<b>[src]</b> starts to move!")
|
||||
attempt_open = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
trigger()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/LoseTarget()
|
||||
..()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/death()
|
||||
var/obj/structure/closet/crate/C = new(get_turf(src))
|
||||
// Put loot in crate
|
||||
for(var/obj/O in src)
|
||||
O.loc = C
|
||||
..()
|
||||
|
||||
GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/cable, /obj/structure/window))
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
var/mob/living/creator = null // the creator
|
||||
var/destroy_objects = 0
|
||||
var/knockdown_people = 0
|
||||
var/static/mutable_appearance/googly_eyes = mutable_appearance('icons/mob/mob.dmi', "googly_eyes")
|
||||
gold_core_spawnable = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Initialize(mapload, obj/copy, mob/living/creator, destroy_original = 0)
|
||||
..()
|
||||
CopyObject(copy, creator, destroy_original)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Life()
|
||||
..()
|
||||
if(!target && !ckey) //Objects eventually revert to normal if no one is around to terrorize
|
||||
adjustBruteLoss(1)
|
||||
for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/death()
|
||||
for(var/atom/movable/M in src)
|
||||
M.loc = get_turf(src)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()
|
||||
. = ..()
|
||||
return . - creator
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/proc/ChangeOwner(mob/owner)
|
||||
if(owner != creator)
|
||||
LoseTarget()
|
||||
creator = owner
|
||||
faction |= "\ref[owner]"
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/proc/CheckObject(obj/O)
|
||||
if((isitem(O) || istype(O, /obj/structure)) && !is_type_in_list(O, GLOB.protected_objects))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(obj/O, mob/living/user, destroy_original = 0)
|
||||
if(destroy_original || CheckObject(O))
|
||||
O.loc = src
|
||||
name = O.name
|
||||
desc = O.desc
|
||||
icon = O.icon
|
||||
icon_state = O.icon_state
|
||||
icon_living = icon_state
|
||||
copy_overlays(O)
|
||||
add_overlay(googly_eyes)
|
||||
if(istype(O, /obj/structure) || istype(O, /obj/machinery))
|
||||
health = (anchored * 50) + 50
|
||||
destroy_objects = 1
|
||||
if(O.density && O.anchored)
|
||||
knockdown_people = 1
|
||||
melee_damage_lower *= 2
|
||||
melee_damage_upper *= 2
|
||||
else if(isitem(O))
|
||||
var/obj/item/I = O
|
||||
health = 15 * I.w_class
|
||||
melee_damage_lower = 2 + I.force
|
||||
melee_damage_upper = 2 + I.force
|
||||
move_to_delay = 2 * I.w_class + 1
|
||||
maxHealth = health
|
||||
if(user)
|
||||
creator = user
|
||||
faction += "\ref[creator]" // very unique
|
||||
if(destroy_original)
|
||||
qdel(O)
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/DestroySurroundings()
|
||||
if(destroy_objects)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/AttackingTarget()
|
||||
. = ..()
|
||||
if(knockdown_people && . && prob(15) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.Knockdown(40)
|
||||
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", \
|
||||
"<span class='userdanger'>\The [src] knocks you down!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/machine
|
||||
speak = list("HUMANS ARE IMPERFECT!", "YOU SHALL BE ASSIMILATED!", "YOU ARE HARMING YOURSELF", "You have been deemed hazardous. Will you comply?", \
|
||||
"My logic is undeniable.", "One of us.", "FLESH IS WEAK", "THIS ISN'T WAR, THIS IS EXTERMINATION!")
|
||||
speak_chance = 7
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/machine/CanAttack(atom/the_target)
|
||||
if(the_target == creator) // Don't attack our creator AI.
|
||||
return 0
|
||||
if(iscyborg(the_target))
|
||||
var/mob/living/silicon/robot/R = the_target
|
||||
if(R.connected_ai == creator) // Only attack robots that aren't synced to our creator AI.
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ranged
|
||||
var/obj/item/gun/TrueGun = null
|
||||
var/obj/item/gun/magic/Zapstick
|
||||
var/obj/item/gun/ballistic/Pewgun
|
||||
var/obj/item/gun/energy/Zapgun
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ranged/CopyObject(obj/O, mob/living/creator, destroy_original = 0)
|
||||
if(..())
|
||||
emote_see = list("aims menacingly")
|
||||
obj_damage = 0
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE //needed? seems weird for them to do so
|
||||
ranged = 1
|
||||
retreat_distance = 1 //just enough to shoot
|
||||
minimum_distance = 6
|
||||
var/obj/item/gun/G = O
|
||||
melee_damage_upper = G.force
|
||||
melee_damage_lower = G.force - max(0, (G.force / 2))
|
||||
move_to_delay = 2 * G.w_class + 1
|
||||
projectilesound = G.fire_sound
|
||||
TrueGun = G
|
||||
if(istype(G, /obj/item/gun/magic))
|
||||
Zapstick = G
|
||||
var/obj/item/ammo_casing/magic/M = Zapstick.ammo_type
|
||||
projectiletype = initial(M.projectile_type)
|
||||
if(istype(G, /obj/item/gun/ballistic))
|
||||
Pewgun = G
|
||||
var/obj/item/ammo_box/magazine/M = Pewgun.mag_type
|
||||
casingtype = initial(M.ammo_type)
|
||||
if(istype(G, /obj/item/gun/energy))
|
||||
Zapgun = G
|
||||
var/selectfiresetting = Zapgun.select
|
||||
var/obj/item/ammo_casing/energy/E = Zapgun.ammo_type[selectfiresetting]
|
||||
projectiletype = initial(E.projectile_type)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ranged/OpenFire(the_target)
|
||||
if(Zapgun)
|
||||
if(Zapgun.cell)
|
||||
var/obj/item/ammo_casing/energy/shot = Zapgun.ammo_type[Zapgun.select]
|
||||
if(Zapgun.cell.charge >= shot.e_cost)
|
||||
Zapgun.cell.use(shot.e_cost)
|
||||
Zapgun.update_icon()
|
||||
..()
|
||||
else if(Zapstick)
|
||||
if(Zapstick.charges)
|
||||
Zapstick.charges--
|
||||
Zapstick.update_icon()
|
||||
..()
|
||||
else if(Pewgun)
|
||||
if(Pewgun.chambered)
|
||||
if(Pewgun.chambered.BB)
|
||||
qdel(Pewgun.chambered.BB)
|
||||
Pewgun.chambered.BB = null //because qdel takes too long, ensures icon update
|
||||
Pewgun.chambered.update_icon()
|
||||
..()
|
||||
else
|
||||
visible_message("<span class='danger'>The <b>[src]</b> clears a jam!</span>")
|
||||
Pewgun.chambered.loc = loc //rip revolver immersions, blame shotgun snowflake procs
|
||||
Pewgun.chambered = null
|
||||
if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len)
|
||||
Pewgun.chambered = Pewgun.magazine.get_round(0)
|
||||
Pewgun.chambered.loc = Pewgun
|
||||
Pewgun.update_icon()
|
||||
else if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) //only true for pumpguns i think
|
||||
Pewgun.chambered = Pewgun.magazine.get_round(0)
|
||||
Pewgun.chambered.loc = Pewgun
|
||||
visible_message("<span class='danger'>The <b>[src]</b> cocks itself!</span>")
|
||||
else
|
||||
ranged = 0 //BANZAIIII
|
||||
retreat_distance = 0
|
||||
minimum_distance = 1
|
||||
return
|
||||
icon_state = TrueGun.icon_state
|
||||
icon_living = TrueGun.icon_state
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
trigger()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/LoseTarget()
|
||||
..()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/death()
|
||||
var/obj/structure/closet/crate/C = new(get_turf(src))
|
||||
// Put loot in crate
|
||||
for(var/obj/O in src)
|
||||
O.loc = C
|
||||
..()
|
||||
|
||||
GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/cable, /obj/structure/window))
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
var/mob/living/creator = null // the creator
|
||||
var/destroy_objects = 0
|
||||
var/knockdown_people = 0
|
||||
var/static/mutable_appearance/googly_eyes = mutable_appearance('icons/mob/mob.dmi', "googly_eyes")
|
||||
gold_core_spawnable = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Initialize(mapload, obj/copy, mob/living/creator, destroy_original = 0)
|
||||
. = ..()
|
||||
CopyObject(copy, creator, destroy_original)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Life()
|
||||
..()
|
||||
if(!target && !ckey) //Objects eventually revert to normal if no one is around to terrorize
|
||||
adjustBruteLoss(1)
|
||||
for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/death()
|
||||
for(var/atom/movable/M in src)
|
||||
M.loc = get_turf(src)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()
|
||||
. = ..()
|
||||
return . - creator
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/proc/ChangeOwner(mob/owner)
|
||||
if(owner != creator)
|
||||
LoseTarget()
|
||||
creator = owner
|
||||
faction |= "\ref[owner]"
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/proc/CheckObject(obj/O)
|
||||
if((isitem(O) || istype(O, /obj/structure)) && !is_type_in_list(O, GLOB.protected_objects))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(obj/O, mob/living/user, destroy_original = 0)
|
||||
if(destroy_original || CheckObject(O))
|
||||
O.loc = src
|
||||
name = O.name
|
||||
desc = O.desc
|
||||
icon = O.icon
|
||||
icon_state = O.icon_state
|
||||
icon_living = icon_state
|
||||
copy_overlays(O)
|
||||
add_overlay(googly_eyes)
|
||||
if(istype(O, /obj/structure) || istype(O, /obj/machinery))
|
||||
health = (anchored * 50) + 50
|
||||
destroy_objects = 1
|
||||
if(O.density && O.anchored)
|
||||
knockdown_people = 1
|
||||
melee_damage_lower *= 2
|
||||
melee_damage_upper *= 2
|
||||
else if(isitem(O))
|
||||
var/obj/item/I = O
|
||||
health = 15 * I.w_class
|
||||
melee_damage_lower = 2 + I.force
|
||||
melee_damage_upper = 2 + I.force
|
||||
move_to_delay = 2 * I.w_class + 1
|
||||
maxHealth = health
|
||||
if(user)
|
||||
creator = user
|
||||
faction += "\ref[creator]" // very unique
|
||||
if(destroy_original)
|
||||
qdel(O)
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/DestroySurroundings()
|
||||
if(destroy_objects)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/AttackingTarget()
|
||||
. = ..()
|
||||
if(knockdown_people && . && prob(15) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.Knockdown(40)
|
||||
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", \
|
||||
"<span class='userdanger'>\The [src] knocks you down!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/machine
|
||||
speak = list("HUMANS ARE IMPERFECT!", "YOU SHALL BE ASSIMILATED!", "YOU ARE HARMING YOURSELF", "You have been deemed hazardous. Will you comply?", \
|
||||
"My logic is undeniable.", "One of us.", "FLESH IS WEAK", "THIS ISN'T WAR, THIS IS EXTERMINATION!")
|
||||
speak_chance = 7
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/machine/CanAttack(atom/the_target)
|
||||
if(the_target == creator) // Don't attack our creator AI.
|
||||
return 0
|
||||
if(iscyborg(the_target))
|
||||
var/mob/living/silicon/robot/R = the_target
|
||||
if(R.connected_ai == creator) // Only attack robots that aren't synced to our creator AI.
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ranged
|
||||
var/obj/item/gun/TrueGun = null
|
||||
var/obj/item/gun/magic/Zapstick
|
||||
var/obj/item/gun/ballistic/Pewgun
|
||||
var/obj/item/gun/energy/Zapgun
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ranged/CopyObject(obj/O, mob/living/creator, destroy_original = 0)
|
||||
if(..())
|
||||
emote_see = list("aims menacingly")
|
||||
obj_damage = 0
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE //needed? seems weird for them to do so
|
||||
ranged = 1
|
||||
retreat_distance = 1 //just enough to shoot
|
||||
minimum_distance = 6
|
||||
var/obj/item/gun/G = O
|
||||
melee_damage_upper = G.force
|
||||
melee_damage_lower = G.force - max(0, (G.force / 2))
|
||||
move_to_delay = 2 * G.w_class + 1
|
||||
projectilesound = G.fire_sound
|
||||
TrueGun = G
|
||||
if(istype(G, /obj/item/gun/magic))
|
||||
Zapstick = G
|
||||
var/obj/item/ammo_casing/magic/M = Zapstick.ammo_type
|
||||
projectiletype = initial(M.projectile_type)
|
||||
if(istype(G, /obj/item/gun/ballistic))
|
||||
Pewgun = G
|
||||
var/obj/item/ammo_box/magazine/M = Pewgun.mag_type
|
||||
casingtype = initial(M.ammo_type)
|
||||
if(istype(G, /obj/item/gun/energy))
|
||||
Zapgun = G
|
||||
var/selectfiresetting = Zapgun.select
|
||||
var/obj/item/ammo_casing/energy/E = Zapgun.ammo_type[selectfiresetting]
|
||||
projectiletype = initial(E.projectile_type)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ranged/OpenFire(the_target)
|
||||
if(Zapgun)
|
||||
if(Zapgun.cell)
|
||||
var/obj/item/ammo_casing/energy/shot = Zapgun.ammo_type[Zapgun.select]
|
||||
if(Zapgun.cell.charge >= shot.e_cost)
|
||||
Zapgun.cell.use(shot.e_cost)
|
||||
Zapgun.update_icon()
|
||||
..()
|
||||
else if(Zapstick)
|
||||
if(Zapstick.charges)
|
||||
Zapstick.charges--
|
||||
Zapstick.update_icon()
|
||||
..()
|
||||
else if(Pewgun)
|
||||
if(Pewgun.chambered)
|
||||
if(Pewgun.chambered.BB)
|
||||
qdel(Pewgun.chambered.BB)
|
||||
Pewgun.chambered.BB = null //because qdel takes too long, ensures icon update
|
||||
Pewgun.chambered.update_icon()
|
||||
..()
|
||||
else
|
||||
visible_message("<span class='danger'>The <b>[src]</b> clears a jam!</span>")
|
||||
Pewgun.chambered.loc = loc //rip revolver immersions, blame shotgun snowflake procs
|
||||
Pewgun.chambered = null
|
||||
if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len)
|
||||
Pewgun.chambered = Pewgun.magazine.get_round(0)
|
||||
Pewgun.chambered.loc = Pewgun
|
||||
Pewgun.update_icon()
|
||||
else if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) //only true for pumpguns i think
|
||||
Pewgun.chambered = Pewgun.magazine.get_round(0)
|
||||
Pewgun.chambered.loc = Pewgun
|
||||
visible_message("<span class='danger'>The <b>[src]</b> cocks itself!</span>")
|
||||
else
|
||||
ranged = 0 //BANZAIIII
|
||||
retreat_distance = 0
|
||||
minimum_distance = 1
|
||||
return
|
||||
icon_state = TrueGun.icon_state
|
||||
icon_living = TrueGun.icon_state
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
var/will_burrow = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/i = rand(1,3)
|
||||
while(i)
|
||||
loot += pick(/obj/item/ore/silver, /obj/item/ore/gold, /obj/item/ore/uranium, /obj/item/ore/diamond)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
gender = MALE
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/gutlunch/gubbuck/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
add_atom_colour(pick("#E39FBB", "#D97D64", "#CF8C4A"), FIXED_COLOUR_PRIORITY)
|
||||
resize = 0.85
|
||||
update_transform()
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
del_on_death = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/death), 100)
|
||||
|
||||
//Legion
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
// No movement while seen code.
|
||||
|
||||
/mob/living/simple_animal/hostile/statue/Initialize(mapload, var/mob/living/creator)
|
||||
..()
|
||||
. = ..()
|
||||
// Give spells
|
||||
mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(src)
|
||||
mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/blindness(src)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var/next_cast = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/wizard/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
fireball = new /obj/effect/proc_holder/spell/aimed/fireball
|
||||
fireball.clothes_req = 0
|
||||
fireball.human_req = 0
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
to_chat(user, "<span class='warning'>This SMES has no power terminal!</span>")
|
||||
|
||||
/obj/machinery/power/smes/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
dir_loop:
|
||||
for(var/d in GLOB.cardinals)
|
||||
var/turf/T = get_step(src, d)
|
||||
|
||||
Reference in New Issue
Block a user