mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
+8
-4
@@ -523,6 +523,7 @@
|
||||
#include "code\game\objects\items\devices\megaphone.dm"
|
||||
#include "code\game\objects\items\devices\multitool.dm"
|
||||
#include "code\game\objects\items\devices\paicard.dm"
|
||||
#include "code\game\objects\items\devices\pipe_freezer.dm"
|
||||
#include "code\game\objects\items\devices\pipe_painter.dm"
|
||||
#include "code\game\objects\items\devices\powersink.dm"
|
||||
#include "code\game\objects\items\devices\scanners.dm"
|
||||
@@ -847,10 +848,10 @@
|
||||
#include "code\modules\customitems\item_defines.dm"
|
||||
#include "code\modules\customitems\item_spawning.dm"
|
||||
#include "code\modules\customitems\definitions\base.dm"
|
||||
#include "code\modules\detectivework\detective_work.dm"
|
||||
#include "code\modules\detectivework\evidence.dm"
|
||||
#include "code\modules\detectivework\footprints_and_rag.dm"
|
||||
#include "code\modules\detectivework\scanner.dm"
|
||||
#include "code\modules\DetectiveWork\detective_work.dm"
|
||||
#include "code\modules\DetectiveWork\evidence.dm"
|
||||
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
|
||||
#include "code\modules\DetectiveWork\scanner.dm"
|
||||
#include "code\modules\economy\Accounts.dm"
|
||||
#include "code\modules\economy\Accounts_DB.dm"
|
||||
#include "code\modules\economy\ATM.dm"
|
||||
@@ -946,16 +947,19 @@
|
||||
#include "code\modules\mining\machine_processing.dm"
|
||||
#include "code\modules\mining\machine_stacking.dm"
|
||||
#include "code\modules\mining\machine_unloading.dm"
|
||||
#include "code\modules\mining\manufacturing.dm"
|
||||
#include "code\modules\mining\materials.dm"
|
||||
#include "code\modules\mining\mine_areas.dm"
|
||||
#include "code\modules\mining\mine_items.dm"
|
||||
#include "code\modules\mining\mine_turfs.dm"
|
||||
#include "code\modules\mining\minerals.dm"
|
||||
#include "code\modules\mining\mining_recipes.dm"
|
||||
#include "code\modules\mining\mint.dm"
|
||||
#include "code\modules\mining\money_bag.dm"
|
||||
#include "code\modules\mining\ore.dm"
|
||||
#include "code\modules\mining\ore_datum.dm"
|
||||
#include "code\modules\mining\satchel_ore_boxdm.dm"
|
||||
#include "code\modules\mining\security_recipes.dm"
|
||||
#include "code\modules\mining\surprise.dm"
|
||||
#include "code\modules\mining\drilling\distribution.dm"
|
||||
#include "code\modules\mining\drilling\drill.dm"
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
|
||||
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
|
||||
/proc/sanitizeSQL(var/t as text)
|
||||
var/sanitized_text = replacetext(t, "'", "\\'")
|
||||
sanitized_text = replacetext(sanitized_text, "\"", "\\\"")
|
||||
return sanitized_text
|
||||
var/sqltext = dbcon.Quote(t);
|
||||
return copytext(sqltext, 2, lentext(sqltext)-1);//Quote() adds quotes around input, we already do that
|
||||
|
||||
/*
|
||||
* Text sanitization
|
||||
|
||||
@@ -1095,3 +1095,30 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "mafia supply crate"
|
||||
group = "Operations"
|
||||
|
||||
/datum/supply_packs/fabric
|
||||
name = "Fabric crate"
|
||||
contains = list(/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric,
|
||||
/obj/item/weapon/ore/fabric)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Fabric crate"
|
||||
group = "Operations"
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
|
||||
if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna) || (subject.flags & NO_SCAN))
|
||||
if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna) || (subject.species.flags & NO_SCAN))
|
||||
scantemp = "Error: Unable to locate valid genetic data."
|
||||
return
|
||||
if (subject.brain_op_stage == 4.0)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if(istype(O, /obj/item/weapon/storage/bag/plants))
|
||||
else if(istype(O, /obj/item/weapon/storage/bag/plants) || istype(O, /obj/item/weapon/storage/belt/medical))
|
||||
var/obj/item/weapon/storage/bag/plants/P = O
|
||||
var/plants_loaded = 0
|
||||
for(var/obj/G in P.contents)
|
||||
@@ -121,6 +121,7 @@
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
|
||||
else
|
||||
user << "<span class='notice'>\The [src] smartly refuses [O].</span>"
|
||||
return 1
|
||||
@@ -138,6 +139,39 @@
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
//Drag pill bottle to fridge to empty it into the fridge
|
||||
/obj/machinery/smartfridge/MouseDrop_T(obj/over_object as obj, mob/user as mob)
|
||||
if(!istype(over_object, /obj/item/weapon/storage/pill_bottle)) //Only pill bottles, please
|
||||
return
|
||||
|
||||
if(!src.ispowered)
|
||||
user << "<span class='notice'>\The [src] is unpowered and useless.</span>"
|
||||
return
|
||||
|
||||
var/obj/item/weapon/storage/box/pillbottles/P = over_object
|
||||
var/items_loaded = 0
|
||||
for(var/obj/G in P.contents)
|
||||
if(accept_check(G))
|
||||
if(contents.len >= max_n_of_items)
|
||||
user << "<span class='notice'>\The [src] is full.</span>"
|
||||
return 1
|
||||
else
|
||||
P.remove_from_storage(G,src)
|
||||
if(item_quants[G.name])
|
||||
item_quants[G.name]++
|
||||
else
|
||||
item_quants[G.name] = 1
|
||||
items_loaded++
|
||||
if(items_loaded)
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] empties \the [P] into \the [src].</span>", \
|
||||
"<span class='notice'>You empty \the [P] into \the [src].</span>")
|
||||
if(P.contents.len > 0)
|
||||
user << "<span class='notice'>Some items are refused.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/*******************
|
||||
* SmartFridge Menu
|
||||
********************/
|
||||
@@ -201,5 +235,3 @@
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ move an amendment</a> to the drawing.</p>
|
||||
return
|
||||
var/area/A = new
|
||||
A.name = str
|
||||
A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
|
||||
A.tagbase="[A.type]_[md5(str)]" // without this dynamic light system ruins everything
|
||||
//var/ma
|
||||
//ma = A.master ? "[A.master]" : "(null)"
|
||||
//world << "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* Plasma Glass Sheets
|
||||
* Reinforced Plasma Glass Sheets (AKA Holy fuck strong windows)
|
||||
|
||||
Todo: Create a unified construct_window(sheet, user, created_window, full_window)
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -98,6 +100,7 @@
|
||||
W = new /obj/structure/window/basic( user.loc, 0 )
|
||||
W.dir = dir_to_set
|
||||
W.ini_dir = W.dir
|
||||
W.state = 0
|
||||
W.anchored = 0
|
||||
src.use(1)
|
||||
if("Full Window")
|
||||
@@ -110,6 +113,7 @@
|
||||
user << "\red There is a full window in the way."
|
||||
return 1
|
||||
var/obj/structure/window/W = new full_window( user.loc, 0 )
|
||||
W.state = 0
|
||||
W.anchored = 0
|
||||
src.use(2)
|
||||
return 0
|
||||
@@ -126,6 +130,8 @@
|
||||
g_amt = 3750
|
||||
m_amt = 1875
|
||||
origin_tech = "materials=2"
|
||||
var/created_window = /obj/structure/window/reinforced
|
||||
var/full_window = /obj/structure/window/full/reinforced
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
name = "reinforced glass"
|
||||
@@ -190,11 +196,8 @@
|
||||
if(locate(/obj/structure/window/full) in user.loc)
|
||||
user << "\red There is a window in the way."
|
||||
return 1
|
||||
var/obj/structure/window/W
|
||||
W = new /obj/structure/window/reinforced( user.loc, 1 )
|
||||
var/obj/structure/window/W = new full_window( user.loc, 0 )
|
||||
W.state = 0
|
||||
W.dir = SOUTHWEST
|
||||
W.ini_dir = SOUTHWEST
|
||||
W.anchored = 0
|
||||
src.use(2)
|
||||
|
||||
@@ -349,7 +352,7 @@
|
||||
var/full_window = /obj/structure/window/full/plasmabasic
|
||||
|
||||
|
||||
/obj/item/stack/sheet/glass/plasmaglass/attack_self(mob/user as mob)
|
||||
/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
|
||||
/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user)
|
||||
@@ -375,7 +378,7 @@
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
var/title = "Sheet-PlasmaGlass"
|
||||
var/title = "Plasma-glass alloy"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
|
||||
if("One Direction")
|
||||
@@ -406,6 +409,7 @@
|
||||
W = new /obj/structure/window/plasmabasic( user.loc, 0 )
|
||||
W.dir = dir_to_set
|
||||
W.ini_dir = W.dir
|
||||
W.state = 0
|
||||
W.anchored = 0
|
||||
src.use(1)
|
||||
if("Full Window")
|
||||
@@ -417,10 +421,8 @@
|
||||
if(locate(/obj/structure/window) in user.loc)
|
||||
user << "\red There is a window in the way."
|
||||
return 1
|
||||
var/obj/structure/window/W
|
||||
W = new /obj/structure/window/plasmabasic( user.loc, 0 )
|
||||
W.dir = SOUTHWEST
|
||||
W.ini_dir = SOUTHWEST
|
||||
var/obj/structure/window/W = new full_window( user.loc, 0 )
|
||||
W.state = 0
|
||||
W.anchored = 0
|
||||
src.use(2)
|
||||
return 0
|
||||
@@ -440,5 +442,60 @@
|
||||
var/full_window = /obj/structure/window/full/plasmareinforced
|
||||
|
||||
|
||||
/obj/item/stack/sheet/glass/plasmarglass/attack_self(mob/user as mob)
|
||||
/obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
|
||||
/obj/item/stack/sheet/plasmarglass/proc/construct_window(mob/user as mob)
|
||||
if(!user || !src) return 0
|
||||
if(!istype(user.loc,/turf)) return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
var/title = "Reinforced plasma-glass alloy"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
|
||||
if("One Direction")
|
||||
if(!src) return 1
|
||||
if(src.loc != user) return 1
|
||||
var/list/directions = new/list(cardinal)
|
||||
var/i = 0
|
||||
for (var/obj/structure/window/win in user.loc)
|
||||
i++
|
||||
if(i >= 4)
|
||||
user << "\red There are too many windows in this location."
|
||||
return 1
|
||||
directions-=win.dir
|
||||
if(!(win.ini_dir in cardinal))
|
||||
user << "\red Can't let you do that."
|
||||
return 1
|
||||
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
|
||||
var/dir_to_set = 2
|
||||
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
|
||||
var/found = 0
|
||||
for(var/obj/structure/window/WT in user.loc)
|
||||
if(WT.dir == direction)
|
||||
found = 1
|
||||
if(!found)
|
||||
dir_to_set = direction
|
||||
break
|
||||
var/obj/structure/window/W
|
||||
W = new /obj/structure/window/plasmareinforced( user.loc, 0 )
|
||||
W.dir = dir_to_set
|
||||
W.ini_dir = W.dir
|
||||
W.state = 0
|
||||
W.anchored = 0
|
||||
src.use(1)
|
||||
if("Full Window")
|
||||
if(!src) return 1
|
||||
if(src.loc != user) return 1
|
||||
if(src.amount < 2)
|
||||
user << "\red You need more glass to do that."
|
||||
return 1
|
||||
if(locate(/obj/structure/window) in user.loc)
|
||||
user << "\red There is a window in the way."
|
||||
return 1
|
||||
var/obj/structure/window/W = new full_window( user.loc, 0 )
|
||||
W.state = 0
|
||||
W.anchored = 0
|
||||
src.use(2)
|
||||
return 0
|
||||
@@ -72,6 +72,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/medical
|
||||
use_to_pickup = 1 //Allow medical belt to pick up medicine
|
||||
name = "medical belt"
|
||||
desc = "Can hold various medical equipment."
|
||||
icon_state = "medicalbelt"
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
basestate = "plasmawindow"
|
||||
icon_state = "plasmawindow"
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
glasstype = /obj/item/stack/sheet/plasmaglass
|
||||
health = 120
|
||||
|
||||
|
||||
@@ -63,6 +64,7 @@
|
||||
basestate = "plasmarwindow"
|
||||
icon_state = "plasmarwindow"
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
glasstype = /obj/item/stack/sheet/plasmaglass
|
||||
reinf = 1
|
||||
health = 160
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
|
||||
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass) )
|
||||
var/dir_to_set = 1
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
@@ -182,8 +182,12 @@
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
|
||||
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
|
||||
else
|
||||
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
|
||||
WD.dir = dir_to_set
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
@@ -228,7 +232,7 @@
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
|
||||
/obj/structure/grille/proc/shock(mob/user as mob, prb)
|
||||
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
|
||||
if(!anchored || destroyed) // deanchored/destroyed grilles are never connected
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
var/reinf = 0
|
||||
var/basestate
|
||||
var/shardtype = /obj/item/weapon/shard
|
||||
var/glasstype = /obj/item/stack/sheet/glass
|
||||
var/disassembled = 0
|
||||
var/sheets = 1 // Number of sheets needed to build this window (determines how much shit is spawned by destroy())
|
||||
// var/silicate = 0 // number of units of silicate
|
||||
// var/icon/silicateIcon = null // the silicated icon
|
||||
@@ -232,6 +234,32 @@
|
||||
state = 1 - state
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
user << (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
|
||||
else if(istype(W, /obj/item/weapon/wrench) && !anchored && health > 7) //Disassemble deconstructed window into parts
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
for(var/i=0;i<sheets;i++)
|
||||
var/obj/item/stack/sheet/glass/NG = getFromPool(glasstype, src.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in src.loc) //Stack em up
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
|
||||
if (reinf)
|
||||
var/obj/item/stack/rods/NR = new (src.loc)
|
||||
for (var/obj/item/stack/rods/R in src.loc)
|
||||
if(R==NR)
|
||||
continue
|
||||
if(R.amount>=R.max_amount)
|
||||
continue
|
||||
R.attackby(NR, user)
|
||||
|
||||
user << "<span class='notice'>You have disassembled the window.</span>"
|
||||
disassembled = 1
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
update_nearby_icons()
|
||||
del(src)
|
||||
else
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
hit(W.force)
|
||||
@@ -338,7 +366,7 @@
|
||||
/obj/structure/window/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
if(loc)
|
||||
if(loc && !disassembled)
|
||||
playsound(get_turf(src), "shatter", 70, 1)
|
||||
update_nearby_icons()
|
||||
..()
|
||||
@@ -391,6 +419,7 @@
|
||||
basestate = "plasmawindow"
|
||||
icon_state = "plasmawindow"
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
glasstype = /obj/item/stack/sheet/plasmaglass
|
||||
health = 120
|
||||
|
||||
/obj/structure/window/plasmabasic/New(Loc,re=0)
|
||||
@@ -412,6 +441,7 @@
|
||||
basestate = "plasmarwindow"
|
||||
icon_state = "plasmarwindow"
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
glasstype = /obj/item/stack/sheet/plasmaglass
|
||||
reinf = 1
|
||||
health = 160
|
||||
explosion_resistance = 4
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
M.generate_name()
|
||||
|
||||
if( M.species.name=="Tajaran" || M.species.name=="Unathi" )
|
||||
if(M.mind.assigned_role == "Cyborg" || M.mind.assigned_role == "Clown")
|
||||
return //Cyborgs don't wear shoes. Clown shoes are large.
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
||||
|
||||
/proc/EquipCustomItems(mob/living/carbon/human/M)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -136,4 +136,12 @@
|
||||
value=1
|
||||
oretype=null
|
||||
sheettype=/obj/item/stack/sheet/mineral/plastic
|
||||
cointype=null
|
||||
|
||||
/datum/material/fabric
|
||||
name="Fabric"
|
||||
id="fabric"
|
||||
value=20
|
||||
oretype=/obj/item/weapon/ore/fabric
|
||||
sheettype=null
|
||||
cointype=null
|
||||
@@ -0,0 +1,252 @@
|
||||
/obj/machinery/manufacturer/mining
|
||||
name = "Mining Fabricator"
|
||||
desc = "A manufacturing unit calibrated to produce mining related equipment."
|
||||
acceptdisk = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
src.available += new /datum/manufacture/pick(src)
|
||||
src.available += new /datum/manufacture/shovel(src)
|
||||
src.available += new /datum/manufacture/oresatchel(src)
|
||||
src.available += new /datum/manufacture/breathmask(src)
|
||||
src.available += new /datum/manufacture/spacesuit(src)
|
||||
src.available += new /datum/manufacture/spacehelm(src)
|
||||
src.available += new /datum/manufacture/eyes_meson(src)
|
||||
src.hidden += new /datum/manufacture/RCD(src)
|
||||
src.hidden += new /datum/manufacture/RCDammo(src)
|
||||
|
||||
|
||||
// Mining Gear
|
||||
/datum/manufacture/pick
|
||||
name = "Pickaxe"
|
||||
item = /obj/item/weapon/pickaxe
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 5
|
||||
time = 5
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/shovel
|
||||
name = "Shovel"
|
||||
item = /obj/item/weapon/shovel
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 3
|
||||
time = 2
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/spick
|
||||
name = "Silver Pickaxe"
|
||||
item = /obj/item/weapon/pickaxe/silver
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 5
|
||||
cost2 = /obj/item/weapon/ore/silver
|
||||
cname2 = "Silver"
|
||||
amount2 = 5
|
||||
time = 10
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/gpick
|
||||
name = "Gold Pickaxe"
|
||||
item = /obj/item/weapon/pickaxe/gold
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 5
|
||||
cost2 = /obj/item/weapon/ore/gold
|
||||
cname2 = "Gold"
|
||||
amount2 = 5
|
||||
time = 15
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/dpick
|
||||
name = "Diamond Pickaxe"
|
||||
item = /obj/item/weapon/pickaxe/diamond
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 5
|
||||
cost2 = /obj/item/weapon/ore/diamond
|
||||
cname2 = "Uranium"
|
||||
amount2 = 5
|
||||
time = 30
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/jackhammer
|
||||
name = "Sonic Jackhammer"
|
||||
item = /obj/item/weapon/pickaxe/jackhammer
|
||||
cost1 = /obj/item/weapon/ore/gold
|
||||
cname1 = "Gold"
|
||||
amount1 = 8
|
||||
cost2 = /obj/item/weapon/ore/silver
|
||||
cname2 = "Silver"
|
||||
amount2 = 12
|
||||
time = 30
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/drill
|
||||
name = "Hand Drill"
|
||||
item = /obj/item/weapon/pickaxe/drill
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 15
|
||||
time = 20
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/diamonddrill
|
||||
name = "Diamond Drill"
|
||||
item = /obj/item/weapon/pickaxe/diamonddrill
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 15
|
||||
cost2 = /obj/item/weapon/ore/diamond
|
||||
cname2 = "Diamond"
|
||||
amount2 = 15
|
||||
cost3 = /obj/item/weapon/ore/silver
|
||||
cname3 = "Silver"
|
||||
amount3 = 15
|
||||
time = 40
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/cutter
|
||||
name = "Plasma Cutter"
|
||||
item = /obj/item/weapon/pickaxe/plasmacutter
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 10
|
||||
cost2 = /obj/item/weapon/ore/gold
|
||||
cname2 = "Gold"
|
||||
amount2 = 10
|
||||
cost3 = /obj/item/weapon/ore/plasma
|
||||
cname3 = "Plasma"
|
||||
amount3 = 15
|
||||
time = 30
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/eyes_meson
|
||||
name = "Optical Meson Scanner"
|
||||
item = /obj/item/clothing/glasses/meson
|
||||
cost1 = /obj/item/weapon/ore/glass
|
||||
cname1 = "Glass"
|
||||
amount1 = 5
|
||||
cost2 = /obj/item/weapon/ore/silver
|
||||
cname2 = "Silver"
|
||||
amount2 = 3
|
||||
time = 10
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/miningsuit
|
||||
name = "Mining Hardsuit"
|
||||
item = /obj/item/clothing/suit/space/rig/mining
|
||||
cost1 = /obj/item/weapon/ore/osmium
|
||||
cname1 = "Platinum"
|
||||
amount1 = 30
|
||||
cost2 = /obj/item/weapon/ore/iron
|
||||
cname2 = "Iron"
|
||||
amount2 = 30
|
||||
time = 30
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/mininghelm
|
||||
name = "Mining Hardsuit Helmet"
|
||||
item = /obj/item/clothing/head/helmet/space/rig/mining
|
||||
cost1 = /obj/item/weapon/ore/osmium
|
||||
cname1 = "Platinum"
|
||||
amount1 = 30
|
||||
cost2 = /obj/item/weapon/ore/iron
|
||||
cname2 = "Iron"
|
||||
amount2 = 30
|
||||
time = 20
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/breathmask
|
||||
name = "Breath Mask"
|
||||
item = /obj/item/clothing/mask/breath
|
||||
cost1 = /obj/item/weapon/ore/fabric
|
||||
cname1 = "Fabric"
|
||||
amount1 = 1
|
||||
time = 5
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/spacesuit
|
||||
name = "Space Suit"
|
||||
item = /obj/item/clothing/suit/space
|
||||
cost1 = /obj/item/weapon/ore/fabric
|
||||
cname1 = "Fabric"
|
||||
amount1 = 5
|
||||
cost2 = /obj/item/weapon/ore/iron
|
||||
cname2 = "Iron"
|
||||
amount2 = 5
|
||||
time = 15
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/spacehelm
|
||||
name = "Space Helmet"
|
||||
item = /obj/item/clothing/head/helmet/space
|
||||
cost1 = /obj/item/weapon/ore/fabric
|
||||
cname1 = "Fabric"
|
||||
amount1 = 5
|
||||
cost2 = /obj/item/weapon/ore/glass
|
||||
cname2 = "Glass"
|
||||
amount2 = 5
|
||||
time = 10
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/oresatchel
|
||||
name = "Ore Satchel"
|
||||
item = /obj/item/weapon/storage/bag/ore
|
||||
cost1 = /obj/item/weapon/ore/fabric
|
||||
cname1 = "Fabric"
|
||||
amount1 = 5
|
||||
time = 5
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/jetpack
|
||||
name = "Jetpack"
|
||||
item = /obj/item/weapon/tank/jetpack
|
||||
cost1 = /obj/item/weapon/ore/gold
|
||||
cname1 = "Gold"
|
||||
amount1 = 15
|
||||
cost2 = /obj/item/weapon/ore/silver
|
||||
cname2 = "Silver"
|
||||
amount2 = 20
|
||||
time = 30
|
||||
create = 1
|
||||
|
||||
//Diskettes!
|
||||
/obj/item/weapon/disk/data/schematic/mining1
|
||||
name = "Mining Schematics Level 1"
|
||||
desc = "Contains the schematics for a new range of Pickaxes."
|
||||
|
||||
New()
|
||||
src.schematics += new /datum/manufacture/spick(src)
|
||||
src.schematics += new /datum/manufacture/gpick(src)
|
||||
src.schematics += new /datum/manufacture/dpick(src)
|
||||
|
||||
/obj/item/weapon/disk/data/schematic/mining2
|
||||
name = "Mining Schematics Level 2"
|
||||
desc = "Contains the schematics for a new line of drills. And a Plasma Cutter. Has the previous level as well."
|
||||
|
||||
New()
|
||||
src.schematics += new /datum/manufacture/spick(src)
|
||||
src.schematics += new /datum/manufacture/gpick(src)
|
||||
src.schematics += new /datum/manufacture/dpick(src)
|
||||
src.schematics += new /datum/manufacture/drill(src)
|
||||
src.schematics += new /datum/manufacture/jackhammer(src)
|
||||
src.schematics += new /datum/manufacture/diamonddrill(src)
|
||||
src.schematics += new /datum/manufacture/cutter(src)
|
||||
|
||||
/obj/item/weapon/disk/data/schematic/mining3
|
||||
name = "Mining Schematics Level 3"
|
||||
desc = "Contains the schematics for a new type of Spacesuit, and schematics for a Jetpack. Has the previous levels as well."
|
||||
|
||||
New()
|
||||
src.schematics += new /datum/manufacture/spick(src)
|
||||
src.schematics += new /datum/manufacture/gpick(src)
|
||||
src.schematics += new /datum/manufacture/dpick(src)
|
||||
src.schematics += new /datum/manufacture/drill(src)
|
||||
src.schematics += new /datum/manufacture/jackhammer(src)
|
||||
src.schematics += new /datum/manufacture/diamonddrill(src)
|
||||
src.schematics += new /datum/manufacture/cutter(src)
|
||||
src.schematics += new /datum/manufacture/miningsuit(src)
|
||||
src.schematics += new /datum/manufacture/mininghelm(src)
|
||||
src.schematics += new /datum/manufacture/jetpack(src)
|
||||
@@ -69,6 +69,12 @@
|
||||
origin_tech = "materials=4"
|
||||
oretag="clown"
|
||||
|
||||
/obj/item/weapon/ore/fabric
|
||||
name = "fabric"
|
||||
icon_state = "fabric"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "fabric"
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "Slag"
|
||||
desc = "Completely useless"
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/obj/machinery/manufacturer/security
|
||||
name = "Security Fabricator"
|
||||
desc = "A manufacturing unit calibrated to produce security and military related equipment."
|
||||
acceptdisk = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
src.available += new /datum/manufacture/beret(src)
|
||||
src.available += new /datum/manufacture/helmet1(src)
|
||||
src.available += new /datum/manufacture/sunglasses(src)
|
||||
src.available += new /datum/manufacture/sechud(src)
|
||||
src.available += new /datum/manufacture/secpants(src)
|
||||
src.available += new /datum/manufacture/secbelt(src)
|
||||
src.available += new /datum/manufacture/armor1(src)
|
||||
src.available += new /datum/manufacture/taser(src)
|
||||
src.available += new /datum/manufacture/baton(src)
|
||||
|
||||
// Security Gear Tier-0. AKA Clothing and basic as shit gear.
|
||||
/datum/manufacture/beret
|
||||
name = "Beret"
|
||||
item = /obj/item/clothing/head/beret/sec
|
||||
cost1 = /obj/item/weapon/ore/fabric
|
||||
cname1 = "Fabric"
|
||||
amount1 = 2
|
||||
time = 3
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/helmet1
|
||||
name = "Helmet"
|
||||
item = /obj/item/clothing/head/helmet
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 10
|
||||
cost2 = /obj/item/weapon/ore/fabric
|
||||
cname2 = "Fabric"
|
||||
amount2 = 10
|
||||
time = 10
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/sunglasses
|
||||
name = "Sunglasses"
|
||||
item = /obj/item/clothing/glasses/sunglasses
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 5
|
||||
cost2 = /obj/item/weapon/ore/glass
|
||||
cname2 = "Glass"
|
||||
amount2 = 10
|
||||
time = 8
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/sechud
|
||||
name = "Security HUD"
|
||||
item = /obj/item/clothing/glasses/hud/security
|
||||
cost1 = /obj/item/weapon/ore/osmium
|
||||
cname1 = "Platinum"
|
||||
amount1 = 10
|
||||
cost2 = /obj/item/weapon/ore/glass
|
||||
cname2 = "Glass"
|
||||
amount2 = 15
|
||||
time = 12
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/secpants
|
||||
name = "Security Uniform"
|
||||
item = /obj/item/clothing/under/rank/security
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 2
|
||||
cost2 = /obj/item/weapon/ore/fabric
|
||||
cname2 = "Fabric"
|
||||
amount2 = 1
|
||||
time = 10
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/secbelt
|
||||
name = "Security Belt"
|
||||
item = /obj/item/weapon/storage/belt/security
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 2
|
||||
cost2 = /obj/item/weapon/ore/fabric
|
||||
cname2 = "Fabric"
|
||||
amount2 = 5
|
||||
time = 15
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/armor1
|
||||
name = "Armored Vest"
|
||||
item = /obj/item/clothing/suit/armor/vest
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 15
|
||||
cost2 = /obj/item/weapon/ore/fabric
|
||||
cname2 = "Fabric"
|
||||
amount2 = 15
|
||||
time = 20
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/taser
|
||||
name = "Taser"
|
||||
item = /obj/item/weapon/gun/energy/taser
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 15
|
||||
cost2 = /obj/item/weapon/ore/glass
|
||||
cname2 = "Glass"
|
||||
amount2 = 10
|
||||
cost3 = /obj/item/weapon/ore/osmium
|
||||
cname3 = "Platinum"
|
||||
amount3 = 20
|
||||
time = 25
|
||||
create = 1
|
||||
|
||||
/datum/manufacture/baton
|
||||
name = "Stun Baton"
|
||||
item = /obj/item/weapon/melee/baton
|
||||
cost1 = /obj/item/weapon/ore/iron
|
||||
cname1 = "Iron"
|
||||
amount1 = 10
|
||||
cost2 = /obj/item/weapon/ore/glass
|
||||
cname2 = "Glass"
|
||||
amount2 = 10
|
||||
cost3 = /obj/item/weapon/ore/osmium
|
||||
cname3 = "Platinum"
|
||||
amount3 = 15
|
||||
time = 20
|
||||
create = 1
|
||||
@@ -591,6 +591,7 @@
|
||||
flesh_color = "#AAAAAA"
|
||||
|
||||
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
|
||||
H.emote("deathgasp")
|
||||
for(var/organ_name in H.organs_by_name)
|
||||
if (organ_name == "head") // do the head last as that's when the user will be transfered to the posibrain
|
||||
continue
|
||||
|
||||
@@ -64,6 +64,15 @@
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/human/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
|
||||
if((species.flags & IS_SYNTHETIC) && (effecttype == IRRADIATE))
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
|
||||
return ..()
|
||||
|
||||
/mob/living/proc/apply_effects(var/stun = 0, var/weaken = 0, var/paralyze = 0, var/irradiate = 0, var/stutter = 0, var/eyeblur = 0, var/drowsy = 0, var/agony = 0, var/blocked = 0)
|
||||
if(blocked >= 2) return 0
|
||||
if(stun) apply_effect(stun, STUN, blocked)
|
||||
|
||||
+11
-8
@@ -147,23 +147,26 @@
|
||||
// Convinience proc. Collects crap that fails to equip either onto the mob's back, or drops it.
|
||||
// Used in job equipping so shit doesn't pile up at the start loc.
|
||||
/mob/living/carbon/human/proc/equip_or_collect(var/obj/item/W, var/slot)
|
||||
if(!equip_to_slot_or_del(W, slot))
|
||||
if(W.mob_can_equip(src, slot, 1))
|
||||
//Mob can equip. Equip it.
|
||||
equip_to_slot_or_del(W, slot)
|
||||
else
|
||||
//Mob can't equip it. Put it in a bag B.
|
||||
// Do I have a backpack?
|
||||
var/obj/item/weapon/storage/B
|
||||
if(istype(back,/obj/item/weapon/storage))
|
||||
//Mob is wearing backpack
|
||||
B = back
|
||||
// Do I have a plastic bag?
|
||||
else
|
||||
//not wearing backpack. Check if player holding plastic bag
|
||||
B=is_in_hands(/obj/item/weapon/storage/bag/plasticbag)
|
||||
|
||||
if(!B)
|
||||
// Gimme one.
|
||||
if(!B) //If not holding plastic bag, give plastic bag
|
||||
B=new /obj/item/weapon/storage/bag/plasticbag(null) // Null in case of failed equip.
|
||||
if(!put_in_hands(B,slot_back))
|
||||
return // Fuck it
|
||||
if(!put_in_hands(B))
|
||||
return // Bag could not be placed in players hands. I don't know what to do here...
|
||||
//Now, B represents a container we can insert W into.
|
||||
B.handle_item_insertion(W,1)
|
||||
|
||||
|
||||
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
|
||||
var/list/slot_equipment_priority = list( \
|
||||
slot_back,\
|
||||
|
||||
@@ -604,8 +604,9 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
switch(body_part)
|
||||
if(HEAD)
|
||||
if(owner.species.flags & IS_SYNTHETIC)
|
||||
organ= new /obj/item/weapon/organ/head/posi(owner.loc, owner)
|
||||
owner.death()
|
||||
if(owner.mind)
|
||||
organ= new /obj/item/weapon/organ/head/posi(owner.loc, owner)
|
||||
owner.death()
|
||||
else if(SKELETON in owner.mutations)
|
||||
organ= new /obj/item/weapon/skeleton/head(owner.loc)
|
||||
else
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
#define LIQUID 2
|
||||
#define GAS 3
|
||||
#define FOOD_METABOLISM 0.4
|
||||
#define TOX_OVERDOSE 30
|
||||
#define BRUTE_OVERDOSE 30
|
||||
#define BURN_OVERDOSE 30
|
||||
#define OXY_OVERDOSE 30
|
||||
#define OVERDOSE 90
|
||||
#define REM REAGENTS_EFFECT_MULTIPLIER
|
||||
|
||||
//The reaction procs must ALWAYS set src = null, this detaches the proc from the object (the reagent)
|
||||
@@ -110,10 +107,10 @@ datum
|
||||
M.adjustToxLoss(overdose_dam * volume / toxod)
|
||||
|
||||
if( (bruteod > 0) && (volume >= bruteod))//Brute Overdosing
|
||||
M.take_overall_damage(overdose_dam * volume / bruteod, 0)
|
||||
M.take_overall_damage(overdose_dam, 0)
|
||||
|
||||
if( (burnod > 0) && (volume >= burnod))//Burn Overdosing
|
||||
M.take_overall_damage(0, overdose_dam * volume / burnod)
|
||||
M.take_overall_damage(0, overdose_dam)
|
||||
|
||||
if( (oxyod > 0) && (volume >= oxyod))//Oxygen Overdosing
|
||||
M.adjustOxyLoss(overdose_dam * volume / oxyod)
|
||||
@@ -360,31 +357,18 @@ datum
|
||||
id = "anti_toxin"
|
||||
description = "Dylovene is a broad-spectrum antitoxin."
|
||||
reagent_state = LIQUID
|
||||
color = "#006400" // rgb: 0, 100, 0
|
||||
bruteod = BRUTE_OVERDOSE
|
||||
burnod = BURN_OVERDOSE
|
||||
mildly_toxic = 0
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = OVERDOSE/1.5
|
||||
oxyod = OVERDOSE/1.5
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(!M) M = holder.my_atom
|
||||
if(holder.has_reagent("toxin"))
|
||||
holder.remove_reagent("toxin", 1*REM)
|
||||
if(holder.has_reagent("stoxin"))
|
||||
holder.remove_reagent("stoxin", 1*REM)
|
||||
if(holder.has_reagent("plasma"))
|
||||
holder.remove_reagent("plasma", 1*REM)
|
||||
if(holder.has_reagent("sacid"))
|
||||
holder.remove_reagent("sacid", 1*REM)
|
||||
if(holder.has_reagent("cyanide"))
|
||||
holder.remove_reagent("cyanide", 1*REM)
|
||||
if(holder.has_reagent("amatoxin"))
|
||||
holder.remove_reagent("amatoxin", 1*REM)
|
||||
if(holder.has_reagent("chloralhydrate"))
|
||||
holder.remove_reagent("chloralhydrate", 1*REM)
|
||||
if(holder.has_reagent("carpotoxin"))
|
||||
holder.remove_reagent("carpotoxin", 1*REM)
|
||||
if(holder.has_reagent("zombiepowder"))
|
||||
holder.remove_reagent("zombiepowder", 1*REM)
|
||||
M.adjustToxLoss(-1.5*REM)
|
||||
if(!alien || alien != IS_DIONA)
|
||||
M.reagents.remove_all_type(/datum/reagent/toxin, 1*REM, 0, 1)
|
||||
M.drowsyness = max(M.drowsyness-2*REM, 0)
|
||||
M.hallucination = max(0, M.hallucination - 5*REM)
|
||||
M.adjustToxLoss(-2*REM)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -583,8 +567,8 @@ datum
|
||||
description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
bruteod = 40
|
||||
oxyod = 40
|
||||
bruteod = OVERDOSE
|
||||
oxyod = OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
@@ -607,7 +591,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#60A584" // rgb: 96, 165, 132
|
||||
addictiveness = 25
|
||||
toxod = TOX_OVERDOSE/2
|
||||
toxod = OVERDOSE/2
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1083,7 +1067,7 @@ datum
|
||||
description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol."
|
||||
reagent_state = LIQUID
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
toxod = TOX_OVERDOSE*2
|
||||
toxod = OVERDOSE*2
|
||||
mildly_toxic = 1
|
||||
custom_metabolism = 0.01
|
||||
|
||||
@@ -1126,7 +1110,7 @@ datum
|
||||
description = "Ryetalyn can cure all genetic abnomalities."
|
||||
reagent_state = SOLID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE/2
|
||||
toxod = OVERDOSE/3
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1174,7 +1158,7 @@ datum
|
||||
description = "Most probably know this as Tylenol, but this chemical is a mild, simple painkiller."
|
||||
reagent_state = LIQUID
|
||||
color = "#C855DC"
|
||||
toxod = TOX_OVERDOSE*2
|
||||
toxod = OVERDOSE
|
||||
addictiveness = 5
|
||||
scannable = 1
|
||||
custom_metabolism = 0.025 // Lasts 10 minutes for 15 units
|
||||
@@ -1184,6 +1168,8 @@ datum
|
||||
..()
|
||||
if (volume > overdose)
|
||||
M.hallucination = max(M.hallucination, 2)
|
||||
..()
|
||||
return
|
||||
|
||||
mutagen
|
||||
name = "Unstable mutagen"
|
||||
@@ -1220,7 +1206,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
addictiveness = 50
|
||||
color = "#C8A5DC"
|
||||
toxod = TOX_OVERDOSE*2
|
||||
toxod = OVERDOSE
|
||||
scannable = 1
|
||||
custom_metabolism = 0.025 // Lasts 10 minutes for 15 units
|
||||
|
||||
@@ -1237,8 +1223,8 @@ datum
|
||||
reagent_state = LIQUID
|
||||
addictiveness = 80
|
||||
color = "#C805DC"
|
||||
toxod = TOX_OVERDOSE
|
||||
oxyod = OXY_OVERDOSE
|
||||
toxod = OVERDOSE/4.5
|
||||
oxyod = OVERDOSE/4.5
|
||||
custom_metabolism = 0.25 // Lasts 10 minutes for 15 units
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -1399,7 +1385,7 @@ datum
|
||||
description = "A compound used to clean things. Now with 50% more sodium hypochlorite!"
|
||||
reagent_state = LIQUID
|
||||
color = "#A5F0EE" // rgb: 165, 240, 238
|
||||
toxod = TOX_OVERDOSE*2
|
||||
toxod = OVERDOSE/2.5
|
||||
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
if(istype(O,/obj/effect/decal/cleanable))
|
||||
@@ -1444,6 +1430,8 @@ datum
|
||||
if(H.shoes.clean_blood())
|
||||
H.update_inv_shoes(0,0)
|
||||
M.clean_blood()
|
||||
..()
|
||||
return
|
||||
|
||||
plantbgone
|
||||
scannable = 1
|
||||
@@ -1452,8 +1440,8 @@ datum
|
||||
description = "A harmful toxic mixture to kill plantlife. Do not ingest!"
|
||||
reagent_state = LIQUID
|
||||
color = "#49002E" // rgb: 73, 0, 46
|
||||
toxod = TOX_OVERDOSE/2
|
||||
burnod = BURN_OVERDOSE/2
|
||||
toxod = OVERDOSE/3
|
||||
burnod = OVERDOSE/3
|
||||
|
||||
// Clear off wallrot fungi
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
@@ -1488,6 +1476,8 @@ datum
|
||||
if(H.dna)
|
||||
if(H.species.flags & IS_PLANT) //plantmen take a LOT of damage
|
||||
H.adjustToxLoss(50)
|
||||
..()
|
||||
return
|
||||
|
||||
plasma
|
||||
name = "Plasma"
|
||||
@@ -1495,7 +1485,7 @@ datum
|
||||
description = "Plasma in its liquid form."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE
|
||||
toxod = OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -1505,7 +1495,7 @@ datum
|
||||
M.adjustToxLoss(2*REM)
|
||||
..()
|
||||
return
|
||||
/* reaction_obj(var/obj/O, var/volume)
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
src = null
|
||||
/*if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg/slime))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/slime/egg = O
|
||||
@@ -1525,13 +1515,14 @@ datum
|
||||
fuel.moles = volume
|
||||
napalm.trace_gases += fuel
|
||||
T.assume_air(napalm)
|
||||
return*/
|
||||
return
|
||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with plasma is stronger than fuel!
|
||||
if(!istype(M, /mob/living))
|
||||
return
|
||||
if(method == TOUCH)
|
||||
M.adjust_fire_stacks(volume / 5)
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
leporazine
|
||||
name = "Leporazine"
|
||||
@@ -1539,8 +1530,8 @@ datum
|
||||
description = "Leporazine can be use to stabilize an individuals body temperature."
|
||||
reagent_state = LIQUID
|
||||
color = "#E9D66B" // rgb: 233, 214, 107
|
||||
toxod = TOX_OVERDOSE
|
||||
burnod = BURN_OVERDOSE
|
||||
toxod = OVERDOSE/1.5
|
||||
burnod = OVERDOSE/1.5
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1557,7 +1548,7 @@ datum
|
||||
description = "Cryptobiolin causes confusion and dizzyness."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFD1DC" // rgb: 255, 209, 220
|
||||
toxod = TOX_OVERDOSE
|
||||
toxod = OVERDOSE/1.5
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1592,8 +1583,8 @@ datum
|
||||
description = "Kelotane is a drug used to treat burns."
|
||||
reagent_state = LIQUID
|
||||
color = "#ECD540" // rgb: 236, 213, 64
|
||||
toxod = TOX_OVERDOSE
|
||||
bruteod = BRUTE_OVERDOSE
|
||||
toxod = OVERDOSE
|
||||
bruteod = OVERDOSE
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(M.stat == 2.0)
|
||||
@@ -1610,8 +1601,8 @@ datum
|
||||
description = "Dermaline is the next step in burn medication. Works twice as good as kelotane and enables the body to restore even the direst heat-damaged tissue."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE/2
|
||||
bruteod = BRUTE_OVERDOSE/2
|
||||
toxod = OVERDOSE/2
|
||||
bruteod = OVERDOSE/2
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
@@ -1629,10 +1620,10 @@ datum
|
||||
description = "Dexalin is used in the treatment of oxygen deprivation."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = 40
|
||||
burnod = 40
|
||||
bruteod = 40
|
||||
oxyod = 40
|
||||
toxod = OVERDOSE
|
||||
burnod = OVERDOSE
|
||||
bruteod = OVERDOSE
|
||||
oxyod = OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
@@ -1656,9 +1647,9 @@ datum
|
||||
description = "Dexalin Plus is used in the treatment of oxygen deprivation. Its highly effective."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE/2
|
||||
burnod = BURN_OVERDOSE
|
||||
oxyod = OXY_OVERDOSE/2
|
||||
toxod = OVERDOSE/3
|
||||
burnod = OVERDOSE/1.5
|
||||
oxyod = OVERDOSE/3
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
@@ -1682,9 +1673,9 @@ datum
|
||||
description = "Tricordrazine is a highly potent stimulant, originally derived from cordrazine. Can be used to treat a wide range of injuries."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE
|
||||
bruteod = BRUTE_OVERDOSE
|
||||
burnod = BURN_OVERDOSE
|
||||
toxod = OVERDOSE
|
||||
bruteod = OVERDOSE
|
||||
burnod = OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
@@ -1705,8 +1696,8 @@ datum
|
||||
description = "Alchdranine is an extremely strange chemical substance that can be used to treat almost any injury with a high level of effectiveness "
|
||||
reagent_state = LIQUID
|
||||
color = "#07a4d1" // rgb: 7, 164, 209
|
||||
toxod = TOX_OVERDOSE/2
|
||||
burnod = BURN_OVERDOSE/2
|
||||
toxod = OVERDOSE/3
|
||||
burnod = OVERDOSE/3
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(M.stat == 2.0)
|
||||
@@ -1720,26 +1711,6 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
anti_toxin
|
||||
name = "Anti-Toxin (Dylovene)"
|
||||
id = "anti_toxin"
|
||||
description = "Dylovene is a broad-spectrum antitoxin."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE
|
||||
oxyod = OXY_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!alien || alien != IS_DIONA)
|
||||
M.reagents.remove_all_type(/datum/reagent/toxin, 1*REM, 0, 1)
|
||||
M.drowsyness = max(M.drowsyness-2*REM, 0)
|
||||
M.hallucination = max(0, M.hallucination - 5*REM)
|
||||
M.adjustToxLoss(-2*REM)
|
||||
..()
|
||||
return
|
||||
|
||||
adminordrazine //An OP chemical for admins
|
||||
name = "Adminordrazine"
|
||||
id = "adminordrazine"
|
||||
@@ -1811,7 +1782,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
custom_metabolism = 0.01
|
||||
toxod = TOX_OVERDOSE
|
||||
toxod = OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -1851,8 +1822,8 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
custom_metabolism = 0.05
|
||||
toxod = TOX_OVERDOSE
|
||||
oxyod = OXY_OVERDOSE
|
||||
toxod = OVERDOSE
|
||||
oxyod = OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -1867,8 +1838,8 @@ datum
|
||||
description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning."
|
||||
reagent_state = LIQUID
|
||||
color = "#BFFF00" // rgb: 191, 255, 0
|
||||
toxod = TOX_OVERDOSE/2
|
||||
burnod = BURN_OVERDOSE/2
|
||||
toxod = OVERDOSE/1.5
|
||||
burnod = OVERDOSE/1.5
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(M.stat == 2.0)
|
||||
@@ -1888,9 +1859,9 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#F77FBE" // rgb: 247, 127, 190
|
||||
custom_metabolism = 0.05
|
||||
toxod = TOX_OVERDOSE/3
|
||||
burnod = BURN_OVERDOSE/3
|
||||
bruteod = BRUTE_OVERDOSE/3
|
||||
toxod = OVERDOSE/4.5
|
||||
burnod = OVERDOSE/4.5
|
||||
bruteod = OVERDOSE/4.5
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -1905,7 +1876,7 @@ datum
|
||||
description = "Heals eye damage"
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE
|
||||
toxod = OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -1928,9 +1899,9 @@ datum
|
||||
description = "Used to encourage recovery of internal organs and nervous systems. Medicate cautiously."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE/3
|
||||
burnod = BURN_OVERDOSE/3
|
||||
bruteod = BRUTE_OVERDOSE/3
|
||||
toxod = OVERDOSE/3
|
||||
burnod = OVERDOSE/3
|
||||
bruteod = OVERDOSE/3
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -1952,7 +1923,7 @@ datum
|
||||
description = "Bicaridine is an analgesic medication and can be used to treat blunt trauma."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
toxod = TOX_OVERDOSE
|
||||
toxod = OVERDOSE/1.5
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
@@ -1970,8 +1941,8 @@ datum
|
||||
description = "Hyperzine is a highly effective, long lasting, muscle stimulant."
|
||||
reagent_state = LIQUID
|
||||
color = "#CCFF00" // rgb: 204, 255, 0
|
||||
toxod = TOX_OVERDOSE
|
||||
burnod = BURN_OVERDOSE
|
||||
toxod = OVERDOSE/1.5
|
||||
burnod = OVERDOSE/1.5
|
||||
custom_metabolism = 0.05
|
||||
addictiveness = 80
|
||||
|
||||
@@ -2020,7 +1991,7 @@ datum
|
||||
description = "A powder derived from fish toxin, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects."
|
||||
reagent_state = SOLID
|
||||
color = "#669900" // rgb: 102, 153, 0
|
||||
toxod = TOX_OVERDOSE
|
||||
toxod = OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -2050,7 +2021,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#228B22" // rgb: 34, 139, 34
|
||||
custom_metabolism = 0.01
|
||||
toxod = TOX_OVERDOSE
|
||||
toxod = OVERDOSE/1.5
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
@@ -2397,7 +2368,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
nutriment_factor = 10 * REAGENTS_METABOLISM
|
||||
color = "#BBEDA4" // rgb: 187, 237, 164
|
||||
toxod = TOX_OVERDOSE/2
|
||||
toxod = OVERDOSE/2
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -2833,8 +2804,7 @@ datum
|
||||
description = "Finely shredded tea leaves, used for making tea."
|
||||
reagent_state = SOLID
|
||||
color = "#7F8400" // rgb: 127, 132, 0
|
||||
|
||||
|
||||
|
||||
//Reagents used for plant fertilizers.
|
||||
toxin/fertilizer
|
||||
name = "fertilizer"
|
||||
@@ -2844,6 +2814,7 @@ datum
|
||||
// toxpwr = 0.2 //It's not THAT poisonous.
|
||||
color = "#664330" // rgb: 102, 67, 48
|
||||
|
||||
|
||||
toxin/fertilizer/eznutrient
|
||||
name = "EZ Nutrient"
|
||||
id = "eznutrient"
|
||||
@@ -3422,7 +3393,7 @@ datum
|
||||
if(!data) data = 1
|
||||
data++
|
||||
M:hallucination += 5
|
||||
if(volume > TOX_OVERDOSE)
|
||||
if(volume > OVERDOSE)
|
||||
M:adjustToxLoss(1)
|
||||
..()
|
||||
return
|
||||
@@ -3442,7 +3413,7 @@ datum
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
..()
|
||||
M.dizziness +=5
|
||||
if(volume > TOX_OVERDOSE)
|
||||
if(volume > OVERDOSE)
|
||||
M:adjustToxLoss(1)
|
||||
return
|
||||
|
||||
@@ -4019,4 +3990,4 @@ datum
|
||||
|
||||
*/
|
||||
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
|
||||
#undef REM
|
||||
#undef REM
|
||||
@@ -152,6 +152,7 @@
|
||||
|
||||
user << "\blue You splash the solution onto [target]."
|
||||
|
||||
|
||||
var/mob/living/M = target
|
||||
|
||||
var/list/injected = list()
|
||||
|
||||
@@ -515,6 +515,15 @@ datum/design/custom_module
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100)
|
||||
build_path = /obj/item/weapon/aiModule/core/full/custom
|
||||
|
||||
datum/design/antimov_module
|
||||
name = "Core Module Design (Antimov)"
|
||||
desc = "Allows for the construction of a Antimov AI Core Module."
|
||||
id = "antimov_module"
|
||||
req_tech = list("programming" = 4, "materials" = 6, "syndicate" = 2)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100)
|
||||
build_path = /obj/item/weapon/aiModule/core/full/antimov
|
||||
|
||||
///////////////////////////////////
|
||||
/////Subspace Telecomms////////////
|
||||
///////////////////////////////////
|
||||
@@ -1764,6 +1773,33 @@ datum/design/mesons
|
||||
materials = list("$metal" = 50, "$glass" = 50)
|
||||
build_path = "/obj/item/clothing/glasses/meson"
|
||||
|
||||
datum/design/miningblueprint1
|
||||
name = "Mining Schematic Disk Version 1"
|
||||
desc = "Contains the schematics for a new range of Pickaxes."
|
||||
id = "miningblueprint1"
|
||||
req_tech = list("materials" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 50, "$glass" = 50)
|
||||
build_path = "/obj/item/weapon/disk/data/schematic/mining1"
|
||||
|
||||
datum/design/miningblueprint2
|
||||
name = "Mining Schematic Disk Version 2"
|
||||
desc = "Contains the schematics for a new line of drills. And a Plasma Cutter. Has the previous level as well."
|
||||
id = "miningblueprint2"
|
||||
req_tech = list("materials" = 5)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 50, "$glass" = 50)
|
||||
build_path = "/obj/item/weapon/disk/data/schematic/mining2"
|
||||
|
||||
datum/design/miningblueprint3
|
||||
name = "Mining Schematic Disk Version 3"
|
||||
desc = "Contains the schematics for a new type of Spacesuit, and schematics for a Jetpack. Has the previous levels as well."
|
||||
id = "miningblueprint3"
|
||||
req_tech = list("materials" = 6)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 50, "$glass" = 50)
|
||||
build_path = "/obj/item/weapon/disk/data/schematic/mining3"
|
||||
|
||||
/////////////////////////////////////////
|
||||
//////////////Blue Space/////////////////
|
||||
/////////////////////////////////////////
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 16 KiB |
+13063
-12926
File diff suppressed because it is too large
Load Diff
@@ -345,6 +345,16 @@ Used In File(s): \code\game\objects\items\devices\PDA\PDA.dm
|
||||
<tr><td><span class="average">{{:value.name}}</span></td><td><span class="average">{{:value.rank}}</span></td><td><span class="average">{{:value.active}}</span></td></tr>
|
||||
{{/if}}
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
{{if data.manifest.supp}}
|
||||
<tr><th colspan="3" class="supp">Support</th></tr>
|
||||
{{for data.manifest["supp"]}}
|
||||
{{if value.rank == "Head of Personnel"}}
|
||||
<tr><td><span class="good">{{:value.name}}</span></td><td><span class="good">{{:value.rank}}</span></td><td><span class="good">{{:value.active}}</span></td></tr>
|
||||
{{else}}
|
||||
<tr><td><span class="average">{{:value.name}}</span></td><td><span class="average">{{:value.rank}}</span></td><td><span class="average">{{:value.active}}</span></td></tr>
|
||||
{{/if}}
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
{{if data.manifest.civ}}
|
||||
<tr><th colspan="3" class="civ">Civilian</th></tr>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,314 @@
|
||||
/* Runtime Condenser by Nodrak
|
||||
* This will sum up identical runtimes into one, giving a total of how many times it occured. The first occurance
|
||||
* of the runtime will log the proc, source, usr and src, the rest will just add to the total. Infinite loops will
|
||||
* also be caught and displayed (if any) above the list of runtimes.
|
||||
*
|
||||
* How to use:
|
||||
* 1) Copy and paste your list of runtimes from Dream Daemon into input.exe
|
||||
* 2) Run RuntimeCondenser.exe
|
||||
* 3) Open output.txt for a condensed report of the runtimes
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
//Make all of these global. It's bad yes, but it's a small program so it really doesn't affect anything.
|
||||
//Because hardcoded numbers are bad :(
|
||||
const unsigned short maxStorage = 99; //100 - 1
|
||||
|
||||
//What we use to read input
|
||||
string currentLine = "Blank";
|
||||
string nextLine = "Blank";
|
||||
|
||||
//Stores lines we want to keep to print out
|
||||
string storedRuntime[maxStorage+1];
|
||||
string storedProc[maxStorage+1];
|
||||
string storedSource[maxStorage+1];
|
||||
string storedUsr[maxStorage+1];
|
||||
string storedSrc[maxStorage+1];
|
||||
|
||||
//Stat tracking stuff for output
|
||||
unsigned int totalRuntimes = 0;
|
||||
unsigned int totalUniqueRuntimes = 0;
|
||||
unsigned int totalInfiniteLoops = 0;
|
||||
unsigned int totalUniqueInfiniteLoops = 0;
|
||||
|
||||
//Misc
|
||||
unsigned int numRuntime[maxStorage+1]; //Number of times a specific runtime has occured
|
||||
bool checkNextLines = false; //Used in case byond has condensed a large number of similar runtimes
|
||||
int storedIterator = 0; //Used to remember where we stored the runtime
|
||||
|
||||
bool readFromFile()
|
||||
{
|
||||
//Open file to read
|
||||
ifstream inputFile("input.txt");
|
||||
|
||||
if(inputFile.is_open())
|
||||
{
|
||||
while(!inputFile.eof()) //Until end of file
|
||||
{
|
||||
//If we've run out of storage
|
||||
if(storedRuntime[maxStorage] != "Blank") break;
|
||||
|
||||
//Update our lines
|
||||
currentLine = nextLine;
|
||||
getline(inputFile, nextLine);
|
||||
|
||||
//After finding a new runtime, check to see if there are extra values to store
|
||||
if(checkNextLines)
|
||||
{
|
||||
//Skip ahead
|
||||
currentLine = nextLine;
|
||||
getline(inputFile, nextLine);
|
||||
|
||||
//If we find this, we have new stuff to store
|
||||
if(nextLine.find("usr:") != std::string::npos)
|
||||
{
|
||||
//Store more info
|
||||
storedSource[storedIterator] = currentLine;
|
||||
storedUsr[storedIterator] = nextLine;
|
||||
|
||||
//Skip ahead again
|
||||
currentLine = nextLine;
|
||||
getline(inputFile, nextLine);
|
||||
|
||||
//Store the last of the info
|
||||
storedSrc[storedIterator] = nextLine;
|
||||
}
|
||||
checkNextLines = false;
|
||||
}
|
||||
|
||||
//Found an infinite loop!
|
||||
if(currentLine.find("Infinite loop suspected") != std::string::npos || currentLine.find("Maximum recursion level reached") != std::string::npos)
|
||||
{
|
||||
totalInfiniteLoops++;
|
||||
|
||||
for(int i=0; i <= maxStorage; i++)
|
||||
{
|
||||
//We've already encountered this
|
||||
if(currentLine == storedRuntime[i])
|
||||
{
|
||||
numRuntime[i]++;
|
||||
break;
|
||||
}
|
||||
|
||||
//We've never encoutnered this
|
||||
if(storedRuntime[i] == "Blank")
|
||||
{
|
||||
storedRuntime[i] = currentLine;
|
||||
currentLine = nextLine;
|
||||
getline(inputFile, nextLine); //Skip the "if this is not an infinite loop" line
|
||||
storedProc[i] = nextLine;
|
||||
numRuntime[i] = 1;
|
||||
checkNextLines = true;
|
||||
storedIterator = i;
|
||||
totalUniqueInfiniteLoops++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Found a runtime!
|
||||
else if(currentLine.find("runtime error:") != std::string::npos)
|
||||
{
|
||||
totalRuntimes++;
|
||||
for(int i=0; i <= maxStorage; i++)
|
||||
{
|
||||
//We've already encountered this
|
||||
if(currentLine == storedRuntime[i])
|
||||
{
|
||||
numRuntime[i]++;
|
||||
break;
|
||||
}
|
||||
|
||||
//We've never encoutnered this
|
||||
if(storedRuntime[i] == "Blank")
|
||||
{
|
||||
storedRuntime[i] = currentLine;
|
||||
storedProc[i] = nextLine;
|
||||
numRuntime[i] = 1;
|
||||
checkNextLines = true;
|
||||
storedIterator = i;
|
||||
totalUniqueRuntimes++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool writeToFile()
|
||||
{
|
||||
//Open and clear the file
|
||||
ofstream outputFile("Output.txt", ios::trunc);
|
||||
|
||||
if(outputFile.is_open())
|
||||
{
|
||||
outputFile << "Note: The proc name, source file, src and usr are all from the FIRST of the identical runtimes. Everything else is cropped.\n\n";
|
||||
if(totalUniqueInfiniteLoops > 0)
|
||||
{
|
||||
outputFile << "Total unique infinite loops: " << totalUniqueInfiniteLoops << endl;
|
||||
}
|
||||
if(totalInfiniteLoops > 0)
|
||||
{
|
||||
outputFile << "Total infinite loops: " << totalInfiniteLoops << endl;
|
||||
}
|
||||
outputFile << "Total unique runtimes: " << totalUniqueRuntimes << endl;
|
||||
outputFile << "Total runtimes: " << totalRuntimes << endl << endl;
|
||||
|
||||
//Display a warning if we've hit the maximum space we've allocated for storage
|
||||
if(totalUniqueRuntimes + totalUniqueInfiniteLoops >= maxStorage)
|
||||
{
|
||||
outputFile << "Warning: The maximum number of unique runtimes has been hit. If there were more, they have been cropped out.\n\n";
|
||||
}
|
||||
|
||||
|
||||
//If we have infinite loops, display them first.
|
||||
if(totalInfiniteLoops > 0)
|
||||
{
|
||||
outputFile << "** Infinite loops **";
|
||||
for(int i=0; i <= maxStorage; i++)
|
||||
{
|
||||
if(storedRuntime[i].find("Infinite loop suspected") != std::string::npos || storedRuntime[i].find("Maximum recursion level reached") != std::string::npos)
|
||||
{
|
||||
if(numRuntime[i] != 0) outputFile << endl << endl << "The following infinite loop has occured " << numRuntime[i] << " time(s).\n";
|
||||
if(storedRuntime[i] != "Blank") outputFile << storedRuntime[i] << endl;
|
||||
if(storedProc[i] != "Blank") outputFile << storedProc[i] << endl;
|
||||
if(storedSource[i] != "Blank") outputFile << storedSource[i] << endl;
|
||||
if(storedUsr[i] != "Blank") outputFile << storedUsr[i] << endl;
|
||||
if(storedSrc[i] != "Blank") outputFile << storedSrc[i] << endl;
|
||||
}
|
||||
}
|
||||
outputFile << endl << endl; //For spacing
|
||||
}
|
||||
|
||||
|
||||
//Do runtimes next
|
||||
outputFile << "** Runtimes **";
|
||||
for(int i=0; i <= maxStorage; i++)
|
||||
{
|
||||
if(storedRuntime[i].find("Infinite loop suspected") != std::string::npos || storedRuntime[i].find("Maximum recursion level reached") != std::string::npos) continue;
|
||||
|
||||
if(numRuntime[i] != 0) outputFile << endl << endl << "The following runtime has occured " << numRuntime[i] << " time(s).\n";
|
||||
if(storedRuntime[i] != "Blank") outputFile << storedRuntime[i] << endl;
|
||||
if(storedProc[i] != "Blank") outputFile << storedProc[i] << endl;
|
||||
if(storedSource[i] != "Blank") outputFile << storedSource[i] << endl;
|
||||
if(storedUsr[i] != "Blank") outputFile << storedUsr[i] << endl;
|
||||
if(storedSrc[i] != "Blank") outputFile << storedSrc[i] << endl;
|
||||
}
|
||||
outputFile.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void sortRuntimes()
|
||||
{
|
||||
string tempRuntime[maxStorage+1];
|
||||
string tempProc[maxStorage+1];
|
||||
string tempSource[maxStorage+1];
|
||||
string tempUsr[maxStorage+1];
|
||||
string tempSrc[maxStorage+1];
|
||||
unsigned int tempNumRuntime[maxStorage+1];
|
||||
unsigned int highestCount = 0; //Used for descending order
|
||||
// int keepLooping = 0;
|
||||
|
||||
//Move all of our data into temporary arrays. Also clear the stored data (not necessary but.. just incase)
|
||||
for(int i=0; i <= maxStorage; i++)
|
||||
{
|
||||
//Get the largest occurance of a single runtime
|
||||
if(highestCount < numRuntime[i])
|
||||
{
|
||||
highestCount = numRuntime[i];
|
||||
}
|
||||
|
||||
tempRuntime[i] = storedRuntime[i]; storedRuntime[i] = "Blank";
|
||||
tempProc[i] = storedProc[i]; storedProc[i] = "Blank";
|
||||
tempSource[i] = storedSource[i]; storedSource[i] = "Blank";
|
||||
tempUsr[i] = storedUsr[i]; storedUsr[i] = "Blank";
|
||||
tempSrc[i] = storedSrc[i]; storedSrc[i] = "Blank";
|
||||
tempNumRuntime[i] = numRuntime[i]; numRuntime[i] = 0;
|
||||
}
|
||||
|
||||
while(highestCount > 0)
|
||||
{
|
||||
for(int i=0; i <= maxStorage; i++) //For every runtime
|
||||
{
|
||||
if(tempNumRuntime[i] == highestCount) //If the number of occurances of that runtime is equal to our current highest
|
||||
{
|
||||
for(int j=0; j <= maxStorage; j++) //Find the next available slot and store the info
|
||||
{
|
||||
if(storedRuntime[j] == "Blank") //Found an empty spot
|
||||
{
|
||||
storedRuntime[j] = tempRuntime[i];
|
||||
storedProc[j] = tempProc[i];
|
||||
storedSource[j] = tempSource[i];
|
||||
storedUsr[j] = tempUsr[i];
|
||||
storedSrc[j] = tempSrc[i];
|
||||
numRuntime[j] = tempNumRuntime[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
highestCount--; //Lower our 'highest' by one and continue
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main() {
|
||||
char exit; //Used to stop the program from immediatly exiting
|
||||
|
||||
//Start everything fresh. "Blank" should never occur in the runtime logs on its own.
|
||||
for(int i=0; i <= maxStorage; i++)
|
||||
{
|
||||
storedRuntime[i] = "Blank";
|
||||
storedProc[i] = "Blank";
|
||||
storedSource[i] = "Blank";
|
||||
storedUsr[i] = "Blank";
|
||||
storedSrc[i] = "Blank";
|
||||
numRuntime[i] = 0;
|
||||
|
||||
}
|
||||
|
||||
if(readFromFile())
|
||||
{
|
||||
cout << "Input read successfully!\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Input failed to open, shutting down.\n";
|
||||
cout << "\nEnter any letter to quit.\n";
|
||||
cin >> exit;
|
||||
return 1;
|
||||
}
|
||||
|
||||
sortRuntimes();
|
||||
|
||||
if(writeToFile())
|
||||
{
|
||||
cout << "Output was successful!\n";
|
||||
cout << "\nEnter any letter to quit.\n";
|
||||
cin >> exit;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "The output file could not be opened, shutting down.\n";
|
||||
cout << "\nEnter any letter to quit.\n";
|
||||
cin >> exit;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
Note: The proc name, source file, src and usr are all from the FIRST of the identical runtimes. Everything else is cropped.
|
||||
|
||||
Total unique runtimes: 2
|
||||
Total runtimes: 2
|
||||
|
||||
** Runtimes **
|
||||
|
||||
The following runtime has occured 1 time(s).
|
||||
runtime error: type mismatch: the plating (107,70,1) (/turf/simulated/floor/plating) += the plating (108,70,1) (/turf/simulated/floor/plating)
|
||||
proc name: IsolateContents (/zone/proc/IsolateContents)
|
||||
source file: ZAS_Zones.dm,747
|
||||
usr: null
|
||||
src: /zone (/zone)
|
||||
|
||||
|
||||
The following runtime has occured 1 time(s).
|
||||
runtime error: Cannot read null.len
|
||||
proc name: Rebuild (/zone/proc/Rebuild)
|
||||
source file: ZAS_Zones.dm,669
|
||||
usr: null
|
||||
src: /zone (/zone)
|
||||
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnstandardnessTestForDM", "UnstandardnessTestForDM\UnstandardnessTestForDM.csproj", "{A0EEBFC9-41D4-474D-853D-126AFDFB82DE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A0EEBFC9-41D4-474D-853D-126AFDFB82DE}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{A0EEBFC9-41D4-474D-853D-126AFDFB82DE}.Debug|x86.Build.0 = Debug|x86
|
||||
{A0EEBFC9-41D4-474D-853D-126AFDFB82DE}.Release|x86.ActiveCfg = Release|x86
|
||||
{A0EEBFC9-41D4-474D-853D-126AFDFB82DE}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Binary file not shown.
@@ -0,0 +1,160 @@
|
||||
namespace UnstandardnessTestForDM
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.listBox2 = new System.Windows.Forms.ListBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(12, 12);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(222, 23);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "Locate all #defines";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.Location = new System.Drawing.Point(12, 82);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(696, 160);
|
||||
this.listBox1.TabIndex = 1;
|
||||
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel1.Controls.Add(this.listBox2);
|
||||
this.panel1.Controls.Add(this.label4);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Location = new System.Drawing.Point(12, 297);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(696, 244);
|
||||
this.panel1.TabIndex = 2;
|
||||
//
|
||||
// listBox2
|
||||
//
|
||||
this.listBox2.FormattingEnabled = true;
|
||||
this.listBox2.Location = new System.Drawing.Point(8, 71);
|
||||
this.listBox2.Name = "listBox2";
|
||||
this.listBox2.Size = new System.Drawing.Size(683, 160);
|
||||
this.listBox2.TabIndex = 4;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(5, 55);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(69, 13);
|
||||
this.label4.TabIndex = 3;
|
||||
this.label4.Text = "Referenced: ";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(5, 42);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(40, 13);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Value: ";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(5, 29);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(61, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Defined in: ";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label1.Location = new System.Drawing.Point(3, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(79, 29);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(9, 38);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(81, 13);
|
||||
this.label5.TabIndex = 3;
|
||||
this.label5.Text = "Files searched: ";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(720, 553);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.listBox1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Unstandardness Test For DM";
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
public System.Windows.Forms.ListBox listBox2;
|
||||
public System.Windows.Forms.Label label5;
|
||||
public System.Windows.Forms.ListBox listBox1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,484 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
namespace UnstandardnessTestForDM
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
DMSource source;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
source = new DMSource();
|
||||
source.mainform = this;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
source.find_all_defines();
|
||||
generate_define_report();
|
||||
}
|
||||
|
||||
public void generate_define_report()
|
||||
{
|
||||
|
||||
TextWriter tw = new StreamWriter("DEFINES REPORT.txt");
|
||||
|
||||
tw.WriteLine("Unstandardness Test For DM report for DEFINES");
|
||||
tw.WriteLine("Generated on " + DateTime.Now);
|
||||
tw.WriteLine("Total number of defines " + source.defines.Count());
|
||||
tw.WriteLine("Total number of Files " + source.filessearched);
|
||||
tw.WriteLine("Total number of references " + source.totalreferences);
|
||||
tw.WriteLine("Total number of errorous defines " + source.errordefines);
|
||||
tw.WriteLine("------------------------------------------------");
|
||||
|
||||
foreach (Define d in source.defines)
|
||||
{
|
||||
tw.WriteLine(d.name);
|
||||
tw.WriteLine("\tValue: " + d.value);
|
||||
tw.WriteLine("\tComment: " + d.comment);
|
||||
tw.WriteLine("\tDefined in: " + d.location + " : " + d.line);
|
||||
tw.WriteLine("\tNumber of references: " + d.references.Count());
|
||||
foreach (String s in d.references)
|
||||
{
|
||||
tw.WriteLine("\t\t" + s);
|
||||
}
|
||||
}
|
||||
|
||||
tw.WriteLine("------------------------------------------------");
|
||||
tw.WriteLine("SUCCESS");
|
||||
|
||||
tw.Close();
|
||||
|
||||
}
|
||||
|
||||
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Define d = (Define)listBox1.Items[listBox1.SelectedIndex];
|
||||
label1.Text = d.name;
|
||||
label2.Text = "Defined in: " + d.location + " : " + d.line;
|
||||
label3.Text = "Value: " + d.value;
|
||||
label4.Text = "References: " + d.references.Count();
|
||||
listBox2.Items.Clear();
|
||||
foreach (String s in d.references)
|
||||
{
|
||||
listBox2.Items.Add(s);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex) { Console.WriteLine("ERROR HERE: " + ex.Message); }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class DMSource
|
||||
{
|
||||
public List<Define> defines;
|
||||
public const int FLAG_DEFINE = 1;
|
||||
public Form1 mainform;
|
||||
|
||||
public int filessearched = 0;
|
||||
public int totalreferences = 0;
|
||||
public int errordefines = 0;
|
||||
|
||||
public List<String> filenames;
|
||||
|
||||
public DMSource()
|
||||
{
|
||||
defines = new List<Define>();
|
||||
filenames = new List<String>();
|
||||
}
|
||||
|
||||
public void find_all_defines()
|
||||
{
|
||||
find_all_files();
|
||||
foreach(String filename in filenames){
|
||||
searchFileForDefines(filename);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void find_all_files()
|
||||
{
|
||||
filenames = new List<String>();
|
||||
String dmefilename = "";
|
||||
|
||||
foreach (string f in Directory.GetFiles("."))
|
||||
{
|
||||
if (f.ToLower().EndsWith(".dme"))
|
||||
{
|
||||
dmefilename = f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dmefilename.Equals(""))
|
||||
{
|
||||
MessageBox.Show("dme file not found");
|
||||
return;
|
||||
}
|
||||
|
||||
using (var reader = File.OpenText(dmefilename))
|
||||
{
|
||||
String s;
|
||||
while (true)
|
||||
{
|
||||
s = reader.ReadLine();
|
||||
|
||||
if (!(s is String))
|
||||
break;
|
||||
|
||||
if (s.StartsWith("#include"))
|
||||
{
|
||||
int start = s.IndexOf("\"")+1;
|
||||
s = s.Substring(start, s.Length - 11);
|
||||
|
||||
if (s.EndsWith(".dm"))
|
||||
{
|
||||
filenames.Add(s);
|
||||
}
|
||||
}
|
||||
|
||||
s = s.Trim(' ');
|
||||
if (s == "") { continue; }
|
||||
}
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void DirSearch(string sDir, int flag)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (string d in Directory.GetDirectories(sDir))
|
||||
{
|
||||
foreach (string f in Directory.GetFiles(d))
|
||||
{
|
||||
if (f.ToLower().EndsWith(".dm"))
|
||||
{
|
||||
if ((flag & FLAG_DEFINE) > 0)
|
||||
{
|
||||
searchFileForDefines(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
DirSearch(d, flag);
|
||||
}
|
||||
}
|
||||
catch (System.Exception excpt)
|
||||
{
|
||||
Console.WriteLine("ERROR IN DIRSEARCH");
|
||||
Console.WriteLine(excpt.Message);
|
||||
Console.WriteLine(excpt.Data);
|
||||
Console.WriteLine(excpt.ToString());
|
||||
Console.WriteLine(excpt.StackTrace);
|
||||
Console.WriteLine("END OF ERROR IN DIRSEARCH");
|
||||
}
|
||||
}
|
||||
|
||||
//DEFINES
|
||||
public void searchFileForDefines(String fileName)
|
||||
{
|
||||
filessearched++;
|
||||
FileInfo f = new FileInfo(fileName);
|
||||
List<String> lines = new List<String>();
|
||||
List<String> lines_without_comments = new List<String>();
|
||||
|
||||
mainform.label5.Text = "Files searched: " + filessearched + "; Defines found: " + defines.Count() + "; References found: " + totalreferences + "; Errorous defines: " + errordefines;
|
||||
mainform.label5.Refresh();
|
||||
|
||||
//This code segment reads the file and stores it into the lines variable.
|
||||
using (var reader = File.OpenText(fileName))
|
||||
{
|
||||
try
|
||||
{
|
||||
String s;
|
||||
while (true)
|
||||
{
|
||||
s = reader.ReadLine();
|
||||
lines.Add(s);
|
||||
s = s.Trim(' ');
|
||||
if (s == "") { continue; }
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
reader.Close();
|
||||
}
|
||||
|
||||
mainform.listBox1.Items.Add("ATTEMPTING: " + fileName);
|
||||
lines_without_comments = remove_comments(lines);
|
||||
|
||||
/*TextWriter tw = new StreamWriter(fileName);
|
||||
foreach (String s in lines_without_comments)
|
||||
{
|
||||
tw.WriteLine(s);
|
||||
}
|
||||
tw.Close();
|
||||
mainform.listBox1.Items.Add("REWRITE: "+fileName);*/
|
||||
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < lines_without_comments.Count; i++)
|
||||
{
|
||||
String line = lines_without_comments[i];
|
||||
|
||||
if (!(line is string))
|
||||
continue;
|
||||
|
||||
//Console.WriteLine("LINE: " + line);
|
||||
|
||||
foreach (Define define in defines)
|
||||
{
|
||||
|
||||
if (line.IndexOf(define.name) >= 0)
|
||||
{
|
||||
define.references.Add(fileName + " : " + i);
|
||||
totalreferences++;
|
||||
}
|
||||
}
|
||||
|
||||
if( line.ToLower().IndexOf("#define") >= 0 )
|
||||
{
|
||||
line = line.Trim();
|
||||
line = line.Replace('\t', ' ');
|
||||
//Console.WriteLine("LINE = "+line);
|
||||
String[] slist = line.Split(' ');
|
||||
if(slist.Length >= 3){
|
||||
//slist[0] has the value of "#define"
|
||||
String name = slist[1];
|
||||
String value = slist[2];
|
||||
|
||||
for (int j = 3; j < slist.Length; j++)
|
||||
{
|
||||
value += " " + slist[j];
|
||||
//Console.WriteLine("LISTITEM["+j+"] = "+slist[j]);
|
||||
}
|
||||
|
||||
value = value.Trim();
|
||||
|
||||
String comment = "";
|
||||
|
||||
if (value.IndexOf("//") >= 0)
|
||||
{
|
||||
comment = value.Substring(value.IndexOf("//"));
|
||||
value = value.Substring(0, value.IndexOf("//"));
|
||||
}
|
||||
|
||||
comment = comment.Trim();
|
||||
value = value.Trim();
|
||||
|
||||
Define d = new Define(fileName,i,name,value,comment);
|
||||
defines.Add(d);
|
||||
mainform.listBox1.Items.Add(d);
|
||||
mainform.listBox1.Refresh();
|
||||
}else{
|
||||
Define d = new Define(fileName, i, "ERROR ERROR", "Something went wrong here", line);
|
||||
errordefines++;
|
||||
defines.Add(d);
|
||||
mainform.listBox1.Items.Add(d);
|
||||
mainform.listBox1.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
Console.WriteLine(e.Message);
|
||||
Console.WriteLine(e.StackTrace);
|
||||
MessageBox.Show("Exception: " + e.Message + " | " + e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
bool iscomment = false;
|
||||
int ismultilinecomment = 0;
|
||||
bool isstring = false;
|
||||
bool ismultilinestring = false;
|
||||
int escapesequence = 0;
|
||||
int stringvar = 0;
|
||||
|
||||
public List<String> remove_comments(List<String> lines)
|
||||
{
|
||||
List<String> r = new List<String>();
|
||||
|
||||
iscomment = false;
|
||||
ismultilinecomment = 0;
|
||||
isstring = false;
|
||||
ismultilinestring = false;
|
||||
|
||||
bool skiponechar = false; //Used so the / in */ doesn't get written;
|
||||
|
||||
for (int i = 0; i < lines.Count(); i++)
|
||||
{
|
||||
|
||||
String line = lines[i];
|
||||
|
||||
if (!(line is String))
|
||||
continue;
|
||||
|
||||
iscomment = false;
|
||||
isstring = false;
|
||||
char ca = ' ';
|
||||
escapesequence = 0;
|
||||
|
||||
String newline = "";
|
||||
|
||||
int k = line.Length;
|
||||
|
||||
for (int j = 0; j < k; j++)
|
||||
{
|
||||
|
||||
char c = line.ToCharArray()[j];
|
||||
|
||||
if (escapesequence == 0)
|
||||
if (normalstatus())
|
||||
{
|
||||
if (ca == '/' && c == '/')
|
||||
{
|
||||
c = ' ';
|
||||
iscomment = true;
|
||||
|
||||
newline = newline.Remove(newline.Length - 1);
|
||||
k = line.Length;
|
||||
}
|
||||
if (ca == '/' && c == '*')
|
||||
{
|
||||
c = ' ';
|
||||
ismultilinecomment = 1;
|
||||
newline = newline.Remove(newline.Length - 1);
|
||||
k = line.Length;
|
||||
}
|
||||
if (c == '"')
|
||||
{
|
||||
isstring = true;
|
||||
}
|
||||
if (ca == '{' && c == '"')
|
||||
{
|
||||
ismultilinestring = true;
|
||||
}
|
||||
}
|
||||
else if (isstring)
|
||||
{
|
||||
|
||||
if (c == '\\')
|
||||
{
|
||||
escapesequence = 2;
|
||||
}
|
||||
else if (stringvar > 0)
|
||||
{
|
||||
if (c == ']')
|
||||
{
|
||||
stringvar--;
|
||||
}
|
||||
else if (c == '[')
|
||||
{
|
||||
stringvar++;
|
||||
}
|
||||
}
|
||||
else if (c == '"')
|
||||
{
|
||||
isstring = false;
|
||||
}
|
||||
else if (c == '[')
|
||||
{
|
||||
stringvar++;
|
||||
}
|
||||
}
|
||||
else if (ismultilinestring)
|
||||
{
|
||||
if (ca == '"' && c == '}')
|
||||
{
|
||||
ismultilinestring = false;
|
||||
}
|
||||
}
|
||||
else if (ismultilinecomment > 0)
|
||||
{
|
||||
if (ca == '/' && c == '*')
|
||||
{
|
||||
c = ' '; //These things are here to prevent /*/ from bieng interpreted as the start and end of a comment.
|
||||
skiponechar = true;
|
||||
ismultilinecomment++;
|
||||
}
|
||||
if (ca == '*' && c == '/')
|
||||
{
|
||||
c = ' '; //These things are here to prevent /*/ from bieng interpreted as the start and end of a comment.
|
||||
skiponechar = true;
|
||||
ismultilinecomment--;
|
||||
}
|
||||
}
|
||||
|
||||
if (!iscomment && (ismultilinecomment==0) && !skiponechar)
|
||||
{
|
||||
newline += c;
|
||||
}
|
||||
|
||||
if (skiponechar)
|
||||
{
|
||||
skiponechar = false;
|
||||
}
|
||||
if (escapesequence > 0)
|
||||
{
|
||||
escapesequence--;
|
||||
}
|
||||
else
|
||||
{
|
||||
ca = c;
|
||||
}
|
||||
}
|
||||
|
||||
r.Add(newline.TrimEnd());
|
||||
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
private bool normalstatus()
|
||||
{
|
||||
return !isstring && !ismultilinestring && (ismultilinecomment==0) && !iscomment && (escapesequence == 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class Define
|
||||
{
|
||||
public String location;
|
||||
public int line;
|
||||
public String name;
|
||||
public String value;
|
||||
public String comment;
|
||||
public List<String> references;
|
||||
|
||||
public Define(String location, int line, String name, String value, String comment)
|
||||
{
|
||||
this.location = location;
|
||||
this.line = line;
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.comment = comment;
|
||||
this.references = new List<String>();
|
||||
}
|
||||
|
||||
public override String ToString()
|
||||
{
|
||||
return "DEFINE: \""+name+"\" is defined as \""+value+"\" AT "+location+" : "+line;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace UnstandardnessTestForDM
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("UnstandardnessTestForDM")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("UnstandardnessTestForDM")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("c0e09000-1840-4416-8bb2-d86a8227adf1")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.239
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace UnstandardnessTestForDM.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UnstandardnessTestForDM.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.239
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace UnstandardnessTestForDM.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{A0EEBFC9-41D4-474D-853D-126AFDFB82DE}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>UnstandardnessTestForDM</RootNamespace>
|
||||
<AssemblyName>UnstandardnessTestForDM</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+18
@@ -0,0 +1,18 @@
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.exe
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.pdb
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\ResolveAssemblyReference.cache
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.Form1.resources
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.Properties.Resources.resources
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\GenerateResource.read.1.tlog
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\GenerateResource.write.1.tlog
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.exe
|
||||
c:\users\baloh\documents\visual studio 2010\Projects\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.pdb
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.exe
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\bin\Debug\UnstandardnessTestForDM.pdb
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\ResolveAssemblyReference.cache
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.Form1.resources
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.Properties.Resources.resources
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\GenerateResource.read.1.tlog
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\GenerateResource.write.1.tlog
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.exe
|
||||
C:\Users\Baloh\Desktop\tgs13\tools\UnstandardnessTestForDM\UnstandardnessTestForDM\obj\x86\Debug\UnstandardnessTestForDM.pdb
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
set MAPFILE=cyberiad.dmm
|
||||
|
||||
cd ../../maps
|
||||
copy %MAPFILE% %MAPFILE%.backup
|
||||
|
||||
pause
|
||||
@@ -0,0 +1,5 @@
|
||||
set MAPFILE=cyberiad.dmm
|
||||
|
||||
java -jar MapPatcher.jar -clean ../../maps/%MAPFILE%.backup ../../maps/%MAPFILE% ../../maps/%MAPFILE%
|
||||
|
||||
pause
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
MAPFILE='cyberiad.dmm'
|
||||
|
||||
git show HEAD:maps/$MAPFILE > tmp.dmm
|
||||
java -jar MapPatcher.jar -clean tmp.dmm '../../maps/'$MAPFILE '../../maps/'$MAPFILE
|
||||
rm tmp.dmm
|
||||
@@ -0,0 +1,17 @@
|
||||
1. Install java(http://www.java.com/en/download/index.jsp)
|
||||
2. Make sure java is in your PATH. To test this, open git bash, and type "java". If it says unknown command, you need to add JAVA/bin to your PATH variable (A guide for this can be found at https://www.java.com/en/download/help/path.xml ).
|
||||
|
||||
Committing
|
||||
1. Before starting to edit the map, double-click "prepare_map.bat" in the tools/mapmerge/ directory.
|
||||
2. After finishing your edit, and before your commit, double-click "clean_map.bat" in the tools/mapmerge/ directory.
|
||||
|
||||
This will make sure in the new version of your map, no paths are needlessly changed, thus instead of 8000 lines changed you'll get 50 lines changed. This not only reduces size of your commit, it also makes it possible to get an overview of your map changes on the "files changed" page in your pull request.
|
||||
|
||||
Merging
|
||||
The easiest way to do merging is to install the merge driver. For this, open `Baystation12/.git/config` in a text editor, and paste the following lines to the end of it:
|
||||
|
||||
[merge "merge-dmm"]
|
||||
name = mapmerge driver
|
||||
driver = ./tools/mapmerge/mapmerge.sh %O %A %B
|
||||
|
||||
After this, merging maps should happen automagically unless there are conflicts(a tile that both you and someone else changed). If there are conflicts, you will unfortunately still be stuck with opening both versions in a map editor, and manually resolving the issues.
|
||||
@@ -0,0 +1,9 @@
|
||||
java -jar tools/mapmerge/MapPatcher.jar -merge $1 $2 $3 $2
|
||||
if [ "$?" -gt 0 ]
|
||||
then
|
||||
echo "Unable to automatically resolve map conflicts, please merge manually."
|
||||
exit 1
|
||||
fi
|
||||
java -jar tools/mapmerge/MapPatcher.jar -clean $1 $2 $2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C# Express 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "midi2piano", "midi2piano\midi2piano.csproj", "{68C84B61-F710-491C-BEE8-5E362C167897}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|x86.Build.0 = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|x86.ActiveCfg = Release|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Binary file not shown.
+135
@@ -0,0 +1,135 @@
|
||||
namespace midi2piano
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.OutputTxt = new System.Windows.Forms.TextBox();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.importMIDIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.importDlg = new System.Windows.Forms.OpenFileDialog();
|
||||
this.halpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OutputTxt
|
||||
//
|
||||
this.OutputTxt.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.OutputTxt.Location = new System.Drawing.Point(0, 24);
|
||||
this.OutputTxt.Multiline = true;
|
||||
this.OutputTxt.Name = "OutputTxt";
|
||||
this.OutputTxt.ReadOnly = true;
|
||||
this.OutputTxt.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.OutputTxt.Size = new System.Drawing.Size(284, 240);
|
||||
this.OutputTxt.TabIndex = 0;
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.copyToolStripMenuItem,
|
||||
this.halpToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(284, 24);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.importMIDIToolStripMenuItem,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// importMIDIToolStripMenuItem
|
||||
//
|
||||
this.importMIDIToolStripMenuItem.Name = "importMIDIToolStripMenuItem";
|
||||
this.importMIDIToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||
this.importMIDIToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.importMIDIToolStripMenuItem.Text = "&Import MIDI...";
|
||||
this.importMIDIToolStripMenuItem.Click += new System.EventHandler(this.importMIDIToolStripMenuItem_Click);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// copyToolStripMenuItem
|
||||
//
|
||||
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
|
||||
this.copyToolStripMenuItem.Size = new System.Drawing.Size(47, 20);
|
||||
this.copyToolStripMenuItem.Text = "&Copy";
|
||||
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
|
||||
//
|
||||
// importDlg
|
||||
//
|
||||
this.importDlg.Filter = "MIDI File|*.midi;*.mid";
|
||||
//
|
||||
// halpToolStripMenuItem
|
||||
//
|
||||
this.halpToolStripMenuItem.Name = "halpToolStripMenuItem";
|
||||
this.halpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.halpToolStripMenuItem.Text = "&Halp";
|
||||
this.halpToolStripMenuItem.Click += new System.EventHandler(this.halpToolStripMenuItem_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 264);
|
||||
this.Controls.Add(this.OutputTxt);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "Form1";
|
||||
this.Text = "MIDI2Piano";
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox OutputTxt;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem importMIDIToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.OpenFileDialog importDlg;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem halpToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,298 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Sanford.Multimedia;
|
||||
using Sanford.Multimedia.Midi;
|
||||
|
||||
namespace midi2piano
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
struct PNote
|
||||
{
|
||||
public float Length;
|
||||
public string Note;
|
||||
|
||||
public PNote(float length, string note)
|
||||
{
|
||||
Length = length;
|
||||
Note = note;
|
||||
}
|
||||
|
||||
public static readonly PNote Default = new PNote(0, "");
|
||||
}
|
||||
|
||||
private void importMIDIToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (importDlg.ShowDialog(this)
|
||||
== System.Windows.Forms.DialogResult.Cancel)
|
||||
return;
|
||||
|
||||
List<PNote> notes = new List<PNote>();
|
||||
PNote curNote = PNote.Default;
|
||||
float tempo = 1;
|
||||
float timeSig = 4f;
|
||||
|
||||
// first, we pull midi data
|
||||
Sequence s = new Sequence(importDlg.FileName);
|
||||
|
||||
// quickly see if there's a piano track first
|
||||
// and get the tempo as well
|
||||
int piano = -1;
|
||||
for (int it = 0; it < s.Count; it++)
|
||||
{
|
||||
Track t = s[it];
|
||||
foreach (MidiEvent me in t.Iterator())
|
||||
{
|
||||
switch (me.MidiMessage.MessageType)
|
||||
{
|
||||
case MessageType.Channel:
|
||||
{
|
||||
ChannelMessage m = (ChannelMessage)me.MidiMessage;
|
||||
if (m.Command == ChannelCommand.ProgramChange)
|
||||
if ((GeneralMidiInstrument)m.Data1 == GeneralMidiInstrument.AcousticGrandPiano)
|
||||
{
|
||||
piano = it;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MessageType.Meta:
|
||||
{
|
||||
MetaMessage m = (MetaMessage)me.MidiMessage;
|
||||
if (m.MetaType == MetaType.Tempo)
|
||||
tempo = (new TempoChangeBuilder(m)).Tempo;
|
||||
else if (m.MetaType == MetaType.TimeSignature)
|
||||
timeSig = new TimeSignatureBuilder(m).Denominator;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (piano >= 0)
|
||||
break;
|
||||
}
|
||||
if (piano >= 0)
|
||||
break;
|
||||
}
|
||||
|
||||
// didn't find one, so just try 0th track anyway
|
||||
if (piano == -1)
|
||||
piano = 0;
|
||||
|
||||
// now, pull all notes (and tempo)
|
||||
// and make sure it's a channel that has content
|
||||
for (int it = piano; it < s.Count; it++)
|
||||
{
|
||||
Track t = s[it];
|
||||
|
||||
int delta = 0;
|
||||
foreach (MidiEvent me in t.Iterator())
|
||||
{
|
||||
delta += me.DeltaTicks;
|
||||
|
||||
switch (me.MidiMessage.MessageType)
|
||||
{
|
||||
case MessageType.Channel:
|
||||
{
|
||||
ChannelMessage m = (ChannelMessage)me.MidiMessage;
|
||||
switch (m.Command)
|
||||
{
|
||||
case ChannelCommand.NoteOn:
|
||||
if (curNote.Note != "")
|
||||
{
|
||||
curNote.Length = delta / 1000F;
|
||||
delta = 0;
|
||||
notes.Add(curNote);
|
||||
}
|
||||
|
||||
curNote.Note = note2Piano(m.Data1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MessageType.Meta:
|
||||
{
|
||||
MetaMessage m = (MetaMessage)me.MidiMessage;
|
||||
if (m.MetaType == MetaType.Tempo)
|
||||
tempo = (new TempoChangeBuilder(m)).Tempo;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// make sure we get last note
|
||||
if (curNote.Note != "")
|
||||
{
|
||||
curNote.Length = delta / 1000F;
|
||||
notes.Add(curNote);
|
||||
}
|
||||
|
||||
// we found a track with content!
|
||||
if (notes.Count > 0)
|
||||
break;
|
||||
}
|
||||
|
||||
// compress redundant accidentals/octaves
|
||||
char[] notemods = new char[7];
|
||||
int[] noteocts = new int[7];
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
notemods[i] = 'n';
|
||||
noteocts[i] = 3;
|
||||
}
|
||||
for (int i = 0; i < notes.Count; i++)
|
||||
{
|
||||
string noteStr = notes[i].Note;
|
||||
int cur_note = noteStr[0] - 0x41;
|
||||
char mod = noteStr[1];
|
||||
int oct = int.Parse(noteStr.Substring(2));
|
||||
|
||||
noteStr = noteStr.Substring(0, 1);
|
||||
if (mod != notemods[cur_note])
|
||||
{
|
||||
noteStr += new string(mod, 1);
|
||||
notemods[cur_note] = mod;
|
||||
}
|
||||
if (oct != noteocts[cur_note])
|
||||
{
|
||||
noteStr += oct.ToString();
|
||||
noteocts[cur_note] = oct;
|
||||
}
|
||||
|
||||
notes[i] = new PNote(notes[i].Length, noteStr);
|
||||
}
|
||||
|
||||
// now, we find what the "beat" length should be,
|
||||
// by counting numbers of times for each length, and finding statistical mode
|
||||
Dictionary<float, int> scores = new Dictionary<float, int>();
|
||||
foreach (PNote n in notes)
|
||||
{
|
||||
if (n.Length != 0)
|
||||
if (scores.Keys.Contains(n.Length))
|
||||
scores[n.Length]++;
|
||||
else
|
||||
scores.Add(n.Length, 1);
|
||||
}
|
||||
float winner = 1;
|
||||
int score = 0;
|
||||
foreach (KeyValuePair<float, int> kv in scores)
|
||||
{
|
||||
if (kv.Value > score)
|
||||
{
|
||||
winner = kv.Key;
|
||||
score = kv.Value;
|
||||
}
|
||||
}
|
||||
// realign all of them to match beat length
|
||||
for (int i = 0; i < notes.Count; i++)
|
||||
{
|
||||
notes[i] = new PNote(notes[i].Length / winner, notes[i].Note);
|
||||
}
|
||||
|
||||
// compress chords down
|
||||
for (int i = 0; i < notes.Count; i++)
|
||||
{
|
||||
if (notes[i].Length == 0 && i < notes.Count - 1)
|
||||
{
|
||||
notes[i + 1] = new PNote(notes[i + 1].Length, notes[i].Note + "-" + notes[i + 1].Note);
|
||||
notes.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
// add in time
|
||||
for (int i = 0; i < notes.Count; i++)
|
||||
{
|
||||
float len = notes[i].Length;
|
||||
notes[i] = new PNote(len, notes[i].Note + (len != 1 ? "/" + (1 / len).ToString("0.##") : ""));
|
||||
}
|
||||
|
||||
// what is the bpm, anyway?
|
||||
int rpm = (int)(28800000 / tempo / winner); // 60 * 1,000,000 * .48 the .48 is because note lengths for some reason midi makes the beat note be .48 long
|
||||
|
||||
// now, output!
|
||||
string line = "";
|
||||
string output = "";
|
||||
int lineCount = 1;
|
||||
foreach (PNote n in notes)
|
||||
{
|
||||
if (line.Length + n.Note.Length + 1 > 51)
|
||||
{
|
||||
output += line.Substring(0, line.Length - 1) + "\r\n";
|
||||
line = "";
|
||||
if (lineCount == 50)
|
||||
break;
|
||||
lineCount++;
|
||||
}
|
||||
line += n.Note + ",";
|
||||
}
|
||||
if (line.Length > 0)
|
||||
output += line.Substring(0, line.Length - 1);
|
||||
OutputTxt.Text = "BPM: " + rpm.ToString() + "\r\n" + output;
|
||||
OutputTxt.SelectAll();
|
||||
}
|
||||
|
||||
public enum NoteNames
|
||||
{
|
||||
C = 0,
|
||||
D = 2,
|
||||
E = 4,
|
||||
F = 5,
|
||||
G = 7,
|
||||
A = 9,
|
||||
B = 11
|
||||
}
|
||||
|
||||
string note2Piano(int n)
|
||||
{
|
||||
string name, arg, octave;
|
||||
name = Enum.GetName(typeof(NoteNames), (NoteNames)(n % 12));
|
||||
if (name == null)
|
||||
{
|
||||
name = Enum.GetName(typeof(NoteNames), (NoteNames)((n + 1) % 12));
|
||||
arg = "b";
|
||||
}
|
||||
else
|
||||
{
|
||||
arg = "n";
|
||||
}
|
||||
octave = (n / 12 - 1).ToString();
|
||||
|
||||
return name + arg + octave;
|
||||
}
|
||||
|
||||
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OutputTxt.SelectAll();
|
||||
OutputTxt.Copy();
|
||||
}
|
||||
|
||||
private void halpToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show(this,
|
||||
"This program prefers MIDIs that have a single track, otherwise it picks the first piano track it finds, else the first track. Songs with odd tempos may have their BPM's calculated wrong.",
|
||||
"Halp", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="importDlg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("midi2piano")]
|
||||
[assembly: AssemblyProduct("midi2piano")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type. Only Windows
|
||||
// assemblies support COM.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// On Windows, the following GUID is for the ID of the typelib if this
|
||||
// project is exposed to COM. On other platforms, it unique identifies the
|
||||
// title storage container when deploying this assembly to the device.
|
||||
[assembly: Guid("9752c562-edc1-40da-8fa1-619df747e0f3")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>midi2piano</RootNamespace>
|
||||
<AssemblyName>midi2piano</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\x86\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\x86\Release</OutputPath>
|
||||
<DefineConstants>TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Sanford.Multimedia.Midi, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>.\Sanford.Multimedia.Midi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user