From 68adcdd4f522a258158d47173267e37b9f4b7404 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Mon, 20 Jun 2016 23:54:40 -0400 Subject: [PATCH] datum icon code --- code/game/gamemodes/cult/cult_datums.dm | 45 ++++++++++++++++++- code/game/gamemodes/cult/ritual.dm | 2 +- .../mob/living/simple_animal/constructs.dm | 11 ++++- code/modules/power/singularity/narsie.dm | 8 ++-- 4 files changed, 59 insertions(+), 7 deletions(-) diff --git a/code/game/gamemodes/cult/cult_datums.dm b/code/game/gamemodes/cult/cult_datums.dm index 4273ddd9145..f4ff5c28e09 100644 --- a/code/game/gamemodes/cult/cult_datums.dm +++ b/code/game/gamemodes/cult/cult_datums.dm @@ -1,4 +1,9 @@ //cult datums by FalseIncarnate + + + + + /datum/cult_info var/name = "Cult of Nar'Sie" var/theme = "blood" @@ -90,4 +95,42 @@ harvester_name = "Psychopomp" - shade_name = "Banshee" \ No newline at end of file + shade_name = "Banshee" + +/datum/cult_info/proc/get_name(var/type_to_name) + if(!type_to_name) + return + switch(type_to_name) + if("god") + return entity_name + if("behemoth") + return behemoth_name + if("builder") + return artificer_name + if("juggernaut") + return juggernaut_name + if("harvester") + return harvester_name + if("wraith") + return wraith_name + if("shade") + return shade_name + +/datum/cult_info/proc/get_icon(var/type_to_icon) + if(!type_to_icon) + return + switch(type_to_icon) + if("god") + return entity_icon_state + if("behemoth") + return behemoth_icon_state + if("builder") + return artificer_icon_state + if("juggernaut") + return juggernaut_icon_state + if("harvester") + return harvester_icon_state + if("wraith") + return wraith_icon_state + if("shade") + return shade_icon_state \ No newline at end of file diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 170ecd3a4d2..b350ecfc7ae 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -254,7 +254,7 @@ var/mob/living/carbon/human/H = user var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot") var/obj/item/organ/external/affecting = H.get_organ(ran_zone(dam_zone)) - user.visible_message("[user] cuts open their /the [affecting] and begins writing in their own blood!", "You slice open your [affecting] and begin drawing a sigil of [ticker.mode.cultdat.entity_title3].") + user.visible_message("[user] cuts open their \the [affecting] and begins writing in their own blood!", "You slice open your [affecting] and begin drawing a sigil of [ticker.mode.cultdat.entity_title3].") user.apply_damage(initial(rune_to_scribe.scribe_damage), ticker.mode.cultdat.dam_type, affecting) if(!do_after(user, initial(rune_to_scribe.scribe_delay)-scribereduct, target = get_turf(user))) for(var/V in shields) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index c056f560dd8..002c04eaee9 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -20,14 +20,16 @@ flying = 1 universal_speak = 1 AIStatus = AI_OFF //normal constructs don't have AI + var/const_type = "shade" var/list/construct_spells = list() var/playstyle_string = "You are a generic construct! Your job is to not exist, and you should probably adminhelp this." loot = list(/obj/item/weapon/reagent_containers/food/snacks/ectoplasm) /mob/living/simple_animal/hostile/construct/New() ..() - name = text("[initial(name)] ([rand(1, 1000)])") - real_name = name + name = "[ticker.mode.cultdat.get_name(const_type)] ([rand(1, 1000)])" + real_name = ticker.mode.cultdat.get_name(const_type) + icon_state = ticker.mode.cultdat.get_icon(const_type) for(var/spell in construct_spells) AddSpell(new spell(src)) updateglow() @@ -102,6 +104,7 @@ environment_smash = 2 attack_sound = 'sound/weapons/punch3.ogg' status_flags = 0 + const_type = "juggernaut" construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall) force_threshold = 11 playstyle_string = "You are a Juggernaut. Though slow, your shell can withstand extreme punishment, \ @@ -163,6 +166,7 @@ attacktext = "slashes" see_in_dark = 7 attack_sound = 'sound/weapons/bladeslice.ogg' + const_type = "wraith" construct_spells = list(/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift) retreat_distance = 2 //AI wraiths will move in and out of combat playstyle_string = "You are a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls." @@ -192,6 +196,7 @@ retreat_distance = 10 minimum_distance = 10 //AI artificers will flee like fuck attack_sound = 'sound/weapons/punch2.ogg' + const_type = "builder" construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser, /obj/effect/proc_holder/spell/aoe_turf/conjure/wall, /obj/effect/proc_holder/spell/aoe_turf/conjure/floor, @@ -270,6 +275,7 @@ environment_smash = 2 attack_sound = 'sound/weapons/punch4.ogg' force_threshold = 11 + const_type = "behemoth" var/energy = 0 var/max_energy = 1000 @@ -300,6 +306,7 @@ environment_smash = 1 see_in_dark = 8 attack_sound = 'sound/weapons/tap.ogg' + const_type = "harvester" construct_spells = list(/obj/effect/proc_holder/spell/targeted/smoke/disable) retreat_distance = 2 //AI harvesters will move in and out of combat, like wraiths, but shittier playstyle_string = "You are a Harvester. You are not strong, but your powers of domination will assist you in your role: \ diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 3ed5961b363..0c89badd616 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -24,6 +24,8 @@ /obj/singularity/narsie/large/New() ..() + icon_state = ticker.mode.cultdat.entity_icon_state + name = ticker.mode.cultdat.entity_name to_chat(world, "[uppertext(ticker.mode.cultdat.entity_name)] HAS RISEN") to_chat(world, pick(sound('sound/hallucinations/im_here1.ogg'), sound('sound/hallucinations/im_here2.ogg'))) @@ -121,12 +123,12 @@ /obj/singularity/narsie/proc/acquire(var/mob/food) - to_chat(target, "NAR-SIE HAS LOST INTEREST IN YOU") + to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HAS LOST INTEREST IN YOU") target = food if(ishuman(target)) - to_chat(target, "NAR-SIE HUNGERS FOR YOUR SOUL") + to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HUNGERS FOR YOUR SOUL") else - to_chat(target, "NAR-SIE HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL") + to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL") //Wizard narsie /obj/singularity/narsie/wizard