ID:2200408
 
So i add stuff to the grid and it shows the icon but for some reason the name of the item wont show up even though i have the checkbox for it to show names checked is there any code reason why it wouldn't show the name?

Show what you already did
mob/var/list/CraftPassives = list()

mob/verb/Learnpassives()
var/obj/Passives/Ninjutsu/Chakra_Manipulation/Chakra_Manipulation = locate() in usr.CraftPassives
// var/obj/Passives/Ninjutsu/Chakra_Manipulation/Chakra_Manipulation2 = locate() in usr.JutsuPassives
// var/obj/Passives/Doujutsu/Sharingan/Sharingan = locate() in usr.CharacterPassives
/*
if(Burst_Shot)
usr << "You already know fireball!"
return
*/

Chakra_Manipulation = new() // create a new fireball object
usr.CraftPassives.Add(Chakra_Manipulation)

// Chakra_Manipulation2 = new() // create a new fireball object
// usr.JutsuPassives.Add(Chakra_Manipulation2)

// Sharingan = new() // create a new fireball object
// usr.CharacterPassives.Add(Sharingan)






obj
Passives
icon='Passive.dmi'

Ninjutsu//some character/jutsu passive
proc
Description()
Click()
Description()

Chakra_Manipulation
icon_state="Ninjutsu"





mob
verb
ShowPassives()

// usr << output(null,"passives.paslist") // clear the grid.
// usr << output(null,"passives.paslist2") // clear the grid.
// usr << output(null,"passives.paslist3") // clear the grid.
for(var/obj/O in usr.CraftPassives)
usr << output(O,"passives.paslist:1,[usr.CraftPassives.Find(O)]")
// for(var/obj/O in usr.JutsuPassives)
// usr << output(O,"passives.paslist2:1,[usr.JutsuPassives.Find(O)]")
// for(var/obj/O in usr.CharacterPassives)
// usr << output(O,"passives.paslist3:1,[usr.CharacterPassives.Find(O)]")

like it will add it to the grid with the icon but there is no name given which is weird cause it works fine in the other source
//try this
obj/Passives
Chakra_Bread//messing with you
icon='passive.dmi'
icon_state="Jelly"
name="Bread >:)"
column1=1
column2=1
Click()
var/mob/M = usr
M.Jutsu()//the verb of the move
well it worked but its so weird cause this code would give the name and stuff and it worked fine yet now it wont but atleast this saves time
also is there anyway i can add to the grid new objs without having to go and put this code for everything i wanna learn?
    var/obj/Passives/Ninjutsu/Chakra_Manipulation/Chakra_Manipulation = locate() in usr.CraftPassives

Chakra_Manipulation = new() // create a new fireball object
usr.CraftPassives.Add(Chakra_Manipulation)


like something so i can add the new skills to the list without all that code for each one
Well i try my best to try and find a easier way out of hard coding since i had little time to work one game.. Hopes it helped you out. :O
mob/proc/skilladd(/**/)
src.skills=list()
src.skills+=src.attacks
for(var/obj/skillcard/O in src.skills)
O.icon_state="[O.name]"
mob/proc/Learned()
src.attacks+=new/obj/passive/Chakra_bread//this send it to the list in skilladd

Try this homie. you can add if statement if you want.. Make i try to make it simple plus effective.
yes this is sooo much better and easier idk why i didn't think of this ty
Hope my novice coding helps you out :)