Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Commit

Permalink
just need to do mapping and test sawblades
Browse files Browse the repository at this point in the history
  • Loading branch information
NanakoAC committed Aug 23, 2019
1 parent 065c29b commit 9db64f9
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 27 deletions.
5 changes: 4 additions & 1 deletion code/_helpers/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,12 @@ proc/GaussRandRound(var/sigma,var/roundto)
return round(GaussRand(sigma),roundto)

//Will return the contents of an atom recursivly to a depth of 'searchDepth'
/atom/proc/GetAllContents(searchDepth = 5)
/atom/proc/GetAllContents(searchDepth = 5, var/includeSelf = FALSE)
var/list/toReturn = list()

if (includeSelf)
toReturn += src

for(var/atom/part in contents)
toReturn += part
if(part.contents.len && searchDepth)
Expand Down
2 changes: 2 additions & 0 deletions code/datums/autolathe/autolathe_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ other types of metals and chemistry for reagents).

var/list/mats = O.matter
if (mats && mats.len)

for(var/a in mats)

var/amount = mats[a] * multiplier
if(amount)
LAZYAPLUS(materials, a, amount)
Expand Down
10 changes: 9 additions & 1 deletion code/datums/autolathe/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,12 @@

/datum/design/autolathe/tool/pneumatic_crowbar
name = "pneumatic crowbar"
build_path = /obj/item/weapon/tool/crowbar/pneumatic
build_path = /obj/item/weapon/tool/crowbar/pneumatic

/datum/design/autolathe/tool/sawblade
name = "sawblade"
build_path = /obj/item/ammo_casing/sawblade

/datum/design/autolathe/tool/sawblade
name = "diamond blade"
build_path = /obj/item/ammo_casing/sawblade/diamond
4 changes: 2 additions & 2 deletions code/game/machinery/autolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

var/datum/computer_file/binary/design/current_file = null
var/list/queue = list()
var/queue_max = 8
var/queue_max = 12

var/speed = 2
var/speed = 1

var/progress = 0

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/binoculars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
throw_range = 15
throw_speed = 3

//matter = list("metal" = 50,MATERIAL_GLASS = 50)
//matter = list(MATERIAL_STEEL = 50,MATERIAL_GLASS = 50)


/obj/item/device/binoculars/attack_self(mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/ecigs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ obj/item/clothing/mask/smokable/ecig/util/examine(mob/user)
w_class = ITEM_SIZE_TINY
icon = 'icons/obj/ecig.dmi'
icon_state = "ecartridge"
matter = list("metal" = 50, MATERIAL_GLASS = 10)
matter = list(MATERIAL_STEEL = 50, MATERIAL_GLASS = 10)
volume = 20
atom_flags = ATOM_FLAG_OPEN_CONTAINER

Expand Down
13 changes: 13 additions & 0 deletions code/modules/client/asset_cache.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,19 @@ You can set verify to TRUE if you want send() to sleep until the client has the

//DEFINITIONS FOR ASSET DATUMS START HERE.


//This loads little icons used for proto/autolathe
/datum/asset/simple/design_icons/register()
for(var/D in SSresearch.all_designs)
var/datum/design/design = D

var/filename = sanitizeFileName("[design.build_path].png")
var/icon/I = getFlatTypeIcon(design.build_path)
register_asset(filename, I)
assets[filename] = I

design.ui_data["icon"] = filename

/datum/asset/simple/tgui
isTrivial = FALSE
assets = list(
Expand Down
6 changes: 3 additions & 3 deletions code/modules/integrated_electronics/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
used for power or data transmission."
icon = 'icons/obj/electronic_assemblies.dmi'
icon_state = "wirer-wire"
matter = list("metal" = 147, MATERIAL_GLASS = 64)
matter = list(MATERIAL_STEEL = 147, MATERIAL_GLASS = 64)
obj_flags = OBJ_FLAG_CONDUCTIBLE
w_class = ITEM_SIZE_SMALL
var/datum/integrated_io/selected_io = null
Expand Down Expand Up @@ -95,7 +95,7 @@
settings to specific circuits, or for debugging purposes. It can also pulse activation pins."
icon = 'icons/obj/electronic_assemblies.dmi'
icon_state = "debugger"
matter = list("metal" = 151, MATERIAL_GLASS = 82)
matter = list(MATERIAL_STEEL = 151, MATERIAL_GLASS = 82)
obj_flags = OBJ_FLAG_CONDUCTIBLE
w_class = ITEM_SIZE_SMALL
description_info = "Ref scanning is done by click-drag-dropping the debugger unto an adjacent object that you wish to scan."
Expand Down Expand Up @@ -159,7 +159,7 @@
desc = "This tool allows one to analyze custom assemblies and their components from a distance."
icon = 'icons/obj/electronic_assemblies.dmi'
icon_state = "analyzer"
matter = list("metal" = 156, MATERIAL_GLASS = 67)
matter = list(MATERIAL_STEEL = 156, MATERIAL_GLASS = 67)
obj_flags = OBJ_FLAG_CONDUCTIBLE
w_class = 2
var/last_scan = ""
Expand Down
22 changes: 11 additions & 11 deletions code/modules/power/cell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var/charge // Current charge
var/maxcharge = 1000 // Capacity in Wh
var/overlay_state
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 50)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 50)


/obj/item/weapon/cell/New()
Expand Down Expand Up @@ -162,7 +162,7 @@
throw_speed = 5
throw_range = 7
maxcharge = 100
matter = list("metal" = 70, MATERIAL_GLASS = 5)
matter = list(MATERIAL_STEEL = 70, MATERIAL_SILVER = 5)

/obj/item/weapon/cell/device/variable/New(newloc, charge_amount)
maxcharge = charge_amount
Expand All @@ -177,14 +177,14 @@
desc = "A small power cell designed to power more energy-demanding devices."
icon_state = "hdevice"
maxcharge = 100
matter = list("metal" = 70, MATERIAL_GLASS = 6)
matter = list(MATERIAL_STEEL = 70, MATERIAL_SILVER = 6)

/obj/item/weapon/cell/crap
name = "old power cell"
desc = "A cheap old power cell. It's probably been in use for quite some time now."
origin_tech = list(TECH_POWER = 0)
maxcharge = 100
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 40)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 40)

/obj/item/weapon/cell/crap/empty
charge = 0
Expand All @@ -194,7 +194,7 @@
desc = "A standard and relatively cheap power cell, commonly used."
origin_tech = list(TECH_POWER = 0)
maxcharge = 250
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 40)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 40)

/obj/item/weapon/cell/crap/empty/New()
..()
Expand All @@ -206,7 +206,7 @@
desc = "A special power cell designed for heavy-duty use in area power controllers."
origin_tech = list(TECH_POWER = 1)
maxcharge = 500
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 50)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 50)


/obj/item/weapon/cell/high
Expand All @@ -215,7 +215,7 @@
origin_tech = list(TECH_POWER = 2)
icon_state = "hcell"
maxcharge = 1000
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 60)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 60)

/obj/item/weapon/cell/high/empty/New()
..()
Expand All @@ -228,7 +228,7 @@
origin_tech = list(TECH_POWER = 3)
icon_state = "hcell"
maxcharge = 1500
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 70)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 70)


/obj/item/weapon/cell/super
Expand All @@ -237,7 +237,7 @@
origin_tech = list(TECH_POWER = 5)
icon_state = "scell"
maxcharge = 2000
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 70)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 70)

/obj/item/weapon/cell/super/empty/New()
..()
Expand All @@ -250,7 +250,7 @@
origin_tech = list(TECH_POWER = 6)
icon_state = "hpcell"
maxcharge = 3000
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 80)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 80)

/obj/item/weapon/cell/hyper/empty/New()
..()
Expand All @@ -263,7 +263,7 @@
icon_state = "icell"
origin_tech = null
maxcharge = 3000
matter = list(MATERIAL_STEEL = 700, MATERIAL_GLASS = 80)
matter = list(MATERIAL_STEEL = 700, MATERIAL_SILVER = 80)

/obj/item/weapon/cell/infinite/check_charge()
return 1
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/ammunition/bullets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
icon_state = "pshell"
spent_icon = "pshell-spent"
projectile_type = /obj/item/projectile/bullet/shotgun/practice
matter = list("metal" = 90)
matter = list(MATERIAL_STEEL = 90)

/obj/item/ammo_casing/shotgun/beanbag
name = "beanbag shell"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/reagent_containers/food/snacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@
icon_state = "roburger"
filling_color = "#cccccc"
center_of_mass = "x=16;y=11"
nutriment_desc = list("bun" = 2, "metal" = 3)
nutriment_desc = list("bun" = 2, "iron" = 3)
nutriment_amt = 2
/obj/item/weapon/reagent_containers/food/snacks/roburger/New()
..()
Expand Down Expand Up @@ -990,7 +990,7 @@
trash = /obj/item/stack/rods
filling_color = "#fffee0"
center_of_mass = "x=17;y=15"
nutriment_desc = list("tofu" = 3, "metal" = 1)
nutriment_desc = list("tofu" = 3, "iron" = 1)
nutriment_amt = 8
/obj/item/weapon/reagent_containers/food/snacks/tofukabob/New()
..()
Expand Down
8 changes: 4 additions & 4 deletions nano/templates/autolathe.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ Used In File(s): \code\game\machinery\autolathe.dm
<div class="fixedLeftWider" style="width:50%; display: table-cell">
{{for data.designs}}
<div class="item">
<div class="block" style='padding: 0px; overflow: auto'>
<div class="item" style="margin: 0px">
<div style ='float: left; height: 24px; width: 24px; margin: 4px' class='statusDisplayItem'><img src= {{:value.icon}} height=24 width=24></div>
<div class="itemContentWidest">{{:value.name}}</div>
<div class="block" style='padding: 0px; overflow: hidden'>
<div class="item" style='margin: 0px; overflow: hidden'>
<div style ='float: left; height: 24px; width: 24px; margin: 4px; margin-top: 0px' class='statusDisplayItem'><img src= {{:value.icon}} height=24 width=24></div>
<div class="itemContentWidest" style ='margin-top:4px'>{{:value.name}}</div>
</div>
{{if value.filename == data.unfolded}}
<div class="statusDisplay" style="margin: 0px 4px 4px 4px">
Expand Down

0 comments on commit 9db64f9

Please sign in to comment.