aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-01-13 08:30:23 -0500
committerClyne Sullivan <tullivan99@gmail.com>2016-01-13 08:30:23 -0500
commit2058d60354e62f84ef915c7409bba445ad934dba (patch)
tree00f79332a2c45a0f12ab16aface7b7233f84aa34 /src
parentbf7d1d29029ca0afa4369bf95b8bd67c73fd5c45 (diff)
settings xml'd
Diffstat (limited to 'src')
-rw-r--r--src/gameplay.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index c4249a4..6626811 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -75,6 +75,13 @@ int commonAIFunc(NPC *speaker){
if(!strcmp(exml->Name(),"text")){
if(exml->UnsignedAttribute("id") == idx){
+ if((oxml = exml->FirstChildElement("give"))){
+ while(oxml){
+ player->inv->addItem((ITEM_ID)oxml->UnsignedAttribute("id"),oxml->UnsignedAttribute("count"));
+ oxml = oxml->NextSiblingElement();
+ }
+ }
+
if((oxml = exml->FirstChildElement("option"))){
const char *op;
char *bp1 = new char[1],*bp2,*tmp;
@@ -281,12 +288,6 @@ SKIP:
}
}
}
- /*for(auto &l : earthlnk){
- if(!strcmp(file+4,l.name)){
- yoyo2 = &l.ptr;
- break;
- }
- }*/
if(wxml->QueryFloatAttribute("x",&spawnx) != XML_NO_ERROR)
earth.back()->addStructure((BUILD_SUB)wxml->UnsignedAttribute("type"),getRand() % earth.back()->getTheWidth() / 2.0f,100,yoyo);//,yoyo2);
else