diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm
index 0efd44ba548..7174a696249 100644
--- a/code/game/atom_procs.dm
+++ b/code/game/atom_procs.dm
@@ -348,6 +348,7 @@
..()
return
+
/atom/Click(location,control,params)
//world << "atom.Click() on [src] by [usr] : src.type is [src.type]"
if(!istype(src,/obj/item/weapon/gun))
@@ -652,25 +653,6 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
if ( !animal.restrained() )
attack_animal(animal)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/atom/DblClick(location, control, params) //TODO: DEFERRED: REWRITE
// world << "checking if this shit gets called at all"
@@ -760,6 +742,14 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
return
}
+ // ------- MIDDLE-CLICK -------
+
+ if(parameters["middle"]){
+ if(!isAI(usr))
+ MiddleClick(usr)
+ return
+ }
+
// ------- THROW -------
if(usr.in_throw_mode)
return usr:throw_item(src)
@@ -1083,6 +1073,11 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
return
+/atom/proc/MiddleClick(var/mob/M as mob) // switch hands
+ if(istype(M, /mob/living/carbon))
+ var/mob/living/carbon/U = M
+ U.swap_hand()
+
/*
/atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return
diff --git a/code/game/dna.dm b/code/game/dna.dm
index 96566c54d2e..55d95595a1e 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -181,6 +181,30 @@
else
return null
+/proc/getblockstring(input,block,subblock,blocksize)
+ var/string
+ var/subpos = 1 // keeps track of the current sub block
+ var/blockpos = 1 // keeps track of the current block
+
+ for(var/i = 1, i <= length(input), i++) // loop through each letter
+
+ var/pushstring = copytext(input, i, i+1)
+
+ if(subpos == subblock && blockpos == block) // if the current block/subblock is selected, mark it
+ pushstring = "[copytext(input, i, i+1)]"
+
+ string += pushstring // push the string to the return string
+
+ if(subpos >= blocksize) // add a line break for every block
+ string += " | "
+ subpos = 0
+ blockpos++
+
+ subpos++
+
+ return string
+
+
/proc/getblock(input,blocknumber,blocksize)
var/result
result = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
@@ -1009,13 +1033,17 @@
////////////////////////////////////////////////////////
if (href_list["unimenu"])
//src.temphtml = text("Unique Identifier: []
", src.connected.occupant.dna.uni_identity)
- src.temphtml = text("Unique Identifier: [getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? ""+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? ""+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? ""+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]
")
+ //src.temphtml = text("Unique Identifier: [getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? ""+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? ""+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? ""+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]
")
+
+ // New way of displaying DNA blocks
+ src.temphtml = text("Unique Identifier: [getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3)]
")
+
src.temphtml += text("Selected Block: []
", src.uniblock)
src.temphtml += text("<- Block ->
", src, src)
src.temphtml += text("Selected Sub-Block: []
", src.subblock)
src.temphtml += text("<- Sub-Block ->
", src, src)
src.temphtml += "Modify Block:
"
- src.temphtml += text("Radiation
", src)
+ src.temphtml += text("Irradiate
", src)
src.delete = 0
if (href_list["unimenuplus"])
if (src.uniblock < 13)
@@ -1091,14 +1119,19 @@
var/temp2 = ""
for(var/i = 3, i <= length(temp_string2), i += 3)
temp2 += copytext(temp_string2, i-2, i+1) + " "
- src.temphtml = text("Structural Enzymes: [temp1] [src.subblock == 1 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)] [temp2]
")
+ //src.temphtml = text("Structural Enzymes: [temp1] [src.subblock == 1 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? ""+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)] [temp2]
")
//src.temphtml = text("Structural Enzymes: []
", src.connected.occupant.dna.struc_enzymes)
+
+ // New shit, it doesn't suck (as much)
+ src.temphtml = text("Structural Enzymes: [getblockstring(src.connected.occupant.dna.struc_enzymes,strucblock,subblock,3)]
")
+ // SE of occupant, selected block, selected subblock, block size (3 subblocks)
+
src.temphtml += text("Selected Block: []
", src.strucblock)
src.temphtml += text("<- Block ->
", src, src, src)
src.temphtml += text("Selected Sub-Block: []
", src.subblock)
src.temphtml += text("<- Sub-Block ->
", src, src)
src.temphtml += "Modify Block:
"
- src.temphtml += text("Radiation
", src)
+ src.temphtml += text("Irradiate
", src)
src.delete = 0
if (href_list["strucmenuplus"])
if (src.strucblock < 27)
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 70e0c5527d9..738629b6fc9 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -150,10 +150,10 @@ var/datum/roundinfo/roundinfo = new()
//initialise our cinematic screen object
cinematic = new(src)
cinematic.icon = 'station_explosion.dmi'
- cinematic.icon_state = "start"
+ cinematic.icon_state = "station_intact"
cinematic.layer = 20
cinematic.mouse_opacity = 0
- cinematic.screen_loc = "1,3" //TODO resize them
+ cinematic.screen_loc = "1,0"
var/obj/structure/stool/bed/temp_buckle = new(src)
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
@@ -179,63 +179,61 @@ var/datum/roundinfo/roundinfo = new()
//Now animate the cinematic
switch(station_missed)
- if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation
- sleep(50)
- world << sound('explosionfar.ogg')
-
if(1) //nuke was nearby but (mostly) missed
if( mode && !override )
override = mode.name
switch( override )
- if("nuclear emergency")
- flick("start_nuke",cinematic)
- sleep(50)
+ if("nuclear emergency") //Nuke wasn't on station when it blew up
+ flick("intro_nuke",cinematic)
+ sleep(35)
world << sound('explosionfar.ogg')
- flick("explode2",cinematic)
- cinematic.icon_state = "loss_nuke2"
+ flick("station_intact_fade_red",cinematic)
+ cinematic.icon_state = "summary_nukefail"
else
- sleep(50)
+ flick("intro_nuke",cinematic)
+ sleep(35)
world << sound('explosionfar.ogg')
- flick("explode2",cinematic)
+ //flick("end",cinematic)
+
+
+ if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation
+ sleep(50)
+ world << sound('explosionfar.ogg')
+
else //station was destroyed
if( mode && !override )
override = mode.name
switch( override )
- if("nuclear emergency")
- flick("start_nuke",cinematic)
- sleep(50)
+ if("nuclear emergency") //Nuke Ops successfully bombed the station
+ flick("intro_nuke",cinematic)
+ sleep(35)
+ flick("station_explode_fade_red",cinematic)
world << sound('explosionfar.ogg')
- cinematic.icon_state = "end"
- flick("explode",cinematic)
- cinematic.icon_state = "loss_nuke"
-
- if("AI malfunction")
- flick("start_malf",cinematic)
- sleep(50)
+ cinematic.icon_state = "summary_nukewin"
+ if("AI malfunction") //Malf (screen,explosion,summary)
+ flick("intro_malf",cinematic)
+ sleep(76)
+ flick("station_explode_fade_red",cinematic)
world << sound('explosionfar.ogg')
- cinematic.icon_state = "end"
- flick("explode",cinematic)
- cinematic.icon_state = "loss_malf"
-
- if("blob")
- flick("start_blob",cinematic) //TODO: make a blob one
- sleep(50)
+ cinematic.icon_state = "summary_malf"
+ if("blob") //Station nuked (nuke,explosion,summary)
+ flick("intro_nuke",cinematic)
+ sleep(35)
+ flick("station_explode_fade_red",cinematic)
world << sound('explosionfar.ogg')
- cinematic.icon_state = "end"
- flick("explode",cinematic)
- cinematic.icon_state = "loss_blob" //TODO: make a blob one
-
- else
- //default station-destroyed ending
- sleep(50)
+ cinematic.icon_state = "summary_selfdes"
+ else //Station nuked (nuke,explosion,summary)
+ flick("intro_nuke",cinematic)
+ sleep(35)
+ flick("station_explode_fade_red", cinematic)
world << sound('explosionfar.ogg')
- cinematic.icon_state = "end"
- flick("explode",cinematic)
- cinematic.icon_state = "loss_general"
- sleep(100)
+ cinematic.icon_state = "summary_selfdes"
+
+ //If its actually the end of the round, wait for it to end.
+ //Otherwise if its a verb it will continue on afterwards.
+ sleep(300)
- //Tidy-up time!
if(cinematic) del(cinematic) //end the cinematic
if(temp_buckle) del(temp_buckle) //release everybody
return
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index accfd0abea5..0831fb00c62 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -180,6 +180,7 @@
viewingcode.Add(usr)
winshow(usr, "Telecomms IDE", 1) // show the IDE
winset(usr, "tcscode", "is-disabled=true")
+ winset(editingcode, "tcscode", "text=\"\"")
var/showcode = dd_replacetext(storedcode, "\"", "\\\"")
winset(usr, "tcscode", "text=\"[showcode]\"")
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index 893162ccfe3..a7a2f0a19c6 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -334,8 +334,22 @@
if(stat & BROKEN) return
if (istype(user, /mob/living/silicon))
return src.attack_hand(user)
+
+ if (istype(W, /obj/item/weapon/card/emag) && !emagged)
+ user << "\red You short out the turret controls' access analysis module."
+ emagged = 1
+ locked = 0
+ if(user.machine==src)
+ src.attack_hand(user)
+
+ return
+
else if( get_dist(src, user) == 0 ) // trying to unlock the interface
if (src.allowed(usr))
+ if(emagged)
+ user << "The turret control is unresponsive."
+ return
+
locked = !locked
user << "You [ locked ? "lock" : "unlock"] the panel."
if (locked)
@@ -344,7 +358,7 @@
user << browse(null, "window=turretid")
else
if (user.machine==src)
- src.attack_hand(usr)
+ src.attack_hand(user)
else
user << "Access denied."
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 80c44dfc887..730aedd55e3 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -52,6 +52,7 @@
if (stat != 2) //still breathing
+
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
diff --git a/code/stylesheet.dm b/code/stylesheet.dm
index 1d20406bafd..a3401ade9fd 100644
--- a/code/stylesheet.dm
+++ b/code/stylesheet.dm
@@ -34,6 +34,7 @@ em {font-style: normal; font-weight: bold;}
h1.alert, h2.alert {color: #000000;}
.emote { font-style: italic;}
+.selecteddna {color: #FFFFFF; background-color: #001B1B}
.attack {color: #ff0000;}
.moderate {color: #CC0000;}
diff --git a/html/changelog.html b/html/changelog.html
index 99f67eab052..2c6d46d8209 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -51,6 +51,10 @@ should be listed in the changelog upon commit though. Thanks. -->
19 May 2012
TG updated:
+ - You can now swap hands by clicking with your middle mouse button (you have to click on a visible object though, that's the catch).
+ - Tweaked the DNA modifier consoles a little bit so that it's much easier to see individual blocks instead of one jumbled mess of hexadecimal.
+ - You can now properly emag AI turret controls and commsat turret controls.
+ - Brand new ending animations!
- Buckling into an office chair and using a fire extinguisher will lead to interesting results.
- Recipe updates for some booze in an attempt to resolve recipe conflicts.
- Wallets now fit in pockets.
diff --git a/icons/effects/station_explosion.dmi b/icons/effects/station_explosion.dmi
index 98ebd235d46..cf85f410860 100644
Binary files a/icons/effects/station_explosion.dmi and b/icons/effects/station_explosion.dmi differ