#Fixed all known bugs with ninja voice.
#As an added bonus, voice-changers will protect from flash. Can be easily removed if needed. #Added more recharge locations for ninjas: cells, smes, and cyborgs. #Recharge changed so that it takes less time but recharges for less. #Adamantine sprites per request. #Updated Ripley sprites per request(?). git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1444 316c924e-a436-60f5-8080-3fe189b3f50e
@@ -46,6 +46,7 @@
|
||||
var/lower_mod = 0
|
||||
var/jetpack = 0
|
||||
var/datum/effects/system/ion_trail_follow/ion_trail = null
|
||||
var/datum/effects/system/spark_spread/spark_system//So they can initialize sparks whenever/N
|
||||
var/jeton = 0
|
||||
var/borgwires = 15
|
||||
var/killswitch = 0
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
protective_temperature = 1100
|
||||
heat_transfer_coefficient = 0.05
|
||||
var/draining = 0
|
||||
var/candrain = 0
|
||||
|
||||
/obj/item/clothing/gloves/stungloves/
|
||||
name = "Stungloves"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
/obj/item/clothing/mask
|
||||
name = "mask"
|
||||
icon = 'masks.dmi'
|
||||
var/vchange = 0//This doesn't seem to do anything. The voice changer gas mask is referenced by istype in say.dm /N
|
||||
body_parts_covered = HEAD
|
||||
|
||||
/obj/item/clothing/mask/gas
|
||||
@@ -35,19 +34,20 @@
|
||||
desc = "A close-fitting tactical mask that can filter some environmental toxins or be connected to an air supply."
|
||||
icon_state = "swat"
|
||||
|
||||
/obj/item/clothing/mask/gas/space_ninja
|
||||
name = "ninja mask"
|
||||
desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_mask"
|
||||
var/mode = 1// 1=Night Vision |2=Thermal |3=Meson
|
||||
var/voice = "Unknown"
|
||||
|
||||
/obj/item/clothing/mask/gas/voice
|
||||
name = "gas mask"
|
||||
desc = "A close-fitting mask that can filter some environmental toxins or be connected to an air supply."
|
||||
icon_state = "gas_mask"
|
||||
vchange = 1//See note avove./N
|
||||
var/mode = 1// 1=Night Vision |2=Thermal |3=Meson
|
||||
var/voice = "Unknown"
|
||||
var/vchange = 0//This didn't do anything before. It now checks if the mask has special functions/N
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja
|
||||
name = "ninja mask"
|
||||
desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_mask"
|
||||
vchange = 1
|
||||
|
||||
/obj/item/clothing/mask/breath
|
||||
desc = "A close-fitting mask that can be connected to an air supply but does not work very well in hard vacuum."
|
||||
|
||||
@@ -115,6 +115,14 @@
|
||||
user = null
|
||||
if (src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/blade)))
|
||||
src.operating = -1
|
||||
if(istype(I, /obj/item/weapon/blade))
|
||||
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'blade1.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message(text("\blue The glass door was sliced open by []!", user), 1, text("\red You hear glass being sliced and sparks flying."), 2)
|
||||
flick(text("[]spark", src.base_state), src)
|
||||
sleep(6)
|
||||
open()
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses)) continue
|
||||
if (istype(H.head, /obj/item/clothing/head/helmet/welding))
|
||||
if(!H.head:up) continue
|
||||
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/space_ninja)) continue
|
||||
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice)) continue
|
||||
if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
|
||||
continue
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
active_power_usage = 300
|
||||
|
||||
/obj/machinery/turret/New()
|
||||
src.spark_system = new /datum/effects/system/spark_spread
|
||||
spark_system = new /datum/effects/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
..()
|
||||
|
||||
@@ -299,6 +299,35 @@
|
||||
|
||||
/obj/mecha/attack_hand(mob/user as mob)
|
||||
src.log_message("Attack by hand/paw. Attacker - [user].",1)
|
||||
/* if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja)&&U.gloves:candrain&&!U.gloves:draining)
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = U.wear_suit
|
||||
var/obj/item/clothing/gloves/space_ninja/G = U.gloves
|
||||
user << "\blue Now charging battery..."
|
||||
occupant_message("\red Warning: Unauthorized access through sub-route 4, block H, detected.")
|
||||
G.draining = 1
|
||||
if(get_charge())
|
||||
var/drain = 0
|
||||
var/totaldrain = 0
|
||||
while(cell.charge>0)
|
||||
drain = rand(100,300)
|
||||
if(cell.charge<drain)
|
||||
drain = cell.charge
|
||||
if (do_after(U,10)) <--- gotta figure out why this isn't being called properly.
|
||||
world << "PING"
|
||||
spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
cell.charge-=drain
|
||||
S.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from [src]."
|
||||
G.draining = 0
|
||||
return
|
||||
else
|
||||
U << "\red The exosuit's battery has run dry of power. You must find another source."
|
||||
return*/
|
||||
if (user.mutations & 8 && !prob(src.deflect_chance))
|
||||
src.take_damage(15)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if (istype(H.head, /obj/item/clothing/head/helmet/welding))
|
||||
if(!H.head:up)
|
||||
safety = 1
|
||||
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/space_ninja))
|
||||
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
safety = 1
|
||||
if (istype(M, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
|
||||
safety = 1
|
||||
|
||||
@@ -322,7 +322,6 @@ NINJA MASK
|
||||
if(charge<0)
|
||||
charge=0
|
||||
active=0
|
||||
// stat("Ninja","#Current Charge: <B>[abs(charge/100)]</B>%",)
|
||||
sleep(10)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/init()
|
||||
@@ -351,7 +350,7 @@ NINJA MASK
|
||||
U.head:canremove=0
|
||||
U.shoes:canremove=0
|
||||
U.gloves:canremove=0
|
||||
src.canremove=0
|
||||
canremove=0
|
||||
sleep(40)
|
||||
U << "\blue Extending neural-net interface...\nNow monitoring brain wave pattern..."
|
||||
sleep(40)
|
||||
@@ -360,7 +359,7 @@ NINJA MASK
|
||||
U.head:canremove=1
|
||||
U.shoes:canremove=1
|
||||
U.gloves:canremove=1
|
||||
src.canremove=1
|
||||
canremove=1
|
||||
return
|
||||
U << "\blue Linking neural-net interface...\nPattern \green <B>GREEN</B>\blue, continuing operation."
|
||||
sleep(40)
|
||||
@@ -379,20 +378,21 @@ NINJA MASK
|
||||
U.mind.special_verbs += /mob/proc/ninjasmoke
|
||||
U.mind.special_verbs += /mob/proc/ninjapulse
|
||||
U.mind.special_verbs += /mob/proc/ninjablade
|
||||
src.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
src.verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
src.verbs += /obj/item/clothing/suit/space/space_ninja/proc/toggle
|
||||
src.initialize=1
|
||||
src.affecting=U
|
||||
src.slowdown=0
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/toggle
|
||||
U.gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
initialize=1
|
||||
affecting=U
|
||||
slowdown=0
|
||||
U.shoes:slowdown--
|
||||
src.ntick(usr)
|
||||
ntick(usr)
|
||||
else
|
||||
if(usr.mind&&usr.mind.special_role=="Space Ninja")
|
||||
usr << "\red You do not understand how this suit functions."
|
||||
else if(usr:wear_suit!=src)
|
||||
usr << "\red You must be wearing the suit to use this function."
|
||||
else if(src.initialize)
|
||||
else if(initialize)
|
||||
usr << "\red The suit is already functioning."
|
||||
else
|
||||
usr << "\red You cannot use this function at this time."
|
||||
@@ -403,7 +403,7 @@ NINJA MASK
|
||||
set desc = "Begins procedure to remove the suit."
|
||||
set category = "Object"
|
||||
|
||||
if(!src.initialize)
|
||||
if(!initialize)
|
||||
usr << "\red The suit is not initialized."
|
||||
return
|
||||
if(alert("Are you certain you wish to remove the suit? This will take time and remove all abilities.",,"Yes","No")=="No")
|
||||
@@ -430,7 +430,7 @@ NINJA MASK
|
||||
U << "\blue VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>."
|
||||
if(active)//Shutdowns stealth.
|
||||
active=0
|
||||
src.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/toggle
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/toggle
|
||||
sleep(40)
|
||||
if(U.stat||U.health<=0)
|
||||
U << "\red <B>FATAL ERROR</B>: 412--GG##&77 BRAIN WAV3 PATT$RN <B>RED</B>\nI-I-INITIATING S-SELf DeStrCuCCCT%$#@@!!$^#!..."
|
||||
@@ -453,13 +453,15 @@ NINJA MASK
|
||||
U.shoes:slowdown++
|
||||
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja))
|
||||
U.gloves:canremove=1
|
||||
src.canremove=1
|
||||
U.gloves:candrain=0
|
||||
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
canremove=1
|
||||
U << "\blue Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>."
|
||||
src.verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
src.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
src.initialize=0
|
||||
src.affecting=null
|
||||
src.slowdown=1
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
initialize=0
|
||||
affecting=null
|
||||
slowdown=1
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/toggle()
|
||||
@@ -468,12 +470,12 @@ NINJA MASK
|
||||
set category = "Object"
|
||||
|
||||
if(usr:wear_suit!=src||!src.initialize)
|
||||
usr << "\red You suit must be worn and active to use this function."
|
||||
usr << "\red Your suit must be worn and active to use this function."
|
||||
return
|
||||
if(src.active)
|
||||
if(active)
|
||||
spawn(0)
|
||||
anim(usr.loc,'mob.dmi',usr,"uncloak")
|
||||
src.active=0
|
||||
active=0
|
||||
usr << "\blue You are now visible."
|
||||
for(var/mob/O in oviewers(usr, null))
|
||||
O << "[usr.name] appears from thin air!"
|
||||
@@ -481,7 +483,7 @@ NINJA MASK
|
||||
else
|
||||
spawn(0)
|
||||
anim(usr.loc,'mob.dmi',usr,"cloak")
|
||||
src.active=1
|
||||
active=1
|
||||
usr << "\blue You are now invisible to normal detection."
|
||||
for(var/mob/O in oviewers(usr, null))
|
||||
O << "[usr.name] vanishes into thin air!"
|
||||
@@ -489,19 +491,40 @@ NINJA MASK
|
||||
/obj/item/clothing/suit/space/space_ninja/examine()
|
||||
set src in view()
|
||||
..()
|
||||
if(src.initialize)
|
||||
if(initialize)
|
||||
usr << "All systems operational. Current energy capacity: <B>[src.charge]</B>."
|
||||
if(src.active)
|
||||
if(active)
|
||||
usr << "The CLOAK-tech device is <B>active</B>."
|
||||
else
|
||||
usr << "The CLOAK-tech device is <B>inactive</B>."
|
||||
usr << "There are <B>[src.sbombs]</B> smoke bombs remaining."
|
||||
|
||||
/obj/item/clothing/mask/gas/space_ninja/New()
|
||||
src.verbs += /obj/item/clothing/mask/gas/space_ninja/proc/togglev
|
||||
src.verbs += /obj/item/clothing/mask/gas/space_ninja/proc/switchm
|
||||
/obj/item/clothing/gloves/space_ninja/proc/toggled()
|
||||
set name = "Toggle Drain"
|
||||
set desc = "Toggles the energy drain mechanism on or off."
|
||||
set category = "Object"
|
||||
if(!candrain)
|
||||
candrain=1
|
||||
usr << "You enable the energy drain mechanism."
|
||||
else
|
||||
candrain=0
|
||||
usr << "You disable the energy drain mechanism."
|
||||
|
||||
/obj/item/clothing/mask/gas/space_ninja/proc/togglev()
|
||||
|
||||
/obj/item/clothing/gloves/space_ninja/examine()
|
||||
set src in view()
|
||||
..()
|
||||
if(!canremove)
|
||||
if(candrain)
|
||||
usr << "The energy drain mechanism is: <B>active</B>."
|
||||
else
|
||||
usr << "The energy drain mechanism is: <B>inactive</B>."
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja/New()
|
||||
verbs += /obj/item/clothing/mask/gas/voice/space_ninja/proc/togglev
|
||||
verbs += /obj/item/clothing/mask/gas/voice/space_ninja/proc/switchm
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja/proc/togglev()
|
||||
set name = "Toggle Voice"
|
||||
set desc = "Toggles the voice synthesizer on or off."
|
||||
set category = "Object"
|
||||
@@ -545,39 +568,39 @@ NINJA MASK
|
||||
usr << "The voice synthesizer is already deactivated."
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/gas/space_ninja/proc/switchm()
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja/proc/switchm()
|
||||
set name = "Switch Mode"
|
||||
set desc = "Switches between Night Vision, Meson, or Thermal vision modes."
|
||||
set category = "Object"
|
||||
//Have to reset these manually since life.dm is retarded like that. Go figure.
|
||||
switch(src.mode)
|
||||
switch(mode)
|
||||
if(1)
|
||||
src.mode=2
|
||||
mode=2
|
||||
usr.see_in_dark = 2
|
||||
usr << "Switching mode to <B>Thermal Scanner</B>."
|
||||
if(2)
|
||||
src.mode=3
|
||||
mode=3
|
||||
usr.see_invisible = 0
|
||||
usr.sight &= ~SEE_MOBS
|
||||
usr << "Switching mode to <B>Meson Scanner</B>."
|
||||
if(3)
|
||||
src.mode=1
|
||||
mode=1
|
||||
usr.sight &= ~SEE_TURFS
|
||||
usr << "Switching mode to <B>Night Vision</B>."
|
||||
|
||||
/obj/item/clothing/mask/gas/space_ninja/examine()
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja/examine()
|
||||
set src in view()
|
||||
..()
|
||||
var/mode = "Night Vision"
|
||||
var/voice = "inactive"
|
||||
switch(src.mode)
|
||||
switch(mode)
|
||||
if(1)
|
||||
mode = "Night Vision"
|
||||
if(2)
|
||||
mode = "Thermal Scanner"
|
||||
if(3)
|
||||
mode = "Meson Scanner"
|
||||
if(src.vchange==0)
|
||||
if(vchange==0)
|
||||
voice = "inactive"
|
||||
else
|
||||
voice = "active"
|
||||
|
||||
@@ -56,7 +56,7 @@ STUN BATON
|
||||
//Most of the other special functions are handled in their own files.
|
||||
|
||||
/obj/item/weapon/blade/New()
|
||||
src.spark_system = new /datum/effects/system/spark_spread
|
||||
spark_system = new /datum/effects/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
return
|
||||
|
||||
@@ -256,11 +256,17 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
|
||||
//End of research and feedback code.
|
||||
|
||||
if (length(heard_masked))
|
||||
var/rendered = "[part_a][M.name][part_b][quotedmsg][part_c]"
|
||||
|
||||
var/N = M.name
|
||||
var/J = eqjobname
|
||||
if (istype(M.wear_mask, /obj/item/clothing/mask/gas/voice)&&M.wear_mask:vchange)
|
||||
//To properly have the ninja show up on radio. Could also be useful for similar items.
|
||||
//Would not be necessary but the mob could be wearing a mask that is not a voice changer.
|
||||
N = M.wear_mask:voice
|
||||
J = "Unknown"
|
||||
var/rendered = "[part_a][N][part_b][quotedmsg][part_c]"
|
||||
for (var/mob/R in heard_masked)
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a]<a href='byond://?src=\ref[src];track2=\ref[R];track=\ref[M]'>[M.name] ([eqjobname]) </a>[part_b][quotedmsg][part_c]", 2)
|
||||
R.show_message("[part_a]<a href='byond://?src=\ref[src];track2=\ref[R];track=\ref[M]'>[N] ([J]) </a>[part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
|
||||
@@ -368,8 +368,8 @@
|
||||
sleep(70)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
W:spark_system.start()
|
||||
playsound(src.loc, 'blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'blade1.ogg', 50, 1)
|
||||
dismantle_wall(1)
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
|
||||
|
||||
@@ -221,7 +221,7 @@ Useful for copy pasta since I'm lazy.*/
|
||||
new_ninja.equip_if_possible(new /obj/item/clothing/suit/space/space_ninja(new_ninja), new_ninja.slot_wear_suit)
|
||||
new_ninja.equip_if_possible(new /obj/item/clothing/gloves/space_ninja(new_ninja), new_ninja.slot_gloves)
|
||||
new_ninja.equip_if_possible(new /obj/item/clothing/head/helmet/space/space_ninja(new_ninja), new_ninja.slot_head)
|
||||
new_ninja.equip_if_possible(new /obj/item/clothing/mask/gas/space_ninja(new_ninja), new_ninja.slot_wear_mask)
|
||||
new_ninja.equip_if_possible(new /obj/item/clothing/mask/gas/voice/space_ninja(new_ninja), new_ninja.slot_wear_mask)
|
||||
new_ninja.equip_if_possible(new /obj/item/device/flashlight(new_ninja), new_ninja.slot_belt)
|
||||
new_ninja.equip_if_possible(new /obj/item/weapon/plastique(new_ninja), new_ninja.slot_r_store)
|
||||
new_ninja.equip_if_possible(new /obj/item/weapon/plastique(new_ninja), new_ninja.slot_l_store)
|
||||
|
||||
@@ -731,7 +731,7 @@
|
||||
else
|
||||
seer = 0
|
||||
see_invisible = 0
|
||||
else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/space_ninja))
|
||||
else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
|
||||
switch(src.wear_mask:mode)
|
||||
if(1)
|
||||
src.see_in_dark = 5
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
//Ninja mask obscures text and voice if set to do so.
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
//Would make it more global but it's sort of ninja specific.
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
|
||||
@@ -30,6 +30,25 @@
|
||||
var/italics = 1
|
||||
var/message_range = 1
|
||||
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
for(var/i=1, i <= abs(temp_message.len/3), i++)
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
message = dd_replaceText(message, "o", "<22>")
|
||||
message = dd_replaceText(message, "p", "<22>")
|
||||
message = dd_replaceText(message, "l", "<22>")
|
||||
message = dd_replaceText(message, "s", "<22>")
|
||||
message = dd_replaceText(message, "u", "<22>")
|
||||
message = dd_replaceText(message, "b", "<22>")
|
||||
|
||||
if (src.stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
@@ -72,11 +91,16 @@
|
||||
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
|
||||
if (!istype(src, /mob/living/carbon/human) || istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers, <span class='message'>\"[message_a]\"</span></span>"
|
||||
//This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically.
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> whispers, <span class='message'>\"[message_a]\"</span></span>"
|
||||
else if (istype(wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if (wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> whispers, <span class='message'>\"[message_a]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> whispers, <span class='message'>\"[message_a]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.real_name]</span>[alt_name] whispers, <span class='message'>\"[message_a]\"</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] whispers, <span class='message'>\"[message_a]\"</span></span>"
|
||||
|
||||
for (var/mob/M in heard_a)
|
||||
M.show_message(rendered, 2)
|
||||
@@ -101,10 +125,15 @@
|
||||
if (M.say_understands(src))
|
||||
var/message_c
|
||||
message_c = stars(message)
|
||||
if (!istype(src, /mob/living/carbon/human) || istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers, <span class='message'>\"[message_c]\"</span></span>"
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> whispers, <span class='message'>\"[message_c]\"</span></span>"
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if(wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> whispers, <span class='message'>\"[message_c]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> whispers, <span class='message'>\"[message_c]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.real_name]</span>[alt_name] whispers, <span class='message'>\"[message_c]\"</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] whispers, <span class='message'>\"[message_c]\"</span></span>"
|
||||
M.show_message(rendered, 2)
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
|
||||
@@ -113,10 +142,15 @@
|
||||
if (italics)
|
||||
message = "<i>[message]</i>"
|
||||
|
||||
if (!istype(src, /mob/living/carbon/human) || istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if(wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.real_name]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (istype(M, /mob/new_player))
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
else
|
||||
if (M.ghost_ears && !(M in listening))
|
||||
listening+=M
|
||||
|
||||
|
||||
for (var/obj/O in ((V | src.contents)-used_radios)) //radio in pocket could work, radio in backpack wouldn't --rastaf0
|
||||
spawn (0)
|
||||
if (O)
|
||||
@@ -278,10 +278,13 @@
|
||||
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
if (!istype(src, /mob/living/carbon/human) || istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> <span class='message'>[message_a]</span></span>"
|
||||
else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/space_ninja))
|
||||
rendered = "<span class='game say'><span class='name'>[src.wear_mask:voice]</span> <span class='message'>[message_a]</span></span>"
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if(wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[src.wear_mask:voice]</span> <span class='message'>[message_a]</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> <span class='message'>[message_a]</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.real_name]</span>[alt_name] <span class='message'>[message_a]</span></span>"
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
/mob/living/silicon/robot/New(loc,var/syndie = 0)
|
||||
|
||||
spark_system = new /datum/effects/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spawn (1)
|
||||
src << "\blue Your icons have been generated!"
|
||||
playsound(src.loc, 'liveagain.ogg', 50, 1, -3)
|
||||
@@ -591,6 +593,35 @@
|
||||
user << "You remove the power cell."
|
||||
src.updateicon()
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja)&&U.gloves:candrain&&!U.gloves:draining)
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = U.wear_suit
|
||||
var/obj/item/clothing/gloves/space_ninja/G = U.gloves
|
||||
user << "\blue Now charging battery..."
|
||||
src << "\red Warning: Unauthorized access through sub-route 12, block C, detected."
|
||||
G.draining = 1
|
||||
if(cell&&cell.charge)
|
||||
var/drain = 0
|
||||
var/totaldrain = 0
|
||||
while(cell.charge>0)
|
||||
drain = rand(100,300)
|
||||
if(cell.charge<drain)
|
||||
drain = cell.charge
|
||||
if (do_after(U,10))
|
||||
spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
cell.charge-=drain
|
||||
S.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from [src]."
|
||||
G.draining = 0
|
||||
return
|
||||
else
|
||||
U << "\red Their battery has run dry of power. You must find another source."
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
|
||||
@@ -437,35 +437,6 @@
|
||||
|
||||
/obj/machinery/power/apc/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja)&&!U.gloves:canremove&&!U.gloves:draining)
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = U.wear_suit
|
||||
var/obj/item/clothing/gloves/space_ninja/G = U.gloves
|
||||
// emagged = 1
|
||||
// locked = 0
|
||||
user << "\blue Now charging battery..."
|
||||
G.draining = 1
|
||||
if(cell&&cell.charge)
|
||||
while(cell.charge>0)
|
||||
var/drain = rand(500,1500)
|
||||
if(cell.charge<drain)
|
||||
drain = cell.charge
|
||||
if (do_after(user,50))
|
||||
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
cell.charge-=drain
|
||||
S.charge+=drain
|
||||
U << "\blue Gained <B>[drain]</B> energy from the APC (<B>[cell.charge]</B> charge remaining)."
|
||||
else break
|
||||
G.draining = 0
|
||||
return
|
||||
else
|
||||
U << "\red This machine has run dry of power. You must find another."
|
||||
return
|
||||
|
||||
if(opened && (!istype(user, /mob/living/silicon)))
|
||||
if(cell)
|
||||
usr.put_in_hand(cell)
|
||||
@@ -477,12 +448,46 @@
|
||||
//user << "You remove the power cell."
|
||||
charging = 0
|
||||
src.updateicon()
|
||||
return
|
||||
if(stat & (BROKEN|MAINT)) return
|
||||
|
||||
else
|
||||
if(stat & (BROKEN|MAINT)) return
|
||||
// do APC interaction
|
||||
user.machine = src
|
||||
src.interact(user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja)&&U.gloves:candrain&&!U.gloves:draining)
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = U.wear_suit
|
||||
var/obj/item/clothing/gloves/space_ninja/G = U.gloves
|
||||
user << "\blue Now charging battery..."
|
||||
G.draining = 1
|
||||
if(cell&&cell.charge)
|
||||
var/drain = 0
|
||||
var/totaldrain = 0
|
||||
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
while(cell.charge>0)
|
||||
drain = rand(100,300)
|
||||
if(cell.charge<drain)
|
||||
drain = cell.charge
|
||||
if (do_after(U,10))
|
||||
spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
cell.charge-=drain
|
||||
S.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from the APC."
|
||||
G.draining = 0
|
||||
if(!emagged)
|
||||
flick("apc-spark", src)
|
||||
emagged = 1
|
||||
locked = 0
|
||||
updateicon()
|
||||
return
|
||||
else
|
||||
U << "\red This APC has run dry of power. You must find another source."
|
||||
return
|
||||
// do APC interaction
|
||||
user.machine = src
|
||||
src.interact(user)
|
||||
|
||||
/obj/machinery/power/apc/proc/interact(mob/user)
|
||||
|
||||
|
||||
@@ -62,6 +62,30 @@
|
||||
if(crit_fail)
|
||||
usr << "\red This power cell seems to be faulty"
|
||||
|
||||
/obj/item/weapon/cell/attack_self(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja)&&U.gloves:candrain&&!U.gloves:draining)
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = U.wear_suit
|
||||
var/obj/item/clothing/gloves/space_ninja/G = U.gloves
|
||||
if(charge)
|
||||
user << "\blue Now charging battery..."
|
||||
G.draining = 1
|
||||
if (do_after(user,50))
|
||||
U << "\blue Gained <B>[charge]</B> energy from the cell."
|
||||
charge = 0
|
||||
S.charge+=charge
|
||||
G.draining = 0
|
||||
corrupt()
|
||||
updateicon()
|
||||
else
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
return
|
||||
else
|
||||
U << "\red This cell is empty and of no use."
|
||||
return
|
||||
|
||||
//Just because someone gets you occasionally with stun gloves doesn't mean you can put in code to kill everyone who tries to make some.
|
||||
/obj/item/weapon/cell/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
|
||||
@@ -180,15 +180,41 @@
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/smes/attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & BROKEN) return
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja)&&U.gloves:candrain&&!U.gloves:draining)
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = U.wear_suit
|
||||
var/obj/item/clothing/gloves/space_ninja/G = U.gloves
|
||||
user << "\blue Now charging battery..."
|
||||
G.draining = 1
|
||||
if(charge)
|
||||
var/drain = 0
|
||||
var/totaldrain = 0
|
||||
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
while(charge>0)
|
||||
drain = rand(100,300)
|
||||
if(charge<drain)
|
||||
drain = charge
|
||||
if (do_after(U,10))
|
||||
spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
charge-=drain
|
||||
S.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from the SMES cell."
|
||||
G.draining = 0
|
||||
return
|
||||
else
|
||||
U << "\red This SMES cell has run dry of power. You must find another source."
|
||||
return
|
||||
|
||||
interact(user)
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/smes/proc/interact(mob/user)
|
||||
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
|
||||
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 75 KiB |