Merge remote-tracking branch 'remotes/git-svn' into bs12_with_tgport

Conflicts:
	code/ATMOSPHERICS/pipes.dm
	code/datums/organs/organ_external.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/gamemodes/events.dm
	code/game/gamemodes/events/ninja_equipment.dm
	code/game/hud.dm
	code/game/jobs/job/captain.dm
	code/game/machinery/atmoalter/area_atmos_computer.dm
	code/game/machinery/recharger.dm
	code/game/objects/hud.dm
	code/game/turfs/turf.dm
	code/modules/client/client defines.dm
	code/modules/clothing/head/misc.dm
	code/modules/clothing/spacesuits/rig.dm
	code/modules/clothing/under/miscellaneous.dm
	code/modules/mob/living/carbon/alien/humanoid/hud.dm
	code/modules/mob/living/carbon/human/hud.dm
	code/modules/mob/living/carbon/human/update_icons.dm
	code/modules/mob/living/carbon/monkey/hud.dm
	code/modules/mob/mob_cleanup.dm
	code/modules/mob/mob_defines.dm
	code/modules/mob/mob_helpers.dm
	code/modules/mob/mob_movement.dm
	code/modules/mob/screen.dm
	code/modules/paperwork/filingcabinet.dm
	code/modules/power/cable_heavyduty.dm
	code/modules/projectiles/guns/energy/temperature.dm
	code/setup.dm
	config/game_options.txt
	icons/mob/screen1_Midnight.dmi
	icons/mob/screen1_Orange.dmi
	icons/mob/screen1_alien.dmi
	icons/mob/screen1_old.dmi
	icons/obj/atmospherics/passive_gate.dmi
	icons/obj/pipe-item.dmi
	interface/interface.dm
This commit is contained in:
Cael_Aislinn
2012-10-05 22:21:26 +10:00
186 changed files with 15013 additions and 14777 deletions
@@ -201,7 +201,7 @@
return
/obj/structure/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(istype(O, /obj/screen) || istype(O, /obj/hud)) //fix for HUD elements making their way into the world -Pete
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
return
if(O.loc == user)
return
+119 -45
View File
@@ -1,8 +1,28 @@
/obj/structure/falsewall
name = "wall"
anchored = 1
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
/obj/structure/falsewall/New()
relativewall_neighbours()
..()
/obj/structure/falsewall/Del()
var/temploc = src.loc
spawn(10)
for(var/turf/simulated/wall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falserwall/W in range(temploc,1))
W.relativewall()
..()
/obj/structure/falsewall/gold
name = "gold wall"
desc = "A wall with gold plating. Swag"
@@ -63,6 +83,33 @@
anchored = 1
var/mineral = "metal"
/obj/structure/falserwall/New()
relativewall_neighbours()
..()
/obj/structure/falsewall/relativewall()
if(!density)
icon_state = "[mineral]fwall_open"
return
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
for(var/obj/structure/falserwall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
icon_state = "[mineral][junction]"
return
/obj/structure/falsewall/attack_hand(mob/user as mob)
if(density)
// Open wall
@@ -92,29 +139,32 @@
icon_state = "[mineral]fwall_open"
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
if(!mineral)
T.ReplaceWithWall()
else
T.ReplaceWithMineralWall(mineral)
del(src)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT:welding )
if(density)
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
if(!mineral)
T.ReplaceWithWall()
else
T.ReplaceWithMineralWall(mineral)
if(mineral != "plasma")//Stupid shit keeps me from pushing the attackby() to plasma walls -Sieve
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT:welding )
var/turf/T = get_turf(src)
if(!mineral)
T.ReplaceWithWall()
else
T.ReplaceWithMineralWall(mineral)
if(mineral != "plasma")//Stupid shit keeps me from pushing the attackby() to plasma walls -Sieve
T = get_turf(src)
T.attackby(W,user)
del(src)
else
user << "\blue You can't reach, close it first!"
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
var/turf/T = get_turf(src)
if(!mineral)
T.ReplaceWithWall()
@@ -172,7 +222,7 @@
/obj/structure/falserwall/
anchored = 1
attack_hand(mob/user as mob)
if(density)
// Open wall
@@ -189,44 +239,68 @@
SetOpacity(1)
relativewall()
/obj/structure/falserwall/relativewall()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
T.ReplaceWithWall() //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you).
del(src)
if(!density)
icon_state = "frwall_open"
return
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T = get_turf(src)
T.attackby(W,user)
del(src)
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
for(var/obj/structure/falserwall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
icon_state = "rwall[junction]"
return
/obj/structure/falserwall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
T.ReplaceWithWall() //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you).
del(src)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T = get_turf(src)
T.attackby(W,user)
del(src)
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T = get_turf(src)
T.attackby(W,user)
del(src)
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T = get_turf(src)
T.attackby(W,user)
del(src)
/obj/structure/falsewall/uranium/proc/radiate()
if(!active)
+1 -1
View File
@@ -67,7 +67,7 @@
var/obj/item/stack/sheet/S = W
switch(S.type)
if(/obj/item/stack/sheet/metal)
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
if(!anchored)
if(S.amount < 2) return
S.use(2)
+145 -18
View File
@@ -9,7 +9,7 @@
//For those other infidels who uses this datum
//VIOLINSSS
var/list/lines
var/list/lines = new()
var/tempo = 5
@@ -245,10 +245,54 @@
soundlist["Cb9"] = 'sound/piano/Cb9.ogg'
soundlist["Cn9"] = 'sound/piano/Cn9.ogg'
proc/statusmsg( var/txt as text )
proc/statusmsg( var/txt )
status = txt
updateUsrDialog()
proc/unbayify( var/text )
var/list/partlist = dd_text2list(text, ",")
var/i
for(i=1, i<=partlist.len, i++)
var/part = partlist[i]
var/list/x = dd_text2list(part, "/")
var/tone = ""
var/tempo = "1"
if(x.len >= 1)
tone = x[1]
if(x.len == 1)
//If there's only the tone set, move it to tempo side instead
//It has to be null, otherwise it means it starts with a number, which is something stupid.
if(!isnull(text2num(copytext(tone, 1, 2))))
//Sets tempo to whatever number we found in there (text2num removes other symbols)
tone = ""
tempo = "[text2num(tone)]"
if(x.len == 2)
tempo = x[2]
//Can't divide by zero, what did they think?
if(tempo=="0")
tempo = "1"
//Removes /infinity, /Infini, whatever this means
if(findtext(lowertext(tempo), "inf"))
tempo = "1"
//If both tone and tempo is set, and its numbers on both sides, leftside is invalid and gets set to ""
//It has to be null, otherwise it means it starts with a number, which is something stupid.
if(!isnull(text2num(copytext(tone, 1, 2))))
//Sets tempo to whatever number we found in there (text2num removes other symbols)
tempo = ""
partlist[i] = "[tone]/[tempo]"
text = dd_list2text(partlist, ",")
return text
proc/playsong()
if(currentsong.compilesuccess == 0)
playing = 0
@@ -288,6 +332,7 @@
var/strippedsourcestring = dd_replacetext(currentsong.sourcestring, "\n", "")
strippedsourcestring = unbayify(strippedsourcestring)
for(var/part in dd_text2list(strippedsourcestring, ","))
var/list/x = dd_text2list(part, "/")
@@ -297,9 +342,10 @@
var/tempodiv = 1
if(xlen==2)
tempodiv = text2num(x[2])
if(tempodiv == 0)
statusmsg( "Compile Error: Can't divide by 0!\nAt Part:'[part]' Tone:" )
return
if(tempodiv <= 0)
//statusmsg( "Compile Error: Can't divide by 0!\nAt Part:'[part]' Tone:" )
//return
tempodiv = 1
else if(xlen>2)
statusmsg( "Compile Error: Tempo Syntax Error!\nAt Part:'[part]' Tone:" )
return
@@ -368,7 +414,7 @@
compilestring += "x" + finaltone + "¤"
//y indicates its a sleep
compilestring += "y[round((currentsong.tempo / tempodiv)*100)/100]¤"
compilestring += "y[round((currentsong.tempo / tempodiv)*10000)/10000]¤"
currentsong.compiledstring = compilestring
currentsong.compilesuccess = 1
@@ -467,12 +513,14 @@
if(showeditor)
dat += {"
Tempo:
<a href='?src=\ref[src];tempo=-3'>-</a><a href='?src=\ref[src];tempo=-2'>-</a><a href='?src=\ref[src];tempo=-1'>-</a>
<a href='?src=\ref[src];bpminc=-50'>+</a><a href='?src=\ref[src];bpminc=-20'>-</a><a href='?src=\ref[src];bpminc=-5'>-</a><a href='?src=\ref[src];bpminc=-1'>-</a>
[calctempo] BPM
<a href='?src=\ref[src];tempo=1'>+</a><a href='?src=\ref[src];tempo=2'>+</a><a href='?src=\ref[src];tempo=3'>+</a><br>
<a href='?src=\ref[src];bpminc=1'>+</a><a href='?src=\ref[src];bpminc=5'>+</a><a href='?src=\ref[src];bpminc=20'>+</a><a href='?src=\ref[src];bpminc=50'>+</a><br>
<a href='?src=\ref[src];compile=1'>Compile</a>
<a href='?src=\ref[src];edit=1'>Edit</a>
<div bgcolor="#888888" style="padding-left:5px; margin-top:5px; background-color:#888888"><pre>[currentsong.sourcestring]</pre></div>"}
<div bgcolor="#888888" style="padding-left:5px; margin-top:5px; background-color:#888888"><pre>[currentsong.sourcestring]</pre></div>
<a href='?src=\ref[src];import=1'>Import</a><br>
<a href='?src=\ref[src];export=1'>Export</a>"}
dat+={"
</div>
<div bgcolor="#AAAAAA" class="content">"}
@@ -498,12 +546,17 @@
defined by 'tempo / x': <i>C,G/2,E/4</i><br>
Combined, an example is: <i>E-Eb4/4,/2,G#/8,B/8,E3-E4/4</i><br>
<br>
Baystation /0 tempo or /infinity tempo does not error, but the compiler ignores them.<br>
<br>
A song may only contain up to 4000 letters.<br>
If you're playing a small piece over and over, remember to put a pause at the end for it to sound properly.<br<
If you're playing a small piece over and over, remember to put a pause at the end for it to sound properly.<br>
<br>
Note: Due to limitations in the engine, some tones doesn't exist. These are:<br>
Cb1<br>
All tones in the ninth octave <b>except Cb9 and Cn9</b>
All tones in the ninth octave <b>except Cb9 and Cn9</b><br>
<br>
Import/Export are there to import/export old-piano code, including baystation piano code.<br>
The Import feature isn't completly finished because of lack of knowledge, but it atleast makes the code compile.
"}
dat+={"
</div>
@@ -542,9 +595,51 @@
else if(href_list["name"])
var/input = html_encode(input(usr, "", "Rename", currentsong.name) as text|null)
if(isnull(input)) return
currentsong.name = copytext(input,1,30)
updateUsrDialog()
else if(href_list["export"])
var/output = dd_replacetext(currentsong.sourcestring, "\n", "")
var/list/sourcelist = dd_text2list(output, ",")
var/list/outputlist = new()
if(sourcelist.len == 0)
return
var/nextadd = sourcelist[1]
sourcelist.Cut(1,1)
var/runmainloop = 1
while(runmainloop)
var/outstr = ""
while(lentext(outstr + nextadd) < 50)
outstr += nextadd + ","
if(sourcelist.len == 0)
runmainloop = 0
break
//Pop one
nextadd = sourcelist[1]
sourcelist.Cut(1,2)
//Remove last comma
outstr = copytext(outstr, 1, lentext(outstr))
//Add to output
outputlist.Add(outstr)
var/curbpm = round((10/currentsong.tempo)*60)
outputlist.Insert(1, "BPM: [curbpm]")
output = dd_list2text(outputlist, "\n")
input(usr, "", "Exported Code", output) as message|null
else if(href_list["savesong"])
//Check if the song already exists in the internal
@@ -564,7 +659,7 @@
updateUsrDialog()
if(playing)
if(href_list["newsong"]||href_list["setsong"]||href_list["tempo"]||href_list["compile"]||href_list["edit"]||href_list["repeat"])
if(href_list["newsong"]||href_list["setsong"]||href_list["tempo"]||href_list["compile"]||href_list["edit"]||href_list["repeat"]||href_list["import"])
statusmsg("Playback Error: Stop the song first!")
else
if(href_list["newsong"])
@@ -585,12 +680,39 @@
updateUsrDialog()
else if(href_list["tempo"])
var/tempoinc = text2num(href_list["tempo"])
else if(href_list["import"])
var/input = html_encode(input(usr, "", "Import") as message|null)
if(isnull(input)) return
currentsong.tempo += tempoinc*-1
if(currentsong.tempo<1)
currentsong.tempo = 1
var/list/inputlist = dd_text2list(input, "\n")
if(copytext(inputlist[1], 1, 4) == "BPM")
var/newbpm = text2num(copytext(input,5,lentext(inputlist[1])+1))
if(newbpm > 0 && newbpm <= 600)
currentsong.tempo = 10/(newbpm/60)
//Remove the BPM shit
inputlist.Cut(1,2)
//Put it back together with commas
input = dd_list2text(inputlist, ",\n")
//Remove last comma
//input = copytext(input, 1, lentext(input))
currentsong.sourcestring = input
updateUsrDialog()
else if(href_list["bpminc"])
var/bpminc = text2num(href_list["bpminc"])
currentsong.tempo = 10/(((10/currentsong.tempo)*60 + bpminc)/60)
if(currentsong.tempo<0.05)
currentsong.tempo = 0.05
currentsong.compilesuccess = 0
updateUsrDialog()
@@ -604,6 +726,7 @@
else if(href_list["edit"])
var/input = html_encode(input(usr, "", "Edit", currentsong.sourcestring) as message|null)
if(isnull(input)) return
input = dd_replacetext(input, " ", "")
input = dd_replacetext(input, "\t", "")
@@ -619,7 +742,11 @@
else if(href_list["repeat"])
var/input = round(input(usr, "", "Repeat", "How many times do you want to repeat? (max 10)") as num|null)
var/input = input(usr, "", "Repeat", "How many times do you want to repeat? (max 10)") as num|null
if(isnull(input)) return
input = round(input)
if(input < 1)
input = 1
else if(input > 10)