I must be really really slow as I keep reading about them and don't get them at all. So Datums are ancestors to everything right? And they store data? But I don't get how to use them or how to make my coding simpler with them.
I think I did this right:
world << "[randdmg] damage!"
I am trying to make a verb based on that but nothing works. I just don't know what to do with this! How do I use this to make my coding simpler?
I have this for example:
if(src.loc==locate(12,6,1) | src.loc==locate(12,3,1) | src.loc==locate(11,9,1) && src.pturn)
for(var/mob/enemy/Prowler/o in locate(15,6,1))
for(var/mob/enemy/Bandit/i in locate(15,3,1))
world << "[src]'s turn"
var/tmp/action=input("What would you like to do?") in list ("Attack", "Run")
var/tmp/attackwho=input("Attack who?") in list ("Enemy 1", "Enemy 2")
var/tmp/randomdmg = rand(1,10)
world << "[src] attacks [o] for [randomdmg] dmg"
var/tmp/randomdmg = rand(1,30)
world << "[src] attacks [i] for [randomdmg] dmg"
How can a Datum make this simpler and shorter?