Stackable items redo. Many improvements, massive code clean up.

Metal and related materials now noticeable more user-friendly.
Added new canister color: yellow "CAUTION". Used for newly created from metal canisters. Can be relabeled once.
Some typos were fixed.
dsay verb now uses fakekey in stealth mode.
AI cannot remove the cell from the charger.
Added alientalk chat prefix: ":a" by Barhandar. Also added keyboard layout independent russian prefixes.
Binary translator done by more convenient may by Barhandar.
Is possible now to wash bloody hands in sink.
Probably fixed bug causes gibbed revheads be not counted as dead.
Some other fixes.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@752 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rastaf.zero@gmail.com
2011-01-03 01:26:01 +00:00
parent 565c2320c4
commit 09e0bcf987
51 changed files with 1138 additions and 1404 deletions

View File

@@ -17,8 +17,8 @@
if (!msg)
return
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.stealth ? pick("BADMIN", "ViktoriaSA", "Drunkwaffel", "Android Datuhh") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.stealth ? src.fakekey : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
//pick("BADMIN", "ViktoriaSA", "Drunkwaffel", "Android Datuhh")
for (var/mob/M in world)
if(M.stat == 2 || (M.client && M.client.holder))
M.show_message(rendered, 2)

View File

@@ -678,10 +678,9 @@
handle_regular_hud_updates()
if (istype(src.ears, /obj/item/device/radio/headset/traitor))
src.robot_talk_understand = 1
else
src.robot_talk_understand = 0
if (istype(src.ears, /obj/item/device/radio/headset))
var/obj/item/device/radio/headset/H = src.ears
src.robot_talk_understand = H.bintran
if (src.stat == 2 || src.mutations & 4)
src.sight |= SEE_TURFS

View File

@@ -68,7 +68,7 @@
message_mode = "left hand"
message = copytext(message, 3)
else if (copytext(message, 1, 3) == ":h")
else if (copytext(message, 1, 3) == ":h" || (copytext(message, 1, 3) == ":<3A>" ))
if (ishuman(src))
message_mode = "secure headset"
message = copytext(message, 3)
@@ -81,14 +81,17 @@
message_mode = "intercom"
message = copytext(message, 3)
else if (copytext(message, 1, 3) == ":s" && src.robot_talk_understand)
else if ((copytext(message, 1, 3) == ":s" || (copytext(message, 1, 3) == ":<3A>" )) && src.robot_talk_understand)
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
src.robot_talk(message)
return
//
message = trim(message)
else if ((copytext(message, 1, 3) == ":a" || (copytext(message, 1, 3) == ":<3A>")) && src.alien_talk_understand)
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
src.alien_talk(message)
return
if (!message)
return

View File

@@ -44,11 +44,11 @@
src.modules += new /obj/item/weapon/wirecutters(src)
src.modules += new /obj/item/device/multitool(src)
var/obj/item/weapon/sheet/metal/M = new /obj/item/weapon/sheet/metal(src)
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(src)
M.amount = 50
src.modules += M
var/obj/item/weapon/sheet/rglass/G = new /obj/item/weapon/sheet/rglass(src)
var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass(src)
G.amount = 50
src.modules += G

View File

@@ -59,11 +59,11 @@
src.modules += new /obj/item/weapon/wirecutters(src)
src.modules += new /obj/item/device/multitool(src)
var/obj/item/weapon/sheet/metal/M = new /obj/item/weapon/sheet/metal(src)
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(src)
M.amount = 50
src.modules += M
var/obj/item/weapon/sheet/rglass/G = new /obj/item/weapon/sheet/rglass(src)
var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass(src)
G.amount = 50
src.modules += G

View File

@@ -1095,6 +1095,43 @@
T.Entered(W)
return
/mob/proc/before_take_item(var/obj/item/item)
u_equip(item)
if (src.client)
src.client.screen -= item
src.update_clothing()
return
/mob/proc/get_active_hand()
if (src.hand)
return src.l_hand
else
return src.r_hand
/mob/proc/get_inactive_hand()
if ( ! src.hand)
return src.l_hand
else
return src.r_hand
/mob/proc/put_in_hand(var/obj/item/I)
I.loc = src
if (src.hand)
src.l_hand = I
else
src.r_hand = I
I.layer = 20
src.update_clothing()
/mob/proc/put_in_inactive_hand(var/obj/item/I)
I.loc = src
if (!src.hand)
src.l_hand = I
else
src.r_hand = I
I.layer = 20
src.update_clothing()
/mob/proc/reset_view(atom/A)
if (src.client)
if (istype(A, /atom/movable))

View File

@@ -217,7 +217,7 @@
/obj/machinery/power/apc/attackby(obj/item/W, mob/user)
if (istype(user, /mob/living/silicon))
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
return src.attack_hand(user)
if (istype(W, /obj/item/weapon/crowbar) && opened)
if (has_electronics==1)
@@ -270,20 +270,20 @@
if (cell)
user << "\red Close the APC first." //Less hints more mystery!
return
else if (!has_electronics || !terminal)
user << "\red There is nothing to secure."
return
else
if (has_electronics==1)
has_electronics = 2
stat &= ~MAINT
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
user << "You screw the circuit electronics into place."
else /*(has_electronics==2)*/
else if (has_electronics==2)
has_electronics = 1
stat |= MAINT
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
user << "You unfasten the electronics."
else /* has_electronics==0 */
user << "\red There is nothing to secure."
return
updateicon()
else if(emagged || malfhack)
user << "The interface is broken"
@@ -377,7 +377,7 @@
playsound(src.loc, 'Welder.ogg', 50, 1)
if(do_after(user, 50))
if (emagged || malfhack || (stat & BROKEN) || opened==2)
new /obj/item/weapon/sheet/metal(loc)
new /obj/item/stack/sheet/metal(loc)
user.visible_message(\
"\red [src] has been cut apart by [user.name] with the weldingtool.",\
"You disassembled brocken APC frame.",\
@@ -419,14 +419,15 @@
&& !opened \
&& W.force >= 5 \
&& W.w_class >= 3.0 \
&& !istype(W, /obj/item/weapon/gun) \
&& prob(10) )
&& prob(20) )
opened = 2
user.visible_message("\red The APC cover was knocked down with the [W.name] by [user.name]!", \
"\red You knock down the APC cover with your [W.name]!", \
"You hear bang")
updateicon()
else
if (istype(user, /mob/living/silicon))
return src.attack_hand(user)
user.visible_message("\red The [src.name] has been hit with the [W.name] by [user.name]!", \
"\red You hit the [src.name] with your [W.name]!", \
"You hear bang")
@@ -478,7 +479,7 @@
return
if(wiresexposed && (!istype(user, /mob/living/silicon)))
user.machine = src
var/t1 = text("<B>Access Panel</B><br>\n")
var/t1 = text("<html><head><title>[area.name] APC wires</title></head><body><B>Access Panel</B><br>\n")
var/list/apcwires = list(
"Orange" = 1,
"Dark red" = 2,
@@ -495,7 +496,7 @@
t1 += "<a href='?src=\ref[src];pulse=[apcwires[wiredesc]]'>Pulse</a> "
t1 += "<br>"
t1 += text("<br>\n[(src.locked ? "The APC is locked." : "The APC is unlocked.")]<br>\n[(src.shorted ? "The APCs power has been shorted." : "The APC is working properly!")]<br>\n[(src.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
t1 += text("<p><a href='?src=\ref[src];close2=1'>Close</a></p>\n")
t1 += text("<p><a href='?src=\ref[src];close2=1'>Close</a></p></body></html>")
user << browse(t1, "window=apcwires")
onclose(user, "apcwires")
@@ -868,6 +869,7 @@
if (src.z == 1)
ticker.mode:apcs++
src.malfai = usr
src.locked = 1
if (src.cell)
if (src.cell.charge > 0)
src.cell.charge = 0