mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-23 13:06:18 +01:00
Stability and performance
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/mob/living/simple_animal/hostile/mimic
|
||||
name = "Mimic"
|
||||
desc = "A creature with the ability to take the form of other objects."
|
||||
icon = 'hyperstation/icons/mobs/mimic.dmi'
|
||||
icon_state = "mimic"
|
||||
icon_living = "mimic"
|
||||
@@ -10,54 +9,50 @@
|
||||
turns_per_move = 5
|
||||
maxHealth = 30
|
||||
health = 30
|
||||
see_in_dark = 7
|
||||
response_help = "pokes"
|
||||
response_disarm = "shoves"
|
||||
response_harm = "hits"
|
||||
see_in_dark = 3
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/killertomato = 2)
|
||||
response_help = "prods"
|
||||
response_disarm = "pushes aside"
|
||||
response_harm = "smacks"
|
||||
melee_damage_lower = 8
|
||||
melee_damage_upper = 12
|
||||
move_to_delay = 9
|
||||
attacktext = "slams"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
faction = list("mimic")
|
||||
var/unstealth = FALSE
|
||||
faction = list("plants")
|
||||
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 150
|
||||
maxbodytemp = 500
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
var/unstealth = FALSE
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/Initialize()
|
||||
// When initialized, make sure they take the form of something.
|
||||
unstealth = FALSE
|
||||
Mimictransform()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/proc/Mimictransform()
|
||||
|
||||
var/transformitem = rand(1,3)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/proc/activate()
|
||||
if(!unstealth)
|
||||
visible_message("<b>[src]</b> starts to move!")
|
||||
unstealth = TRUE
|
||||
if (unstealth == FALSE)
|
||||
switch(transformitem)
|
||||
if(1)
|
||||
//Glass
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "glass_empty"
|
||||
aggro_vision_range = 0
|
||||
|
||||
if(2)
|
||||
//Glass
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "glass_empty"
|
||||
aggro_vision_range = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/LoseTarget()
|
||||
..()
|
||||
icon_state = initial(icon_state) //when lost target, return into stealth form.
|
||||
unstealth = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/ListTargets()
|
||||
if(unstealth)
|
||||
return ..()
|
||||
return ..(1)
|
||||
|
||||
//If stealthed, do not target
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
activate()
|
||||
//if taking damage, trigger.
|
||||
if(3)
|
||||
//Glass
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "glass_empty"
|
||||
aggro_vision_range = 0
|
||||
else
|
||||
//back to normal
|
||||
icon = 'hyperstation/icons/mobs/mimic.dmi'
|
||||
icon_state = "mimic"
|
||||
Reference in New Issue
Block a user