-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,534 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/atom/proc/Value(var/base) | ||
return base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/mob/living/carbon/human/Value(var/base) | ||
. = ..() | ||
if(species) | ||
. *= species.rarity_value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/obj/Value() | ||
. = ..() | ||
for(var/a in contents) | ||
. += get_value(a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/obj/item/slime_extract/Value(var/base) | ||
return base * Uses | ||
|
||
/obj/item/ammo_casing/Value() | ||
if(!BB) | ||
return 1 | ||
return ..() | ||
|
||
/obj/item/weapon/reagent_containers/Value() | ||
. = ..() | ||
if(reagents) | ||
for(var/a in reagents.reagent_list) | ||
var/datum/reagent/reg = a | ||
. += reg.value * reg.volume | ||
. = round(.) | ||
|
||
/obj/item/stack/Value(var/base) | ||
return base * amount | ||
|
||
/obj/item/stack/material/Value() | ||
if(!material) | ||
return ..() | ||
return material.value * amount | ||
|
||
/obj/item/weapon/ore/Value() | ||
var/material/mat = get_material_by_name(material) | ||
if(mat) | ||
return mat.value | ||
return 0 | ||
|
||
/obj/item/weapon/material/Value() | ||
return material.value * worth_multiplier | ||
|
||
/obj/item/weapon/spacecash/Value() | ||
return worth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/obj/machinery/Value() | ||
. = ..() | ||
if(stat & BROKEN) | ||
. *= 0.5 | ||
. = round(.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/obj/structure/barricade/Value() | ||
return material.value | ||
|
||
/obj/structure/bed/Value() | ||
return ..() * material.value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//Workaround by Ginja due to the fact initial(parent_type) does not work. | ||
|
||
#define PARENT(x) text2path(replacetext("[x]", regex("/\[^/\]+$"), "")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/proc/get_value(atom/A) // A can be either type *or* instance; ie get_value(/obj) is valid, as is get_value(new /obj) | ||
var/atom/t = ispath(A) ? A : A.type | ||
while(!(t in worths)) // Find the first parent that is in the list | ||
t = PARENT(t) | ||
if(!t) | ||
return 0 | ||
var/value = worths[t] | ||
if(value >= 0) // Value zero or greater than zero, all instances have same value | ||
return value | ||
else // Negative. If it's a path, use -x, otherwise call Value() on the instance | ||
if(ispath(A)) | ||
return -value | ||
return A.Value(-value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/obj/item/weapon/material | ||
var/worth_multiplier = 1 | ||
|
||
//Rule of thumb is: worth more than the parts put in | ||
//Finished good is worth more than its individual parts | ||
|
||
/obj/item/weapon/material/kitchen | ||
worth_multiplier = 1.1 | ||
|
||
/obj/item/weapon/material/butterfly | ||
worth_multiplier = 8 | ||
|
||
/obj/item/weapon/material/harpoon | ||
worth_multiplier = 15 | ||
|
||
/obj/item/weapon/material/hatchet | ||
worth_multiplier = 6 | ||
|
||
/obj/item/weapon/material/minihoe | ||
worth_multiplier = 6 | ||
|
||
/obj/item/weapon/material/scythe | ||
worth_multiplier = 20 | ||
|
||
/obj/item/weapon/material/sword | ||
worth_multiplier = 30 | ||
|
||
/obj/item/weapon/material/twohanded/fireaxe | ||
worth_multiplier = 31 | ||
|
||
/obj/item/weapon/material/twohanded/spear | ||
worth_multiplier = 7 //blade + stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/material | ||
var/value = 1 | ||
|
||
/material/uranium | ||
value = 100 | ||
|
||
/material/diamond | ||
value = 70 | ||
|
||
/material/gold | ||
value = 40 | ||
|
||
/material/silver | ||
value = 35 | ||
|
||
/material/phoron | ||
value = 200 | ||
|
||
/material/stone/marble | ||
value = 4 | ||
|
||
/material/steel | ||
value = 4 | ||
|
||
/material/diona | ||
value = 5 | ||
|
||
/material/steel/holographic | ||
value = 0 | ||
|
||
/material/plasteel | ||
value = 12 | ||
|
||
/material/plasteel/titanium | ||
value = 10 | ||
|
||
/material/glass/reinforced | ||
value = 2 | ||
|
||
/material/glass/phoron | ||
value = 30 | ||
|
||
/material/glass/phoron/reinforced | ||
value = 40 | ||
|
||
/material/osmium | ||
value = 30 | ||
|
||
/material/tritium | ||
value = 300 | ||
|
||
/material/mhydrogen | ||
value = 100 | ||
|
||
/material/platinum | ||
value = 80 | ||
|
||
/material/iron | ||
value = 5 | ||
|
||
/material/voxalloy | ||
value = 100 | ||
|
||
/material/wood | ||
value = 3 | ||
|
||
/material/wood/holographic | ||
value = 0 | ||
|
||
/material/cardboard | ||
value = 0 | ||
|
||
/material/leather | ||
value = 3 |
Oops, something went wrong.