Skip to content

Commit

Permalink
initial item worth commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kearel committed Jun 11, 2016
1 parent 4683936 commit 8061b09
Show file tree
Hide file tree
Showing 18 changed files with 2,306 additions and 0 deletions.
14 changes: 14 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,20 @@
#include "code\modules\hydroponics\trays\tray_soil.dm"
#include "code\modules\hydroponics\trays\tray_tools.dm"
#include "code\modules\hydroponics\trays\tray_update_icons.dm"
#include "code\modules\item_worth\machinery.dm"
#include "code\modules\item_worth\materials.dm"
#include "code\modules\item_worth\mecha.dm"
#include "code\modules\item_worth\mobs.dm"
#include "code\modules\item_worth\structures.dm"
#include "code\modules\item_worth\items\clothing.dm"
#include "code\modules\item_worth\items\device.dm"
#include "code\modules\item_worth\items\guns.dm"
#include "code\modules\item_worth\items\items.dm"
#include "code\modules\item_worth\items\organs.dm"
#include "code\modules\item_worth\items\reagent_containers.dm"
#include "code\modules\item_worth\items\stack.dm"
#include "code\modules\item_worth\items\storage.dm"
#include "code\modules\item_worth\items\weapon.dm"
#include "code\modules\library\lib_items.dm"
#include "code\modules\library\lib_machines.dm"
#include "code\modules\library\lib_readme.dm"
Expand Down
8 changes: 8 additions & 0 deletions code/game/gamemodes/gameticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,14 @@ var/global/datum/controller/gameticker/ticker
if(dronecount)
world << "<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round.</b>"

var/total_damage = station_damage_score
for(var/a in machines)
var/obj/machinery/M = a
if(M.stat & BROKEN) //I hate doing it like this but technically machines don't cost anything to replace if they aint broke.
total_damage += M.get_worth()
if(total_damage)
world << "<br><br><b>[station_name()] has taken over [round(total_damage)] thalers in damage.</b><br>"

mode.declare_completion()//To declare normal completion.

//Ask the event manager to print round end information
Expand Down
2 changes: 2 additions & 0 deletions code/global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,5 @@ var/max_explosion_range = 14
var/global/obj/item/device/radio/intercom/global_announcer = new(null)

var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian")

var/station_damage_score = 0 //How much it costed to run the station for this round (in thalers)

0 comments on commit 8061b09

Please sign in to comment.