mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
better gargoyle code
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
var/identifier = "statue"
|
||||
var/adjective = "hardens"
|
||||
var/material = "stone"
|
||||
var/tint = rgb(255,255,255)
|
||||
var/tint = "#FFFFFF"
|
||||
|
||||
/datum/component/gargoyle/Initialize()
|
||||
if (!ishuman(parent))
|
||||
@@ -21,10 +21,6 @@
|
||||
gargoyle.verbs += /mob/living/carbon/human/proc/gargoyle_transformation
|
||||
gargoyle.verbs += /mob/living/carbon/human/proc/gargoyle_pause
|
||||
gargoyle.verbs += /mob/living/carbon/human/proc/gargoyle_checkenergy
|
||||
gargoyle.verbs += /mob/living/carbon/human/proc/gargoyle_verbAdjective
|
||||
gargoyle.verbs += /mob/living/carbon/human/proc/gargoyle_verbIdentifier
|
||||
gargoyle.verbs += /mob/living/carbon/human/proc/gargoyle_verbMaterial
|
||||
gargoyle.verbs += /mob/living/carbon/human/proc/gargoyle_verbColor
|
||||
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
@@ -41,6 +37,9 @@
|
||||
if (transformed)
|
||||
if (!statue)
|
||||
transformed = FALSE
|
||||
else if (gargoyle.loc != statue)
|
||||
statue.unpetrify(FALSE)
|
||||
return
|
||||
statue.damage(-0.5)
|
||||
energy = min(energy+0.3, 100)
|
||||
|
||||
@@ -104,55 +103,3 @@
|
||||
var/datum/component/gargoyle/comp = GetComponent(/datum/component/gargoyle)
|
||||
if (comp)
|
||||
to_chat(src, "<span class='notice'>You have [round(comp.energy,0.01)] energy remaining. It is currently [comp.paused ? "stable" : (comp.transformed ? "increasing" : "decreasing")].</span>")
|
||||
|
||||
/mob/living/carbon/human/proc/Gargoyle_Customizer(var/namer,var/type)
|
||||
var/datum/component/gargoyle/comp = GetComponent(/datum/component/gargoyle)
|
||||
if (comp)
|
||||
if(type==1)
|
||||
return comp.identifier = namer
|
||||
if(type==2)
|
||||
return comp.material = namer
|
||||
if(type==3)
|
||||
return comp.adjective = namer
|
||||
if(type==4)
|
||||
return comp.tint = namer
|
||||
//Add color code here in the future
|
||||
if(type==5)
|
||||
return
|
||||
//Placeholder for being able to pick up statues
|
||||
|
||||
/mob/living/carbon/human/proc/gargoyle_verbIdentifier()
|
||||
set name = "Gargoyle - Name Identifier"
|
||||
set category = "Abilities"
|
||||
set desc = "Renames your statue to something of your choosing but only the statue part of the name."
|
||||
var/user_input = input("Enter your statue identifier")
|
||||
if(!user_input)
|
||||
return
|
||||
Gargoyle_Customizer(user_input,1)
|
||||
|
||||
/mob/living/carbon/human/proc/gargoyle_verbMaterial()
|
||||
set name = "Gargoyle - Name Material"
|
||||
set category = "Abilities"
|
||||
set desc = "Renames your statues material to something of your choosing. by default it is (stone)."
|
||||
var/user_input = input("Enter your petrification material")
|
||||
if(!user_input)
|
||||
return
|
||||
Gargoyle_Customizer(user_input,2)
|
||||
|
||||
/mob/living/carbon/human/proc/gargoyle_verbAdjective()
|
||||
set name = "Gargoyle - Name Adjective"
|
||||
set category = "Abilities"
|
||||
set desc = "Renames your petrification adjective to something of your choosing. by default it is (hardens)."
|
||||
var/user_input = input("Enter your petrification adjective")
|
||||
if(!user_input)
|
||||
return
|
||||
Gargoyle_Customizer(user_input,3)
|
||||
|
||||
/mob/living/carbon/human/proc/gargoyle_verbColor()
|
||||
set name = "Gargoyle - Recolor"
|
||||
set category = "Abilities"
|
||||
set desc = "Recolor your statue to something of your choosing. by default it is grey."
|
||||
var/user_input = input(src, "Choose a tint color!") as color|null
|
||||
if(!user_input)
|
||||
return
|
||||
Gargoyle_Customizer(user_input,4)
|
||||
|
||||
Reference in New Issue
Block a user