Переглянути джерело

Merge pull request #4 from Thekingofsweden/Version-1.1.3-Integration

Shop rewrite, minor other tweaks
heromaster 9 роки тому
батько
коміт
4e8befade0
6 змінених файлів з 284 додано та 809 видалено
  1. 2 0
      glife.qproj
  2. 15 0
      locations/_buy_single_item
  3. 29 0
      locations/_single_stock_item
  4. 1 1
      locations/down
  5. 235 808
      locations/shop
  6. 2 0
      locations/stat

+ 2 - 0
glife.qproj

@@ -667,7 +667,9 @@
       <Location name="portnoi2"/>
       <Location name="sexorg"/>
       <Location name="$stock_item"/>
+	  <Location name="$single_stock_item"/>
       <Location name="$buy_item"/>
+	  <Location name="$buy_single_item"/>
     </Folder>
     <Folder name="Etogame">
       <Location name="etoexhib"/>

+ 15 - 0
locations/_buy_single_item

@@ -0,0 +1,15 @@
+# $buy_single_item
+!! This buys an item and sets the value of the underlying variable to the specific value
+!! For example, buying a plasma tv sets tv = 2
+
+!! ARGS 0 is the value to set the variable to
+!! ARGS 1 is the item description
+!! ARGS 2 is the price
+!! ARGS 3 is the variable name for the item
+!! ARGS 4 is the location to go back to
+
+dynamic "set <<$ARGS[3]>> = <<ARGS[0]>>"
+set money -= ARGS[2]
+gt $ARGS[4], '<font color="green">You bought a <b><<$ARGS[1]>></b>.</font>'
+
+--- $buy_single_item ---------------------------------

+ 29 - 0
locations/_single_stock_item

@@ -0,0 +1,29 @@
+# $single_stock_item
+!! generic function to be used to stock single purchase items in stores
+!! see # shop, specifically the household appliances section for an example of use
+
+!! ARGS 0 is the value identifying when the item is owned
+!! it is assumed that anything >= the value is acceptable, this allows for upgrades like regular tv to plasma
+!! ARGS 1 is the item description
+!! ARGS 2 is the price
+!! ARGS 3 is the variable name for the item
+!! ARGS 4 is the location to go back to
+
+!! This will check to see if the item is already owned
+dynamic "$RESULT = iif(<<$ARGS[3]>> >= <<ARGS[0]>>, '', 'not owned')"
+if $RESULT = '':
+	exit
+end
+
+$RESULT = '<tr>' + _
+'<td align="center"><<$ARGS[1]>></td>' + _
+'<td align="left">costs <<ARGS[2]>> rubles</td>' + _
+'<td align="right">'
+
+if money >= ARGS[2]:
+	$RESULT += '<a href="exec: gs ''$buy_single_item'', <<ARGS[0]>>, ''<<$ARGS[1]>>'', <<ARGS[2]>>, ''<<$ARGS[3]>>'', ''<<$ARGS[4]>>''">buy</a>'
+end
+
+$RESULT += '</td></tr>'
+
+--- $single_stock_item ---------------------------------

+ 1 - 1
locations/down

@@ -114,10 +114,10 @@ if hour >= 15 or hour <= 2:'The <a href="exec:gt ''stripclub'', ''start''">Strip
 
 if hour >= 9 and hour <= 20:
 	'In the center is a large <a href="exec:gt ''torgcentr''">shopping center</a>'
-	'Popular <a href="exec:GT ''fit'',''start''">fitness center</a> in which trained as professional athletes, and wishing to lose weight for beach season.'
 	'There is a <a href="exec:gt ''foto'', ''start''">photo studio</a> next to a popular <a href="exec:gt ''fit'', ''start''">fitness center</a>, where professional athletes can train.'
 	'At the <a href="exec:gt ''bass'', ''start''">swimming pool</a>, people can train for the next beach season.'
 end
+'A 30 minute walk away is the <a href="exec:minut += 34 & gt ''park'', ''start''">central park</a>. You can reach all the districts of the town while walking through it. Walking to it''s center should take far less than an hour.'
 
 if hour >= 8 and hour <= 22:'Infront of the expensive <a href="exec:gt ''restoran'', ''start''">Restaurant</a> are luxury cars parking.'
 

Різницю між файлами не показано, бо вона завелика
+ 235 - 808
locations/shop


+ 2 - 0
locations/stat

@@ -1157,6 +1157,8 @@ else
 end
 
 pl '<b><<money>></b> rubles in your wallet.'
+if karta > 0:pl '<b><<karta>></b> rubles in your bank account.'
+if stolmoney > 0:pl '<b><<stolmoney>></b> rubles in your table drawer.'
 
 if StoryLine > 0 and SchoolAtestat = 0:pl '<<$holyday>>'
 if birthday = day and birthmonth = month:pl '<b>Today is your birthday.</b>'

Деякі файли не було показано, через те що забагато файлів було змінено