diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 6f08cf975b7..bc45982505f 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -32680,6 +32680,7 @@ melee_damage_lower = 20; melee_damage_upper = 20; name = "Lia" + random_color = FALSE }, /turf/open/floor/plasteel/grimy, /area/crew_quarters/heads/hos) diff --git a/code/datums/action.dm b/code/datums/action.dm index 157a4fd37a1..007b964a160 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -725,7 +725,7 @@ small_icon_state = "dwarf_legion" /datum/action/small_sprite/megafauna/spacedragon - small_icon = 'icons/mob/animal.dmi' + small_icon = 'icons/mob/carp.dmi' small_icon_state = "carp" /datum/action/small_sprite/Trigger() diff --git a/code/game/objects/items/dehy_carp.dm b/code/game/objects/items/dehy_carp.dm index f6e7a72c8bd..1283b94af5f 100644 --- a/code/game/objects/items/dehy_carp.dm +++ b/code/game/objects/items/dehy_carp.dm @@ -27,7 +27,7 @@ visible_message("[src] swells up!") //Animation - icon = 'icons/mob/animal.dmi' + icon = 'icons/mob/carp.dmi' flick("carp_swell", src) //Wait for animation to end sleep(6) @@ -63,7 +63,7 @@ H.spawn_gibs() H.apply_damage(200, def_zone = BODY_ZONE_CHEST) forceMove(get_turf(H)) //we move it back - icon = 'icons/mob/animal.dmi' + icon = 'icons/mob/carp.dmi' flick("carp_swell", src) sleep(6) //let the animation play out diff --git a/code/modules/events/wizard/magicarp.dm b/code/modules/events/wizard/magicarp.dm index ab23c30e007..cf0e5e1b05b 100644 --- a/code/modules/events/wizard/magicarp.dm +++ b/code/modules/events/wizard/magicarp.dm @@ -36,6 +36,7 @@ projectilesound = 'sound/weapons/emitter.ogg' maxHealth = 50 health = 50 + random_color = FALSE var/allowed_projectile_types = list(/obj/item/projectile/magic/change, /obj/item/projectile/magic/animate, /obj/item/projectile/magic/resurrection, /obj/item/projectile/magic/death, /obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball, /obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 4fff7d9a3cd..921788ca1bb 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -532,7 +532,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( A = image('icons/mob/monkey.dmi',H,"monkey1") A.name = "Monkey ([rand(1,999)])" if("carp")//Carp - A = image('icons/mob/animal.dmi',H,"carp") + A = image('icons/mob/carp.dmi',H,"carp") A.name = "Space Carp" if("corgi")//Corgi A = image('icons/mob/pets.dmi',H,"corgi") diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index 447cbe339d3..9e25a074c44 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -3,9 +3,10 @@ /mob/living/simple_animal/hostile/carp name = "space carp" desc = "A ferocious, fang-bearing creature that resembles a fish." - icon_state = "carp" - icon_living = "carp" - icon_dead = "carp_dead" + icon = 'icons/mob/carp.dmi' + icon_state = "base" + icon_living = "base" + icon_dead = "base_dead" icon_gib = "carp_gib" mob_biotypes = list(MOB_ORGANIC, MOB_BEAST) speak_chance = 0 @@ -38,12 +39,90 @@ pressure_resistance = 200 gold_core_spawnable = HOSTILE_SPAWN + var/random_color = TRUE //if the carp uses random coloring + var/rarechance = 1 //chance for rare color variant + + var/static/list/carp_colors = list(\ + "lightpurple" = "#c3b9f1", \ + "lightpink" = "#da77a8", \ + "green" = "#70ff25", \ + "grape" = "#df0afb", \ + "swamp" = "#e5e75a", \ + "turquoise" = "#04e1ed", \ + "brown" = "#ca805a", \ + "teal" = "#20e28e", \ + "lightblue" = "#4d88cc", \ + "rusty" = "#dd5f34", \ + "beige" = "#bbaeaf", \ + "yellow" = "#f3ca4a", \ + "blue" = "#09bae1", \ + "palegreen" = "#7ef099", \ + ) + var/static/list/carp_colors_rare = list(\ + "silver" = "#fdfbf3", \ + ) + +/mob/living/simple_animal/hostile/carp/Initialize(mapload) + . = ..() + carp_randomify(rarechance) + update_icons() + +/mob/living/simple_animal/hostile/carp/proc/carp_randomify(rarechance) + if(random_color) + var/our_color + if(prob(rarechance)) + our_color = pick(carp_colors_rare) + add_atom_colour(carp_colors_rare[our_color], FIXED_COLOUR_PRIORITY) + else + our_color = pick(carp_colors) + add_atom_colour(carp_colors[our_color], FIXED_COLOUR_PRIORITY) + add_carp_overlay() + +/mob/living/simple_animal/hostile/carp/proc/add_carp_overlay() + if(!random_color) + return + cut_overlays() + var/mutable_appearance/base_overlay = mutable_appearance(icon, "base_mouth") + base_overlay.appearance_flags = RESET_COLOR + add_overlay(base_overlay) + +/mob/living/simple_animal/hostile/carp/proc/add_dead_carp_overlay() + if(!random_color) + return + cut_overlays() + var/mutable_appearance/base_dead_overlay = mutable_appearance(icon, "base_dead_mouth") + base_dead_overlay.appearance_flags = RESET_COLOR + add_overlay(base_dead_overlay) + +/mob/living/simple_animal/hostile/carp/death(gibbed) + . = ..() + cut_overlays() + if(!random_color || gibbed) + return + add_dead_carp_overlay() + +/mob/living/simple_animal/hostile/carp/revive(full_heal = 0, admin_revive = 0) + . = ..() + if(.) + regenerate_icons() + +/mob/living/simple_animal/hostile/carp/regenerate_icons() + cut_overlays() + if(!random_color) + return + if(stat != DEAD) + add_carp_overlay() + else + add_dead_carp_overlay() + ..() + /mob/living/simple_animal/hostile/carp/holocarp icon_state = "holocarp" icon_living = "holocarp" maxbodytemp = INFINITY gold_core_spawnable = NO_SPAWN del_on_death = 1 + random_color = FALSE /mob/living/simple_animal/hostile/carp/megacarp icon = 'icons/mob/broadMobs.dmi' @@ -57,6 +136,7 @@ health = 20 pixel_x = -16 mob_size = MOB_SIZE_LARGE + random_color = FALSE obj_damage = 80 melee_damage_lower = 20 @@ -90,5 +170,6 @@ gold_core_spawnable = NO_SPAWN faction = list(ROLE_SYNDICATE) AIStatus = AI_OFF + rarechance = 10 #undef REGENERATION_DELAY diff --git a/code/modules/mob/living/simple_animal/hostile/eyeballs.dm b/code/modules/mob/living/simple_animal/hostile/eyeballs.dm index 44f7f9c9f87..8f64d88f060 100644 --- a/code/modules/mob/living/simple_animal/hostile/eyeballs.dm +++ b/code/modules/mob/living/simple_animal/hostile/eyeballs.dm @@ -1,5 +1,3 @@ - - /mob/living/simple_animal/hostile/carp/eyeball name = "eyeball" desc = "An odd looking creature, it won't stop staring..." @@ -26,4 +24,5 @@ movement_type = FLYING faction = list("spooky") - del_on_death = 1 \ No newline at end of file + del_on_death = 1 + random_color = FALSE diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi index f7de4b6197e..0fa693a7c52 100644 Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ diff --git a/icons/mob/carp.dmi b/icons/mob/carp.dmi new file mode 100644 index 00000000000..5b6138ee99a Binary files /dev/null and b/icons/mob/carp.dmi differ