Merge branch 'examine' of https://github.com/clusterfack/bugfixstation13 into clusterfack-examine

Conflicts:
	code/modules/clothing/shoes/magboots.dm
This commit is contained in:
Chris
2015-01-09 10:00:25 -06:00
128 changed files with 3394 additions and 3738 deletions

View File

@@ -1306,7 +1306,6 @@
#include "code\modules\power\power.dm"
#include "code\modules\power\smes.dm"
#include "code\modules\power\solar.dm"
#include "code\modules\power\switch.dm"
#include "code\modules\power\terminal.dm"
#include "code\modules\power\tracker.dm"
#include "code\modules\power\turbine.dm"

View File

@@ -27,19 +27,13 @@
overlays += "sheater-open"
return
/obj/machinery/space_heater/air_conditioner/examine()
set src in oview(12)
if (!( usr ))
return
usr << "This is \icon[src] \an [src.name]."
usr << src.desc
usr << "The air conditioner is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
/obj/machinery/space_heater/air_conditioner/examine(mob/user)
..()
user << "The air conditioner is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
if(open)
usr << "The power cell is [cell ? "installed" : "missing"]."
user << "The power cell is [cell ? "installed" : "missing"]."
else
usr << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
return
user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
/obj/machinery/space_heater/air_conditioner/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
@@ -64,13 +58,13 @@
C.loc = src
C.add_fingerprint(usr)
user.visible_message("\blue [user] inserts a power cell into [src].", "\blue You insert the power cell into [src].")
user.visible_message("<span class='notice'>[user] inserts a power cell into [src].</span>", "<span class='notice'>You insert the power cell into [src].</span>")
else
user << "The hatch must be open to insert a power cell."
return
else if(istype(I, /obj/item/weapon/screwdriver))
open = !open
user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].")
user.visible_message("<span class='notice'>[user] [open ? "opens" : "closes"] the hatch on the [src].</span>", "<span class='notice'>You [open ? "open" : "close"] the hatch on the [src].</span>")
update_icon()
if(!open && user.machine == src)
user << browse(null, "window=aircond")
@@ -108,7 +102,7 @@
onclose(user, "aircond")
else
on = !on
user.visible_message("\blue [user] switches [on ? "on" : "off"] the [src].","\blue You switch [on ? "on" : "off"] the [src].")
user.visible_message("<span class='notice'>[user] switches [on ? "on" : "off"] the [src].</span>","<span class='notice'>You switch [on ? "on" : "off"] the [src].</span>")
update_icon()
return
@@ -133,7 +127,7 @@
usr.put_in_hands(cell)
cell.add_fingerprint(usr)
cell = null
usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].")
usr.visible_message("<span class='notice'>[usr] removes the power cell from \the [src].</span>", "<span class='notice'>You remove the power cell from \the [src].</span>")
if("cellinstall")
@@ -145,7 +139,7 @@
C.loc = src
C.add_fingerprint(usr)
usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].")
usr.visible_message("<span class='notice'>[usr] inserts a power cell into \the [src].</span>", "<span class='notice'>You insert the power cell into \the [src].</span>")
src.updateDialog()
else

View File

@@ -42,322 +42,320 @@
on = 1
icon_state = "in"
New()
..()
area_uid = areaMaster.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/New()
..()
area_uid = areaMaster.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
src.broadcast_status()
high_volume
name = "Large Air Vent"
power_channel = EQUIP
New()
..()
air_contents.volume = 1000
/obj/machinery/atmospherics/unary/vent_pump/high_volume
name = "Large Air Vent"
power_channel = EQUIP
update_icon()
if(welded)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
return
if(on && !(stat & (NOPOWER|BROKEN)))
if(pump_direction)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
/obj/machinery/atmospherics/unary/vent_pump/high_volume/New()
..()
air_contents.volume = 1000
/obj/machinery/atmospherics/unary/vent_pump/update_icon()
if(welded)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
return
if(on && !(stat & (NOPOWER|BROKEN)))
if(pump_direction)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
return
process()
..()
CHECK_DISABLED(vents)
if (!node)
return // Turning off the vent is a PITA. - N3X
if(stat & (NOPOWER|BROKEN))
return
//on = 0
/obj/machinery/atmospherics/unary/vent_pump/process()
..()
CHECK_DISABLED(vents)
if (!node)
return // Turning off the vent is a PITA. - N3X
if(stat & (NOPOWER|BROKEN))
return
//on = 0
//broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0
if(!on)
return 0
//broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0
if(!on)
return 0
if(welded)
return 0
if(welded)
return 0
// New GC does this sometimes
if(!loc) return
// New GC does this sometimes
if(!loc) return
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
if(pump_direction) //internal -> external
var/pressure_delta = 10000
if(pump_direction) //internal -> external
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (air_contents.return_pressure() - internal_pressure_bound))
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (air_contents.return_pressure() - internal_pressure_bound))
if(pressure_delta > 0.1)
if(air_contents.temperature > 0)
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
if(pressure_delta > 0.1)
if(air_contents.temperature > 0)
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
loc.assume_air(removed)
if(network)
network.update = 1
if(network)
network.update = 1
else //external -> internal
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (internal_pressure_bound - air_contents.return_pressure()))
else //external -> internal
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (internal_pressure_bound - air_contents.return_pressure()))
if(pressure_delta > 0.1)
if(environment.temperature > 0)
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
if(pressure_delta > 0.1)
if(environment.temperature > 0)
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
return
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
return
air_contents.merge(removed)
air_contents.merge(removed)
if(network)
network.update = 1
if(network)
network.update = 1
return 1
return 1
//Radio remote control
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency,radio_filter_in)
/obj/machinery/atmospherics/unary/vent_pump/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency,radio_filter_in)
broadcast_status()
if(!radio_connection)
return 0
/obj/machinery/atmospherics/unary/vent_pump/proc/broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"area" = src.area_uid,
"tag" = src.id_tag,
"device" = "AVP",
"power" = on,
"direction" = pump_direction?("release"):("siphon"),
"checks" = pressure_checks,
"internal" = internal_pressure_bound,
"external" = external_pressure_bound,
"timestamp" = world.time,
"sigtype" = "status"
)
signal.data = list(
"area" = src.area_uid,
"tag" = src.id_tag,
"device" = "AVP",
"power" = on,
"direction" = pump_direction?("release"):("siphon"),
"checks" = pressure_checks,
"internal" = internal_pressure_bound,
"external" = external_pressure_bound,
"timestamp" = world.time,
"sigtype" = "status"
)
if(!areaMaster.air_vent_names[id_tag])
var/new_name = "[areaMaster.name] Vent Pump #[areaMaster.air_vent_names.len+1]"
areaMaster.air_vent_names[id_tag] = new_name
name = new_name
areaMaster.air_vent_info[id_tag] = signal.data
if(!areaMaster.air_vent_names[id_tag])
var/new_name = "[areaMaster.name] Vent Pump #[areaMaster.air_vent_names.len+1]"
areaMaster.air_vent_names[id_tag] = new_name
name = new_name
areaMaster.air_vent_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
radio_connection.post_signal(src, signal, radio_filter_out)
return 1
return 1
initialize()
..()
/obj/machinery/atmospherics/unary/vent_pump/initialize()
..()
//some vents work his own spesial way
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
if(frequency)
set_frequency(frequency)
//some vents work his own spesial way
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
if(frequency)
set_frequency(frequency)
receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
/obj/machinery/atmospherics/unary/vent_pump/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
var/handled=0
if("purge" in signal.data)
pressure_checks &= ~1
pump_direction = 0
handled=1
var/handled=0
if("purge" in signal.data)
pressure_checks &= ~1
pump_direction = 0
handled=1
if("stabilize" in signal.data)
pressure_checks |= 1
pump_direction = 1
handled=1
if("stabilize" in signal.data)
pressure_checks |= 1
pump_direction = 1
handled=1
if("power" in signal.data)
on = text2num(signal.data["power"])
handled=1
if("power" in signal.data)
on = text2num(signal.data["power"])
handled=1
if("power_toggle" in signal.data)
on = !on
handled=1
if("power_toggle" in signal.data)
on = !on
handled=1
if("checks" in signal.data)
pressure_checks = text2num(signal.data["checks"])
handled=1
if("checks" in signal.data)
pressure_checks = text2num(signal.data["checks"])
handled=1
if("checks_toggle" in signal.data)
pressure_checks = (pressure_checks?0:3)
handled=1
if("checks_toggle" in signal.data)
pressure_checks = (pressure_checks?0:3)
handled=1
if("direction" in signal.data)
pump_direction = text2num(signal.data["direction"])
handled=1
if("direction" in signal.data)
pump_direction = text2num(signal.data["direction"])
handled=1
if("set_internal_pressure" in signal.data)
internal_pressure_bound = Clamp(
text2num(signal.data["set_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
handled=1
if("set_internal_pressure" in signal.data)
internal_pressure_bound = Clamp(
text2num(signal.data["set_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
handled=1
if("set_external_pressure" in signal.data)
external_pressure_bound = Clamp(
text2num(signal.data["set_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
handled=1
if("set_external_pressure" in signal.data)
external_pressure_bound = Clamp(
text2num(signal.data["set_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
handled=1
if("adjust_internal_pressure" in signal.data)
internal_pressure_bound = Clamp(
internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
handled=1
if("adjust_internal_pressure" in signal.data)
internal_pressure_bound = Clamp(
internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
handled=1
if("adjust_external_pressure" in signal.data)
external_pressure_bound = Clamp(
external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
handled=1
if("adjust_external_pressure" in signal.data)
external_pressure_bound = Clamp(
external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
handled=1
if("init" in signal.data)
name = signal.data["init"]
return
if("init" in signal.data)
name = signal.data["init"]
return
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
if(!handled)
testing("\[[world.timeofday]\]: vent_pump/receive_signal: unknown command \n[signal.debug_print()]")
if("status" in signal.data)
spawn(2)
broadcast_status()
update_icon()
return //do not update_icon
if(!handled)
testing("\[[world.timeofday]\]: vent_pump/receive_signal: unknown command \n[signal.debug_print()]")
spawn(2)
broadcast_status()
update_icon()
return
/obj/machinery/atmospherics/unary/vent_pump/hide(var/i) //to make the little pipe section invisible, the icon changes.
if(welded)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
return
hide(var/i) //to make the little pipe section invisible, the icon changes.
if(welded)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
return
if(on&&node)
if(pump_direction)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
if(on&&node)
if(pump_direction)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
examine()
set src in oview(1)
..()
if(welded)
usr << "It seems welded shut."
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
..()
if(welded)
user << "<span class='info'>It seems welded shut.</span>"
power_change()
if(powered(power_channel))
stat &= ~NOPOWER
else
stat |= NOPOWER
update_icon()
/obj/machinery/atmospherics/unary/vent_pump/power_change()
if(powered(power_channel))
stat &= ~NOPOWER
else
stat |= NOPOWER
update_icon()
interact(mob/user as mob)
update_multitool_menu(user)
/obj/machinery/atmospherics/unary/vent_pump/interact(mob/user as mob)
update_multitool_menu(user)
multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[1439]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag","set_id")]</li>
</ul>
"}
/obj/machinery/atmospherics/unary/vent_pump/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[1439]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag","set_id")]</li>
</ul>
"}
attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user << "\blue Now welding the vent."
if(do_after(user, 20))
if(!src || !WT.isOn()) return
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
if(!welded)
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
welded = 1
update_icon()
else
user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
welded = 0
update_icon()
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user << "<span class='notice'>Now welding the vent.</span>"
if(do_after(user, 20))
if(!src || !WT.isOn()) return
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
if(!welded)
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
welded = 1
update_icon()
else
user << "\blue The welding tool needs to be on to start this task."
user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
welded = 0
update_icon()
else
user << "\blue You need more welding fuel to complete this task."
return 1
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
user << "<span class='notice'>The welding tool needs to be on to start this task.</span>"
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return 1
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact)
user << "\red You must remove the plating first."
return 1
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
add_fingerprint(user)
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>"
return 1
var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact)
user << "<span class='warning'>You must remove the plating first.</span>"
return 1
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
user << "<span class='warning'>You cannot unwrench this [src], it too exerted due to internal pressure.</span>"
add_fingerprint(user)
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
/obj/machinery/atmospherics/unary/vent_pump/Destroy()
areaMaster.air_vent_info.Remove(id_tag)

View File

@@ -128,7 +128,7 @@
level = T.intact ? 2 : 1
initialize(1)
if(!node1&&!node2)
usr << "\red There's nothing to connect this pipe section to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
usr << "<span class='warning'>There's nothing to connect this pipe section to! A pipe segment must be connected to at least one other object!</span>"
return 0
update_icon()
build_network()
@@ -210,9 +210,9 @@
else
return 1
/obj/machinery/atmospherics/pipe/simple/examine()
/obj/machinery/atmospherics/pipe/simple/examine(mob/user)
..()
usr << "<span class='info'>This [src.name] is rated up to [format_num(alert_pressure)] kPa.</span>"
user << "<span class='info'>This [src.name] is rated up to [format_num(alert_pressure)] kPa.</span>"
/obj/machinery/atmospherics/pipe/simple/proc/groan()
src.visible_message("<span class='warning'>\The [src] groans from the pressure!</span>");
@@ -580,12 +580,12 @@
return // Coloring pipes.
if (istype(W, /obj/item/device/analyzer) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "\red [user] has used the analyzer on \icon[icon]"
O << "<span class='attack'>[user] has used the analyzer on \icon[icon]</span>"
var/pressure = parent.air.return_pressure()
var/total_moles = parent.air.total_moles()
user << "\blue Results of analysis of \icon[icon]"
user << "<span class='notice'>Results of analysis of \icon[icon]</span>"
if (total_moles>0)
var/o2_concentration = parent.air.oxygen/total_moles
var/n2_concentration = parent.air.nitrogen/total_moles
@@ -594,16 +594,16 @@
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Plasma: [round(plasma_concentration*100)]%"
user << "<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>"
user << "<span class='info'>Nitrogen: [round(n2_concentration*100)]%</span>"
user << "<span class='info'>Oxygen: [round(o2_concentration*100)]%</span>"
user << "<span class='info'>CO2: [round(co2_concentration*100)]%</span>"
user << "<span class='info'>Plasma: [round(plasma_concentration*100)]%</span>"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
user << "\blue Temperature: [round(parent.air.temperature-T0C)]&deg;C"
user << "<span class='warning'>Unknown: [round(unknown_concentration*100)]%</span>"
user << "<span class='info'>Temperature: [round(parent.air.temperature-T0C)]&deg;C</span>"
else
user << "\blue Tank is empty!"
user << "<span class='notice'>Tank is empty!</span>"
/obj/machinery/atmospherics/pipe/manifold
icon = 'icons/obj/atmospherics/pipe_manifold.dmi'
@@ -627,7 +627,7 @@
level = T.intact ? 2 : 1
initialize(1)
if(!node1&&!node2&&!node3)
usr << "\red There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
usr << "<span class='warning'>There's nothing to connect this manifold to! A pipe segment must be connected to at least one other object!</span>"
return 0
update_icon() // Skipped in initialize()!
build_network()
@@ -873,7 +873,7 @@
level = T.intact ? 2 : 1
initialize(1)
if(!node1 && !node2 && !node3 && !node4)
usr << "\red There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
usr << "<span class='warning'>There's nothing to connect this manifold to! A pipe segment must be connected to at least one other object!</span>"
return 0
update_icon()
build_network()
@@ -1089,25 +1089,25 @@
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/red))
src._color = "red"
src.color = PIPE_COLOR_RED
user << "\red You paint the pipe red."
user << "<span class='notice'>You paint the pipe red.</span>"
update_icon()
return 1
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/blue))
src._color = "blue"
src.color = PIPE_COLOR_BLUE
user << "\red You paint the pipe blue."
user << "<span class='notice'>You paint the pipe blue.</span>"
update_icon()
return 1
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/green))
src._color = "green"
src.color = PIPE_COLOR_GREEN
user << "\red You paint the pipe green."
user << "<span class='notice'>You paint the pipe green.</span>"
update_icon()
return 1
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/yellow))
src._color = "yellow"
src.color = PIPE_COLOR_YELLOW
user << "\red You paint the pipe yellow."
user << "<span class='notice'>You paint the pipe yellow.</span>"
update_icon()
return 1

View File

@@ -231,11 +231,11 @@
This is overridden in ai.dm
*/
/mob/proc/ShiftClickOn(var/atom/A)
A.ShiftClick(src)
A.ShiftClick()
return
/atom/proc/ShiftClick(var/mob/user)
if(user.client && user.client.eye == user)
examine()
user.examination(src)
return
/*

View File

@@ -50,7 +50,7 @@
// We don't need a fucking toggle.
/mob/dead/observer/ShiftClickOn(var/atom/A)
A.examine()
usr.examination(src)
/atom/proc/attack_ghost(mob/user as mob)
var/ghost_flags = 0
@@ -59,7 +59,7 @@
if(canGhostRead(user,src,ghost_flags))
src.attack_ai(user)
else
src.examine()
user.examination(src)
/* Bay edition
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you

View File

@@ -33,21 +33,21 @@
var/growthstages = 0
var/plant_type = 0 // 0 = 'normal plant'; 1 = weed; 2 = shroom
/obj/item/seeds/examine()
/obj/item/seeds/examine(mob/user)
..()
usr << "Plant Yield: \blue [(yield != -1) ? yield : "\red ERROR"]"
usr << "Plant Potency: \blue [(potency != -1) ? potency : "\red ERROR"]"
user << "Plant Yield: <span class='info'>[(yield != -1) ? yield : "<span class='attack'>ERROR</span>"]</span>"
user << "Plant Potency: <span class='info'>[(potency != -1) ? potency : "<span class='attack'>ERROR</span>"]</span>"
/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
user << "*** <B>[plantname]</B> ***"
user << "-Plant Endurance: \blue [endurance]"
user << "-Plant Lifespan: \blue [lifespan]"
user << "-Plant Endurance: <span class='info'>[endurance]</span>"
user << "-Plant Lifespan: <span class='info'>[lifespan]</span>"
if(yield != -1)
user << "-Plant Yield: \blue [yield]"
user << "-Plant Production: \blue [production]"
user << "-Plant Yield: <span class='info'>[yield]</span>"
user << "-Plant Production: <span class='info'>[production]</span>"
if(potency != -1)
user << "-Plant Potency: \blue [potency]"
user << "-Plant Potency: <span class='info'>[potency]</span>"
return
..() // Fallthrough to item/attackby() so that bags can pick seeds up
@@ -1413,7 +1413,7 @@
force = round((5 + potency / 5), 1)
/obj/item/weapon/grown/deathnettle // -- Skie
desc = "The \red glowing \black nettle incites \red<B>rage</B>\black in you just from looking at it!"
desc = "The <span class='attack'>glowing</span> nettle incites <span class='danger'>rage</span> in you just from looking at it!"
icon = 'icons/obj/weapons.dmi'
name = "deathnettle"
icon_state = "deathnettle"
@@ -1430,7 +1430,7 @@
attack_verb = list("stung")
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<span class='danger'>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</span>"
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/deathnettle/New()
@@ -1496,7 +1496,7 @@
var/WeedKillStr = 2
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<span class='danger'>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</span>"
return (TOXLOSS)
/obj/item/weapon/pestspray // -- Skie
@@ -1515,7 +1515,7 @@
var/PestKillStr = 2
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<span class='danger'>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</span>"
return (TOXLOSS)
/obj/item/weapon/minihoe // -- Numbers

View File

@@ -280,24 +280,34 @@ its easier to just keep the beam vertical.
//I've found that 3 ticks provided a nice balance for my use.
for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) del O
//Woo hoo. Overtime
//All atoms
/atom/verb/examine()
set name = "Examine"
set category = "IC"
set src in oview(12) //make it work from farther away
/atom/proc/examine(mob/user)
//This reformat names to get a/an properly working on item descriptions when they are bloody
var/f_name = "\a [src]."
if(src.blood_DNA)
if(gender == PLURAL)
f_name = "some "
else
f_name = "a "
f_name += "<span class='danger'>blood-stained</span> [name]!"
if (!( usr ))
return
user << "\icon[src] That's [f_name]"
if(desc)
user << desc
usr.face_atom(src)
usr << "That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn
usr << desc
if(on_fire)
usr << "\red OH SHIT! IT'S ON FIRE!"
// *****RM
//usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]"
//user << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]"
if(reagents && is_open_container()) //is_open_container() isn't really the right proc for this, but w/e
user << "It contains:"
if(reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
user << "<span class='info'>[R.volume] units of [R.name]</span>"
else
user << "<span class='info'>Nothing.</span>"
if(on_fire)
user << "<span class='danger'>OH SHIT! IT'S ON FIRE!</span>"
return
// /atom/proc/MouseDrop_T()

View File

@@ -21,7 +21,7 @@ var/global/list/rune_list = list() // HOLY FUCK WHY ARE WE LOOPING THROUGH THE W
runewords-=cultwords[word]
/obj/effect/rune
desc = ""
desc = "A strange collection of symbols drawn in blood."
anchored = 1
icon = 'icons/obj/rune.dmi'
icon_state = "1"
@@ -76,26 +76,10 @@ var/global/list/rune_list = list() // HOLY FUCK WHY ARE WE LOOPING THROUGH THE W
rune_list.Remove(src)
..()
/obj/effect/rune/examine()
set src in view(2)
if(!iscultist(usr))
usr << "A strange collection of symbols drawn in blood."
return
/* Explosions... really?
if(desc && !usr.stat)
usr << "It reads: <i>[desc]</i>."
sleep(30)
explosion(src.loc, 0, 2, 5, 5)
if(src)
del(src)
*/
if(!desc)
usr << "A spell circle drawn in blood. It reads: <i>[word1] [word2] [word3]</i>."
else
usr << "Explosive Runes inscription in blood. It reads: <i>[desc]</i>."
return
/obj/effect/rune/examine(mob/user)
..()
if(iscultist(user))
user << "A spell circle drawn in blood. It reads: <i>[word1] [word2] [word3]</i>."
/obj/effect/rune/attackby(I as obj, user as mob)
@@ -194,6 +178,7 @@ var/global/list/rune_list = list() // HOLY FUCK WHY ARE WE LOOPING THROUGH THE W
/obj/item/weapon/tome
name = "arcane tome"
desc = "An old, dusty tome with frayed edges and a sinister looking cover."
icon_state ="tome"
throw_speed = 1
throw_range = 5
@@ -484,12 +469,10 @@ var/global/list/rune_list = list() // HOLY FUCK WHY ARE WE LOOPING THROUGH THE W
user << "You copy the translation notes from your tome."
/obj/item/weapon/tome/examine()
set src in usr
if(!iscultist(usr))
usr << "An old, dusty tome with frayed edges and a sinister looking cover."
else
usr << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
/obj/item/weapon/tome/examine(mob/user)
..()
if(iscultist(user))
user << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
/obj/item/weapon/tome/cultify()
return

View File

@@ -15,12 +15,6 @@
findNullRod(A)
return 0
/obj/item/weapon/paper/talisman/examine()
set src in view(2)
..()
return
/obj/item/weapon/paper/talisman/New()
..()
pixel_x=0

View File

@@ -71,10 +71,10 @@
// /vg/: Don't let ghosts fuck with this.
/turf/unsimulated/wall/supermatter/attack_ghost(mob/user as mob)
src.examine()
user.examination(src)
/turf/unsimulated/wall/supermatter/attack_ai(mob/user as mob)
return src.examine()
return user.examination(src)
/turf/unsimulated/wall/supermatter/attack_hand(mob/user as mob)
user.visible_message("<span class=\"warning\">\The [user] reaches out and touches \the [src]... And then blinks out of existance.</span>",\

View File

@@ -59,7 +59,7 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/proc/killai(mob/living/silicon/ai/A = AI)
if(A.client)
A << "\red Self-erase protocol dete-- *bzzzzz*"
A << "<span class='warning'>Self-erase protocol dete-- *bzzzzz*</span>"
A << browse(null, "window=hack spideros")
AI = null
A.death(1)//Kill, deleting mob.
@@ -85,7 +85,7 @@ ________________________________________________________________________________
if(s_control&&!s_busy)
deinitialize()
else
affecting << "\red The function did not trigger!"
affecting << "<span class='warning'>The function did not trigger!</span>"
return
/obj/item/clothing/suit/space/space_ninja/proc/spideros()
@@ -96,7 +96,7 @@ ________________________________________________________________________________
if(s_control&&!s_busy&&!kamikaze)
display_spideros()
else
affecting << "\red The interface is locked!"
affecting << "<span class='warning'>The interface is locked!</span>"
return
/obj/item/clothing/suit/space/space_ninja/proc/stealth()
@@ -107,7 +107,7 @@ ________________________________________________________________________________
if(s_control&&!s_busy)
toggle_stealth()
else
affecting << "\red Stealth does not appear to work!"
affecting << "<span class='warning'>Stealth does not appear to work!</span>"
return
//=======//PROCESS PROCS//=======//
@@ -157,27 +157,27 @@ ________________________________________________________________________________
for(var/i,i<7,i++)
switch(i)
if(0)
U << "\blue Now initializing..."
U << "<span class='notice'>Now initializing...</span>"
if(1)
if(!lock_suit(U))//To lock the suit onto wearer.
break
U << "\blue Securing external locking mechanism...\nNeural-net established."
U << "<span class='notice'>Securing external locking mechanism...\nNeural-net established.</span>"
if(2)
U << "\blue Extending neural-net interface...\nNow monitoring brain wave pattern..."
U << "\<span class='notice'>Extending neural-net interface...\nNow monitoring brain wave pattern...</span>"
if(3)
if(U.stat==2||U.health<=0)
U << "\red <B>FĆAL <20>Rr<52>R</B>: 344--93#<23>&&21 BR<42><52>N |/|/aV<61> PATT$RN <B>RED</B>\nA-A-aB<61>rT<72>NG..."
U << "<span class='danger'>FĆAL <20>Rr<52>R:</span> 344--93#<23>&&21 BR<42><52>N |/|/aV<61> PATT$RN <B>RED</B>\nA-A-aB<61>rT<72>NG..."
unlock_suit()
break
lock_suit(U,1)//Check for icons.
U.regenerate_icons()
U << "\blue Linking neural-net interface...\nPattern \green <B>GREEN</B>\blue, continuing operation."
U << "<span class='notice'>Linking neural-net interface...\nPattern </span><span class='confirm'>GREEN</span><span class='notice'>, continuing operation."
if(4)
U << "\blue VOID-shift device status: <B>ONLINE</B>.\nCLOAK-tech device status: <B>ONLINE</B>."
U << "<span class='notice'>VOID-shift device status: <B>ONLINE</B>.\nCLOAK-tech device status: <B>ONLINE</B>.</span>"
if(5)
U << "\blue Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[cell.charge]</B>."
U << "<span class='notice'>Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[cell.charge]</B>.</span>"
if(6)
U << "\blue All systems operational. Welcome to <B>SpiderOS</B>, [U.real_name]."
U << "<span class='notice'>All systems operational. Welcome to <B>SpiderOS</B>, [U.real_name].</span>"
grant_ninja_verbs()
grant_equip_verbs()
ntick()
@@ -187,9 +187,9 @@ ________________________________________________________________________________
if(!U.mind||U.mind.assigned_role!="MODE")//Your run of the mill persons shouldn't know what it is. Or how to turn it on.
U << "You do not understand how this suit functions. Where the heck did it even come from?"
else if(s_initialized)
U << "\red The suit is already functioning. \black <b>Please report this bug.</b>"
U << "<span class='warning'>The suit is already functioning. </span> <b>Please report this bug.</b>"
else
U << "\red <B>ERROR</B>: \black You cannot use this function at this time."
U << "<span class='danger'>ERROR:</span> You cannot use this function at this time."
return
//=======//DEINITIALIZE//=======//
@@ -198,34 +198,34 @@ ________________________________________________________________________________
if(affecting==loc&&!s_busy)
var/mob/living/carbon/human/U = affecting
if(!s_initialized)
U << "\red The suit is not initialized. \black <b>Please report this bug.</b>"
U << "<span class='warning'>The suit is not initialized. </span> <b>Please report this bug.</b>"
return
if(alert("Are you certain you wish to remove the suit? This will take time and remove all abilities.",,"Yes","No")=="No")
return
if(s_busy||flush)
U << "\red <B>ERROR</B>: \black You cannot use this function at this time."
U << "<span class='danger'>ERROR:</span> You cannot use this function at this time."
return
s_busy = 1
for(var/i = 0,i<7,i++)
switch(i)
if(0)
U << "\blue Now de-initializing..."
U << "<span class='notice'>Now de-initializing...</span>"
remove_kamikaze(U)//Shutdowns kamikaze.
spideros = 0//Spideros resets.
if(1)
U << "\blue Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>."
U << "<span class='notice'>Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>.</span>"
remove_ninja_verbs()
if(2)
U << "\blue Primary system status: <B>OFFLINE</B>.\nBackup system status: <B>OFFLINE</B>."
U << "<span class='notice'>Primary system status: <B>OFFLINE</B>.\nBackup system status: <B>OFFLINE</B>.</span>"
if(3)
U << "\blue VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>."
U << "<span class='notice'>VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>.</span>"
cancel_stealth()//Shutdowns stealth.
if(4)
U << "\blue Disconnecting neural-net interface...\green<B>Success</B>\blue."
U << "<span class='notice'>Disconnecting neural-net interface...</span><span class='confirm'>Success.</span>"
if(5)
U << "\blue Disengaging neural-net interface...\green<B>Success</B>\blue."
U << "<span class='notice'>Disengaging neural-net interface...</span><span class='confirm'>Success.</span>"
if(6)
U << "\blue Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>."
U << "<span class='notice'>Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>.</span>"
blade_check(U,2)
remove_equip_verbs()
unlock_suit()
@@ -498,7 +498,7 @@ ________________________________________________________________________________
if(s_control)
if(!affecting||U.stat||!s_initialized)//Check to make sure the guy is wearing the suit after clicking and it's on.
U << "\red Your suit must be worn and active to use this function."
U << "<span class='warning'>Your suit must be worn and active to use this function.</span>"
U << browse(null, "window=spideros")//Closes the window.
return
@@ -510,7 +510,7 @@ ________________________________________________________________________________
U << "Anonymous Messenger blinks."
else
if(!affecting||A.stat||!s_initialized||A.loc!=src)
A << "\red This function is not available at this time."
A << "<span class='warning'>This function is not available at this time.</span>"
A << browse(null, "window=spideros")//Closes the window.
return
@@ -532,7 +532,7 @@ ________________________________________________________________________________
U.electrocute_act(damage, src,0.1,1)//The last argument is a safety for the human proc that checks for gloves.
cell.charge -= damage
else
A << "\red <b>ERROR</b>: \black Not enough energy remaining."
A << "<span class='danger'>ERROR:</span> Not enough energy remaining."
if("Message")
var/obj/item/device/pda/P = locate(href_list["target"])
@@ -542,7 +542,7 @@ ________________________________________________________________________________
display_to << browse(null, "window=spideros")
return
if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists.
display_to << "\red Error: unable to deliver message."
display_to << "<span class='warning'>Error: unable to deliver message.</span>"
display_spideros()
return
P.tnote += "<i><b>&larr; From [!s_control?(A):"an unknown source"]:</b></i><br>[t]<br>"
@@ -555,7 +555,7 @@ ________________________________________________________________________________
if("Inject")
if( (href_list["tag"]=="radium"? (reagents.get_reagent_amount("radium"))<=(a_boost*a_transfer) : !reagents.get_reagent_amount(href_list["tag"])) )//Special case for radium. If there are only a_boost*a_transfer radium units left.
display_to << "\red Error: the suit cannot perform this function. Out of [href_list["name"]]."
display_to << "<span class='warning'>Error: the suit cannot perform this function. Out of [href_list["name"]].</span>"
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, href_list["tag"], href_list["tag"]=="nutriment"?5:a_transfer)//Nutriment is a special case since it's very potent. Shouldn't influence actual refill amounts or anything.
@@ -594,27 +594,27 @@ ________________________________________________________________________________
for(var/i, i<4, i++)
switch(i)
if(0)
U << "\blue Engaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
U << "<span class='notice'>Engaging mode...\n\</span><b>CODE NAME</b>: <span class='danger'>KAMIKAZE</span>"
if(1)
U << "\blue Re-routing power nodes... \nUnlocking limiter..."
U << "<span class='notice'>Re-routing power nodes... \nUnlocking limiter...</span>"
if(2)
U << "\blue Power nodes re-routed. \nLimiter unlocked."
U << "<span class='notice'>Power nodes re-routed. \nLimiter unlocked.</span>"
if(3)
grant_kamikaze(U)//Give them verbs and change variables as necessary.
U.regenerate_icons()//Update their clothing.
ninjablade()//Summon two energy blades.
message_admins("\blue [key_name_admin(U)] used KAMIKAZE mode.")//Let the admins know.
message_admins("<span class='notice'>[key_name_admin(U)] used KAMIKAZE mode.</span>")//Let the admins know.
s_busy = 0
return
sleep(s_delay)
else
U << "\red <b>ERROR<b>: \black Unable to initiate mode."
U << "<span class='danger'>ERROR:</span> Unable to initiate mode."
else
U << browse(null, "window=spideros")
s_busy = 0
return
else
U << "\red ERROR: WRONG PASSWORD!"
U << "<span class='warning'>ERROR: WRONG PASSWORD!</span>"
k_unlock = 0
spideros = 0
s_busy = 0
@@ -630,7 +630,7 @@ ________________________________________________________________________________
t_disk.loc = T
t_disk = null
else
U << "\red <b>ERROR<b>: \black Could not eject disk."
U << "<span class='danger'>ERROR:</span> Could not eject disk."
if("Copy to Disk")
var/datum/tech/current_data = locate(href_list["target"])
@@ -651,14 +651,14 @@ ________________________________________________________________________________
pai.loc = T
pai = null
else
U << "\red <b>ERROR<b>: \black Could not eject pAI card."
U << "<span class='danger'>ERROR:</span> Could not eject pAI card."
if("Override AI Laws")
var/law_zero = A.laws.zeroth//Remembers law zero, if there is one.
A.laws = new /datum/ai_laws/ninja_override
A.set_zeroth_law(law_zero)//Adds back law zero if there was one.
A.show_laws()
U << "\blue Law Override: <b>SUCCESS</b>."
U << "<span class='notice'>Law Override: <b>SUCCESS</b>.</span>"
if("Purge AI")
var/confirm = alert("Are you sure you want to purge the AI? This cannot be undone once started.", "Confirm purge", "Yes", "No")
@@ -672,31 +672,31 @@ ________________________________________________________________________________
if(AI==A)
switch(i)
if(0)
A << "\red <b>WARNING</b>: \black purge procedure detected. \nNow hacking host..."
U << "\red <b>WARNING</b>: HACKING AT<41><54>TEMP<4D> IN PR0GRESs!"
A << "<span class='danger'>WARNING</span>: purge procedure detected. \nNow hacking host..."
U << "<span class='danger'>WARNING</span>: HACKING AT<41><54>TEMP<4D> IN PR0GRESs!"
spideros = 0
k_unlock = 0
U << browse(null, "window=spideros")
if(1)
A << "Disconnecting neural interface..."
U << "\red <b>WAR<41>NING</b>: <20>R<EFBFBD>O0<4F>Gr<47>--S 2&3%"
U << "<span class='danger'>WAR<41>NING</span>: <20>R<EFBFBD>O0<4F>Gr<47>--S 2&3%"
if(2)
A << "Shutting down external protocol..."
U << "\red <b>WARNING</b>: P<><50><EFBFBD><EFBFBD>RֆGr<47>5S 677^%"
U << "<span class='danger'>WARNING</span>: P<><50><EFBFBD><EFBFBD>RֆGr<47>5S 677^%"
cancel_stealth()
if(3)
A << "Connecting to kernel..."
U << "\red <b>WARNING</b>: <20>R<EFBFBD>r<EFBFBD>R_404"
U << "<span class='danger'>WARNING</span>: <20>R<EFBFBD>r<EFBFBD>R_404"
A.control_disabled = 0
if(4)
A << "Connection established and secured. Menu updated."
U << "\red <b>W<>r#nING</b>: #%@!!WȆ|_4<5F>54@ \nUn<55>B88l3 T<> L<>-<2D>o-L<>CaT2 ##$!<21>RN<52>0..%.."
U << "<span class='danger'>W<>r#nING</span>: #%@!!WȆ|_4<5F>54@ \nUn<55>B88l3 T<> L<>-<2D>o-L<>CaT2 ##$!<21>RN<52>0..%.."
grant_AI_verbs()
return
sleep(s_delay)
else break
s_busy = 0
U << "\blue Hacking attempt disconnected. Resuming normal operation."
U << "<span class='notice'>Hacking attempt disconnected. Resuming normal operation.</span>"
else
flush = 1
A.suiciding = 1
@@ -744,9 +744,9 @@ ________________________________________________________________________________
ai_holo_process()//Move to initialize
else
AI << "\red ERROR: \black Image feed in progress."
AI << "<span class='warning'>ERROR:</span> Image feed in progress."
else
AI << "\red ERROR: \black Unable to project image."
AI << "<span class='warning'>ERROR:</span> Unable to project image."
return
/obj/item/clothing/suit/space/space_ninja/proc/ai_holo_process()
@@ -811,13 +811,13 @@ ________________________________________________________________________________
if(s_control)
I:transfer_ai("NINJASUIT","AICARD",src,U)
else
U << "\red <b>ERROR</b>: \black Remote access channel disabled."
U << "<span class='warning'>ERROR:</span> Remote access channel disabled."
return//Return individually so that ..() can run properly at the end of the proc.
else if(istype(I, /obj/item/device/paicard) && !pai)//If it's a pai card.
U:drop_item()
I.loc = src
pai = I
U << "\blue You slot \the [I] into \the [src]."
U << "<span class='notice'>You slot \the [I] into \the [src].</span>"
updateUsrDialog()
return
else if(istype(I, /obj/item/weapon/reagent_containers/glass))//If it's a glass beaker.
@@ -838,7 +838,7 @@ ________________________________________________________________________________
return
else if(istype(I, /obj/item/weapon/cell))
if(I:maxcharge>cell.maxcharge&&n_gloves&&n_gloves.candrain)
U << "\blue Higher maximum capacity detected.\nUpgrading..."
U << "<span class='notice'>Higher maximum capacity detected.\nUpgrading...</span>"
if (n_gloves&&n_gloves.candrain&&do_after(U,s_delay))
U.drop_item()
I.loc = src
@@ -850,9 +850,9 @@ ________________________________________________________________________________
old_cell.corrupt()
old_cell.updateicon()
cell = I
U << "\blue Upgrade complete. Maximum capacity: <b>[round(cell.maxcharge/100)]</b>%"
U << "<span class='notice'>Upgrade complete. Maximum capacity: <b>[round(cell.maxcharge/100)]</b>%</span>"
else
U << "\red Procedure interrupted. Protocol terminated."
U << "<span class='warning'>Procedure interrupted. Protocol terminated.</span>"
return
else if(istype(I, /obj/item/weapon/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit.
var/obj/item/weapon/disk/tech_disk/TD = I
@@ -865,13 +865,13 @@ ________________________________________________________________________________
current_data.level=TD.stored.level
break
TD.stored = null
U << "\blue Data analyzed and updated. Disk erased."
U << "<span class='notice'>Data analyzed and updated. Disk erased.</span>"
else
U << "\red <b>ERROR</b>: \black Procedure interrupted. Process terminated."
U << "<span class='danger'>ERROR:</span> Procedure interrupted. Process terminated."
else
I.loc = src
t_disk = I
U << "\blue You slot \the [I] into \the [src]."
U << "<span class='notice'>You slot \the [I] into \the [src].</span>"
return
..()
@@ -885,7 +885,7 @@ ________________________________________________________________________________
s_active=!s_active
icon_state = U.gender==FEMALE ? "s-ninjasf" : "s-ninjas"
U.regenerate_icons() //update their icons
U << "\blue You are now invisible to normal detection."
U << "<span class='notice'>You are now invisible to normal detection.</span>"
for(var/mob/O in oviewers(U))
O.show_message("[U.name] vanishes into thin air!",1)
U.invisibility = INVISIBILITY_OBSERVER
@@ -897,7 +897,7 @@ ________________________________________________________________________________
spawn(0)
anim(U.loc,U,'icons/mob/mob.dmi',,"uncloak",,U.dir)
s_active=!s_active
U << "\blue You are now visible."
U << "<span class='notice'>You are now visible.</span>"
U.invisibility = 0
for(var/mob/O in oviewers(U))
O.show_message("[U.name] appears from thin air!",1)
@@ -926,21 +926,19 @@ ________________________________________________________________________________
U.drop_item()
return 0
/obj/item/clothing/suit/space/space_ninja/examine()
set src in view()
/obj/item/clothing/suit/space/space_ninja/examine(mob/user)
..()
if(s_initialized)
var/mob/living/carbon/human/U = affecting
if(s_control)
U << "All systems operational. Current energy capacity: <B>[cell.charge]</B>."
if(s_control && (user == affecting))
user << "All systems operational. Current energy capacity: <B>[cell.charge]</B>."
if(!kamikaze)
U << "The CLOAK-tech device is <B>[s_active?"active":"inactive"]</B>."
user << "The CLOAK-tech device is <B>[s_active?"active":"inactive"]</B>."
else
U << "\red KAMIKAZE MODE ENGAGED!"
U << "There are <B>[s_bombs]</B> smoke bombs remaining."
U << "There are <B>[a_boost]</B> adrenaline boosters remaining."
user << "<span class='danger'>KAMIKAZE MODE ENGAGED!</span>"
user << "There are <B>[s_bombs]</B> smoke bombs remaining."
user << "There are <B>[a_boost]</B> adrenaline boosters remaining."
else
U << "<22>rr<72>R <20>a<EFBFBD><61>a<EFBFBD><61> No-<2D>-<2D> f<><66>N<EFBFBD> 3RR<52>r"
user << "<22>rr<72>R <20>a<EFBFBD><61>a<EFBFBD><61> No-<2D>-<2D> f<><66>N<EFBFBD> 3RR<52>r"
/*
===================================================================================
@@ -963,7 +961,7 @@ ________________________________________________________________________________
G.draining = 1
if(target_type!="RESEARCH")//I lumped research downloading here for ease of use.
U << "\blue Now charging battery..."
U << "<span class='notice'>Now charging battery...</span>"
switch(target_type)
@@ -986,14 +984,14 @@ ________________________________________________________________________________
S.cell.charge+=drain
totaldrain+=drain
else break
U << "\blue Gained <B>[totaldrain]</B> energy from the APC."
U << "<span class='notice'>Gained <B>[totaldrain]</B> energy from the APC.</span>"
if(!A.emagged)
flick("apc-spark", src)
A.emagged = 1
A.locked = 0
A.update_icon()
else
U << "\red This APC has run dry of power. You must find another source."
U << "<span class='warning'>This APC has run dry of power. You must find another source.</span>"
if("SMES")
var/obj/machinery/power/smes/A = target
@@ -1014,15 +1012,15 @@ ________________________________________________________________________________
S.cell.charge+=drain
totaldrain+=drain
else break
U << "\blue Gained <B>[totaldrain]</B> energy from the SMES cell."
U << "<span class='notice'>Gained <B>[totaldrain]</B> energy from the SMES cell.</span>"
else
U << "\red This SMES cell has run dry of power. You must find another source."
U << "<span class='warning'>This SMES cell has run dry of power. You must find another source.</span>"
if("CELL")
var/obj/item/weapon/cell/A = target
if(A.charge)
if (G.candrain&&do_after(U,30))
U << "\blue Gained <B>[A.charge]</B> energy from the cell."
U << "<span class='notice'>Gained <B>[A.charge]</B> energy from the cell.</span>"
if(S.cell.charge+A.charge>S.cell.maxcharge)
S.cell.charge=S.cell.maxcharge
else
@@ -1032,9 +1030,9 @@ ________________________________________________________________________________
A.corrupt()
A.updateicon()
else
U << "\red Procedure interrupted. Protocol terminated."
U << "<span class='warning'>Procedure interrupted. Protocol terminated.</span>"
else
U << "\red This cell is empty and of no use."
U << "<span class='warning'>This cell is empty and of no use.</span>"
if("MACHINERY")//Can be applied to generically to all powered machinery. I'm leaving this alone for now.
var/obj/machinery/A = target
@@ -1069,31 +1067,31 @@ ________________________________________________________________________________
totaldrain += drained
spark_system.start()
if(drained==0) break
U << "\blue Gained <B>[totaldrain]</B> energy from the power network."
U << "<span class='notice'>Gained <B>[totaldrain]</B> energy from the power network.</span>"
else
U << "\red Power network could not be found. Aborting."
U << "<span class='warning'>Power network could not be found. Aborting.</span>"
else
U << "\red This recharger is not providing energy. You must find another source."
U << "<span class='warning'>This recharger is not providing energy. You must find another source.</span>"
if("RESEARCH")
var/obj/machinery/A = target
U << "\blue Hacking \the [A]..."
U << "<span class='notice'>Hacking \the [A]...</span>"
spawn(0)
var/turf/location = get_turf(U)
for(var/mob/living/silicon/ai/AI in player_list)
AI << "\red <b>Network Alert: Hacking attempt detected[location?" in [location]":". Unable to pinpoint location"]</b>."
AI << "<span class='danger'>Network Alert: Hacking attempt detected[location?" in [location]":". Unable to pinpoint location"]</span>."
if(A:files&&A:files.known_tech.len)
for(var/datum/tech/current_data in S.stored_research)
U << "\blue Checking \the [current_data.name] database."
U << "<span class='notice'>Checking \the [current_data.name] database.</span>"
if(do_after(U, S.s_delay)&&G.candrain&&!isnull(A))
for(var/datum/tech/analyzing_data in A:files.known_tech)
if(current_data.id==analyzing_data.id)
if(analyzing_data.level>current_data.level)
U << "\blue Database: \black <b>UPDATED</b>."
U << "<span class='notice'>Database:<span> <b>UPDATED</b>."
current_data.level = analyzing_data.level
break//Move on to next.
else break//Otherwise, quit processing.
U << "\blue Data analyzed. Process finished."
U << "<span class='notice'>Data analyzed. Process finished.</span>"
if("WIRE")
var/obj/structure/cable/A = target
@@ -1121,11 +1119,11 @@ ________________________________________________________________________________
totaldrain += drained
S.spark_system.start()
if(drained==0) break
U << "\blue Gained <B>[totaldrain]</B> energy from the power network."
U << "<span class='notice'>Gained <B>[totaldrain]</B> energy from the power network.</span>"
if("MECHA")
var/obj/mecha/A = target
A.occupant_message("\red Warning: Unauthorized access through sub-route 4, block H, detected.")
A.occupant_message("<span class='warning'>Warning: Unauthorized access through sub-route 4, block H, detected.</span>")
if(A.get_charge())
while(G.candrain&&A.cell.charge>0&&!maxcapacity)
drain = rand(G.mindrain,G.maxdrain)
@@ -1141,13 +1139,13 @@ ________________________________________________________________________________
S.cell.charge+=drain
totaldrain+=drain
else break
U << "\blue Gained <B>[totaldrain]</B> energy from [src]."
U << "<span class='notice'>Gained <B>[totaldrain]</B> energy from [src].</span>"
else
U << "\red The exosuit's battery has run dry. You must find another source of power."
U << "<span class='warning'>The exosuit's battery has run dry. You must find another source of power.</span>"
if("CYBORG")
var/mob/living/silicon/robot/A = target
A << "\red Warning: Unauthorized access through sub-route 12, block C, detected."
A << "<span class='warning'>Warning: Unauthorized access through sub-route 12, block C, detected.</span>"
G.draining = 1
if(A.cell&&A.cell.charge)
while(G.candrain&&A.cell.charge>0&&!maxcapacity)
@@ -1164,9 +1162,9 @@ ________________________________________________________________________________
S.cell.charge+=drain
totaldrain+=drain
else break
U << "\blue Gained <B>[totaldrain]</B> energy from [A]."
U << "<span class='notice'>Gained <B>[totaldrain]</B> energy from [A].</span>"
else
U << "\red Their battery has run dry of power. You must find another source."
U << "<span class='warning'>Their battery has run dry of power. You must find another source.</span>"
else//Else nothing :<
@@ -1185,12 +1183,10 @@ ________________________________________________________________________________
U << "You <b>[candrain?"disable":"enable"]</b> special interaction."
candrain=!candrain
/obj/item/clothing/gloves/space_ninja/examine()
set src in view()
/obj/item/clothing/gloves/space_ninja/examine(mob/user)
..()
if(!canremove)
var/mob/living/carbon/human/U = loc
U << "The energy drain mechanism is: <B>[candrain?"active":"inactive"]</B>."
user << "The energy drain mechanism is: <B>[candrain?"active":"inactive"]</B>."
/*
===================================================================================
@@ -1290,10 +1286,8 @@ ________________________________________________________________________________
U.sight &= ~SEE_TURFS
U << "Switching mode to <B>Scouter</B>."
/obj/item/clothing/mask/gas/voice/space_ninja/examine()
set src in view()
/obj/item/clothing/mask/gas/voice/space_ninja/examine(mob/user)
..()
var/mode
switch(mode)
if(0)
@@ -1304,8 +1298,8 @@ ________________________________________________________________________________
mode = "Thermal Scanner"
if(3)
mode = "Meson Scanner"
usr << "<B>[mode]</B> is active."//Leaving usr here since it may be on the floor or on a person.
usr << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
user << "<B>[mode]</B> is active."//Leaving usr here since it may be on the floor or on a person.
user << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
/*
===================================================================================
@@ -1343,7 +1337,7 @@ It is possible to destroy the net by the occupant or someone else.
for(var/mob/O in viewers(src, 3))
O.show_message(text("[] was recovered from the energy net!", M.name), 1, text("You hear a grunt."), 2)
if(!isnull(master))//As long as they still exist.
master << "\red <b>ERROR</b>: \black unable to initiate transport protocol. Procedure terminated."
master << "<span class='danger'>ERROR:</span> unable to initiate transport protocol. Procedure terminated."
del(src)
return
@@ -1357,7 +1351,7 @@ It is possible to destroy the net by the occupant or someone else.
if(isnull(M)||M.loc!=loc)//If mob is gone or not at the location.
if(!isnull(master))//As long as they still exist.
master << "\red <b>ERROR</b>: \black unable to locate \the [mob_name]. Procedure terminated."
master << "<span class='danger'>ERROR:</span> unable to locate \the [mob_name]. Procedure terminated."
del(src)//Get rid of the net.
return
@@ -1378,7 +1372,7 @@ It is possible to destroy the net by the occupant or someone else.
anim(M.loc,M,'icons/mob/mob.dmi',,"phaseout",,M.dir)
M.loc = pick(holdingfacility)//Throw mob in to the holding facility.
M << "\red You appear in a strange place!"
M << "<span class='warning'>You appear in a strange place!</span>"
spawn(0)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
@@ -1393,12 +1387,12 @@ It is possible to destroy the net by the occupant or someone else.
O.show_message(text("[] vanished!", M), 1, text("You hear sparks flying!"), 2)
if(!isnull(master))//As long as they still exist.
master << "\blue <b>SUCCESS</b>: \black transport procedure of \the [affecting] complete."
master << "<span class='bnotice'>SUCCESS</span>:</span> transport procedure of \the [affecting] complete."
M.anchored = 0//Important.
else//And they are free.
M << "\blue You are free of the net!"
M << "<span class='notice'>You are free of the net!</span>"
return
bullet_act(var/obj/item/projectile/Proj)
@@ -1430,7 +1424,7 @@ It is possible to destroy the net by the occupant or someone else.
hitby(AM as mob|obj)
..()
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[src] was hit by [AM].</B>"), 1)
O.show_message(text("<span class='danger'>[src] was hit by [AM].</span>"), 1)
var/tforce = 0
if(ismob(AM))
tforce = 10
@@ -1444,9 +1438,9 @@ It is possible to destroy the net by the occupant or someone else.
attack_hand()
if (M_HULK in usr.mutations)
usr << text("\blue You easily destroy the energy net.")
usr << text("<span class='notice'>You easily destroy the energy net.</span>")
for(var/mob/O in oviewers(src))
O.show_message(text("\red [] rips the energy net apart!", usr), 1)
O.show_message(text("<span class='attack'>[] rips the energy net apart!</span>", usr), 1)
health-=50
healthcheck()
return
@@ -1457,15 +1451,15 @@ It is possible to destroy the net by the occupant or someone else.
attack_alien()
if (islarva(usr))
return
usr << text("\green You claw at the net.")
usr << text("</span><span class='attack'>You claw at the net.</span>")
for(var/mob/O in oviewers(src))
O.show_message(text("\red [] claws at the energy net!", usr), 1)
O.show_message(text("<span class='attack'>[] claws at the energy net!</span>", usr), 1)
playsound(get_turf(src), 'sound/weapons/slash.ogg', 80, 1)
health -= rand(10, 20)
if(health <= 0)
usr << text("\green You slice the energy net to pieces.")
usr << text("\</span><span class='attack'>You slice the energy net to pieces.</span>")
for(var/mob/O in oviewers(src))
O.show_message(text("\red [] slices the energy net apart!", usr), 1)
O.show_message(text("<span class='attack'>[] slices the energy net apart!</span>", usr), 1)
healthcheck()
return

View File

@@ -16,53 +16,53 @@
var/active = 0
attack_self()
if(!active)
active = 1
workdisk()
usr << "\blue You activate the pinpointer"
playsound(get_turf(src), 'sound/items/healthanalyzer.ogg', 30, 1)
else
active = 0
icon_state = "pinoff"
usr << "\blue You deactivate the pinpointer"
/obj/item/weapon/pinpointer/attack_self()
if(!active)
active = 1
workdisk()
usr << "<span class='notice'>You activate \the [src]</span>"
playsound(get_turf(src), 'sound/items/healthanalyzer.ogg', 30, 1)
else
active = 0
icon_state = "pinoff"
usr << "<span class='notice'>You deactivate \the [src]</span>"
proc/point_at(atom/target)
if(!active)
return
if(!target)
icon_state = "pinonnull"
return
/obj/item/weapon/pinpointer/proc/point_at(atom/target)
if(!active)
return
if(!target)
icon_state = "pinonnull"
return
var/turf/T = get_turf(target)
var/turf/L = get_turf(src)
var/turf/T = get_turf(target)
var/turf/L = get_turf(src)
if(T.z != L.z)
icon_state = "pinonnull"
else
dir = get_dir(L, T)
switch(get_dist(L, T))
if(-1)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5)
.()
if(T.z != L.z)
icon_state = "pinonnull"
else
dir = get_dir(L, T)
switch(get_dist(L, T))
if(-1)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5)
.()
proc/workdisk()
if(!the_disk)
the_disk = locate()
point_at(the_disk)
/obj/item/weapon/pinpointer/proc/workdisk()
if(!the_disk)
the_disk = locate()
point_at(the_disk)
examine()
..()
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb.timing)
usr << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
/obj/item/weapon/pinpointer/examine(mob/user)
..()
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb.timing)
user << "<span class='danger'>Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]</span>"
/obj/item/weapon/pinpointer/advpinpointer
@@ -73,20 +73,20 @@
var/turf/location = null
var/obj/target = null
attack_self()
if(!active)
active = 1
if(mode == 0)
workdisk()
if(mode == 1)
point_at(location)
if(mode == 2)
point_at(target)
usr << "\blue You activate the pinpointer"
else
active = 0
icon_state = "pinoff"
usr << "\blue You deactivate the pinpointer"
/obj/item/weapon/pinpointer/advpinpointer/attack_self()
if(!active)
active = 1
if(mode == 0)
workdisk()
if(mode == 1)
point_at(location)
if(mode == 2)
point_at(target)
usr << "<span class='notice'>You activate the pinpointer</span>"
else
active = 0
icon_state = "pinoff"
usr << "<span class='notice'>You deactivate the pinpointer</span>"
/obj/item/weapon/pinpointer/advpinpointer/verb/toggle_mode()
@@ -254,47 +254,47 @@
var/obj/target = null
var/used = 0
attack_self()
if(!active)
active = 1
point_at(target)
usr << "\blue You activate the pinpointer"
else
active = 0
icon_state = "pinoff"
usr << "\blue You deactivate the pinpointer"
verb/select_pda()
set category = "Object"
set name = "Select pinpointer target"
set src in view(1)
if(used)
usr << "Target has already been set!"
return
var/list/L = list()
L["Cancel"] = "Cancel"
var/length = 1
for (var/obj/item/device/pda/P in world)
if(P.name != "\improper PDA")
L[text("([length]) [P.name]")] = P
length++
var/t = input("Select pinpointer target. WARNING: Can only set once.") as null|anything in L
if(t == "Cancel")
return
target = L[t]
if(!target)
usr << "Failed to locate [target]!"
return
/obj/item/weapon/pinpointer/pdapinpointer/attack_self()
if(!active)
active = 1
point_at(target)
usr << "You set the pinpointer to locate [target]"
used = 1
usr << "<span class='notice'>You activate the pinpointer</span>"
else
active = 0
icon_state = "pinoff"
usr << "<span class='notice'>You deactivate the pinpointer</span>"
/obj/item/weapon/pinpointer/pdapinpointer/verb/select_pda()
set category = "Object"
set name = "Select pinpointer target"
set src in view(1)
if(used)
usr << "Target has already been set!"
return
var/list/L = list()
L["Cancel"] = "Cancel"
var/length = 1
for (var/obj/item/device/pda/P in world)
if(P.name != "\improper PDA")
L[text("([length]) [P.name]")] = P
length++
var/t = input("Select pinpointer target. WARNING: Can only set once.") as null|anything in L
if(t == "Cancel")
return
target = L[t]
if(!target)
usr << "Failed to locate [target]!"
return
active = 1
point_at(target)
usr << "You set the pinpointer to locate [target]"
used = 1
examine()
..()
if (target)
usr << "\blue Tracking [target]"
/obj/item/weapon/pinpointer/pdapinpointer/examine(mob/user)
..()
if (target)
user << "<span class='notice'>Tracking [target]</span>"

View File

@@ -826,7 +826,7 @@
stat ^= BROKEN
add_fingerprint(user)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] has []activated []!", user, (stat&BROKEN) ? "de" : "re", src), 1)
O.show_message(text("<span class='warning'>[] has []activated []!</span>", user, (stat&BROKEN) ? "de" : "re", src), 1)
update_icon()
return
*/
@@ -851,10 +851,10 @@
else
if(allowed(user) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN))
locked = !locked
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the Air Alarm interface.</span>"
updateUsrDialog()
else
user << "\red Access denied."
user << "<span class='warning'>Access denied.</span>"
return
if(1)
@@ -910,12 +910,12 @@
spawn(rand(0,15))
update_icon()
/obj/machinery/alarm/examine()
/obj/machinery/alarm/examine(mob/user)
..()
if (buildstage < 2)
usr << "It is not wired."
user << "<span class='info'>It is not wired.</span>"
if (buildstage < 1)
usr << "The circuit is missing."
user << "<span class='info'>The circuit is missing.</span>"
/*
AIR ALARM ITEM
@@ -951,14 +951,14 @@ Code shamelessly copied from apc_frame
var/turf/loc = get_turf_loc(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Air Alarm cannot be placed on this spot."
usr << "<span class='warning'>Air Alarm cannot be placed on this spot.</span>"
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Air Alarm cannot be placed in this area."
usr << "<span class='warning'>Air Alarm cannot be placed in this area.</span>"
return
if(gotwallitem(loc, ndir))
usr << "\red There's already an item on this wall!"
usr << "<span class='warning'>There's already an item on this wall!</span>"
return
new /obj/machinery/alarm(loc, ndir, 1)
@@ -1042,13 +1042,13 @@ FIRE ALARM
if (istype(W, /obj/item/device/multitool))
src.detecting = !( src.detecting )
if (src.detecting)
user.visible_message("\red [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.")
user.visible_message("<span class='attack'>[user] has reconnected [src]'s detecting unit!</span>", "You have reconnected [src]'s detecting unit.")
else
user.visible_message("\red [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
user.visible_message("<span class='attack'>[user] has disconnected [src]'s detecting unit!</span>", "You have disconnected [src]'s detecting unit.")
if(istype(W, /obj/item/weapon/wirecutters))
if(do_after(user,50))
buildstage=1
user.visible_message("\red [user] has cut the wiring from \the [src]!", "You have cut the last of the wiring from \the [src].")
user.visible_message("<span class='attack'>[user] has cut the wiring from \the [src]!</span>", "You have cut the last of the wiring from \the [src].")
update_icon()
new /obj/item/weapon/cable_coil(user.loc,5)
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
@@ -1266,14 +1266,14 @@ Code shamelessly copied from apc_frame
var/turf/loc = get_turf_loc(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Fire Alarm cannot be placed on this spot."
usr << "<span class='warning'>Fire Alarm cannot be placed on this spot.</span>"
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Fire Alarm cannot be placed in this area."
usr << "<span class='warning'>Fire Alarm cannot be placed in this area.</span>"
return
if(gotwallitem(loc, ndir))
usr << "\red There's already an item on this wall!"
usr << "<span class='warning'>There's already an item on this wall!</span>"
return
new /obj/machinery/firealarm(loc, ndir, 1)

View File

@@ -1,6 +1,6 @@
/obj/machinery/meter
name = "meter"
desc = "It measures something."
desc = "A gas flow meter."
icon = 'icons/obj/meter.dmi'
icon_state = "meterX"
var/obj/machinery/atmospherics/pipe/target = null
@@ -100,12 +100,9 @@
t += "The connect error light is blinking."
return t
/obj/machinery/meter/examine()
set src in view(3)
var/t = "A gas flow meter. "
t += status()
usr << t
/obj/machinery/meter/examine(mob/user)
..()
attack_hand(user)
/obj/machinery/meter/attack_ai(var/mob/user)
attack_hand(user)
@@ -122,7 +119,7 @@
if (get_dist(usr, src) <= 3 || istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead))
t += status()
else
usr << "\blue <B>You are too far away.</B>"
usr << "<span class='notice'><B>You are too far away.</B></span>"
return 1
usr << t
@@ -145,11 +142,11 @@
return ..()
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
"[user] unfastens \the [src].</span>", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear ratchet.")
new /obj/item/pipe_meter(src.loc)
del(src)

View File

@@ -53,21 +53,19 @@
if(!locked && open)
emagged = 2
/obj/machinery/bot/examine()
set src in view()
/obj/machinery/bot/examine(mob/user)
..()
if (src.health < maxhealth)
if (src.health > maxhealth/3)
usr << "<span class='warning'>[src]'s parts look loose.</span>"
user << "<span class='warning'>[src]'s parts look loose.</span>"
else
usr << "<span class='danger'>[src]'s parts look very loose!</span>"
return
user << "<span class='danger'>[src]'s parts look very loose!</span>"
/obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
if(flags & INVULNERABLE)
return
src.health -= rand(15,30)*brute_dam_coeff
src.visible_message("\red <B>[user] has slashed [src]!</B>")
src.visible_message("<span class='danger'>[user] has slashed [src]!</span>")
playsound(get_turf(src), 'sound/weapons/slice.ogg', 25, 1, -1)
if(prob(10))
new /obj/effect/decal/cleanable/blood/oil(src.loc)
@@ -79,7 +77,7 @@
return
if(M.melee_damage_upper == 0) return
src.health -= M.melee_damage_upper
src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>")
src.visible_message("<span class='danger'>[M] has [M.attacktext] [src]!</span>")
add_logs(M, src, "attacked", admin=0)
if(prob(10))
new /obj/effect/decal/cleanable/blood/oil(src.loc)
@@ -110,7 +108,7 @@
if(health < maxhealth)
if(open)
health = min(maxhealth, health+10)
user.visible_message("\red [user] repairs [src]!","\blue You repair [src]!")
user.visible_message("<span class='danger'>[user] repairs [src]!</span>","<span class='notice'>You repair [src]!</span>")
else
user << "<span class='notice'>Unable to repair with the maintenance panel closed.</span>"
else

View File

@@ -33,12 +33,11 @@
else
overlays.Cut()
/obj/machinery/cell_charger/examine()
set src in oview(5)
/obj/machinery/cell_charger/examine(mob/user)
..()
usr << "There's [charging ? "a" : "no"] cell in the charger."
user << "There's [charging ? "a" : "no"] cell in the charger."
if(charging)
usr << "Current charge: [charging.charge]"
user << "Current charge: [charging.charge]"
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN)
@@ -47,14 +46,14 @@
..()
if(istype(W, /obj/item/weapon/cell) && anchored)
if(charging)
user << "\red There is already a cell in the charger."
user << "<span class='warning'>There is already a cell in the charger.</span>"
return
else
var/area/a = loc.loc // Gets our locations location, like a dream within a dream
if(!isarea(a))
return
if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
user << "\red The [name] blinks red as you try to insert the cell!"
user << "<span class='warning'>The [name] blinks red as you try to insert the cell!</span>"
return
user.drop_item()
@@ -77,7 +76,7 @@
/obj/machinery/cell_charger/wrenchAnchor(mob/user)
if(charging)
user << "\red Remove the cell first!"
user << "<span class='warning'>Remove the cell first!</span>"
return
..()

View File

@@ -136,11 +136,9 @@
src.read_only = !src.read_only
user << "You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"]."
/obj/item/weapon/disk/data/examine()
set src in oview(5)
/obj/item/weapon/disk/data/examine(mob/user)
..()
usr << text("The write-protect tab is set to [src.read_only ? "protected" : "unprotected"].")
return
user << "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"]."
//Health Tracker Implant
@@ -321,7 +319,7 @@
/obj/machinery/clonepod/crowbarDestroy(mob/user)
if (occupant)
user << "\red You cannot disassemble this [src], it's occupado."
user << "<span class='warning'>You cannot disassemble this [src], it's occupado.</span>"
return
return..()
@@ -329,18 +327,18 @@
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (!src.check_access(W))
user << "\red Access Denied."
user << "<span class='warning'>Access Denied.</span>"
return
if ((!src.locked) || (isnull(src.occupant)))
return
if ((src.occupant.health < -20) && (src.occupant.stat != 2))
user << "\red Access Refused."
user << "<span class='warning'>Access Refused.</span>"
return
else
src.locked = 0
user << "System unlocked."
else if (istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
user << "\blue \The [src] processes \the [W]."
user << "<span class='notice'>\The [src] processes \the [W].</span>"
biomass += 50
user.drop_item()
del(W)

View File

@@ -65,7 +65,7 @@
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
return
if(occupant)
user << "\blue <B>The cryo cell is already occupied!</B>"
user << "<span class='bnotice'>The cryo cell is already occupied!</span>"
return
if(isrobot(user))
if(!istype(user:module, /obj/item/weapon/robot_module/medical))
@@ -75,7 +75,7 @@
if(!istype(L) || L.buckled)
return
if(L.abiotic())
user << "\red <B>Subject cannot have abiotic items on.</B>"
user << "<span class='danger'>Subject cannot have abiotic items on.</span>"
return
for(var/mob/living/carbon/slime/M in range(1,L))
if(M.Victim == L)
@@ -123,19 +123,21 @@
go_out()
return
/obj/machinery/atmospherics/unary/cryo_cell/examine()
/obj/machinery/atmospherics/unary/cryo_cell/examine(mob/user)
..()
if(in_range(usr, src))
usr << "You can just about make out some loose objects floating in the murk:"
for(var/obj/O in src)
if(O != beaker)
usr << O.name
for(var/mob/M in src)
if(M != occupant)
usr << M.name
if(in_range(user,src))
if(contents)
user << "You can just about make out some properties of the cryo's murky depths:"
for(var/atom/movable/floater in contents)
user << "A figure floats in the depths, they appear to be [floater.name]"
if(beaker)
user << "A beaker is releasing the following chemicals into the fluids:"
for(var/datum/reagent/R in beaker.reagents.reagent_list)
user << "<span class='info'>[R.volume] units of [R.name]</span>"
else
user << "<span class='info'>The chamber appears devoid of anything but its biotic fluids.</span>"
else
usr << "<span class='notice'>Too far away to view contents.</span>"
user << "<span class='notice'>Too far away to view contents.</span>"
/obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user)
ui_interact(user)
@@ -244,7 +246,7 @@
user << "[src] is on."
return
if(occupant)
user << "\red [occupant.name] is inside the [src]!"
user << "<span class='warning'>[occupant.name] is inside the [src]!</span>"
return
if(beaker) //special check to avoid destroying this
beaker.loc = src.loc
@@ -253,7 +255,7 @@
/obj/machinery/atmospherics/unary/cryo_cell/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
if(istype(G, /obj/item/weapon/reagent_containers/glass))
if(beaker)
user << "\red A beaker is already loaded into the machine."
user << "<span class='warning'>A beaker is already loaded into the machine.</span>"
return
beaker = G
user.drop_item()
@@ -354,16 +356,16 @@
return
/obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob)
if (!istype(M))
usr << "\red <B>The cryo cell cannot handle such a lifeform!</B>"
usr << "<span class='danger'>The cryo cell cannot handle such a lifeform!</span>"
return
if (occupant)
usr << "\red <B>The cryo cell is already occupied!</B>"
usr << "<span class='danger'>The cryo cell is already occupied!</span>"
return
if (M.abiotic())
usr << "\red Subject may not have abiotic items on."
usr << "<span class='warning'>Subject may not have abiotic items on.</span>"
return
if(!node)
usr << "\red The cell is not correctly connected to its pipe network!"
usr << "<span class='warning'>The cell is not correctly connected to its pipe network!</span>"
return
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
@@ -371,7 +373,7 @@
M.stop_pulling()
M.loc = src
if(M.health > -100 && (M.health < 0 || M.sleeping))
M << "\blue <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
M << "<span class='bnotice'>You feel a cold liquid surround you. Your skin starts to freeze up.</span>"
occupant = M
//M.metabslow = 1
add_fingerprint(usr)
@@ -386,7 +388,7 @@
if(usr == occupant)//If the user is inside the tube...
if (usr.stat == 2)//and he's not dead....
return
usr << "\blue Release sequence activated. This will take two minutes."
usr << "<span class='notice'>Release sequence activated. This will take two minutes.</span>"
sleep(1200)
if(!src || !usr || !occupant || (occupant != usr)) //Check if someone's released/replaced/bombed him already
return

View File

@@ -98,13 +98,12 @@
. = ..()
/obj/machinery/door/firedoor/examine()
set src in view()
/obj/machinery/door/firedoor/examine(mob/user)
. = ..()
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
usr << "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
user << "<span class='danger'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
usr << "<b>Sensor readings:</b>"
user << "<b>Sensor readings:</b>"
for(var/index = 1; index <= tile_info.len; index++)
var/o = "&nbsp;&nbsp;"
switch(index)
@@ -129,14 +128,14 @@
o += "[celsius]<5D>C</span> "
o += "<span style='color:blue'>"
o += "[pressure]kPa</span></li>"
usr << o
user << o
if( islist(users_to_open) && users_to_open.len)
var/users_to_open_string = users_to_open[1]
if(users_to_open.len >= 2)
for(var/i = 2 to users_to_open.len)
users_to_open_string += ", [users_to_open[i]]"
usr << "These people have opened \the [src] during an alert: [users_to_open_string]."
user << "These people have opened \the [src] during an alert: [users_to_open_string]."
/obj/machinery/door/firedoor/Bumped(atom/AM)
@@ -189,14 +188,14 @@
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(0, user))
blocked = !blocked
user.visible_message("\red \The [user] [blocked ? "welds" : "unwelds"] \the [src] with \a [W].",\
user.visible_message("<span class='attack'>\The [user] [blocked ? "welds" : "unwelds"] \the [src] with \a [W].</span>",\
"You [blocked ? "weld" : "unweld"] \the [src] with \the [W].",\
"You hear something being welded.")
update_icon()
return
if(blocked)
user << "\red \The [src] is welded solid!"
user << "<span class='warning'>\The [src] is welded solid!</span>"
return
var/area/A = get_area_master(src)
@@ -207,11 +206,11 @@
if(operating)
return
if( blocked )
user.visible_message("\red \The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!",\
user.visible_message("<span class='attack'>\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!</span>",\
"You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\
"You hear someone struggle and metal straining.")
user.visible_message("\red \The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!",\
user.visible_message("<span class='attack'>\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!</span>",\
"You force \the [src] [density ? "open" : "closed"] with \the [C]!",\
"You hear metal strain, and a door [density ? "open" : "close"].")
@@ -272,7 +271,7 @@
"You hear a beep, and a door opening.")
*/
else
user.visible_message("\blue \The [src] [density ? "open" : "close"]s for \the [user].",\
user.visible_message("<span class='notice'>\The [src] [density ? "open" : "close"]s for \the [user].</span>",\
"\The [src] [density ? "open" : "close"]s.",\
"You hear a beep, and a door opening.")
// Accountability!

View File

@@ -64,7 +64,7 @@
if(src.beaker)
src.beaker.loc = get_turf(src)
src.beaker = null
user << "\blue You dismantle \the [name]."
user << "<span class='notice'>You dismantle \the [name].</span>"
del(src)
if (istype(W, /obj/item/weapon/reagent_containers))
if(!isnull(src.beaker))
@@ -149,7 +149,7 @@
set src in view(1)
if(!istype(usr, /mob/living))
usr << "\red You can't do that."
usr << "<span class='warning'>You can't do that.</span>"
return
if(usr.stat)
@@ -158,19 +158,14 @@
mode = !mode
usr << "The [src] is now [mode ? "injecting" : "taking blood"]."
/obj/machinery/iv_drip/examine()
set src in view()
/obj/machinery/iv_drip/examine(mob/user)
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "The [src] is [mode ? "injecting" : "taking blood"]."
user << "The [src] is [mode ? "injecting" : "taking blood"]."
if(beaker)
if(beaker.reagents && beaker.reagents.reagent_list.len)
usr << "\blue Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid."
user << "<span class='info'>Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.</span>"
else
usr << "\blue Attached is an empty [beaker]."
user << "<span class='info'>Attached is \an empty [beaker].</span>"
else
usr << "\blue No chemicals are attached."
usr << "\blue [attached ? attached : "No one"] is attached."
user << "<span class='info'>No chemicals are attached.</span>"
user << "<span class='info'>It is attached to [attached ? attached : "no one"].</span>"

View File

@@ -21,10 +21,9 @@
else
icon_state = on ? "light1" : "light0"
/obj/machinery/light_switch/examine()
set src in oview(1)
if(usr && !usr.stat)
usr << "A light switch. It is [on? "on" : "off"]."
/obj/machinery/light_switch/examine(mob/user)
..()
user << "<span class='info'>It is [on? "on" : "off"].</span>"
/obj/machinery/light_switch/attack_paw(mob/user)

View File

@@ -146,7 +146,7 @@ Class Procs:
/obj/machinery/examine(mob/user)
..()
if(panel_open)
user << "Its maintenance panel is open."
user << "<span class='info'>Its maintenance panel is open.</span>"
/obj/machinery/Destroy()
if(src in machines)
@@ -243,7 +243,7 @@ Class Procs:
var/re_init=0
if("set_tag" in href_list)
if(!(href_list["set_tag"] in vars))
usr << "\red Something went wrong: Unable to find [href_list["set_tag"]] in vars!"
usr << "<span class='warning'>Something went wrong: Unable to find [href_list["set_tag"]] in vars!</span>"
return 1
var/current_tag = src.vars[href_list["set_tag"]]
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag", src, current_tag) as null|text),1,MAX_MESSAGE_LEN)
@@ -260,13 +260,13 @@ Class Procs:
if(!O)
return 1
if(!canLink(O))
usr << "\red You can't link with that device."
usr << "<span class='warning'>You can't link with that device.</span>"
return 1
if(unlinkFrom(usr, O))
usr << "\blue A green light flashes on \the [P], confirming the link was removed."
usr << "<span class='confirm'>A green light flashes on \the [P], confirming the link was removed.</span>"
else
usr << "\red A red light flashes on \the [P]. It appears something went wrong when unlinking the two devices."
usr << "<span class='attack'>A red light flashes on \the [P]. It appears something went wrong when unlinking the two devices.</span>"
update_mt_menu=1
if("link" in href_list)
@@ -274,25 +274,25 @@ Class Procs:
if(!O)
return 1
if(!canLink(O,href_list))
usr << "\red You can't link with that device."
usr << "<span class='warning'>You can't link with that device.</span>"
return 1
if (isLinkedWith(O))
usr << "\red A red light flashes on \the [P]. The two devices are already linked."
usr << "<span class='attack'>A red light flashes on \the [P]. The two devices are already linked.</span>"
return 1
if(linkWith(usr, O, href_list))
usr << "\blue A green light flashes on \the [P], confirming the link was removed."
usr << "<span class='confirm'>A green light flashes on \the [P], confirming the link has been created.</span>"
else
usr << "\red A red light flashes on \the [P]. It appears something went wrong when linking the two devices."
usr << "<span class='attack'>A red light flashes on \the [P]. It appears something went wrong when linking the two devices.</span>"
update_mt_menu=1
if("buffer" in href_list)
P.buffer = src
usr << "\blue A green light flashes, and the device appears in the multitool buffer."
usr << "<span class='confirm'>A green light flashes, and the device appears in the multitool buffer.</span>"
update_mt_menu=1
if("flush" in href_list)
usr << "\blue A green light flashes, and the device disappears from the multitool buffer."
usr << "<span class='confirm'>A green light flashes, and the device disappears from the multitool buffer.</span>"
P.buffer = null
update_mt_menu=1
@@ -324,7 +324,7 @@ Class Procs:
if ( ! (istype(usr, /mob/living/carbon/human) || \
istype(usr, /mob/living/silicon) || \
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
usr << "\red You don't have the dexterity to do this!"
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
return 1
var/norange = 0
@@ -380,7 +380,7 @@ Class Procs:
if ( ! (istype(usr, /mob/living/carbon/human) || \
istype(usr, /mob/living/silicon) || \
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
usr << "\red You don't have the dexterity to do this!"
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
return 1
/*
//distance checks are made by atom/proc/DblClick
@@ -390,10 +390,10 @@ Class Procs:
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 60)
visible_message("\red [H] stares cluelessly at [src] and drools.")
visible_message("<span class='warning'>[H] stares cluelessly at [src] and drools.</span>")
return 1
else if(prob(H.getBrainLoss()))
user << "\red You momentarily forget how to use [src]."
user << "<span class='warning'>You momentarily forget how to use [src].</span>"
return 1
src.add_fingerprint(user)

View File

@@ -33,19 +33,13 @@
overlays += "sheater-open"
return
/obj/machinery/space_heater/examine()
set src in oview(12)
if (!( usr ))
return
usr << "This is \icon[src] \an [src.name]."
usr << src.desc
usr << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
/obj/machinery/space_heater/examine(mob/user)
..()
user << "<span class='info'>The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"].</span>"
if(open)
usr << "The power cell is [cell ? "installed" : "missing"]."
user << "<span class='info'>The power cell is [cell ? "installed" : "missing"].</span>"
else
usr << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
return
user << "<span class='info'>The charge meter reads [cell ? round(cell.percent(),1) : 0]%</span>"
/obj/machinery/space_heater/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
@@ -71,7 +65,7 @@
C.loc = src
C.add_fingerprint(usr)
user.visible_message("\blue [user] inserts a power cell into [src].", "\blue You insert the power cell into [src].")
user.visible_message("<span class='notice'>[user] inserts a power cell into [src].</span>", "<span class='notice'>You insert the power cell into [src].</span>")
else
user << "The hatch must be open to insert a power cell."
return
@@ -119,7 +113,7 @@
else
on = !on
user.visible_message("\blue [user] switches [on ? "on" : "off"] the [src].","\blue You switch [on ? "on" : "off"] the [src].")
user.visible_message("<span class='notice'>[user] switches [on ? "on" : "off"] the [src].</span>","<span class='notice'>You switch [on ? "on" : "off"] the [src].</span>")
update_icon()
return
@@ -144,7 +138,7 @@
usr.put_in_hands(cell)
cell.add_fingerprint(usr)
cell = null
usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].")
usr.visible_message("<span class='notice'>[usr] removes the power cell from \the [src].</span>", "<span class='notice'>You remove the power cell from \the [src].</span>")
if("cellinstall")
if(open && !cell)
@@ -155,7 +149,7 @@
C.loc = src
C.add_fingerprint(usr)
usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].")
usr.visible_message("<span class='notice'>[usr] inserts a power cell into \the [src].</span>", "<span class='notice'>You insert the power cell into \the [src].</span>")
updateDialog()
else

View File

@@ -41,168 +41,164 @@
maptext_height = 26
maptext_width = 32
// new display
// register for radio system
New()
..()
spawn(5) // must wait for map loading to finish
if(radio_controller)
radio_controller.add_object(src, frequency)
// new display
// register for radio system
/obj/machinery/status_display/New()
..()
spawn(5) // must wait for map loading to finish
if(radio_controller)
radio_controller.add_object(src, frequency)
// timed process
process()
if(stat & NOPOWER)
remove_display()
return
if(spookymode)
spookymode = 0
remove_display()
return
update()
// timed process
/obj/machinery/status_display/process()
if(stat & NOPOWER)
remove_display()
return
if(spookymode)
spookymode = 0
remove_display()
return
update()
emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
set_picture("ai_bsod")
/obj/machinery/status_display/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
set_picture("ai_bsod")
..(severity)
// set what is displayed
proc/update()
if(friendc && mode!=4) //Makes all status displays except supply shuttle timer display the eye -- Urist
set_picture("ai_friend")
return
/obj/machinery/status_display/proc/update()
if(friendc && mode!=4) //Makes all status displays except supply shuttle timer display the eye -- Urist
set_picture("ai_friend")
return
switch(mode)
if(0) //blank
remove_display()
if(1) //emergency shuttle timer
if(emergency_shuttle.online)
var/line1
var/line2 = get_shuttle_timer()
if(emergency_shuttle.location == 1)
line1 = "-ETD-"
else
line1 = "-ETA-"
if(length(line2) > CHARS_PER_LINE)
line2 = "Error!"
update_display(line1, line2)
else
remove_display()
if(2) //custom messages
switch(mode)
if(0) //blank
remove_display()
if(1) //emergency shuttle timer
if(emergency_shuttle.online)
var/line1
var/line2
if(!index1)
line1 = message1
var/line2 = get_shuttle_timer()
if(emergency_shuttle.location == 1)
line1 = "-ETD-"
else
line1 = copytext(message1+"|"+message1, index1, index1+CHARS_PER_LINE)
var/message1_len = length(message1)
index1 += SCROLL_SPEED
if(index1 > message1_len)
index1 -= message1_len
if(!index2)
line2 = message2
else
line2 = copytext(message2+"|"+message2, index2, index2+CHARS_PER_LINE)
var/message2_len = length(message2)
index2 += SCROLL_SPEED
if(index2 > message2_len)
index2 -= message2_len
line1 = "-ETA-"
if(length(line2) > CHARS_PER_LINE)
line2 = "Error!"
update_display(line1, line2)
if(4) // supply shuttle timer
var/line1 = "SUPPLY"
var/line2
if(supply_shuttle.moving)
line2 = get_supply_shuttle_timer()
if(length(line2) > CHARS_PER_LINE)
line2 = "Error"
else
remove_display()
if(2) //custom messages
var/line1
var/line2
if(!index1)
line1 = message1
else
line1 = copytext(message1+"|"+message1, index1, index1+CHARS_PER_LINE)
var/message1_len = length(message1)
index1 += SCROLL_SPEED
if(index1 > message1_len)
index1 -= message1_len
if(!index2)
line2 = message2
else
line2 = copytext(message2+"|"+message2, index2, index2+CHARS_PER_LINE)
var/message2_len = length(message2)
index2 += SCROLL_SPEED
if(index2 > message2_len)
index2 -= message2_len
update_display(line1, line2)
if(4) // supply shuttle timer
var/line1 = "SUPPLY"
var/line2
if(supply_shuttle.moving)
line2 = get_supply_shuttle_timer()
if(length(line2) > CHARS_PER_LINE)
line2 = "Error"
else
if(supply_shuttle.at_station)
line2 = "Docked"
else
if(supply_shuttle.at_station)
line2 = "Docked"
else
line1 = ""
update_display(line1, line2)
line1 = ""
update_display(line1, line2)
examine()
set src in view()
. = ..()
switch(mode)
if(1,2,4)
usr << "The display says:<br>\t<xmp>[message1]</xmp><br>\t<xmp>[message2]</xmp>"
/obj/machinery/status_display/examine(mob/user)
. = ..()
switch(mode)
if(1,2,4)
user << "<span class='info'>The display says:<br>\t<xmp>[message1]</xmp><br>\t<xmp>[message2]</xmp></span>"
proc/set_message(m1, m2)
if(m1)
index1 = (length(m1) > CHARS_PER_LINE)
message1 = m1
else
message1 = ""
index1 = 0
/obj/machinery/status_display/proc/set_message(m1, m2)
if(m1)
index1 = (length(m1) > CHARS_PER_LINE)
message1 = m1
else
message1 = ""
index1 = 0
if(m2)
index2 = (length(m2) > CHARS_PER_LINE)
message2 = m2
else
message2 = ""
index2 = 0
if(m2)
index2 = (length(m2) > CHARS_PER_LINE)
message2 = m2
else
message2 = ""
index2 = 0
proc/set_picture(state)
picture_state = state
remove_display()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
/obj/machinery/status_display/proc/set_picture(state)
picture_state = state
remove_display()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
proc/update_display(line1, line2)
var/new_text = {"<div style="font-size:[FONT_SIZE];color:[FONT_COLOR];font:'[FONT_STYLE]';text-align:center;" valign="top">[line1]<br>[line2]</div>"}
if(maptext != new_text)
maptext = new_text
/obj/machinery/status_display/proc/update_display(line1, line2)
var/new_text = {"<div style="font-size:[FONT_SIZE];color:[FONT_COLOR];font:'[FONT_STYLE]';text-align:center;" valign="top">[line1]<br>[line2]</div>"}
if(maptext != new_text)
maptext = new_text
proc/get_shuttle_timer()
var/timeleft = emergency_shuttle.timeleft()
if(timeleft)
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return ""
/obj/machinery/status_display/proc/get_shuttle_timer()
var/timeleft = emergency_shuttle.timeleft()
if(timeleft)
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return ""
proc/get_supply_shuttle_timer()
if(supply_shuttle.moving)
var/timeleft = round((supply_shuttle.eta_timeofday - world.timeofday) / 10,1)
if(timeleft < 0)
return "Late"
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return ""
/obj/machinery/status_display/proc/get_supply_shuttle_timer()
if(supply_shuttle.moving)
var/timeleft = round((supply_shuttle.eta_timeofday - world.timeofday) / 10,1)
if(timeleft < 0)
return "Late"
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return ""
proc/remove_display()
if(overlays.len)
overlays.Cut()
if(maptext)
maptext = ""
/obj/machinery/status_display/proc/remove_display()
if(overlays.len)
overlays.Cut()
if(maptext)
maptext = ""
receive_signal(datum/signal/signal)
/obj/machinery/status_display/receive_signal(datum/signal/signal)
switch(signal.data["command"])
if("blank")
mode = 0
switch(signal.data["command"])
if("blank")
mode = 0
if("shuttle")
mode = 1
if("shuttle")
mode = 1
if("message")
mode = 2
set_message(signal.data["msg1"], signal.data["msg2"])
if("alert")
mode = 3
set_picture(signal.data["picture_state"])
if("supply")
if(supply_display)
mode = 4
if("message")
mode = 2
set_message(signal.data["msg1"], signal.data["msg2"])
if("alert")
mode = 3
set_picture(signal.data["picture_state"])
if("supply")
if(supply_display)
mode = 4
/obj/machinery/ai_status_display
icon = 'icons/obj/status_display.dmi'
@@ -222,71 +218,70 @@
var/emotion = "Neutral"
process()
if(stat & NOPOWER)
overlays.Cut()
return
if(spookymode)
spookymode = 0
overlays.Cut()
return
/obj/machinery/ai_status_display/process()
if(stat & NOPOWER)
overlays.Cut()
return
if(spookymode)
spookymode = 0
overlays.Cut()
return
update()
update()
emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
set_picture("ai_bsod")
/obj/machinery/ai_status_display/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
set_picture("ai_bsod")
..(severity)
proc/update()
/obj/machinery/ai_status_display/proc/update()
if(mode==0) //Blank
overlays.Cut()
return
if(mode==0) //Blank
overlays.Cut()
return
if(mode==1) // AI emoticon
switch(emotion)
if("Very Happy")
set_picture("ai_veryhappy")
if("Happy")
set_picture("ai_happy")
if("Neutral")
set_picture("ai_neutral")
if("Unsure")
set_picture("ai_unsure")
if("Confused")
set_picture("ai_confused")
if("Sad")
set_picture("ai_sad")
if("BSOD")
set_picture("ai_bsod")
if("Blank")
set_picture("ai_off")
if("Problems?")
set_picture("ai_trollface")
if("Awesome")
set_picture("ai_awesome")
if("Dorfy")
set_picture("ai_urist")
if("Facepalm")
set_picture("ai_facepalm")
if("Friend Computer")
set_picture("ai_friend")
if(mode==1) // AI emoticon
switch(emotion)
if("Very Happy")
set_picture("ai_veryhappy")
if("Happy")
set_picture("ai_happy")
if("Neutral")
set_picture("ai_neutral")
if("Unsure")
set_picture("ai_unsure")
if("Confused")
set_picture("ai_confused")
if("Sad")
set_picture("ai_sad")
if("BSOD")
set_picture("ai_bsod")
if("Blank")
set_picture("ai_off")
if("Problems?")
set_picture("ai_trollface")
if("Awesome")
set_picture("ai_awesome")
if("Dorfy")
set_picture("ai_urist")
if("Facepalm")
set_picture("ai_facepalm")
if("Friend Computer")
set_picture("ai_friend")
return
return
if(mode==2) // BSOD
set_picture("ai_bsod")
return
if(mode==2) // BSOD
set_picture("ai_bsod")
return
proc/set_picture(var/state)
picture_state = state
if(overlays.len)
overlays.Cut()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
/obj/machinery/ai_status_display/proc/set_picture(var/state)
picture_state = state
if(overlays.len)
overlays.Cut()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
#undef CHARS_PER_LINE
#undef FOND_SIZE

View File

@@ -165,27 +165,24 @@
else
return 0
/obj/mecha/examine()
set src in view()
/obj/mecha/examine(mob/user)
..()
var/integrity = health/initial(health)*100
switch(integrity)
if(85 to 100)
usr << "It's fully intact."
user << "<span class='info'>It's fully intact.</span>"
if(65 to 85)
usr << "It's slightly damaged."
user << "<span class='notice'>It's slightly damaged.</span>"
if(45 to 65)
usr << "It's badly damaged."
user << "<span class='warning'>It's badly damaged.</span>"
if(25 to 45)
usr << "It's heavily damaged."
user << "<span class='warning'>It's heavily damaged.</span>"
else
usr << "It's falling apart."
user << "<span class='danger'>It's falling apart.</span>"
if(equipment && equipment.len)
usr << "It's equipped with:"
user << "It's equipped with:"
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
usr << "\icon[ME] [ME]"
return
user << "\icon[ME] [ME]"
/obj/mecha/proc/drop_item()//Derpfix, but may be useful in future for engineering exosuits.
return
@@ -442,14 +439,14 @@
src.take_damage(15)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
playsound(get_turf(src), 'sound/weapons/slash.ogg', 50, 1, -1)
user << "\red You slash at the armored suit!"
visible_message("\red The [user] slashes at [src.name]'s armor!")
user << "<span class='warning'>You slash at the armored suit!</span>"
visible_message("<span class='warning'>The [user] slashes at [src.name]'s armor!</span>")
else
src.log_append_to_last("Armor saved.")
playsound(get_turf(src), 'sound/weapons/slash.ogg', 50, 1, -1)
user << "\green Your claws had no effect!"
src.occupant_message("\blue The [user]'s claws are stopped by the armor.")
visible_message("\blue The [user] rebounds off [src.name]'s armor!")
src.occupant_message("<span class='notice'>The [user]'s claws are stopped by the armor.</span>")
visible_message("<span class='notice'>The [user] rebounds off [src.name]'s armor!</span>")
return
@@ -462,13 +459,13 @@
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
src.take_damage(damage)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
visible_message("\red <B>[user]</B> [user.attacktext] [src]!")
visible_message("<span class='warning'><B>[user]</B> [user.attacktext] [src]!</span>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
else
src.log_append_to_last("Armor saved.")
playsound(get_turf(src), 'sound/weapons/slash.ogg', 50, 1, -1)
src.occupant_message("\blue The [user]'s attack is stopped by the armor.")
visible_message("\blue The [user] rebounds off [src.name]'s armor!")
src.occupant_message("<span class='notice'>The [user]'s attack is stopped by the armor.</span>")
visible_message("<span class='notice'>The [user] rebounds off [src.name]'s armor!</span>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
return
@@ -483,7 +480,7 @@
src.visible_message("The [A] fastens firmly to [src].")
return
if(prob(src.deflect_chance) || istype(A, /mob))
src.occupant_message("\blue The [A] bounces off the armor.")
src.occupant_message("<span class='notice'>The [A] bounces off the armor.</span>")
src.visible_message("The [A] bounces off the [src.name] armor")
src.log_append_to_last("Armor saved.")
if(istype(A, /mob/living))
@@ -505,7 +502,7 @@
/obj/mecha/proc/dynbulletdamage(var/obj/item/projectile/Proj)
if(prob(src.deflect_chance))
src.occupant_message("\blue The armor deflects incoming projectile.")
src.occupant_message("<span class='notice'>The armor deflects incoming projectile.</span>")
src.visible_message("The [src.name] armor deflects the projectile")
src.log_append_to_last("Armor saved.")
return
@@ -637,7 +634,7 @@
user.delayNextAttack(8)
src.log_message("Attacked by [W]. Attacker - [user]")
if(prob(src.deflect_chance))
user << "\red The [W] bounces off [src.name] armor."
user << "<span class='attack'>The [W] bounces off [src.name] armor.</span>"
src.log_append_to_last("Armor saved.")
/*
for (var/mob/V in viewers(src))
@@ -687,9 +684,9 @@
output_maintenance_dialog(id_card, user)
return
else
user << "\red Invalid ID: Access denied."
user << "<span class='warning'>Invalid ID: Access denied.</span>"
else
user << "\red Maintenance protocols disabled by operator."
user << "<span class='warning'>Maintenance protocols disabled by operator.</span>"
else if(istype(W, /obj/item/weapon/wrench))
if(state==1)
state = 2
@@ -748,11 +745,11 @@
if (WT.remove_fuel(0,user))
if (hasInternalDamage(MECHA_INT_TANK_BREACH))
clearInternalDamage(MECHA_INT_TANK_BREACH)
user << "\blue You repair the damaged gas tank."
user << "<span class='notice'>You repair the damaged gas tank.</span>"
else
return
if(src.health<initial(src.health))
user << "\blue You repair some damage to [src.name]."
user << "<span class='notice'>You repair some damage to [src.name].</span>"
src.health += min(10, initial(src.health)-src.health)
else
user << "The [src.name] is at full integrity"
@@ -893,12 +890,12 @@
var/obj/machinery/atmospherics/portables_connector/possible_port = locate(/obj/machinery/atmospherics/portables_connector/) in loc
if(possible_port)
if(connect(possible_port))
src.occupant_message("\blue [name] connects to the port.")
src.occupant_message("<span class='notice'>[name] connects to the port.</span>")
src.verbs += /obj/mecha/verb/disconnect_from_port
src.verbs -= /obj/mecha/verb/connect_to_port
return
else
src.occupant_message("\red [name] failed to connect to the port.")
src.occupant_message("<span class='warning'>[name] failed to connect to the port.</span>")
return
else
src.occupant_message("Nothing happens")
@@ -913,11 +910,11 @@
if(usr!=src.occupant)
return
if(disconnect())
src.occupant_message("\blue [name] disconnects from the port.")
src.occupant_message("<span class='notice'>[name] disconnects from the port.</span>")
src.verbs -= /obj/mecha/verb/disconnect_from_port
src.verbs += /obj/mecha/verb/connect_to_port
else
src.occupant_message("\red [name] is not connected to the port at the moment.")
src.occupant_message("<span class='warning'>[name] is not connected to the port at the moment.</span>")
/obj/mecha/verb/toggle_lights()
set name = "Toggle Lights"
@@ -961,7 +958,7 @@
return
src.log_message("[usr] tries to move in.")
if (src.occupant)
usr << "\blue <B>The [src.name] is already occupied!</B>"
usr << "<span class='bnotice'>The [src.name] is already occupied!</span>"
src.log_append_to_last("Permission denied.")
return
/*
@@ -976,7 +973,7 @@
else if(src.operation_allowed(usr))
passed = 1
if(!passed)
usr << "\red Access denied"
usr << "<span class='warning'>Access denied</span>"
src.log_append_to_last("Permission denied.")
return
for(var/mob/living/carbon/slime/M in range(1,usr))
@@ -984,7 +981,7 @@
usr << "You're too busy getting your life sucked out of you."
return
visible_message("\blue [usr] starts to climb into [src.name]")
visible_message("<span class='notice'>[usr] starts to climb into [src.name]</span>")
if(enter_after(40,usr))
@@ -1034,7 +1031,7 @@
//Added a message here since people assume their first click failed or something./N
// user << "Installing MMI, please stand by."
visible_message("\blue [usr] starts to insert an MMI into [src.name]")
visible_message("<span class='notice'>[usr] starts to insert an MMI into [src.name]</span>")
if(enter_after(40,user))
if(!occupant)

View File

@@ -134,9 +134,9 @@ var/global/list/image/splatter_cache=list()
else
icon_state = "writing1"
/obj/effect/decal/cleanable/blood/writing/examine()
/obj/effect/decal/cleanable/blood/writing/examine(mob/user)
..()
usr << "It reads: <font color='[basecolor]'>\"[message]\"<font>"
user << "It reads: <font color='[basecolor]'>\"[message]\"<font>"
/obj/effect/decal/cleanable/blood/gibs
name = "gibs"

View File

@@ -5,32 +5,26 @@
layer = 2.1
anchored = 1
examine()
set src in view(2)
..()
return
/obj/effect/decal/cleanable/crayon/New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
name = type
desc = "A [type] drawn in crayon."
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
name = type
desc = "A [type] drawn in crayon."
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
overlays += mainOverlay
overlays += shadeOverlay
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
overlays += mainOverlay
overlays += shadeOverlay
add_hiddenprint(usr)
add_hiddenprint(usr)

View File

@@ -44,10 +44,10 @@
/obj/effect/decal/slag/examine()
/obj/effect/decal/slag/examine(mob/user)
..()
if(molten)
usr << "<span class=\"warning\">Jesus, it's hot!</span>"
user << "<span class=\"warning\">Jesus, it's hot!</span>"
var/list/bits=list()
for(var/mat_id in mats.storage)
@@ -56,9 +56,9 @@
bits.Add(mat.processed_name)
if(bits.len>0)
usr << "<span class=\"info\">It appears to contain bits of [english_list(bits)].</span>"
user << "<span class=\"info\">It appears to contain bits of [english_list(bits)].</span>"
else
usr << "<span class=\"warning\">It appears to be completely worthless.</span>"
user << "<span class=\"warning\">It appears to be completely worthless.</span>"
/obj/effect/decal/slag/solidify()
icon_state="slagcold"
@@ -97,6 +97,6 @@
slag.mats = src.mats
qdel(src)
else
user.visible_message("<span class=\"warning\">[user.name] hits \the [src] with his [W.name].</span>", \
"<span class=\"warning\">You fail to damage \the [src] with your [W.name]!</span>", \
user.visible_message("<span class=\"attack\">[user.name] hits \the [src] with his [W.name].</span>", \
"<span class=\"attack\">You fail to damage \the [src] with your [W.name]!</span>", \
"You hear someone hitting something.")

View File

@@ -107,10 +107,9 @@
src.loc = T
/obj/item/examine()
set src in view()
/obj/item/examine(mob/user)
var/size
var/odesc = desc
switch(src.w_class)
if(1.0)
size = "tiny"
@@ -124,10 +123,18 @@
size = "huge"
else
//if ((M_CLUMSY in usr.mutations) && prob(50)) t = "funny-looking"
usr << "This is a [src.blood_DNA ? "bloody " : ""]\icon[src][src.name]. It is a [size] item."
if(src.desc)
usr << src.desc
return
var/pronoun
if (src.gender == PLURAL)
pronoun = "They are"
else
pronoun = "It is"
if (!desc)
user << "[pronoun] a [size] item."
else
desc += " [pronoun] a [size] item."
..()
desc = odesc
/obj/item/attack_ai(mob/user as mob)
..()
@@ -284,7 +291,7 @@
testing("[M] TOO FAT TO WEAR [src]!")
if(!(flags & ONESIZEFITSALL))
if(!disable_warning)
H << "\red You're too fat to wear the [name]."
H << "<span class='warning'>You're too fat to wear the [name].</span>"
return 0
switch(slot)
@@ -359,7 +366,7 @@
if(slot_belt)
if(!H.w_uniform)
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
if( !(slot_flags & SLOT_BELT) )
return 0
@@ -458,7 +465,7 @@
if(slot_wear_id)
if(!H.w_uniform)
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
if( !(slot_flags & SLOT_ID) )
return 0
@@ -474,7 +481,7 @@
if(slot_l_store)
if(!H.w_uniform)
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
if(slot_flags & SLOT_DENYPOCKET)
return
@@ -491,7 +498,7 @@
if(slot_r_store)
if(!H.w_uniform)
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
if(slot_flags & SLOT_DENYPOCKET)
return
@@ -508,7 +515,7 @@
if(slot_s_store)
if(!H.wear_suit)
if(!disable_warning)
H << "\red You need a suit before you can attach this [name]."
H << "<span class='warning'>You need a suit before you can attach this [name].</span>"
return 0
if(!H.wear_suit.allowed)
if(!disable_warning)
@@ -593,25 +600,25 @@
if(istype(usr, /mob/living/carbon/brain))//Is a brain
usr << "You can't pick things up!"
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
usr << "\red You can't pick things up!"
usr << "<span class='warning'>You can't pick things up!</span>"
return
if(src.anchored) //Object isn't anchored
usr << "\red You can't pick that up!"
usr << "<span class='warning'>You can't pick that up!</span>"
return
if(!usr.hand && usr.r_hand) //Right hand is not full
usr << "\red Your right hand is full."
usr << "<span class='warning'>Your right hand is full.</span>"
return
if(usr.hand && usr.l_hand && !isMoMMI(usr)) //Left hand is not full
usr << "\red Your left hand is full."
usr << "<span class='warning'>Your left hand is full.</span>"
return
if(!istype(src.loc, /turf)) //Object is on a turf
usr << "\red You can't pick that up!"
usr << "<span class='warning'>You can't pick that up!</span>"
return
//All checks are done, time to pick it up!
if(isMoMMI(usr))
// Otherwise, we get MoMMIs changing their own laws.
if(istype(src,/obj/item/weapon/aiModule))
src << "\red Your firmware prevents you from picking up [src]!"
src << "<span class='warning'>Your firmware prevents you from picking up [src]!</span>"
return
if(usr.get_active_hand() == null)
usr.put_in_hands(src)
@@ -644,7 +651,7 @@
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
user << "<span class='warning'>You're going to need to remove that mask/helmet/glasses first.</span>"
return
var/mob/living/carbon/monkey/Mo = M
@@ -652,11 +659,11 @@
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
user << "<span class='warning'>You're going to need to remove that mask/helmet/glasses first.</span>"
return
if(!M.has_eyes())
user << "\red You cannot locate any eyes on [M]!"
user << "<span class='warning'>You cannot locate any eyes on [M]!</span>"
return
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
@@ -684,30 +691,30 @@
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has been stabbed in the eye with [src] by [user].", 1)
M << "\red [user] stabs you in the eye with [src]!"
user << "\red You stab [M] in the eye with [src]!"
O.show_message("<span class='attack'>[M] has been stabbed in the eye with [src] by [user].</span>", 1)
M << "<span class='attack'>[user] stabs you in the eye with [src]!</span>"
user << "<span class='attack'>You stab [M] in the eye with [src]!</span>"
else
user.visible_message( \
"\red [user] has stabbed themself with [src]!", \
"\red You stab yourself in the eyes with [src]!" \
"<span class='attack'>[user] has stabbed themself with [src]!</span>", \
"<span class='attack'>You stab yourself in the eyes with [src]!</span>" \
)
eyes.damage += rand(3,4)
if(eyes.damage >= eyes.min_bruised_damage)
if(M.stat != 2)
if(eyes.robotic <= 1) //robot eyes bleeding might be a bit silly
M << "\red Your eyes start to bleed profusely!"
M << "<span class='warning'>Your eyes start to bleed profusely!</span>"
if(prob(50))
if(M.stat != 2)
M << "\red You drop what you're holding and clutch at your eyes!"
M << "<span class='warning'>You drop what you're holding and clutch at your eyes!</span>"
M.drop_item()
M.eye_blurry += 10
M.Paralyse(1)
M.Weaken(4)
if (eyes.damage >= eyes.min_broken_damage)
if(M.stat != 2)
M << "\red You go blind!"
M << "<span class='warning'>You go blind!</span>"
var/datum/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(7))
M:UpdateDamageIcon()

View File

@@ -67,10 +67,9 @@
failmsg = "The [name]'s refill light blinks red."
..()
/obj/item/device/lightreplacer/examine()
set src in view(2)
/obj/item/device/lightreplacer/examine(mob/user)
..()
usr << "It has [uses] lights remaining."
user << "<span class='info'>It has [uses] light\s remaining.</span>"
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/emag) && emagged == 0)

View File

@@ -107,13 +107,14 @@ obj/item/device/multitool/ai_detect/update_icon()
else src.icon_state = initial(src.icon_state)
return
obj/item/device/multitool/ai_detect/examine()
obj/item/device/multitool/ai_detect/examine(mob/user)
..()
if(src.detected) usr << "The screen displays:"
if(src.detected & DETECT_AI) usr << "AI detected"
if(src.detected & DETECT_PAI) usr << "pAI detected"
if(src.detected & DETECT_RECORDER) usr << "Tape recorder detected"
if(src.detected & DETECT_ANALYZER) usr << "Voice analyzer detected"
if(src.detected)
user << "<span class='info'>The screen displays:</span>"
if(DETECT_AI) user << "<span class='info'>AI detected</span>"
if(DETECT_PAI) user << "<span class='info'>pAI detected></span>"
if(DETECT_RECORDER) user << "<span class='info'>Tape recorder detected</span>"
if(DETECT_ANALYZER) user << "<span class='info'>Voice analyzer detected</span>"
////////////////////////////////////////////////////////////////////////
#undef DETECT_TICKER_PERIOD

View File

@@ -19,7 +19,7 @@
return
var/obj/machinery/atmospherics/pipe/P = A
if(!(mode in P.available_colors))
user << "\red This [P] can't be painted [mode]. Available colors: [english_list(P.available_colors)]"
user << "<span class='warning'>This [P] can't be painted [mode]. Available colors: [english_list(P.available_colors)]</span>"
return
P._color = mode
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
@@ -28,6 +28,6 @@
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?","Pipe painter") in modes
/obj/item/device/pipe_painter/examine()
/obj/item/device/pipe_painter/examine(mob/user)
..()
usr << "It is in [mode] mode."
user << "<span class='info'>It is in [mode] mode.</span>"

View File

@@ -674,16 +674,12 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
return get_mobs_in_view(canhear_range, src)
/obj/item/device/radio/examine()
set src in view()
/obj/item/device/radio/examine(mob/user)
..()
if ((in_range(src, usr) || loc == usr))
if (b_stat)
usr.show_message("\blue \the [src] can be attached and modified!")
else
usr.show_message("\blue \the [src] can not be modified or attached!")
return
if (b_stat)
user.show_message("<span class = 'info'>\the [src] can be attached and modified!</span>")
else
user.show_message("<span class = 'info'>\the [src] can not be modified or attached!</span>")
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -693,9 +689,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
if (b_stat)
user.show_message("\blue The radio can now be attached and modified!")
user.show_message("<span class = 'notice'>The radio can now be attached and modified!</span>")
else
user.show_message("\blue The radio can no longer be modified or attached!")
user.show_message("<span class = 'notice'>The radio can no longer be modified or attached!</span>")
updateDialog()
//Foreach goto(83)
add_fingerprint(user)

View File

@@ -27,11 +27,9 @@
usr << browse(null, "window=stack")
..()
/obj/item/stack/examine()
set src in view(1)
/obj/item/stack/examine(mob/user)
..()
usr << "There are [src.amount] [src.singular_name]\s in the stack."
return
user << "<span class='info'>There are [src.amount] [src.singular_name]\s in the stack.</span>"
/obj/item/stack/attack_self(mob/user as mob)
list_recipes(user)
@@ -120,18 +118,18 @@
if (!multiplier) multiplier = 1
if (src.amount < R.req_amount*multiplier)
if (R.req_amount*multiplier>1)
usr << "\red You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!"
usr << "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>"
else
usr << "\red You haven't got enough [src] to build \the [R.title]!"
usr << "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>"
return
if (R.one_per_turf && (locate(R.result_type) in usr.loc))
usr << "\red There is another [R.title] here!"
usr << "<span class='warning'>There is another [R.title] here!</span>"
return
if (R.on_floor && !istype(usr.loc, /turf/simulated/floor))
usr << "\red \The [R.title] must be constructed on the floor!"
usr << "<span class='warning'>\The [R.title] must be constructed on the floor!</span>"
return
if (R.time)
usr << "\blue Building [R.title] ..."
usr << "<span class='notice'>Building [R.title] ...</span>"
if (!do_after(usr, R.time))
return
if (src.amount < R.req_amount*multiplier)

View File

@@ -123,7 +123,7 @@
*/
/obj/item/toy/gun
name = "cap gun"
desc = "There are 0 caps left. Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!"
desc = "It almost looks like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!"
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_state = "gun"
@@ -138,49 +138,45 @@
attack_verb = list("struck", "pistol whipped", "hit", "bashed")
var/bullets = 7.0
examine()
set src in usr
/obj/item/toy/gun/examine(mob/user)
..()
user << "There [bullets == 1 ? "is" : "are"] [bullets] cap\s left."
src.desc = text("There are [] caps\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets)
..()
return
attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob)
if (istype(A, /obj/item/toy/ammo/gun))
if (src.bullets >= 7)
user << "<span class = 'notice'>It's already fully loaded!</span>"
return 1
if (A.amount_left <= 0)
user << "<span class = 'warning'>There is no more caps!</span>"
return 1
if (A.amount_left < (7 - src.bullets))
src.bullets += A.amount_left
user << text("<span class = 'warning'>You reload [] caps\s!</span>", A.amount_left)
A.amount_left = 0
else
user << text("<span class = 'warning'>You reload [] caps\s!</span>", 7 - src.bullets)
A.amount_left -= 7 - src.bullets
src.bullets = 7
A.update_icon()
/obj/item/toy/gun/attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob)
if (istype(A, /obj/item/toy/ammo/gun))
if (src.bullets >= 7)
user << "<span class = 'notice'>It's already fully loaded!</span>"
return 1
return
if (A.amount_left <= 0)
user << "<span class = 'warning'>There is no more caps!</span>"
return 1
if (A.amount_left < (7 - src.bullets))
src.bullets += A.amount_left
user << text("<span class = 'warning'>You reload [] caps\s!</span>", A.amount_left)
A.amount_left = 0
else
user << text("<span class = 'warning'>You reload [] caps\s!</span>", 7 - src.bullets)
A.amount_left -= 7 - src.bullets
src.bullets = 7
A.update_icon()
return 1
return
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if (flag)
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "<span class = 'warning'>You don't have the dexterity to do this!</span>"
return
src.add_fingerprint(user)
if (src.bullets < 1)
user.show_message("\red *click* *click*", 2)
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
playsound(user, 'sound/weapons/Gunshot.ogg', 100, 1)
src.bullets--
for(var/mob/O in viewers(user, null))
O.show_message(text("<span class = 'danger'><B>[] fires a cap gun at []!</B></span>", user, target), 1, "<span class = 'danger'>You hear a gunshot</span>", 2)
/obj/item/toy/gun/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if (flag)
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "<span class = 'warning'>You don't have the dexterity to do this!</span>"
return
src.add_fingerprint(user)
if (src.bullets < 1)
user.show_message("<span class = 'danger'>*click* *click*</span>", 2)
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
playsound(user, 'sound/weapons/Gunshot.ogg', 100, 1)
src.bullets--
for(var/mob/O in viewers(user, null))
O.show_message(text("<span class = 'danger'><B>[] fires a cap gun at []!</B></span>", user, target), 1, "<span class = 'danger'>You hear a gunshot</span>", 2)
/obj/item/toy/ammo/gun
name = "ammo-caps"
@@ -196,10 +192,15 @@
w_type = RECYK_MISC
var/amount_left = 7.0
update_icon()
src.icon_state = text("357-[]", src.amount_left)
src.desc = text("There are [] caps\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left)
return
/obj/item/toy/ammo/gun/update_icon()
src.icon_state = text("357-[]", src.amount_left)
src.desc = text("There are [] caps\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left)
return
/obj/item/toy/ammo/gun/examine(mob/user)
..()
user << "There [amount_left == 1 ? "is" : "are"] [amount_left] cap\s left."
/*
* Toy crossbow
@@ -216,91 +217,90 @@
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
examine()
set src in view(2)
..()
if (bullets)
usr << "<span class = 'info'>It is loaded with [bullets] foam darts!</span>"
/obj/item/toy/crossbow/examine(mob/user)
..()
if (bullets)
user << "<span class = 'info'>It is loaded with [bullets] foam dart\s!</span>"
attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
del(I)
bullets++
user << "<span class = 'info'>You load the foam dart into the crossbow.</span>"
else
usr << "<span class = 'warning'>It's already fully loaded.</span>"
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
del(I)
bullets++
user << "<span class = 'info'>You load the foam dart into the crossbow.</span>"
else
usr << "<span class = 'warning'>It's already fully loaded.</span>"
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
/obj/item/toy/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
for(var/mob/O in viewers(world.view, D))
O.show_message(text("<span class = 'danger'>[] was hit by the foam dart!</span>", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc)
del(D)
return
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
del(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
for(var/mob/O in viewers(world.view, D))
O.show_message(text("<span class = 'danger'>[] was hit by the foam dart!</span>", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc)
del(D)
return
return
else if (bullets == 0)
user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("<span class = 'danger'>[] realized they were out of ammo and starting scrounging for some!<span>", user), 1)
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
del(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
del(D)
return
else if (bullets == 0)
user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("<span class = 'danger'>[] realized they were out of ammo and starting scrounging for some!<span>", user), 1)
attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
/obj/item/toy/crossbow/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
// ******* Check
if (src.bullets > 0 && M.lying)
if (src.bullets > 0 && M.lying)
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class = 'danger'><B>[] casually lines up a shot with []'s head and pulls the trigger!</B></span>", user, M), 1, "<span class = 'danger'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class = 'danger'>[] was hit in the head by the foam dart!</span>", M), 1)
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class = 'danger'><B>[] casually lines up a shot with []'s head and pulls the trigger!</B></span>", user, M), 1, "<span class = 'danger'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class = 'danger'>[] was hit in the head by the foam dart!</span>", M), 1)
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class = 'danger'><B>[] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</B></span>", user, M), 1, "<span class = 'danger'>You hear someone fall</span>", 2)
user.Weaken(5)
return
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class = 'danger'><B>[] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</B></span>", user, M), 1, "<span class = 'danger'>You hear someone fall</span>", 2)
user.Weaken(5)
return
/obj/item/toy/ammo/crossbow
name = "foam dart"
@@ -412,17 +412,17 @@
w_class = 1
throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("<span class = 'danger'>The [src.name] explodes!</span>","</span class = 'danger'>You hear a bang!</span>")
/obj/item/toy/snappop/virus/throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("<span class = 'danger'>The [src.name] explodes!</span>","</span class = 'danger'>You hear a bang!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
del(src)
playsound(src, 'sound/effects/snap.ogg', 50, 1)
del(src)
@@ -438,15 +438,15 @@
icon_state = "snappop"
w_class = 1
throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("<span class = 'danger'>The [src.name] explodes!</span>","<span class = 'danger'>You hear a snap!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
del(src)
/obj/item/toy/snappop/throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("<span class = 'danger'>The [src.name] explodes!</span>","<span class = 'danger'>You hear a snap!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
del(src)
/obj/item/toy/snappop/Crossed(H as mob|obj)
if((ishuman(H))) //i guess carp and shit shouldn't set them off
@@ -525,12 +525,9 @@
return
/obj/item/toy/waterflower/examine()
set src in usr
usr << text("\icon[] [] units of water left!", src, src.reagents.total_volume)
..()
return
/obj/item/toy/waterflower/examine(mob/user)
..()
user << "[src.reagents.total_volume] units of water left!"
/*
* Mech prizes
@@ -838,10 +835,9 @@
var/flipped = 0
pixel_x = -5
/obj/item/toy/singlecard/examine()
set src in usr.contents
if(ishuman(usr))
var/mob/living/carbon/human/cardUser = usr
/obj/item/toy/singlecard/examine(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/cardUser = user
if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
cardUser.visible_message("<span class = 'notice'>[cardUser] checks \his card.",
"<span class = 'notice'>The card reads: [src.cardname]</span>")
@@ -901,7 +897,7 @@
icon_state = "gooncode"
suicide_act(mob/user)
viewers(user) << "<span class = 'warning'><b>[user] is using [src.name]! It looks like \he's trying to re-add poo!</b></span>"
viewers(user) << "<span class = 'danger'>[user] is using [src.name]! It looks like \he's trying to re-add poo!</span>"
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)

View File

@@ -57,7 +57,7 @@
//user.drop_item()
//module.loc=src
modules += module.copy() // Instead of a reference
user << "\blue You insert \the [module] into \the [src], and the device reads the module's contents."
user << "<span class='notice'>You insert \the [module] into \the [src], and the device reads the module's contents.</span>"
else
return ..()
@@ -65,36 +65,36 @@
for(var/obj/item/weapon/aiModule/mod in modules)
qdel(mod)
modules.Cut()
user << "\blue You clear \the [src]'s memory buffers!"
user << "<span class='notice'>You clear \the [src]'s memory buffers!</span>"
laws = new base_law_type
return
/obj/item/weapon/planning_frame/examine()
/obj/item/weapon/planning_frame/examine(mob/user)
..()
laws_sanity_check()
if(modules.len && istype(modules[1],/obj/item/weapon/aiModule/purge))
usr << "<b>Purge module inserted!</b> - All laws will be cleared prior to adding the ones below."
user << "<b>Purge module inserted!</b> - All laws will be cleared prior to adding the ones below."
if(!laws.inherent_cleared)
usr << "<b><u>Assuming that default laws are unchanged</u>, the laws currently inserted would read as:</b>"
user << "<b><u>Assuming that default laws are unchanged</u>, the laws currently inserted would read as:</b>"
else
usr << "<b>The laws currently inserted would read as:</b>"
user << "<b>The laws currently inserted would read as:</b>"
if(src.modules.len == 0)
usr << "<i>No modules have been inserted!</i>"
user << "<i>No modules have been inserted!</i>"
return
src.laws.show_laws(usr)
src.laws.show_laws(user)
/obj/item/weapon/planning_frame/verb/dry_run()
set name = "Dry Run"
usr << "You read through the list of modules to emulate, in their run order:"
for(var/i=1;i<=modules.len;i++)
var/obj/item/weapon/aiModule/module = modules[i]
var/notes="\blue Looks OK!"
var/notes="<span class='notice'>Looks OK!</span>"
if(i>1 && istype(modules[i],/obj/item/weapon/aiModule/purge))
notes="\red <b>This should be the first module!</b>"
notes="<span class='danger'>This should be the first module!</span>"
if(!module.validate(src.laws,src,usr))
notes="\red <b>A red light is blinking!</b>"
notes="<span class='danger'>A red light is blinking!</span>"
if(module.modflags & DANGEROUS_MODULE)
notes="\red <b>Your heart skips a beat!</b>"
notes="<span class='danger'>Your heart skips a beat!</span>"
usr << " [i-1]. [module.name] - [notes]"
/obj/item/weapon/planning_frame/proc/laws_sanity_check()

View File

@@ -18,63 +18,63 @@
var/obj/item/device/toner/ink = null
//This proc doesn't just check if the painter can be used, but also uses it.
//Only call this if you are certain that the painter will be used right after this check!
proc/use(mob/user as mob)
if(can_use(user))
ink.charges--
playsound(get_turf(src), 'sound/effects/spray2.ogg', 50, 1)
return 1
else
return 0
//This proc doesn't just check if the painter can be used, but also uses it.
//Only call this if you are certain that the painter will be used right after this check!
/obj/item/weapon/airlock_painter/proc/use(mob/user as mob)
if(can_use(user))
ink.charges--
playsound(get_turf(src), 'sound/effects/spray2.ogg', 50, 1)
return 1
else
return 0
//This proc only checks if the painter can be used.
//Call this if you don't want the painter to be used right after this check, for example
//because you're expecting user input.
proc/can_use(mob/user as mob)
if(!ink)
user << "<span class='notice'>There is no toner cardridge installed installed in \the [name]!</span>"
return 0
else if(ink.charges < 1)
user << "<span class='notice'>\The [name] is out of ink!</span>"
return 0
else
return 1
//This proc only checks if the painter can be used.
//Call this if you don't want the painter to be used right after this check, for example
//because you're expecting user input.
/obj/item/weapon/airlock_painter/proc/can_use(mob/user as mob)
if(!ink)
user << "<span class='notice'>There is no toner cardridge installed installed in \the [name]!</span>"
return 0
else if(ink.charges < 1)
user << "<span class='notice'>\The [name] is out of ink!</span>"
return 0
else
return 1
examine()
..()
if(!ink)
usr << "<span class='notice'>It doesn't have a toner cardridge installed.</span>"
return
var/ink_level = "high"
if(ink.charges < 1)
ink_level = "empty"
else if((ink.charges/ink.max_charges) <= 0.25) //25%
ink_level = "low"
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
ink_level = "dangerously high"
usr << "<span class='notice'>Its ink levels look [ink_level].</span>"
/obj/item/weapon/airlock_painter/examine(mob/user)
..()
if(!ink)
user << "<span class='info'>It doesn't have a toner cardridge installed.</span>"
return
var/ink_level = "high"
if(ink.charges < 1)
ink_level = "empty"
else if((ink.charges/ink.max_charges) <= 0.25) //25%
ink_level = "low"
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
ink_level = "dangerously high"
user << "<span class='info'>Its ink levels look [ink_level].</span>"
attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/device/toner))
if(ink)
user << "<span class='notice'>\the [name] already contains \a [ink].</span>"
return
user.drop_item()
W.loc = src
user << "<span class='notice'>You install \the [W] into \the [name].</span>"
ink = W
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
attack_self(mob/user)
/obj/item/weapon/airlock_painter/attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/device/toner))
if(ink)
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
ink.loc = user.loc
user.put_in_hands(ink)
user << "<span class='notice'>You remove \the [ink] from \the [name].</span>"
ink = null
user << "<span class='notice'>\the [name] already contains \a [ink].</span>"
return
user.drop_item()
W.loc = src
user << "<span class='notice'>You install \the [W] into \the [name].</span>"
ink = W
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
/obj/item/weapon/airlock_painter/attack_self(mob/user)
if(ink)
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
ink.loc = user.loc
user.put_in_hands(ink)
user << "<span class='notice'>You remove \the [ink] from \the [name].</span>"
ink = null
/obj/item/weapon/airlock_painter/New()
. = ..()

View File

@@ -145,17 +145,17 @@
return 0
/obj/item/weapon/card/emag/examine()
/obj/item/weapon/card/emag/examine(mob/user)
..()
if(energy==-1)
usr << "<span class=\"info\">\The [name] has a tiny fusion generator for power.</span>"
user << "<span class=\"info\">\The [name] has a tiny fusion generator for power.</span>"
else
var/class="info"
if(energy/max_energy < 0.1 /* 10% energy left */)
class="warning"
usr << "<span class=\"[class]\">This [name] has [energy]MJ left in its capacitor ([max_energy]MJ capacity).</span>"
user << "<span class=\"[class]\">This [name] has [energy]MJ left in its capacitor ([max_energy]MJ capacity).</span>"
if(recharge_rate && recharge_ticks)
usr << "<span class=\"info\">A small label on a thermocouple notes that it recharges at a rate of [recharge_rate]MJ for every [recharge_ticks<=1?"":"[recharge_ticks] "]oscillator tick[recharge_ticks>1?"s":""].</span>"
user << "<span class=\"info\">A small label on a thermocouple notes that it recharges at a rate of [recharge_rate]MJ for every [recharge_ticks<=1?"":"[recharge_ticks] "]oscillator tick[recharge_ticks>1?"s":""].</span>"
/obj/item/weapon/card/id
name = "identification card"
@@ -274,7 +274,7 @@
src.access |= I.access
if(istype(user, /mob/living) && user.mind)
if(user.mind.special_role)
usr << "\blue The card's microscanners activate as you pass it over the ID, copying its access."
usr << "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>"
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
@@ -292,7 +292,7 @@
return
src.assignment = u
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
user << "\blue You successfully forge the ID card."
user << "<span class='notice'>You successfully forge the ID card.</span>"
registered_user = user
else if(!registered_user || registered_user == user)
@@ -312,7 +312,7 @@
return
src.assignment = u
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
user << "\blue You successfully forge the ID card."
user << "<span class='notice'>You successfully forge the ID card.</span>"
return
if("Show")
..()

View File

@@ -34,12 +34,11 @@ var/global/list/moneytypes=list(
amount = new_amount
update_icon()
/obj/item/weapon/spacecash/examine()
/obj/item/weapon/spacecash/examine(mob/user)
..()
if(amount>1)
usr << "\icon[src] This is a stack of [amount] [src]s."
else
usr << "\icon[src] This is \a [src]s."
usr << "It's worth [worth*amount] credits."
user << "It is a stack holding [amount] chips."
user << "<span class='info'>It's worth [worth*amount] credits.</span>"
/obj/item/weapon/spacecash/update_icon()
icon_state = "cash[worth]"
@@ -80,13 +79,13 @@ var/global/list/moneytypes=list(
collected += collect_from(cash)
if(collected)
update_icon()
user << "\blue You add [collected] chips to your stack of cash."
user << "span class='notice'>You add [collected] chips to your stack of cash.</span>"
else if(istype(A,/obj/item/weapon/spacecash))
var/obj/item/weapon/spacecash/cash = A
var/collected = src.collect_from(cash)
if(collected)
update_icon()
user << "\blue You add [collected] chips to your stack of cash."
user << "span class='notice'>You add [collected] chips to your stack of cash.</span>"
/obj/item/weapon/spacecash/c10
icon_state = "cash10"

View File

@@ -48,18 +48,17 @@
item_state = "foam_extinguisher"
sprite_name = "foam_extinguisher"
/obj/item/weapon/extinguisher/examine()
set src in usr
usr << "\icon[src] [src.name] contains:"
if(reagents && reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
usr << "\blue [R.volume] units of [R.name]"
for(var/thing in src)
usr << "\red \A [thing] is jammed into the nozzle!"
/obj/item/weapon/extinguisher/examine(mob/user)
..()
return
if(!is_open_container())
user << "It contains:"
if(reagents && reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
user << "<span class='info'>[R.volume] units of [R.name]</span>"
else
user << "<span class='info'>Nothing</span>"
for(var/thing in src)
user << "<span class='warning'>\A [thing] is jammed into the nozzle!</span>"
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
safety = !safety
@@ -72,15 +71,15 @@
if(user.stat || user.restrained() || user.lying) return
if (istype(W, /obj/item/weapon/wrench))
if(!is_open_container())
user.visible_message("[user] begins to unwrench the fill cap on \the [src].","\blue You begin to unwrench the fill cap on \the [src].")
user.visible_message("[user] begins to unwrench the fill cap on \the [src].","<span class='notice'>You begin to unwrench the fill cap on \the [src].</span>")
if(do_after(user, 25))
user.visible_message("[user] removes the fill cap on \the [src].","\blue You remove the fill cap on \the [src].")
user.visible_message("[user] removes the fill cap on \the [src].","<span class='notice'>You remove the fill cap on \the [src].</span>")
playsound(get_turf(src),'sound/items/Ratchet.ogg', 100, 1)
flags |= OPENCONTAINER
else
user.visible_message("[user] begins to seal the fill cap on \the [src].","\blue You begin to seal the fill cap on \the [src].")
user.visible_message("[user] begins to seal the fill cap on \the [src].","<span class='notice'>You begin to seal the fill cap on \the [src].</span>")
if(do_after(user, 25))
user.visible_message("[user] fastens the fill cap on \the [src].","\blue You fasten the fill cap on \the [src].")
user.visible_message("[user] fastens the fill cap on \the [src].","<span class='notice'>You fasten the fill cap on \the [src].</span>")
playsound(get_turf(src),'sound/items/Ratchet.ogg', 100, 1)
flags &= ~OPENCONTAINER
return
@@ -110,16 +109,16 @@
if(o.reagents.has_reagent(bad_reagent))
badshit += reagents_to_log[bad_reagent]
if(badshit.len)
var/hl="\red <b>([english_list(badshit)])</b> \black"
var/hl="<span class='danger'>([english_list(badshit)])"
// message_admins("[user.name] ([user.ckey]) filled \a [src] with [o.reagents.get_reagent_ids()] [hl]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
log_game("[user.name] ([user.ckey]) filled \a [src] with [o.reagents.get_reagent_ids()] [hl]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
o.reagents.trans_to(src, 50)
user << "\blue \The [src] is now refilled"
user << "<span class='notice'>\The [src] is now refilled</span>"
playsound(get_turf(src), 'sound/effects/refill.ogg', 50, 1, -6)
return
if(is_open_container() && reagents.total_volume)
user << "\blue You empty \the [src] onto [target]."
user << "<span class='notice'>You empty \the [src] onto [target].</span>"
if(reagents.has_reagent("fuel"))
message_admins("[user.name] ([user.ckey]) poured Welder Fuel onto [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
log_game("[user.name] ([user.ckey]) poured Welder Fuel onto [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
@@ -128,7 +127,7 @@
return
if (!safety && !is_open_container())
if (src.reagents.total_volume < 1)
usr << "\red \The [src] is empty."
usr << "<span class='warning'>\The [src] is empty.</span>"
return
if (world.time < src.last_use + 20)
@@ -139,7 +138,7 @@
if(reagents.has_reagent(bad_reagent))
badshit += reagents_to_log[bad_reagent]
if(badshit.len)
var/hl="\red <b>([english_list(badshit)])</b> \black"
var/hl="<span class='danger'>([english_list(badshit)])</span>"
message_admins("[user.name] ([user.ckey]) used \a [src] filled with [reagents.get_reagent_ids(1)] [hl]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
log_game("[user.name] ([user.ckey]) used \a [src] filled with [reagents.get_reagent_ids(1)] [hl]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
@@ -230,13 +229,13 @@
if((istype(target, /obj/structure/reagent_dispensers/watertank)))
var/obj/o = target
o.reagents.trans_to(src, 50)
user << "\blue \The [src] is now refilled"
user << "<span class='notice'>\The [src] is now refilled</span>"
playsound(get_turf(src), 'sound/effects/refill.ogg', 50, 1, -6)
return
if (!safety && !is_open_container())
if (src.reagents.total_volume < 1)
usr << "\red \The [src] is empty."
usr << "<span class='warning'>\The [src] is empty."
return
if (world.time < src.last_use + 20)

View File

@@ -293,12 +293,9 @@
return
*/
/obj/item/weapon/wrapping_paper/examine()
set src in oview(1)
/obj/item/weapon/wrapping_paper/examine(mob/user)
..()
usr << "There is about [amount] square units of paper left!"
return
user << "<span class='info'>There is about [amount] square units of paper left!</span>"
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
if (!istype(target, /mob/living/carbon/human)) return

View File

@@ -18,217 +18,215 @@
var/obj/item/weapon/reagent_containers/glass/beaker/noreactgrenade/reservoir = null
var/extract_uses = 0
hear_talk(mob/M as mob, message)
/obj/item/weapon/grenade/chem_grenade/hear_talk(mob/M as mob, message)
if(detonator)
detonator.hear_talk(M, message)
/obj/item/weapon/grenade/chem_grenade/attack_self(mob/user as mob)
if(!stage || stage==1)
if(detonator)
detonator.hear_talk(M, message)
attack_self(mob/user as mob)
if(!stage || stage==1)
if(detonator)
// detonator.loc=src.loc
detonator.detached()
usr.put_in_hands(detonator)
detonator=null
stage=0
icon_state = initial(icon_state)
else if(beakers.len)
for(var/obj/B in beakers)
if(istype(B))
beakers -= B
user.put_in_hands(B)
E = null
C = null
inserted_cores = 0
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
if(stage > 1 && !active && clown_check(user))
user << "<span class='warning'>You prime \the [name]!</span>"
detonator.detached()
usr.put_in_hands(detonator)
detonator=null
stage=0
icon_state = initial(icon_state)
else if(beakers.len)
for(var/obj/B in beakers)
if(istype(B))
beakers -= B
user.put_in_hands(B)
E = null
C = null
inserted_cores = 0
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
if(stage > 1 && !active && clown_check(user))
user << "<span class='attack'>You prime \the [name]!</span>"
log_attack("<font color='red'>[user.name] ([user.ckey]) primed \a [src].</font>")
log_admin("ATTACK: [user] ([user.ckey]) primed \a [src].")
message_admins("ATTACK: [user] ([user.ckey]) primed \a [src].")
log_attack("<font color='red'>[user.name] ([user.ckey]) primed \a [src].</font>")
log_admin("ATTACK: [user] ([user.ckey]) primed \a [src].")
message_admins("ATTACK: [user] ([user.ckey]) primed \a [src].")
activate()
add_fingerprint(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
activate()
add_fingerprint(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
var/obj/item/device/assembly_holder/det = W
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
user << "<span class='warning'> Assembly must contain one igniter.</span>"
return
if(!det.secured)
user << "<span class='warning'> Assembly must be secured with screwdriver.</span>"
return
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
var/obj/item/device/assembly_holder/det = W
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
user << "<span class='warning'> Assembly must contain one igniter.</span>"
return
if(!det.secured)
user << "<span class='warning'> Assembly must be secured with screwdriver.</span>"
return
path = 1
user << "<span class='notice'> You add [W] to the metal casing.</span>"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
user.remove_from_mob(det)
det.loc = src
detonator = det
icon_state = initial(icon_state) +"_ass"
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
stage = 1
else if(istype(W,/obj/item/weapon/screwdriver) && path != 2)
if(stage == 1)
path = 1
user << "<span class='notice'> You add [W] to the metal casing.</span>"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
user.remove_from_mob(det)
det.loc = src
detonator = det
icon_state = initial(icon_state) +"_ass"
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
stage = 1
else if(istype(W,/obj/item/weapon/screwdriver) && path != 2)
if(stage == 1)
path = 1
if(beakers.len)
user << "<span class='notice'> You lock the assembly.</span>"
name = "grenade"
else
if(beakers.len)
user << "<span class='notice'> You lock the assembly.</span>"
name = "grenade"
else
// user << "<span class='warning'> You need to add at least one beaker before locking the assembly.</span>"
user << "<span class='warning'> You lock the empty assembly.</span>"
name = "fake grenade"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
icon_state = initial(icon_state) +"_locked"
stage = 2
else if(stage == 2)
if(active && prob(95))
user << "<span class='warning'> You trigger the assembly!</span>"
prime()
return
else
user << "<span class='notice'> You unlock the assembly.</span>"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
icon_state = initial(icon_state) + (detonator?"_ass":"")
stage = 1
active = 0
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
path = 1
if(beakers.len == 2)
user << "<span class='warning'> The grenade can not hold more containers.</span>"
user << "<span class='warning'> You lock the empty assembly.</span>"
name = "fake grenade"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
icon_state = initial(icon_state) +"_locked"
stage = 2
else if(stage == 2)
if(active && prob(95))
user << "<span class='warning'> You trigger the assembly!</span>"
prime()
return
else
if (istype(W,/obj/item/slime_extract))
if (inserted_cores > 0)
user << "<span class='warning'> This type of grenade cannot hold more than one slime core.</span>"
else
user << "<span class='notice'> You add \the [W] to the assembly.</span>"
user.drop_item()
W.loc = src
beakers += W
E = W
inserted_cores++
stage = 1
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
else if(W.reagents.total_volume)
user << "<span class='notice'> You unlock the assembly.</span>"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
icon_state = initial(icon_state) + (detonator?"_ass":"")
stage = 1
active = 0
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
path = 1
if(beakers.len == 2)
user << "<span class='warning'> The grenade can not hold more containers.</span>"
return
else
if (istype(W,/obj/item/slime_extract))
if (inserted_cores > 0)
user << "<span class='warning'> This type of grenade cannot hold more than one slime core.</span>"
else
user << "<span class='notice'> You add \the [W] to the assembly.</span>"
user.drop_item()
W.loc = src
beakers += W
E = W
inserted_cores++
stage = 1
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
else
user << "<span class='warning'> \the [W] is empty.</span>"
else if (istype(W,/obj/item/slime_extract))
user << "<span class='warning'> This grenade case is too small for a slime core to fit in it.</span>"
else if(W.reagents.total_volume)
user << "<span class='notice'> You add \the [W] to the assembly.</span>"
user.drop_item()
W.loc = src
beakers += W
stage = 1
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
else
user << "<span class='warning'> \the [W] is empty.</span>"
else if (istype(W,/obj/item/slime_extract))
user << "<span class='warning'> This grenade case is too small for a slime core to fit in it.</span>"
examine()
set src in usr
usr << desc
if(detonator)
usr << "With attached [detonator.name]"
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
..()
if(detonator)
user << "<span class='info'>With an attached [detonator.name]</span>"
activate(mob/user as mob)
if(active) return
/obj/item/weapon/grenade/chem_grenade/activate(mob/user as mob)
if(active) return
if(detonator)
if(!isigniter(detonator.a_left))
detonator.a_left.activate()
active = 1
if(!isigniter(detonator.a_right))
detonator.a_right.activate()
active = 1
if(active)
icon_state = initial(icon_state) + "_active"
if(detonator)
if(!isigniter(detonator.a_left))
detonator.a_left.activate()
active = 1
if(!isigniter(detonator.a_right))
detonator.a_right.activate()
active = 1
if(active)
icon_state = initial(icon_state) + "_active"
if(user)
log_attack("<font color='red'>[user.name] ([user.ckey]) primed \a [src]</font>")
log_admin("ATTACK: [user] ([user.ckey]) primed \a [src]")
message_admins("ATTACK: [user] ([user.ckey]) primed \a [src]")
if(user)
log_attack("<font color='red'>[user.name] ([user.ckey]) primed \a [src]</font>")
log_admin("ATTACK: [user] ([user.ckey]) primed \a [src]")
message_admins("ATTACK: [user] ([user.ckey]) primed \a [src]")
return
/obj/item/weapon/grenade/chem_grenade/proc/primed(var/primed = 1)
if(active)
icon_state = initial(icon_state) + (primed?"_primed":"_active")
/obj/item/weapon/grenade/chem_grenade/prime()
if(!stage || stage<2) return
//if(prob(reliability))
var/has_reagents = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(G.reagents.total_volume) has_reagents = 1
active = 0
if(!has_reagents)
icon_state = initial(icon_state) +"_locked"
playsound(get_turf(src), 'sound/items/Screwdriver2.ogg', 50, 1)
return
proc/primed(var/primed = 1)
if(active)
icon_state = initial(icon_state) + (primed?"_primed":"_active")
playsound(get_turf(src), 'sound/effects/bamfgas.ogg', 50, 1)
prime()
if(!stage || stage<2) return
visible_message("<span class='warning'>\icon[src] \The [src] bursts open.</span>")
//if(prob(reliability))
var/has_reagents = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(G.reagents.total_volume) has_reagents = 1
reservoir = new /obj/item/weapon/reagent_containers/glass/beaker/noreactgrenade() //acts like a stasis beaker, so the chemical reactions don't occur before all the slime reactions have occured
active = 0
if(!has_reagents)
icon_state = initial(icon_state) +"_locked"
playsound(get_turf(src), 'sound/items/Screwdriver2.ogg', 50, 1)
return
playsound(get_turf(src), 'sound/effects/bamfgas.ogg', 50, 1)
visible_message("<span class='warning'>\icon[src] \The [src] bursts open.</span>")
reservoir = new /obj/item/weapon/reagent_containers/glass/beaker/noreactgrenade() //acts like a stasis beaker, so the chemical reactions don't occur before all the slime reactions have occured
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(reservoir, G.reagents.total_volume)
for(var/obj/item/slime_extract/S in beakers) //checking for reagents inside the slime extracts
S.reagents.trans_to(reservoir, S.reagents.total_volume)
if (E != null)
extract_uses = E.Uses
for(var/i=1,i<=extract_uses,i++)//<-------//exception for slime extracts injected with steroids. The grenade will repeat its checks untill all its remaining uses are gone
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(reservoir, G.reagents.total_volume)
for(var/obj/item/slime_extract/S in beakers) //checking for reagents inside the slime extracts
S.reagents.trans_to(reservoir, S.reagents.total_volume)
if (E != null)
extract_uses = E.Uses
for(var/i=1,i<=extract_uses,i++)//<-------//exception for slime extracts injected with steroids. The grenade will repeat its checks untill all its remaining uses are gone
if (reservoir.reagents.has_reagent("plasma", 5))
reservoir.reagents.trans_id_to(E, "plasma", 5) //If the grenade contains a slime extract, the grenade will check in this order
else if (reservoir.reagents.has_reagent("blood", 5)) //for any Plasma -> Blood ->or Water among the reagents of the other containers
reservoir.reagents.trans_id_to(E, "blood", 5) //and inject 5u of it into the slime extract.
else if (reservoir.reagents.has_reagent("water", 5))
reservoir.reagents.trans_id_to(E, "water", 5)
else if (reservoir.reagents.has_reagent("sugar", 5))
reservoir.reagents.trans_id_to(E, "sugar", 5)
if(E.reagents.total_volume) //<-------//exception for slime reactions that produce new reagents. The grenade checks if any
E.reagents.trans_to(reservoir, E.reagents.total_volume) //reagents are left in the slime extracts after the slime reactions occured
if (C != null)
extract_uses = C.Uses
for(var/j=1,j<=extract_uses,j++) //why don't anyone ever uses "while" directives anyway?
if (reservoir.reagents.has_reagent("plasma", 5))
reservoir.reagents.trans_id_to(E, "plasma", 5) //If the grenade contains a slime extract, the grenade will check in this order
else if (reservoir.reagents.has_reagent("blood", 5)) //for any Plasma -> Blood ->or Water among the reagents of the other containers
reservoir.reagents.trans_id_to(E, "blood", 5) //and inject 5u of it into the slime extract.
reservoir.reagents.trans_id_to(C, "plasma", 5) //since the order in which slime extracts are inserted matters (in the case of an Ex grenade)
else if (reservoir.reagents.has_reagent("blood", 5))//this allow users to plannify which reagent will get into which extract.
reservoir.reagents.trans_id_to(C, "blood", 5)
else if (reservoir.reagents.has_reagent("water", 5))
reservoir.reagents.trans_id_to(E, "water", 5)
reservoir.reagents.trans_id_to(C, "water", 5)
else if (reservoir.reagents.has_reagent("sugar", 5))
reservoir.reagents.trans_id_to(E, "sugar", 5)
if(E.reagents.total_volume) //<-------//exception for slime reactions that produce new reagents. The grenade checks if any
E.reagents.trans_to(reservoir, E.reagents.total_volume) //reagents are left in the slime extracts after the slime reactions occured
if (C != null)
extract_uses = C.Uses
for(var/j=1,j<=extract_uses,j++) //why don't anyone ever uses "while" directives anyway?
if (reservoir.reagents.has_reagent("plasma", 5))
reservoir.reagents.trans_id_to(C, "plasma", 5) //since the order in which slime extracts are inserted matters (in the case of an Ex grenade)
else if (reservoir.reagents.has_reagent("blood", 5))//this allow users to plannify which reagent will get into which extract.
reservoir.reagents.trans_id_to(C, "blood", 5)
else if (reservoir.reagents.has_reagent("water", 5))
reservoir.reagents.trans_id_to(C, "water", 5)
else if (reservoir.reagents.has_reagent("sugar", 5))
reservoir.reagents.trans_id_to(C, "sugar", 5)
if(C.reagents.total_volume)
C.reagents.trans_to(reservoir, C.reagents.total_volume)
reservoir.reagents.trans_id_to(C, "sugar", 5)
if(C.reagents.total_volume)
C.reagents.trans_to(reservoir, C.reagents.total_volume)
reservoir.reagents.update_total()
reservoir.reagents.update_total()
reservoir.reagents.trans_to(src, reservoir.reagents.total_volume)
reservoir.reagents.trans_to(src, reservoir.reagents.total_volume)
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
/*else
icon_state = initial(icon_state) + "_locked"
crit_fail = 1
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.loc = get_turf(src.loc)*/
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
/*else
icon_state = initial(icon_state) + "_locked"
crit_fail = 1
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.loc = get_turf(src.loc)*/
/obj/item/weapon/grenade/chem_grenade/New()
. = ..()
@@ -250,79 +248,78 @@ obj/item/weapon/grenade/chem_grenade/exgrenade
origin_tech = "combat=4;materials=3;engineering=2"
affected_area = 4
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
var/obj/item/device/assembly_holder/det = W
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
user << "<span class='warning'> Assembly must contain one igniter.</span>"
return
if(!det.secured)
user << "<span class='warning'> Assembly must be secured with screwdriver.</span>"
return
obj/item/weapon/grenade/chem_grenade/exgrenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
var/obj/item/device/assembly_holder/det = W
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
user << "<span class='warning'> Assembly must contain one igniter.</span>"
return
if(!det.secured)
user << "<span class='warning'> Assembly must be secured with screwdriver.</span>"
return
path = 1
user << "<span class='notice'> You insert [W] into the grenade.</span>"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
user.remove_from_mob(det)
det.loc = src
detonator = det
icon_state = initial(icon_state) +"_ass"
name = "unsecured EX grenade with [beakers.len] containers[detonator?" and detonator":""]"
stage = 1
else if(istype(W,/obj/item/weapon/screwdriver) && path != 2)
if(stage == 1)
path = 1
user << "<span class='notice'> You insert [W] into the grenade.</span>"
if(beakers.len)
user << "<span class='notice'> You lock the assembly.</span>"
name = "EX Grenade"
else
user << "<span class='notice'> You lock the empty assembly.</span>"
name = "fake grenade"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
user.remove_from_mob(det)
det.loc = src
detonator = det
icon_state = initial(icon_state) +"_ass"
name = "unsecured EX grenade with [beakers.len] containers[detonator?" and detonator":""]"
stage = 1
else if(istype(W,/obj/item/weapon/screwdriver) && path != 2)
if(stage == 1)
path = 1
if(beakers.len)
user << "<span class='notice'> You lock the assembly.</span>"
name = "EX Grenade"
else
user << "<span class='notice'> You lock the empty assembly.</span>"
name = "fake grenade"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
icon_state = initial(icon_state) +"_locked"
stage = 2
else if(stage == 2)
if(active && prob(95))
user << "<span class='warning'> You trigger the assembly!</span>"
prime()
return
else
user << "<span class='notice'> You unlock the assembly.</span>"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
name = "unsecured EX grenade with [beakers.len] containers[detonator?" and detonator":""]"
icon_state = initial(icon_state) + (detonator?"_ass":"")
stage = 1
active = 0
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
path = 1
if(beakers.len == 3)
user << "<span class='warning'> The grenade can not hold more containers.</span>"
icon_state = initial(icon_state) +"_locked"
stage = 2
else if(stage == 2)
if(active && prob(95))
user << "<span class='attack'> You trigger the assembly!</span>"
prime()
return
else
if (istype(W,/obj/item/slime_extract))
if (inserted_cores > 1)
user << "<span class='warning'> You cannot fit more than two slime cores in this grenade.</span>"
else
user << "<span class='notice'> You add \the [W] to the assembly.</span>"
user.drop_item()
W.loc = src
beakers += W
if (E == null)//E = first slime extract, C = second slime extract
E = W
else
C = W
inserted_cores++
stage = 1
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
else if(W.reagents.total_volume)
user << "<span class='notice'> You unlock the assembly.</span>"
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 25, -3)
name = "unsecured EX grenade with [beakers.len] containers[detonator?" and detonator":""]"
icon_state = initial(icon_state) + (detonator?"_ass":"")
stage = 1
active = 0
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
path = 1
if(beakers.len == 3)
user << "<span class='warning'> The grenade can not hold more containers.</span>"
return
else
if (istype(W,/obj/item/slime_extract))
if (inserted_cores > 1)
user << "<span class='warning'> You cannot fit more than two slime cores in this grenade.</span>"
else
user << "<span class='notice'> You add \the [W] to the assembly.</span>"
user.drop_item()
W.loc = src
beakers += W
if (E == null)//E = first slime extract, C = second slime extract
E = W
else
C = W
inserted_cores++
stage = 1
name = "unsecured EX grenade with [beakers.len] containers[detonator?" and detonator":""]"
else
user << "<span class='warning'> \the [W] is empty.</span>"
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
else if(W.reagents.total_volume)
user << "<span class='notice'> You add \the [W] to the assembly.</span>"
user.drop_item()
W.loc = src
beakers += W
stage = 1
name = "unsecured EX grenade with [beakers.len] containers[detonator?" and detonator":""]"
else
user << "<span class='warning'> \the [W] is empty.</span>"
/obj/item/weapon/grenade/chem_grenade/metalfoam
name = "Metal-Foam Grenade"
@@ -330,20 +327,20 @@ obj/item/weapon/grenade/chem_grenade/exgrenade
path = 1
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
/obj/item/weapon/grenade/chem_grenade/metalfoam/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminum", 30)
B2.reagents.add_reagent("foaming_agent", 10)
B2.reagents.add_reagent("pacid", 10)
B1.reagents.add_reagent("aluminum", 30)
B2.reagents.add_reagent("foaming_agent", 10)
B2.reagents.add_reagent("pacid", 10)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
/obj/item/weapon/grenade/chem_grenade/incendiary
name = "Incendiary Grenade"
@@ -351,22 +348,22 @@ obj/item/weapon/grenade/chem_grenade/exgrenade
path = 1
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
/obj/item/weapon/grenade/chem_grenade/incendiary/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminum", 15)
//B1.reagents.add_reagent("fuel",20)
B2.reagents.add_reagent("plasma", 15)
B2.reagents.add_reagent("sacid", 15)
//B1.reagents.add_reagent("fuel",20)
B1.reagents.add_reagent("aluminum", 15)
//B1.reagents.add_reagent("fuel",20)
B2.reagents.add_reagent("plasma", 15)
B2.reagents.add_reagent("sacid", 15)
//B1.reagents.add_reagent("fuel",20)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
/obj/item/weapon/grenade/chem_grenade/antiweed
name = "weedkiller grenade"
@@ -374,21 +371,21 @@ obj/item/weapon/grenade/chem_grenade/exgrenade
path = 1
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
/obj/item/weapon/grenade/chem_grenade/antiweed/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("plantbgone", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B1.reagents.add_reagent("plantbgone", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
beakers += B1
beakers += B2
icon_state = "grenade"
beakers += B1
beakers += B2
icon_state = "grenade"
/obj/item/weapon/grenade/chem_grenade/cleaner
name = "Cleaner Grenade"
@@ -396,20 +393,20 @@ obj/item/weapon/grenade/chem_grenade/exgrenade
stage = 2
path = 1
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
/obj/item/weapon/grenade/chem_grenade/cleaner/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("water", 40)
B2.reagents.add_reagent("cleaner", 10)
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("water", 40)
B2.reagents.add_reagent("cleaner", 10)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
/obj/item/weapon/reagent_containers/glass/beaker/noreactgrenade
name = "grenade reservoir"

View File

@@ -2,16 +2,16 @@
//iedcasing assembly crafting//
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/attackby(var/obj/item/I, mob/user as mob)
if(istype(I, /obj/item/device/assembly/igniter))
var/obj/item/device/assembly/igniter/G = I
var/obj/item/weapon/grenade/iedcasing/W = new /obj/item/weapon/grenade/iedcasing
user.before_take_item(G)
user.before_take_item(src)
user.put_in_hands(W)
user << "<span class='notice'>You stuff the [I] in the [src], emptying the contents beforehand.</span>"
W.underlays += image(src.icon, icon_state = src.icon_state)
del(I)
del(src)
if(istype(I, /obj/item/device/assembly/igniter))
var/obj/item/device/assembly/igniter/G = I
var/obj/item/weapon/grenade/iedcasing/W = new /obj/item/weapon/grenade/iedcasing
user.before_take_item(G)
user.before_take_item(src)
user.put_in_hands(W)
user << "<span class='notice'>You stuff the [I] in the [src], emptying the contents beforehand.</span>"
W.underlays += image(src.icon, icon_state = src.icon_state)
del(I)
del(src)
/obj/item/weapon/grenade/iedcasing
@@ -86,9 +86,7 @@
explosion(src.loc,-1,0,2)
del(src)
/obj/item/weapon/grenade/iedcasing/examine()
set src in usr
usr << desc
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
..()
if(assembled == 3)
usr << "You can't tell when it will explode!" //Stops you from checking the time to detonation unlike regular grenades
return
user << "<span class='info'>You can't tell when it will explode!</span>" //Stops you from checking the time to detonation unlike regular grenades

View File

@@ -43,19 +43,18 @@
return*/
/obj/item/weapon/grenade/examine()
set src in usr
usr << desc
/obj/item/weapon/grenade/examine(mob/user)
..()
if(det_time > 1)
usr << "The timer is set to [det_time/10] seconds."
user << "<span class='info'>The timer is set to [det_time/10] seconds.</span>"
return
usr << "\The [src] is set for instant detonation."
user << "<span class='warning'>\The [src] is set for instant detonation.</span>"
/obj/item/weapon/grenade/attack_self(mob/user as mob)
if(!active)
if(clown_check(user))
user << "<span class='warning'>You prime \the [name]! [det_time/10] seconds!</span>"
user << "<span class='attack'>You prime \the [name]! [det_time/10] seconds!</span>"
activate(user)
add_fingerprint(user)

View File

@@ -24,19 +24,14 @@
src.icon_state = "[src.icon_type]box[total_contents]"
return
/obj/item/weapon/storage/fancy/examine()
set src in oview(1)
/obj/item/weapon/storage/fancy/examine(mob/user)
..()
if(contents.len <= 0)
usr << "There are no [src.icon_type]s left in the box."
user << "<span class='info'>There are no [src.icon_type]s left in the box.</span>"
else if(contents.len == 1)
usr << "There is one [src.icon_type] left in the box."
user << "<span class='info'>There is one [src.icon_type] left in the box.</span>"
else
usr << "There are [src.contents.len] [src.icon_type]s in the box."
return
user << "<span class='info'>There are [src.contents.len] [src.icon_type]s in the box.</span>"
/*
@@ -180,10 +175,10 @@
return
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/clothing/mask/cigarette/C = W
if(!istype(C)) return // what
reagents.trans_to(C, (reagents.total_volume/contents.len))
..()
var/obj/item/clothing/mask/cigarette/C = W
if(!istype(C)) return // what
reagents.trans_to(C, (reagents.total_volume/contents.len))
..()
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))

View File

@@ -54,13 +54,13 @@
if(!locked)
..()
else
user << "\red Its locked!"
user << "<span class='warning'>Its locked!</span>"
return
/obj/item/weapon/storage/lockbox/show_to(mob/user as mob)
if(locked)
user << "\red Its locked!"
user << "<span class='warning'>Its locked!</span>"
else
..()
return
@@ -164,10 +164,9 @@
req_access = list()
var/tracked_access = "It doesn't look like it's ever been used."
/obj/item/weapon/storage/lockbox/unlockable/examine()
/obj/item/weapon/storage/lockbox/unlockable/examine(mob/user)
..()
usr << tracked_access
return 1
user << tracked_access
/obj/item/weapon/storage/lockbox/unlockable/attackby(obj/O as obj, mob/user as mob)
if (istype(O, /obj/item/weapon/card/id))

View File

@@ -27,116 +27,115 @@
max_w_class = 2
max_combined_w_class = 14
examine()
set src in oview(1)
..()
usr << text("The service panel is [src.open ? "open" : "closed"].")
/obj/item/weapon/storage/secure/examine(mob/user)
..()
user << "<span class='info'>The service panel is [src.open ? "open" : "closed"].</span>"
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(get_turf(src), 'sound/weapons/blade1.ogg', 50, 1)
playsound(get_turf(src), "sparks", 50, 1)
user << "You slice through the lock on [src]."
else
user << "You short out the lock on [src]."
return
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20))
src.open =! src.open
user.show_message(text("\blue You [] the service panel.", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
user.show_message(text("\red Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
if (do_after(usr, 100))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
user.show_message(text("\red Internal memory reset. Please give it a few seconds to reinitialize."), 1)
sleep(80)
src.l_setshort = 0
src.l_hacking = 0
else
user.show_message(text("\red Unable to reset internal memory."), 1)
src.l_hacking = 0
else src.l_hacking = 0
return
//At this point you have exhausted all the special things to do when locked
// ... but it's still locked.
return
// -> storage/attackby() what with handle insertion, etc
..()
MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
return
..()
attack_self(mob/user as mob)
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if (src.emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if (src.l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", src.code)
if (!src.locked)
message = "*****"
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
user << browse(dat, "window=caselock;size=300x280")
Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
return
if (href_list["type"])
if (href_list["type"] == "E")
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
src.l_code = src.code
src.l_set = 1
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
src.locked = 0
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_opened)
src.code = null
else
src.code = "ERROR"
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(get_turf(src), 'sound/weapons/blade1.ogg', 50, 1)
playsound(get_turf(src), "sparks", 50, 1)
user << "You slice through the lock on [src]."
else
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
src.locked = 1
src.overlays = null
src.code = null
src.close(usr)
user << "You short out the lock on [src]."
return
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20))
src.open =! src.open
user.show_message(text("<span class='notice'>You [] the service panel.</span>", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
user.show_message(text("<span class='warning'>Now attempting to reset internal memory, please hold.</span>"), 1)
src.l_hacking = 1
if (do_after(usr, 100))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
user.show_message(text("<span class='warning'>Internal memory reset. Please give it a few seconds to reinitialize.</span>"), 1)
sleep(80)
src.l_setshort = 0
src.l_hacking = 0
else
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
src.code = "ERROR"
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
return
user.show_message(text("<span class='warning'>Unable to reset internal memory.</span>"), 1)
src.l_hacking = 0
else src.l_hacking = 0
return
//At this point you have exhausted all the special things to do when locked
// ... but it's still locked.
return
// -> storage/attackby() what with handle insertion, etc
..()
/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
return
..()
/obj/item/weapon/storage/secure/attack_self(mob/user as mob)
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if (src.emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if (src.l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", src.code)
if (!src.locked)
message = "*****"
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
user << browse(dat, "window=caselock;size=300x280")
/obj/item/weapon/storage/secure/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
return
if (href_list["type"])
if (href_list["type"] == "E")
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
src.l_code = src.code
src.l_set = 1
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
src.locked = 0
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_opened)
src.code = null
else
src.code = "ERROR"
else
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
src.locked = 1
src.overlays = null
src.code = null
src.close(usr)
else
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
src.code = "ERROR"
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
return
return
// -----------------------------
// Secure Briefcase
// -----------------------------
@@ -152,27 +151,27 @@
throw_range = 4
w_class = 4.0
New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
/obj/item/weapon/storage/secure/briefcase/New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
usr << "\red [src] is locked and cannot be opened!"
else if ((src.loc == user) && (!src.locked))
playsound(get_turf(src), "rustle", 50, 1, -5)
if (user.s_active)
user.s_active.close(user) //Close and re-open
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
return
/obj/item/weapon/storage/secure/briefcase/attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
usr << "<span class='warning'>[src] is locked and cannot be opened!</span>"
else if ((src.loc == user) && (!src.locked))
playsound(get_turf(src), "rustle", 50, 1, -5)
if (user.s_active)
user.s_active.close(user) //Close and re-open
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
return
//I consider this worthless but it isn't my code so whatever. Remove or uncomment.
/*attack(mob/M as mob, mob/living/user as mob)
@@ -229,13 +228,13 @@
density = 0
cant_hold = list("/obj/item/weapon/storage/secure/briefcase")
New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
/obj/item/weapon/storage/secure/safe/New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
attack_hand(mob/user as mob)
return attack_self(user)
/obj/item/weapon/storage/secure/safe/attack_hand(mob/user as mob)
return attack_self(user)
// Clown planet WMD storage
/obj/item/weapon/storage/secure/safe/clown

View File

@@ -17,7 +17,7 @@
var/mob/foundmob = "" //Used in throwing proc.
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is putting the live [src.name] in \his mouth! It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<span class='danger'>[user] is putting the live [src.name] in \his mouth! It looks like \he's trying to commit suicide.</span>"
return (FIRELOSS)
/obj/item/weapon/melee/baton/New()
@@ -52,13 +52,12 @@
else
icon_state = "[initial(name)]"
/obj/item/weapon/melee/baton/examine()
set src in view(1)
/obj/item/weapon/melee/baton/examine(mob/user)
..()
if(bcell)
usr <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
user <<"<span class='info'>The baton is [round(bcell.percent())]% charged.</span>"
if(!bcell)
usr <<"<span class='warning'>The baton does not have a power source installed.</span>"
user <<"<span class='warning'>The baton does not have a power source installed.</span>"
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cell))
@@ -85,7 +84,7 @@
/obj/item/weapon/melee/baton/attack_self(mob/user)
if(status && (M_CLUMSY in user.mutations) && prob(50))
user << "\red You grab the [src] on the wrong side."
user << "<span class='warning'>You grab the [src] on the wrong side.</span>"
user.Weaken(stunforce*3)
deductcharge(hitcost)
return
@@ -122,7 +121,7 @@
playsound(loc, "swing_hit", 50, 1, -1)
else if(!status)
L.visible_message("<span class='warning'>[L] has been prodded with the [src] by [user]. Luckily it was off.</span>")
L.visible_message("<span class='attack'>[L] has been prodded with the [src] by [user]. Luckily it was off.</span>")
return
if(status)

View File

@@ -13,56 +13,47 @@
var/volume_rate = 500 //Needed for borg jetpack transfer
action_button_name = "Toggle Jetpack"
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return
/obj/item/weapon/tank/jetpack/verb/toggle_rockets()
set name = "Toggle Jetpack Stabilization"
set category = "Object"
src.stabilization_on = !( src.stabilization_on )
usr << "You toggle the stabilization [stabilization_on? "on":"off"]."
return
verb/toggle_rockets()
set name = "Toggle Jetpack Stabilization"
set category = "Object"
src.stabilization_on = !( src.stabilization_on )
usr << "You toggle the stabilization [stabilization_on? "on":"off"]."
return
verb/toggle()
set name = "Toggle Jetpack"
set category = "Object"
on = !on
if(on)
icon_state = "[icon_state]-on"
/obj/item/weapon/tank/jetpack/verb/toggle()
set name = "Toggle Jetpack"
set category = "Object"
on = !on
if(on)
icon_state = "[icon_state]-on"
// item_state = "[item_state]-on"
ion_trail.start()
else
icon_state = initial(icon_state)
ion_trail.start()
else
icon_state = initial(icon_state)
// item_state = initial(item_state)
ion_trail.stop()
return
ion_trail.stop()
return
proc/allow_thrust(num, mob/living/user as mob)
if(!(src.on))
return 0
if((num < 0.005 || src.air_contents.total_moles() < num))
src.ion_trail.stop()
return 0
/obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user as mob)
if(!(src.on))
return 0
if((num < 0.005 || src.air_contents.total_moles() < num))
src.ion_trail.stop()
return 0
var/datum/gas_mixture/G = src.air_contents.remove(num)
var/datum/gas_mixture/G = src.air_contents.remove(num)
var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.toxins //fuck trace gases -Pete
if(allgases >= 0.005)
return 1
var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.toxins //fuck trace gases -Pete
if(allgases >= 0.005)
return 1
del(G)
return
del(G)
return
ui_action_click()
toggle()
/obj/item/weapon/tank/jetpack/ui_action_click()
toggle()
/obj/item/weapon/tank/jetpack/New()
. = ..()
@@ -95,14 +86,6 @@
icon_state = "jetpack-red"
item_state = "jetpack-red"
examine()
set src in usr
..()
if(air_contents.nitrogen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of nitrogen!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return
/obj/item/weapon/tank/jetpack/nitrogen/New()
. = ..()
air_contents.adjust(, , (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
@@ -114,14 +97,6 @@
icon_state = "jetpack-black"
item_state = "jetpack-black"
examine()
set src in usr
..()
if(air_contents.carbon_dioxide < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return
/obj/item/weapon/tank/jetpack/carbondioxide/New()
. = ..()
air_contents.adjust(, (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))

View File

@@ -16,13 +16,6 @@
icon_state = "oxygen"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/oxygen/New()
. = ..()
air_contents.adjust((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
@@ -58,14 +51,6 @@
desc = "Mixed anyone?"
icon_state = "oxygen"
examine()
set src in usr
..()
if(air_contents.oxygen < 1 && loc==usr)
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/New()
. = ..()
air_contents.adjust((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD, , (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD)
@@ -100,13 +85,6 @@
desc = "The lifeblood of plasmamen. Warning: Extremely flammable, do not inhale (unless you're a plasman)."
icon_state = "plasma_fr"
/obj/item/weapon/tank/plasma/plasmaman/examine()
set src in usr
..()
if(air_contents.toxins < 0.2 && loc==usr)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of plasma!</B>")
usr << sound('sound/effects/alert.ogg')
/*
* Emergency Oxygen
*/
@@ -121,13 +99,6 @@
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
volume = 2 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
examine()
set src in usr
..()
if(air_contents.oxygen < 0.2 && loc==usr)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/emergency_oxygen/New()
. = ..()
air_contents.adjust((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
@@ -166,10 +137,3 @@
/obj/item/weapon/tank/nitrogen/New()
. = ..()
air_contents.adjust(, , (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C))
/obj/item/weapon/tank/nitrogen/examine()
set src in usr
..()
if(air_contents.nitrogen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)

View File

@@ -39,12 +39,13 @@
..()
/obj/item/weapon/tank/examine()
/obj/item/weapon/tank/examine(mob/user)
..()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if (!in_range(src, usr))
if (icon == src) usr << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
if (!in_range(src, user))
if (icon == src) user << "<span class='notice'>It's \a \icon[icon][src]! If you want any more information you'll need to get closer.</span>"
return
var/celsius_temperature = src.air_contents.temperature-T0C
@@ -63,9 +64,11 @@
else
descriptive = "furiously hot"
usr << "\blue \The \icon[icon][src] feels [descriptive]"
user << "<span class='info'>\The \icon[icon][src] feels [descriptive]</span>"
return
if(air_contents.volume * 10 < volume)
user << "<span class='danger'>The meter on the [src.name] indicates you are almost out of gas!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/blob_act()
if(prob(50))
@@ -86,14 +89,12 @@
icon = src.loc
if ((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [W] on \icon[icon] [src]"
user.visible_message("<span class='attack'>[user] has used [W] on \icon[icon] [src]</span>", "<span class='attack'>You use \the [W] on \icon[icon] [src]</span>")
var/pressure = air_contents.return_pressure()
manipulated_by = user.real_name //This person is aware of the contents of the tank.
var/total_moles = air_contents.total_moles()
user << "\blue Results of analysis of \icon[icon]"
user << "<span class='notice'>Results of analysis of \icon[icon]</span>"
if (total_moles>0)
var/o2_concentration = air_contents.oxygen/total_moles
var/n2_concentration = air_contents.nitrogen/total_moles
@@ -102,16 +103,16 @@
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Plasma: [round(plasma_concentration*100)]%"
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
user << "<span class='notice'>Nitrogen: [round(n2_concentration*100)]%</span>"
user << "<span class='notice'>Oxygen: [round(o2_concentration*100)]%</span>"
user << "\<span class='notice'>CO2: [round(co2_concentration*100)]%</span>"
user << "<span class='notice'>Plasma: [round(plasma_concentration*100)]%</span>"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
user << "\blue Temperature: [round(air_contents.temperature-T0C)]&deg;C"
user << "<span class='warning'>Unknown: [round(unknown_concentration*100)]%</span>"
user << "<span class='notice'>Temperature: [round(air_contents.temperature-T0C)]&deg;C</span>"
else
user << "\blue Tank is empty!"
user << "<span class='notice'>Tank is empty!</span>"
src.add_fingerprint(user)
else if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W
@@ -184,17 +185,17 @@
if(location.internal == src)
location.internal = null
location.internals.icon_state = "internal0"
usr << "\blue You close the tank release valve."
usr << "<span class='notice'>You close the tank release valve.</span>"
if (location.internals)
location.internals.icon_state = "internal0"
else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src
usr << "\blue You open \the [src] valve."
usr << "<span class='notice'>You open \the [src] valve.</span>"
if (location.internals)
location.internals.icon_state = "internal1"
else
usr << "\blue You need something to connect to \the [src]."
usr << "<span class='notice'>You need something to connect to \the [src].</span>"
src.add_fingerprint(usr)
return 1

View File

@@ -64,8 +64,8 @@
attack_verb = list("stabbed")
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is stabbing the [src.name] into \his heart! It looks like \he's trying to commit suicide.</b>")
viewers(user) << pick("<span class='danger'>[user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.</span>", \
"<span class='danger'>[user] is stabbing the [src.name] into \his heart! It looks like \he's trying to commit suicide.</span>")
return(BRUTELOSS)
/obj/item/weapon/screwdriver/New()
@@ -112,7 +112,7 @@
if(ishuman(M) && !M.restrained() && !M.stat && !M.paralysis && ! M.stunned)
if(!istype(M.loc,/turf)) return
if(C.amount < 10)
usr << "\red You need at least 10 lengths to make a bolas wire!"
usr << "<span class='warning'>You need at least 10 lengths to make a bolas wire!</span>"
return
var/obj/item/weapon/legcuffs/bolas/cable/B = new /obj/item/weapon/legcuffs/bolas/cable(usr.loc)
qdel(src)
@@ -120,10 +120,10 @@
B.cable_color = C._color
B.screw_state = item_state
B.screw_istate = icon_state
M << "\blue You wind some cable around the screwdriver handle to make a bolas wire."
M << "<span class='notice'>You wind some cable around the screwdriver handle to make a bolas wire.</span>"
C.use(10)
else
usr << "\blue You cannot do that."
usr << "<span class='warning'>You cannot do that.</span>"
else
..()
/*
@@ -201,7 +201,7 @@
var/max_fuel = 20 //The max amount of fuel the welder can hold
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is burning \his face off with the [src.name]! It looks like \he's trying to commit suicide!</b>"
viewers(user) << "<span class='danger'>[user] is burning \his face off with the [src.name]! It looks like \he's trying to commit suicide!</span>"
return (FIRELOSS|OXYLOSS)
/obj/item/weapon/weldingtool/New()
@@ -209,21 +209,20 @@
create_reagents(max_fuel)
reagents.add_reagent("fuel", max_fuel)
/obj/item/weapon/weldingtool/examine()
set src in usr
usr << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
return
/obj/item/weapon/weldingtool/examine(mob/user)
..()
user << "It contains [get_fuel()]/[src.max_fuel] units of fuel!"
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if(welding)
user << "\red Stop welding first!"
user << "<span class='warning'>Stop welding first!</span>"
return
status = !status
if(status)
user << "\blue You resecure the welder."
user << "<span class='notice'>You resecure the welder.</span>"
else
user << "\blue The welder can now be attached and modified."
user << "<span class='notice'>The welder can now be attached and modified.</span>"
src.add_fingerprint(user)
return
@@ -296,13 +295,13 @@
if(!proximity) return
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
O.reagents.trans_to(src, max_fuel)
user << "\blue Welder refueled"
user << "<span class='notice'>Welder refueled</span>"
playsound(get_turf(src), 'sound/effects/refill.ogg', 50, 1, -6)
return
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.welding)
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
log_game("[key_name(user)] triggered a fueltank explosion.")
user << "\red That was stupid of you."
user << "<span class='warning'>That was stupid of you.</span>"
var/obj/structure/reagent_dispensers/fueltank/tank = O
tank.explode()
return
@@ -338,7 +337,7 @@
return 1
else
if(M)
M << "\blue You need more welding fuel to complete this task."
M << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return 0
//Returns whether or not the welding tool is currently on.
@@ -351,18 +350,18 @@
//If we're turning it on
if(temp_welding > 0)
if (remove_fuel(1))
usr << "\blue The [src] switches on."
usr << "<span class='notice'>\The [src] switches on.</span>"
src.force = 15
src.damtype = "fire"
src.icon_state = "welder1"
processing_objects.Add(src)
else
usr << "\blue Need more fuel!"
usr << "<span class='notice'>Need more fuel!</span>"
src.welding = 0
return
//Otherwise
else
usr << "\blue The [src] switches off."
usr << "<span class='notice'>\The [src] switches off.</span>"
src.force = 3
src.damtype = "brute"
src.icon_state = "welder"
@@ -382,20 +381,20 @@
src.welding = !( src.welding )
if (src.welding)
if (remove_fuel(1))
usr << "\blue You switch the [src] on."
usr << "<span class='notice'>You switch the [src] on.</span>"
src.force = 15
src.damtype = "fire"
src.icon_state = "welder1"
processing_objects.Add(src)
else
usr << "\blue Need more fuel!"
usr << "<span class='notice'>Need more fuel!</span>"
src.welding = 0
return
else
if(!message)
usr << "\blue You switch the [src] off."
usr << "<span class='notice'>You switch the [src] off.</span>"
else
usr << "\blue The [src] shuts off!"
usr << "<span class='notice'>\The [src] shuts off!</span>"
src.force = 3
src.damtype = "brute"
src.icon_state = "welder"
@@ -415,26 +414,26 @@
return
switch(safety)
if(1)
usr << "\red Your eyes sting a little."
usr << "<span class='warning'>Your eyes sting a little.</span>"
E.damage += rand(1, 2)
if(E.damage > 12)
user.eye_blurry += rand(3,6)
if(0)
usr << "\red Your eyes burn."
usr << "<span class='warning'>Your eyes burn.</span>"
E.damage += rand(2, 4)
if(E.damage > 10)
E.damage += rand(4,10)
if(-1)
usr << "\red Your thermals intensify the welder's glow. Your eyes itch and burn severely."
usr << "<span class='warning'>Your thermals intensify the welder's glow. Your eyes itch and burn severely.</span>"
user.eye_blurry += rand(12,20)
E.damage += rand(12, 16)
if(E.damage > 10 && safety < 2)
user << "\red Your eyes are really starting to hurt. This can't be good for you!"
user << "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>"
if (E.damage >= E.min_broken_damage)
user << "\red You go blind!"
user << "<span class='warning'>You go blind!</span>"
user.sdisabilities |= BLIND
else if (E.damage >= E.min_bruised_damage)
user << "\red You go blind!"
user << "<span class='warning'>You go blind!</span>"
user.eye_blind = 5
user.eye_blurry = 5
user.disabilities |= NEARSIGHTED
@@ -500,7 +499,7 @@
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is smashing \his head in with the [src.name]! It looks like \he's trying to commit suicide!</b>"
viewers(user) << "<span class='danger'>[user] is smashing \his head in with the [src.name]! It looks like \he's trying to commit suicide!</span>"
return (BRUTELOSS)
/obj/item/weapon/crowbar/red
@@ -510,7 +509,7 @@
item_state = "crowbar_red"
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is smashing \his head in with the [src.name]! It looks like \he's done waiting for half life three!</b>"
viewers(user) << "<span class='danger'>[user] is smashing \his head in with the [src.name]! It looks like \he's done waiting for half life three!</span>"
return (BRUTELOSS)
@@ -523,12 +522,12 @@
if(S.brute_dam)
S.heal_damage(15,0,0,1)
if(user != M)
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]",\
"\red You patch some dents on \the [M]'s [S.display_name]",\
user.visible_message("<span class='attack'>\The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]</span>",\
"<span class='attack'>You patch some dents on \the [M]'s [S.display_name]</span>",\
"You hear a welder.")
else
user.visible_message("\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
"\red You patch some dents on your [S.display_name]",\
user.visible_message("<span class='attack'>\The [user] patches some dents on their [S.display_name] with \the [src]</span>",\
"<span class='attack'>You patch some dents on your [S.display_name]</span>",\
"You hear a welder.")
else
user << "Nothing to fix!"
@@ -556,5 +555,5 @@
attack_self(mob/user as mob)
open = !open
user << "\blue You [open?"open" : "close"] the conversion kit."
user << "<span class='notice'>You [open?"open" : "close"] the conversion kit.</span>"
update_icon()

View File

@@ -138,15 +138,14 @@ LINEN BINS
var/obj/item/hidden = null
/obj/structure/bedsheetbin/examine()
usr << desc
if(amount < 1)
usr << "There are no bed sheets in the bin."
return
if(amount == 1)
usr << "There is one bed sheet in the bin."
return
usr << "There are [amount] bed sheets in the bin."
/obj/structure/bedsheetbin/examine(mob/user)
..()
if(amount == 0)
user << "<span class='info'>There are no bed sheets in the bin.</span>"
else if(amount == 1)
user << "<span class='info'>There is one bed sheet in the bin.</span>"
else
user << "<span class='info'>There are [amount] bed sheets in the bin.</span>"
/obj/structure/bedsheetbin/update_icon()

View File

@@ -87,13 +87,14 @@
req_access=list(access_rd)
update_icon()
/obj/structure/displaycase/examine()
/obj/structure/displaycase/examine(mob/user)
..()
usr << "<span class='notice'>Peering through the glass, you see that it contains:</span>"
var/msg = "<span class='info'>Peering through the glass, you see that it contains:</span>"
if(occupant)
usr << "\icon[occupant] <span class='notice'>\A [occupant]</span>"
else:
usr << "Nothing."
msg+= "\icon[occupant] <span class='notice'>\A [occupant]</span>"
else
msg+= "Nothing."
user << msg
/obj/structure/displaycase/proc/dump()
if(occupant)

View File

@@ -24,22 +24,21 @@
. = ..()
create_reagents(100)
/obj/structure/stool/bed/chair/vehicle/janicart/examine()
set src in usr
usr << "\icon[src] This pimpin' ride contains [reagents.total_volume] unit\s of water!"
if(in_range(src, usr) && reagents.has_reagent("lube"))
usr << "<span class='warning'> Something is very off about this water.</span>"
/obj/structure/stool/bed/chair/vehicle/janicart/examine(mob/user)
..()
if(in_range(src, user) && reagents.has_reagent("lube"))
user << "<span class='warning'> Something is very off about this water.</span>"
switch(health)
if(75 to 99)
usr << "\blue It appears slightly dented."
user << "<span class='info'>It appears slightly dented.</span>"
if(40 to 74)
usr << "\red It appears heavily dented."
user << "<span class='warning'>It appears heavily dented.</span>"
if(1 to 39)
usr << "\red It appears severely dented."
user << "<span class='warning'>It appears severely dented.</span>"
if((INFINITY * -1) to 0)
usr << "It appears completely unsalvageable"
user << "<span class='danger'>It appears completely unsalvageable</span>"
if(mybag)
usr << "\A [mybag] is hanging on the pimpin' ride."
user << "\A [mybag] is hanging on the pimpin' ride."
/obj/structure/stool/bed/chair/vehicle/janicart/attackby(obj/item/W, mob/user)
..()
@@ -101,5 +100,5 @@
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes(0)
cleaned_human.clean_blood()
cleaned_human << "\red [src] cleans your face!"
cleaned_human << "<span class='warning'>[src] cleans your face!</span>"
return

View File

@@ -13,11 +13,6 @@
/obj/structure/mopbucket/New()
create_reagents(100)
/obj/structure/mopbucket/examine()
..()
usr << "<span class='notice'>[src] contains [reagents.total_volume] units of reagents!"
usr << "<span class='notice'>[src]'s wheels are [anchored? "locked" : "unlocked"]!"
/obj/structure/mopbucket/attack_hand(mob/user as mob)
..()
if(!anchored)

View File

@@ -42,20 +42,17 @@
processing_objects |= src
handle_rotation()
/obj/structure/stool/bed/chair/vehicle/clowncart/examine()
set src in usr
usr << "\icon[src] [desc]"
var/tmp/difference = reagents.total_volume - reagents.get_reagent_amount("banana")
usr << "This [nick] contains [reagents.get_reagent_amount("banana")] unit\s of banana juice[(difference != 0 ? ", and [difference] unit\s of something else!" : "!")]" //yeah
/obj/structure/stool/bed/chair/vehicle/clowncart/examine(mob/user)
..()
if(max_health > 100)
usr << "It is reinforced with [(max_health-100)/20] bananium sheets."
user << "<span class='info'>It is reinforced with [(max_health-100)/20] bananium sheets.</span>"
switch(health)
if(max_health*0.5 to max_health)
usr << "<span class='notice'>It appears slightly dented.</span>"
user << "<span class='notice'>It appears slightly dented.</span>"
if(1 to max_health*0.5)
usr << "<span class='warning'>It appears heavily dented.</span>"
user << "<span class='warning'>It appears heavily dented.</span>"
if((INFINITY * -1) to 0)
usr << "<span class='danger'>It appears completely unsalvageable.</span>"
user << "<span class='danger'>It appears completely unsalvageable.</span>"
/obj/structure/stool/bed/chair/vehicle/clowncart/attackby(obj/item/W, mob/user)
if (istype(W, /obj/item/weapon/bikehorn))

View File

@@ -25,10 +25,10 @@
update_nearby_tiles()
update_nearby_icons()
/obj/structure/window/examine()
/obj/structure/window/examine(mob/user)
..()
if(!anchored)
usr << "<span class='notice'>\the [src] appears to be loose.</span>"
user << "<span class='info'>\the [src] appears to be loose.</span>"
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
@@ -136,8 +136,8 @@
else if (usr.a_intent == "hurt")
user.delayNextAttack(8) // not so polite
playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1)
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
"\red You bang against the [src.name]!", \
usr.visible_message("<span class='warning'>[usr.name] bangs against the [src.name]!</span>", \
"<span class='warning'>You bang against the [src.name]!</span>", \
"You hear a banging sound.")
else
user.delayNextAttack(10)
@@ -197,20 +197,20 @@
M.apply_damage(7)
damage = 7
hit(10)
visible_message("\red [user] slams [M] against \the [src]!")
visible_message("<span class='warning'>[user] slams [M] against \the [src]!</span>")
if(2)
if (prob(50))
M.Weaken(1)
M.apply_damage(10)
damage = 10
hit(25)
visible_message("\red <b>[user] bashes [M] against \the [src]!</b>")
visible_message("<span class='danger'>[user] bashes [M] against \the [src]!</span>")
if(3)
M.Weaken(5)
M.apply_damage(20)
damage = 20
hit(50)
visible_message("\red <big><b>[user] crushes [M] against \the [src]!</b></big>")
visible_message("<big><span class='danger'>[user] crushes [M] against \the [src]!</span></big>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been window slammed by [user.name] ([user.ckey]) for [damage] damage.</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Window slammed [M.name] for [damage] damage.</font>")
msg_admin_attack("[user.name] ([user.ckey]) window slammed [M.name] ([M.ckey]) for [damage] damage (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")

View File

@@ -23,9 +23,9 @@
soot_type = null
/turf/simulated/wall/examine()
/turf/simulated/wall/examine(mob/user)
..()
if(src.engraving) usr << src.engraving
if(src.engraving) user << src.engraving
/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0)
if(istype(src,/turf/simulated/wall/r_wall))
@@ -107,12 +107,12 @@
user.delayNextAttack(8)
if ((M_HULK in user.mutations))
if (prob(hardness))
usr << text("\blue You smash through the wall.")
usr << text("<span class='attack'>You smash through the wall.</span>")
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1)
return
else
usr << text("\blue You punch the wall.")
usr << text("<span class='attack'>You punch the wall.</span>")
return
return src.attack_hand(user)
@@ -123,11 +123,11 @@
if(istype(src, /turf/simulated/wall/r_wall))
if(M.environment_smash == 3)
dismantle_wall(1)
M << "<span class='info'>You smash through the wall.</span>"
M << "<span class='attack'>You smash through the wall.</span>"
else
M << "<span class='info'>This wall is far too strong for you to destroy.</span>"
else
M << "<span class='info'>You smash through the wall.</span>"
M << "<span class='attack'>You smash through the wall.</span>"
dismantle_wall(1)
return
@@ -135,12 +135,12 @@
user.delayNextAttack(8)
if (M_HULK in user.mutations)
if (prob(hardness) || rotting)
usr << text("\blue You smash through the wall.")
usr << text("<span class='attack'>You smash through the wall.</span>")
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1)
return
else
usr << text("\blue You punch the wall.")
usr << text("<span class='attack'>You punch the wall.</span>")
return
if(rotting)

View File

@@ -26,136 +26,132 @@
var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
proc/activate() //What the device does when turned on
return
/obj/item/device/assembly/proc/activate() //What the device does when turned on
return
proc/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
return
/obj/item/device/assembly/proc/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
return
proc/pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
return
/obj/item/device/assembly/proc/pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
return
proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here
return
/obj/item/device/assembly/proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here
return
proc/attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
return
/obj/item/device/assembly/proc/attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
return
proc/process_cooldown() //Called via spawn(10) to have it count down the cooldown var
return
/obj/item/device/assembly/proc/process_cooldown() //Called via spawn(10) to have it count down the cooldown var
return
proc/holder_movement() //Called when the holder is moved
return
/obj/item/device/assembly/proc/holder_movement() //Called when the holder is moved
return
interact(mob/user as mob) //Called when attack_self is called
return
/obj/item/device/assembly/interact(mob/user as mob) //Called when attack_self is called
return
proc/describe() // Called by grenades to describe the state of the trigger (time left, etc)
return "The trigger assembly looks broken!"
/obj/item/device/assembly/proc/describe() // Called by grenades to describe the state of the trigger (time left, etc)
return "The trigger assembly looks broken!"
process_cooldown()
cooldown--
if(cooldown <= 0) return 0
spawn(10)
process_cooldown()
return 1
/obj/item/device/assembly/process_cooldown()
cooldown--
if(cooldown <= 0) return 0
spawn(10)
process_cooldown()
return 1
Destroy()
if(istype(src.loc, /obj/item/device/assembly_holder) || istype(holder))
var/obj/item/device/assembly_holder/A = src.loc
if(A.a_left == src)
A.a_left = null
else if(A.a_right == src)
A.a_right = null
src.holder = null
/obj/item/device/assembly/Destroy()
if(istype(src.loc, /obj/item/device/assembly_holder) || istype(holder))
var/obj/item/device/assembly_holder/A = src.loc
if(A.a_left == src)
A.a_left = null
else if(A.a_right == src)
A.a_right = null
src.holder = null
..()
..()
pulsed(var/radio = 0)
if(holder && (wires & WIRE_RECEIVE))
activate()
if(radio && (wires & WIRE_RADIO_RECEIVE))
activate()
return 1
/obj/item/device/assembly/pulsed(var/radio = 0)
if(holder && (wires & WIRE_RECEIVE))
activate()
if(radio && (wires & WIRE_RADIO_RECEIVE))
activate()
return 1
pulse(var/radio = 0)
if(holder && (wires & WIRE_PULSE))
holder.process_activation(src, 1, 0)
if(holder && (wires & WIRE_PULSE_SPECIAL))
holder.process_activation(src, 0, 1)
/obj/item/device/assembly/pulse(var/radio = 0)
if(holder && (wires & WIRE_PULSE))
holder.process_activation(src, 1, 0)
if(holder && (wires & WIRE_PULSE_SPECIAL))
holder.process_activation(src, 0, 1)
if(istype(loc,/obj/item/weapon/grenade)) // This is a hack. Todo: Manage this better -Sayu
var/obj/item/weapon/grenade/G = loc
G.prime() // Adios, muchachos
if(istype(loc,/obj/item/weapon/grenade)) // This is a hack. Todo: Manage this better -Sayu
var/obj/item/weapon/grenade/G = loc
G.prime() // Adios, muchachos
// if(radio && (wires & WIRE_RADIO_PULSE))
//Not sure what goes here quite yet send signal?
//Not sure what goes here quite yet send signal?
return 1
/obj/item/device/assembly/activate()
if(!secured || (cooldown > 0)) return 0
cooldown = 2
spawn(10)
process_cooldown()
return 1
/obj/item/device/assembly/toggle_secure()
secured = !secured
update_icon()
return secured
/obj/item/device/assembly/attach_assembly(var/obj/item/device/assembly/A, var/mob/user)
holder = new/obj/item/device/assembly_holder(get_turf(src))
if(holder.attach(A,src,user))
user << "<span class='notice'>You attach \the [A] to \the [src]!</span>"
return 1
return 0
activate()
if(!secured || (cooldown > 0)) return 0
cooldown = 2
spawn(10)
process_cooldown()
return 1
toggle_secure()
secured = !secured
update_icon()
return secured
attach_assembly(var/obj/item/device/assembly/A, var/mob/user)
holder = new/obj/item/device/assembly_holder(get_turf(src))
if(holder.attach(A,src,user))
user << "\blue You attach \the [A] to \the [src]!"
return 1
return 0
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isassembly(W))
var/obj/item/device/assembly/A = W
if((!A.secured) && (!secured))
attach_assembly(A,user)
return
if(isscrewdriver(W))
if(toggle_secure())
user << "\blue \The [src] is ready!"
else
user << "\blue \The [src] can now be attached!"
/obj/item/device/assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isassembly(W))
var/obj/item/device/assembly/A = W
if((!A.secured) && (!secured))
attach_assembly(A,user)
return
..()
if(isscrewdriver(W))
if(toggle_secure())
user << "<span class='notice'>\The [src] is ready!</span>"
else
user << "<span class='notice'>\The [src] can now be attached!</span>"
return
..()
return
process()
processing_objects.Remove(src)
return
/obj/item/device/assembly/process()
processing_objects.Remove(src)
return
examine()
set src in view()
..()
if((in_range(src, usr) || loc == usr))
if(secured)
usr << "\The [src] is ready!"
else
usr << "\The [src] can be attached!"
return
/obj/item/device/assembly/examine(mob/user)
..()
if(secured)
user << "<span class='info'>\The [src] is ready!</span>"
else
user << "<span class='info'>\The [src] can be attached!</span>"
/obj/item/device/assembly/attack_self(mob/user as mob)
if(!user) return 0
user.set_machine(src)
interact(user)
return 1
attack_self(mob/user as mob)
if(!user) return 0
user.set_machine(src)
interact(user)
return 1
interact(mob/user as mob)
return //HTML MENU FOR WIRES GOES HERE
/obj/item/device/assembly/interact(mob/user as mob)
return //HTML MENU FOR WIRES GOES HERE
/*
var/small_icon_state = null//If this obj will go inside the assembly use this for icons

View File

@@ -12,9 +12,9 @@
var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device
var/obj/item/weapon/tank/bombtank = null //the second part of the bomb is a plasma tank
/obj/item/device/onetankbomb/examine()
/obj/item/device/onetankbomb/examine(mob/user)
..()
bombtank.examine()
user.examination(bombtank)
/obj/item/device/onetankbomb/update_icon()
if(bombtank)

View File

@@ -15,237 +15,234 @@
var/obj/item/device/assembly/a_right = null
var/obj/special_assembly = null
proc/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
return
/obj/item/device/assembly_holder/proc/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
return
proc/attach_special(var/obj/O, var/mob/user)
return
/obj/item/device/assembly_holder/proc/attach_special(var/obj/O, var/mob/user)
return
proc/process_activation(var/obj/item/device/D)
return
/obj/item/device/assembly_holder/proc/process_activation(var/obj/item/device/D)
return
proc/detached()
return
/obj/item/device/assembly_holder/proc/detached()
return
IsAssemblyHolder()
return 1
/obj/item/device/assembly_holder/IsAssemblyHolder()
return 1
Destroy()
if(a_left)
a_left.holder = null
if(a_right)
a_right.holder = null
..()
/obj/item/device/assembly_holder/Destroy()
if(a_left)
a_left.holder = null
if(a_right)
a_right.holder = null
..()
attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
if((!D)||(!D2)) return 0
if((!isassembly(D))||(!isassembly(D2))) return 0
if((D:secured)||(D2:secured)) return 0
if(user)
user.remove_from_mob(D)
user.remove_from_mob(D2)
D:holder = src
D2:holder = src
D.loc = src
D2.loc = src
a_left = D
a_right = D2
name = "[D.name]-[D2.name] assembly"
update_icon()
usr.put_in_hands(src)
/obj/item/device/assembly_holder/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
if((!D)||(!D2)) return 0
if((!isassembly(D))||(!isassembly(D2))) return 0
if((D:secured)||(D2:secured)) return 0
if(user)
user.remove_from_mob(D)
user.remove_from_mob(D2)
D:holder = src
D2:holder = src
D.loc = src
D2.loc = src
a_left = D
a_right = D2
name = "[D.name]-[D2.name] assembly"
update_icon()
usr.put_in_hands(src)
return 1
return 1
attach_special(var/obj/O, var/mob/user)
if(!O) return
if(!O.IsSpecialAssembly()) return 0
/obj/item/device/assembly_holder/attach_special(var/obj/O, var/mob/user)
if(!O) return
if(!O.IsSpecialAssembly()) return 0
/* if(O:Attach_Holder())
special_assembly = O
update_icon()
src.name = "[a_left.name] [a_right.name] [special_assembly.name] assembly"
special_assembly = O
update_icon()
src.name = "[a_left.name] [a_right.name] [special_assembly.name] assembly"
*/
return
return
update_icon()
overlays.Cut()
if(a_left)
overlays += "[a_left.icon_state]_left"
for(var/O in a_left.attached_overlays)
overlays += "[O]_l"
if(a_right)
src.overlays += "[a_right.icon_state]_right"
for(var/O in a_right.attached_overlays)
overlays += "[O]_r"
if(master)
master.update_icon()
/obj/item/device/assembly_holder/update_icon()
overlays.Cut()
if(a_left)
overlays += "[a_left.icon_state]_left"
for(var/O in a_left.attached_overlays)
overlays += "[O]_l"
if(a_right)
src.overlays += "[a_right.icon_state]_right"
for(var/O in a_right.attached_overlays)
overlays += "[O]_r"
if(master)
master.update_icon()
/* if(special_assembly)
special_assembly.update_icon()
if(special_assembly:small_icon_state)
src.overlays += special_assembly:small_icon_state
for(var/O in special_assembly:small_icon_state_overlays)
src.overlays += O
special_assembly.update_icon()
if(special_assembly:small_icon_state)
src.overlays += special_assembly:small_icon_state
for(var/O in special_assembly:small_icon_state_overlays)
src.overlays += O
*/
examine()
set src in view()
..()
if ((in_range(src, usr) || src.loc == usr))
if (src.secured)
usr << "\The [src] is ready!"
else
usr << "\The [src] can be attached!"
return
/obj/item/device/assembly_holder/examine(mob/user)
..()
if (secured)
user << "<span class='info'>\The [src] is ready!</span>"
else
user << "<span class='info'>\The [src] can be attached!</span>"
HasProximity(atom/movable/AM as mob|obj)
if(a_left)
a_left.HasProximity(AM)
if(a_right)
a_right.HasProximity(AM)
if(special_assembly)
special_assembly.HasProximity(AM)
/obj/item/device/assembly_holder/HasProximity(atom/movable/AM as mob|obj)
if(a_left)
a_left.HasProximity(AM)
if(a_right)
a_right.HasProximity(AM)
if(special_assembly)
special_assembly.HasProximity(AM)
Crossed(atom/movable/AM as mob|obj)
if(a_left)
a_left.Crossed(AM)
if(a_right)
a_right.Crossed(AM)
if(special_assembly)
special_assembly.Crossed(AM)
/obj/item/device/assembly_holder/Crossed(atom/movable/AM as mob|obj)
if(a_left)
a_left.Crossed(AM)
if(a_right)
a_right.Crossed(AM)
if(special_assembly)
special_assembly.Crossed(AM)
on_found(mob/finder as mob)
if(a_left)
a_left.on_found(finder)
if(a_right)
a_right.on_found(finder)
if(special_assembly)
if(istype(special_assembly, /obj/item))
var/obj/item/S = special_assembly
S.on_found(finder)
/obj/item/device/assembly_holder/on_found(mob/finder as mob)
if(a_left)
a_left.on_found(finder)
if(a_right)
a_right.on_found(finder)
if(special_assembly)
if(istype(special_assembly, /obj/item))
var/obj/item/S = special_assembly
S.on_found(finder)
hear_talk(mob/living/M as mob, msg)
if(a_left)
a_left.hear_talk(M, msg)
if(a_right)
a_right.hear_talk(M, msg)
/obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg)
if(a_left)
a_left.hear_talk(M, msg)
if(a_right)
a_right.hear_talk(M, msg)
Move()
..()
if(a_left && a_right)
a_left.holder_movement()
a_right.holder_movement()
/obj/item/device/assembly_holder/Move()
..()
if(a_left && a_right)
a_left.holder_movement()
a_right.holder_movement()
// if(special_assembly)
// special_assembly:holder_movement()
return
return
attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
if(a_left && a_right)
a_left.holder_movement()
a_right.holder_movement()
/obj/item/device/assembly_holder/attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
if(a_left && a_right)
a_left.holder_movement()
a_right.holder_movement()
// if(special_assembly)
// special_assembly:Holder_Movement()
..()
return
..()
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(!a_left || !a_right)
user << "\red BUG:Assembly part missing, please report this!"
return
a_left.toggle_secure()
a_right.toggle_secure()
secured = !secured
if(secured)
user << "\blue \The [src] is ready!"
else
user << "\blue \The [src] can now be taken apart!"
update_icon()
/obj/item/device/assembly_holder/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(!a_left || !a_right)
user << "<span class='warning'>BUG:Assembly part missing, please report this!</span>"
return
else if(W.IsSpecialAssembly())
attach_special(W, user)
else if(istype(W,/obj/item/weapon/weldingtool))
if(!a_left || !a_right)
user << "\red BUG:Assembly part missing, please report this!"
return
if(!isigniter(a_left) && !isigniter(a_right))
user << "\red You can't make an igniter without an igniting component!"
return
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
user << "\blue You begin to weld \the [src] to the floor..."
if (do_after(user, 40))
var/obj/machinery/igniter/igniter=new(src.loc)
igniter.assembly=src
src.loc=igniter
user << "\blue You attach the assembly to the floor with a few spot welds."
else:
user << "\red You need more welder fuel to do that."
return
a_left.toggle_secure()
a_right.toggle_secure()
secured = !secured
if(secured)
user << "<span class='notice'>\The [src] is ready!</span>"
else
..()
user << "<span class='notice'>\The [src] can now be taken apart!</span>"
update_icon()
return
else if(W.IsSpecialAssembly())
attach_special(W, user)
else if(istype(W,/obj/item/weapon/weldingtool))
if(!a_left || !a_right)
user << "<span class='warning'>BUG:Assembly part missing, please report this!</span>"
return
if(!isigniter(a_left) && !isigniter(a_right))
user << "<span class='warning'>You can't make an igniter without an igniting component!</span>"
return
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
user << "<span class='notice'>You begin to weld \the [src] to the floor...</span>"
if (do_after(user, 40))
var/obj/machinery/igniter/igniter=new(src.loc)
igniter.assembly=src
src.loc=igniter
user << "<span class='notice'>You attach the assembly to the floor with a few spot welds.</span>"
else:
user << "<span class='warning'>You need more welder fuel to do that.</span>"
return
else
..()
return
attack_self(mob/user as mob)
src.add_fingerprint(user)
if(src.secured)
if(!a_left || !a_right)
user << "\red Assembly part missing!"
return
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
switch(alert("Which side would you like to use?",,"Left","Right"))
if("Left") a_left.attack_self(user)
if("Right") a_right.attack_self(user)
return
else
if(!istype(a_left,/obj/item/device/assembly/igniter))
a_left.attack_self(user)
if(!istype(a_right,/obj/item/device/assembly/igniter))
a_right.attack_self(user)
/obj/item/device/assembly_holder/attack_self(mob/user as mob)
src.add_fingerprint(user)
if(src.secured)
if(!a_left || !a_right)
user << "<span class='warning'>Assembly part missing!</span>"
return
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
switch(alert("Which side would you like to use?",,"Left","Right"))
if("Left") a_left.attack_self(user)
if("Right") a_right.attack_self(user)
return
else
var/turf/T = get_turf(src)
if(!T) return 0
if(a_left)
a_left:holder = null
a_left.loc = T
if(a_right)
a_right:holder = null
a_right.loc = T
spawn(0)
del(src)
return
if(!istype(a_left,/obj/item/device/assembly/igniter))
a_left.attack_self(user)
if(!istype(a_right,/obj/item/device/assembly/igniter))
a_right.attack_self(user)
else
var/turf/T = get_turf(src)
if(!T) return 0
if(a_left)
a_left:holder = null
a_left.loc = T
if(a_right)
a_right:holder = null
a_right.loc = T
spawn(0)
del(src)
return
process_activation(var/obj/D, var/normal = 1, var/special = 1)
if(!D) return 0
if(!secured)
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
if((normal) && (a_right) && (a_left))
if(istype(src.loc, /obj/machinery/igniter))
src.loc:toggle_state()
else:
if(a_right != D)
a_right.pulsed(0)
if(a_left != D)
a_left.pulsed(0)
if(master)
master.receive_signal()
/obj/item/device/assembly_holder/process_activation(var/obj/D, var/normal = 1, var/special = 1)
if(!D) return 0
if(!secured)
visible_message("\icon[src] *beep* *beep*", "*beep* *beep*")
if((normal) && (a_right) && (a_left))
if(istype(src.loc, /obj/machinery/igniter))
src.loc:toggle_state()
else:
if(a_right != D)
a_right.pulsed(0)
if(a_left != D)
a_left.pulsed(0)
if(master)
master.receive_signal()
// if(special && special_assembly)
// if(!special_assembly == D)
// special_assembly.dothings()
return 1
return 1
@@ -256,55 +253,55 @@
/obj/item/device/assembly_holder/timer_igniter
name = "timer-igniter assembly"
New()
..()
/obj/item/device/assembly_holder/timer_igniter/New()
..()
var/obj/item/device/assembly/igniter/ign = new(src)
ign.secured = 1
ign.holder = src
var/obj/item/device/assembly/timer/tmr = new(src)
tmr.time=5
tmr.secured = 1
tmr.holder = src
processing_objects.Add(tmr)
a_left = tmr
a_right = ign
secured = 1
update_icon()
name = initial(name) + " ([tmr.time] secs)"
var/obj/item/device/assembly/igniter/ign = new(src)
ign.secured = 1
ign.holder = src
var/obj/item/device/assembly/timer/tmr = new(src)
tmr.time=5
tmr.secured = 1
tmr.holder = src
processing_objects.Add(tmr)
a_left = tmr
a_right = ign
secured = 1
update_icon()
name = initial(name) + " ([tmr.time] secs)"
loc.verbs += /obj/item/device/assembly_holder/timer_igniter/verb/configure
loc.verbs += /obj/item/device/assembly_holder/timer_igniter/verb/configure
detached()
loc.verbs -= /obj/item/device/assembly_holder/timer_igniter/verb/configure
..()
/obj/item/device/assembly_holder/timer_igniter/detached()
loc.verbs -= /obj/item/device/assembly_holder/timer_igniter/verb/configure
..()
verb/configure()
set name = "Set Timer"
set category = "Object"
set src in usr
/obj/item/device/assembly_holder/timer_igniter/verb/configure()
set name = "Set Timer"
set category = "Object"
set src in usr
if ( !(usr.stat || usr.restrained()) )
var/obj/item/device/assembly_holder/holder
if(istype(src,/obj/item/weapon/grenade/chem_grenade))
var/obj/item/weapon/grenade/chem_grenade/gren = src
holder=gren.detonator
var/obj/item/device/assembly/timer/tmr = holder.a_left
if(!istype(tmr,/obj/item/device/assembly/timer))
tmr = holder.a_right
if(!istype(tmr,/obj/item/device/assembly/timer))
usr << "<span class='notice'>This detonator has no timer.</span>"
return
if ( !(usr.stat || usr.restrained()) )
var/obj/item/device/assembly_holder/holder
if(istype(src,/obj/item/weapon/grenade/chem_grenade))
var/obj/item/weapon/grenade/chem_grenade/gren = src
holder=gren.detonator
var/obj/item/device/assembly/timer/tmr = holder.a_left
if(!istype(tmr,/obj/item/device/assembly/timer))
tmr = holder.a_right
if(!istype(tmr,/obj/item/device/assembly/timer))
usr << "<span class='notice'>This detonator has no timer.</span>"
return
if(tmr.timing)
usr << "<span class='notice'>Clock is ticking already.</span>"
else
var/ntime = input("Enter desired time in seconds", "Time", "5") as num
if (ntime>0 && ntime<1000)
tmr.time = ntime
name = initial(name) + "([tmr.time] secs)"
usr << "<span class='notice'>Timer set to [tmr.time] seconds.</span>"
else
usr << "<span class='notice'>Timer can't be [ntime<=0?"negative":"more than 1000 seconds"].</span>"
if(tmr.timing)
usr << "<span class='notice'>Clock is ticking already.</span>"
else
usr << "<span class='notice'>You cannot do this while [usr.stat?"unconscious/dead":"restrained"].</span>"
var/ntime = input("Enter desired time in seconds", "Time", "5") as num
if (ntime>0 && ntime<1000)
tmr.time = ntime
name = initial(name) + "([tmr.time] secs)"
usr << "<span class='notice'>Timer set to [tmr.time] seconds.</span>"
else
usr << "<span class='notice'>Timer can't be [ntime<=0?"negative":"more than 1000 seconds"].</span>"
else
usr << "<span class='notice'>You cannot do this while [usr.stat?"unconscious/dead":"restrained"].</span>"

View File

@@ -8,106 +8,106 @@
var/armed = 0
wires = WIRE_PULSE
examine()
..()
if(armed)
usr << "It looks like it's armed."
/obj/item/device/assembly/mousetrap/examine(mob/user)
..()
if(armed)
user << "<span class='warning'>It looks like it's armed.</span>"
/obj/item/device/assembly/mousetrap/update_icon()
if(armed)
icon_state = "mousetraparmed"
else
icon_state = "mousetrap"
if(holder)
holder.update_icon()
/obj/item/device/assembly/mousetrap/proc/triggered(mob/target as mob, var/type = "feet")
if(!armed)
return
var/datum/organ/external/affecting = null
if(ishuman(target))
var/mob/living/carbon/human/H = target
switch(type)
if("feet")
if(!H.shoes)
affecting = H.get_organ(pick("l_leg", "r_leg"))
H.Weaken(3)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_organ(type)
H.Stun(3)
if(affecting)
if(affecting.take_damage(1, 0))
H.UpdateDamageIcon()
H.updatehealth()
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
visible_message("<span class='danger'>SPLAT!</span>")
M.splat()
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
armed = 0
update_icon()
if(armed)
icon_state = "mousetraparmed"
else
icon_state = "mousetrap"
if(holder)
holder.update_icon()
pulse(0)
proc/triggered(mob/target as mob, var/type = "feet")
if(!armed)
/obj/item/device/assembly/mousetrap/attack_self(mob/living/user as mob)
if(!armed)
user << "<span class='notice'>You arm [src].</span>"
else
if(((user.getBrainLoss() >= 60 || (M_CLUMSY in user.mutations)) && prob(50)))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
var/datum/organ/external/affecting = null
if(ishuman(target))
var/mob/living/carbon/human/H = target
switch(type)
if("feet")
if(!H.shoes)
affecting = H.get_organ(pick("l_leg", "r_leg"))
H.Weaken(3)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_organ(type)
H.Stun(3)
if(affecting)
if(affecting.take_damage(1, 0))
H.UpdateDamageIcon()
H.updatehealth()
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
visible_message("\red <b>SPLAT!</b>")
M.splat()
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
armed = 0
update_icon()
pulse(0)
user << "<span class='notice'>You disarm [src].</span>"
armed = !armed
update_icon()
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
attack_self(mob/living/user as mob)
if(!armed)
user << "<span class='notice'>You arm [src].</span>"
else
if(((user.getBrainLoss() >= 60 || (M_CLUMSY in user.mutations)) && prob(50)))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
user << "<span class='notice'>You disarm [src].</span>"
armed = !armed
update_icon()
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/user as mob)
if(armed)
if(((user.getBrainLoss() >= 60 || M_CLUMSY in user.mutations)) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
..()
attack_hand(mob/living/user as mob)
if(armed)
if(((user.getBrainLoss() >= 60 || M_CLUMSY in user.mutations)) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
..()
/obj/item/device/assembly/mousetrap/Crossed(AM as mob|obj)
if(armed)
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.m_intent == "run")
triggered(H)
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
"<span class='warning'>You accidentally step on [src]</span>")
if(ismouse(AM))
triggered(AM)
..()
Crossed(AM as mob|obj)
if(armed)
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.m_intent == "run")
triggered(H)
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
"<span class='warning'>You accidentally step on [src]</span>")
if(ismouse(AM))
triggered(AM)
..()
/obj/item/device/assembly/mousetrap/on_found(mob/finder as mob)
if(armed)
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
triggered(finder, finder.hand ? "l_hand" : "r_hand")
return 1 //end the search!
return 0
on_found(mob/finder as mob)
if(armed)
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
triggered(finder, finder.hand ? "l_hand" : "r_hand")
return 1 //end the search!
return 0
hitby(A as mob|obj)
if(!armed)
return ..()
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
triggered(null)
/obj/item/device/assembly/mousetrap/hitby(A as mob|obj)
if(!armed)
return ..()
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
triggered(null)
/obj/item/device/assembly/mousetrap/armed

View File

@@ -24,7 +24,7 @@
wearable = 1
if(!wearable && (slot != 15 && slot != 16)) //Pockets.
M << "\red Your species cannot wear [src]."
M << "<span class='warning'>Your species cannot wear [src].</span>"
return 0
return ..()
@@ -107,11 +107,6 @@ BLIND // can't see anything
species_restricted = list("exclude","Unathi","Tajaran","Muton")
var/pickpocket = 0 //Master pickpocket?
/obj/item/clothing/gloves/examine()
set src in usr
..()
return
/obj/item/clothing/gloves/emp_act(severity)
if(cell)
cell.charge -= 1000 / severity
@@ -289,20 +284,21 @@ BLIND // can't see anything
..()
/obj/item/clothing/under/examine()
set src in view()
/obj/item/clothing/under/examine(mob/user)
..()
var/mode
switch(src.sensor_mode)
if(0)
usr << "Its sensors appear to be disabled."
mode = "Its sensors appear to be disabled."
if(1)
usr << "Its binary life sensors appear to be enabled."
mode = "Its binary life sensors appear to be enabled."
if(2)
usr << "Its vital tracker appears to be enabled."
mode = "Its vital tracker appears to be enabled."
if(3)
usr << "Its vital tracker and tracking beacon appear to be enabled."
mode = "Its vital tracker and tracking beacon appear to be enabled."
user << "<span class='info'>" + mode + "</span>"
if(hastie)
usr << "\A [hastie] is clipped to it."
user << "<span class='info'>\A [hastie] is clipped to it.</span>"
/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
var/mob/M = usr
@@ -375,32 +371,32 @@ BLIND // can't see anything
if(usr.stat) return
if (!hastie || !istype(hastie,/obj/item/clothing/tie/holster))
usr << "\red You need a holster for that!"
usr << "<span class='warning'>You need a holster for that!</span>"
return
var/obj/item/clothing/tie/holster/H = hastie
if(!H.holstered)
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
usr << "\blue You need your gun equiped to holster it."
usr << "<span class='notice'>You need your gun equiped to holster it.</span>"
return
var/obj/item/weapon/gun/W = usr.get_active_hand()
if (!W.isHandgun())
usr << "\red This gun won't fit in \the [H]!"
usr << "<span class='warning'>This gun won't fit in \the [H]!</span>"
return
H.holstered = usr.get_active_hand()
usr.drop_item()
H.holstered.loc = src
usr.visible_message("\blue \The [usr] holsters \the [H.holstered].", "You holster \the [H.holstered].")
usr.visible_message("<span class='notice'>\The [usr] holsters \the [H.holstered].", "You holster \the [H.holstered].</span>")
else
if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj))
usr << "\red You need an empty hand to draw the gun!"
usr << "<span class='warning'>You need an empty hand to draw the gun!</span>"
else
if(usr.a_intent == "hurt")
usr.visible_message("\red \The [usr] draws \the [H.holstered], ready to shoot!", \
"\red You draw \the [H.holstered], ready to shoot!")
usr.visible_message("<span class='warning'>\The [usr] draws \the [H.holstered], ready to shoot!</span>", \
"<span class='warning'>You draw \the [H.holstered], ready to shoot!</span>")
else
usr.visible_message("\blue \The [usr] draws \the [H.holstered], pointing it at the ground.", \
"\blue You draw \the [H.holstered], pointing it at the ground.")
usr.visible_message("<span class='notice'>\The [usr] draws \the [H.holstered], pointing it at the ground.</span>", \
"<span class='notice'>You draw \the [H.holstered], pointing it at the ground.</span>")
usr.put_in_hands(H.holstered)
H.holstered = null
@@ -412,7 +408,7 @@ BLIND // can't see anything
if(usr.stat) return
if (!hastie || !istype(hastie,/obj/item/clothing/tie/storage))
usr << "\red You need something to store items in for that!"
usr << "<span class='warning'>You need something to store items in for that!</span>"
return
var/obj/item/clothing/tie/storage/W = hastie

View File

@@ -7,39 +7,37 @@
action_button_name = "Toggle Magboots"
species_fit = list("Vox")
verb/toggle()
set name = "Toggle Magboots"
set category = "Object"
set src in usr
if(usr.stat)
return
if(src.magpulse)
src.flags &= ~NOSLIP
src.slowdown = SHOES_SLOWDOWN
src.magpulse = 0
icon_state = "magboots0"
usr << "You disable the mag-pulse traction system."
else
src.flags |= NOSLIP
src.slowdown = 2
src.magpulse = 1
icon_state = "magboots1"
usr << "You enable the mag-pulse traction system."
usr.update_inv_shoes() //so our mob-overlays update
attack_self()
src.toggle()
..()
/obj/item/clothing/shoes/magboots/verb/toggle()
set name = "Toggle Magboots"
set category = "Object"
set src in usr
if(usr.stat)
return
if(src.magpulse)
src.flags &= ~NOSLIP
src.slowdown = SHOES_SLOWDOWN
src.magpulse = 0
icon_state = "magboots0"
usr << "You disable the mag-pulse traction system."
else
src.flags |= NOSLIP
src.slowdown = 2
src.magpulse = 1
icon_state = "magboots1"
usr << "You enable the mag-pulse traction system."
usr.update_inv_shoes() //so our mob-overlays update
examine()
set src in view()
..()
var/state = "disabled"
if(src.flags&NOSLIP)
state = "enabled"
usr << "Its mag-pulse traction system appears to be [state]."
/obj/item/clothing/shoes/magboots/attack_self()
src.toggle()
..()
return
/obj/item/clothing/shoes/magboots/examine(mob/user)
..()
var/state = "disabled"
if(src.flags&NOSLIP)
state = "enabled"
user << "<span class='info'>Its mag-pulse traction system appears to be [state].</span>"
//CE
/obj/item/clothing/shoes/magboots/elite
@@ -47,22 +45,22 @@
name = "advanced magboots"
icon_state = "CE-magboots0"
toggle()
if(usr.stat)
return
if(src.magpulse)
src.flags &= ~NOSLIP
src.slowdown = SHOES_SLOWDOWN
src.magpulse = 0
icon_state = "CE-magboots0"
usr << "You disable the mag-pulse traction system."
else
src.flags |= NOSLIP
src.slowdown = 1
src.magpulse = 1
icon_state = "CE-magboots1"
usr << "You enable the mag-pulse traction system."
usr.update_inv_shoes() //so our mob-overlays update
/obj/item/clothing/shoes/magboots/elite/toggle()
if(usr.stat)
return
if(src.magpulse)
src.flags &= ~NOSLIP
src.slowdown = SHOES_SLOWDOWN
src.magpulse = 0
icon_state = "CE-magboots0"
usr << "You disable the mag-pulse traction system."
else
src.flags |= NOSLIP
src.slowdown = 1
src.magpulse = 1
icon_state = "CE-magboots1"
usr << "You enable the mag-pulse traction system."
usr.update_inv_shoes() //so our mob-overlays update
//Death squad
/obj/item/clothing/shoes/magboots/deathsquad
@@ -70,19 +68,19 @@
name = "deathsquad magboots"
icon_state = "DS-magboots0"
toggle()
if(usr.stat)
return
if(src.magpulse)
src.flags &= ~NOSLIP
src.slowdown = SHOES_SLOWDOWN
src.magpulse = 0
icon_state = "DS-magboots0"
usr << "You disable the mag-pulse traction system."
else
src.flags |= NOSLIP
src.slowdown = 0
src.magpulse = 1
icon_state = "DS-magboots1"
usr << "You enable the mag-pulse traction system."
usr.update_inv_shoes() //so our mob-overlays update
/obj/item/clothing/shoes/magboots/deathsquad/toggle()
if(usr.stat)
return
if(src.magpulse)
src.flags &= ~NOSLIP
src.slowdown = SHOES_SLOWDOWN
src.magpulse = 0
icon_state = "DS-magboots0"
usr << "You disable the mag-pulse traction system."
else
src.flags |= NOSLIP
src.slowdown = 0
src.magpulse = 1
icon_state = "DS-magboots1"
usr << "You enable the mag-pulse traction system."
usr.update_inv_shoes() //so our mob-overlays update

View File

@@ -128,24 +128,18 @@
icon_state = "boots-vox"
species_restricted = list("Vox")
toggle()
//set name = "Toggle Floor Grip"
if(usr.stat)
return
if(src.magpulse)
src.flags &= ~NOSLIP
src.magpulse = 0
usr << "You relax your deathgrip on the flooring."
else
src.flags |= NOSLIP
src.magpulse = 1
usr << "You dig your claws deeply into the flooring, bracing yourself."
examine()
set src in view()
..()
/obj/item/clothing/shoes/magboots/vox/toggle()
//set name = "Toggle Floor Grip"
if(usr.stat)
return
if(src.magpulse)
src.flags &= ~NOSLIP
src.magpulse = 0
usr << "You relax your deathgrip on the flooring."
else
src.flags |= NOSLIP
src.magpulse = 1
usr << "You dig your claws deeply into the flooring, bracing yourself."
// Vox Casual
// Civvie

View File

@@ -16,12 +16,12 @@
camera.network = list("ERT")
cameranet.removeCamera(camera)
camera.c_tag = user.name
user << "\blue User scanned as [camera.c_tag]. Camera activated."
user << "<span class='notice'>User scanned as [camera.c_tag]. Camera activated.</span>"
/obj/item/clothing/head/helmet/space/ert/examine()
/obj/item/clothing/head/helmet/space/ert/examine(mob/user)
..()
if(get_dist(usr,src) <= 1)
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
if(get_dist(user,src) <= 1)
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
/obj/item/clothing/suit/space/ert
name = "emergency response team suit"

View File

@@ -19,10 +19,10 @@
var/extinguish_cooldown=10 SECONDS
var/extinguishes_left=10 // Yeah yeah, reagents, blah blah blah. This should be simple.
/obj/item/clothing/suit/space/plasmaman/examine()
set src in view()
/obj/item/clothing/suit/space/plasmaman/examine(mob/user)
..()
usr << "There are [extinguishes_left] extinguisher canisters left in this suit."
user << "<span class='info'>There are [extinguishes_left] extinguisher canisters left in this suit.</span>"
/obj/item/clothing/suit/space/plasmaman/proc/Extinguish(var/mob/user)
var/mob/living/carbon/human/H=user
if(extinguishes_left)

View File

@@ -105,12 +105,12 @@
camera.network = list("NUKE")
cameranet.removeCamera(camera)
camera.c_tag = user.name
user << "\blue User scanned as [camera.c_tag]. Camera activated."
user << "<span class='notice'>User scanned as [camera.c_tag]. Camera activated.</span>"
/obj/item/clothing/head/helmet/space/rig/syndi/examine()
/obj/item/clothing/head/helmet/space/rig/syndi/examine(mob/user)
..()
if(get_dist(usr,src) <= 1)
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
if(get_dist(user,src) <= 1)
user << "<span class='info'>This helmet has a built-in camera. It's [camera ? "" : "in"]active.</span>"
/obj/item/clothing/suit/space/rig/syndi
icon_state = "rig-syndi"

View File

@@ -29,7 +29,7 @@
/obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
if(ismob(target) && target.reagents && reagents.total_volume)
user.visible_message("\red \The [target] has been smothered with \the [src] by \the [user]!", "\red You smother \the [target] with \the [src]!", "You hear some struggling and muffled cries of surprise")
user.visible_message("<span class='warning'>\The [target] has been smothered with \the [src] by \the [user]!</span>", "<span class='warning'>You smother \the [target] with \the [src]!</span>", "You hear some struggling and muffled cries of surprise")
src.reagents.reaction(target, TOUCH)
spawn(5) src.reagents.clear_reagents()
return
@@ -43,10 +43,3 @@
user.visible_message("[user] finishes wiping off the [A]!")
A.clean_blood()
return
/obj/item/weapon/reagent_containers/glass/rag/examine()
if (!usr)
return
usr << "That's \a [src]."
usr << desc
return

View File

@@ -98,11 +98,10 @@ var/global/ingredientLimit = 10
// Interactions ////////////////////////////////////////////////
/obj/machinery/cooking/examine()
/obj/machinery/cooking/examine(mob/user)
. = ..()
if(src.active) usr << "It's currently processing [src.ingredient ? src.ingredient.name : ""]."
if(src.cooks_in_reagents) usr << "It seems to have [reagents.total_volume] units left."
return
if(src.active) user << "<span class='info'>It's currently processing [src.ingredient ? src.ingredient.name : ""].</span>"
if(src.cooks_in_reagents) user << "<span class='info'>It seems to have [reagents.total_volume] units left.</span>"
/obj/machinery/cooking/attack_hand(mob/user)
if(istype(user,/mob/dead/observer)) user << "Your ghostly hand goes straight through."

View File

@@ -27,13 +27,13 @@
src.name = "packet of [seed.seed_name] [seed.seed_noun]"
src.desc = "It has a picture of [seed.display_name] on the front."
/obj/item/seeds/examine()
/obj/item/seeds/examine(mob/user)
..()
if(seed && !seed.roundstart)
usr << "It's tagged as variety #[seed.uid]."
user << "It's tagged as variety <span class='info'>#[seed.uid].</span>"
else
usr << "Plant Yield: <span class='notice'>[(seed.yield != -1) ? seed.yield : "<span class='warning'> ERROR</span>"]</span>"
usr << "Plant Potency: <span class='notice'>[(seed.potency != -1) ? seed.potency : "<span class='warning> ERROR</span>"]</span>"
user << "Plant Yield: <span class='info'>[(seed.yield != -1) ? seed.yield : "<span class='warning'> ERROR</span>"]</span>"
user << "Plant Potency: <span class='info'>[(seed.potency != -1) ? seed.potency : "<span class='warning> ERROR</span>"]</span>"
/obj/item/seeds/cutting
name = "cuttings"

View File

@@ -35,7 +35,7 @@
if(istype(W,/obj/item/weapon/card/id))
// N3X - Fixes people's IDs getting eaten when a new card is inserted
if(istype(inserted_id))
user << "\red There is already an ID card within the machine."
user << "<span class='warning'>There is already an ID card within the machine.</span>"
return
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
@@ -134,9 +134,9 @@
var/datum/money_account/acct = get_card_account(inserted_id)
if(acct.charge(-credits,null,"Claimed mining credits.",dest_name = "Ore Redemption"))
credits = 0
usr << "\blue Credits transferred."
usr << "<span class='notice'>Credits transferred.</span>"
else
usr << "\red Failed to claim credits."
usr << "<span class='warning'>Failed to claim credits.</span>"
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
@@ -144,14 +144,14 @@
I.loc = src
inserted_id = I
else
usr << "\red No valid ID."
usr << "<span class='warning'>No valid ID.</span>"
return 1
else if(href_list["release"] && istype(inserted_id))
if(check_access(inserted_id))
var/release=href_list["release"]
var/datum/material/mat = materials.getMaterial(release)
if(!mat)
usr << "\red Unable to find material [release]!"
usr << "<span class='warning'>Unable to find material [release]!</span>"
return 1
var/desired = input("How much?","How much [mat.processed_name] to eject?",mat.stored) as num
if(desired==0)
@@ -262,7 +262,7 @@
usr.drop_item()
I.loc = src
inserted_id = I
else usr << "\red No valid ID."
else usr << "<span class='warning'>No valid ID.</span>"
if(href_list["purchase"])
if(istype(inserted_id))
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
@@ -350,9 +350,9 @@
user << "<span class='info'>There's no points left on [src].</span>"
..()
/obj/item/weapon/card/mining_point_card/examine()
/obj/item/weapon/card/mining_point_card/examine(mob/user)
..()
usr << "There's [points] credits on the card."
user << "<span class='info'>There's [points] credits on the card.</span>"
/**********************Jaunter**********************/
@@ -519,10 +519,6 @@
sterile = 1
//tint = 3 //Makes it feel more authentic when it latches on
/obj/item/clothing/mask/facehugger/toy/examine()//So that giant red text about probisci doesn't show up.
if(desc)
usr << desc
/obj/item/clothing/mask/facehugger/toy/Die()
return
@@ -697,10 +693,10 @@
user << "<span class='info'>[src] is only effective on lesser beings.</span>"
return
/obj/item/weapon/lazarus_injector/examine()
/obj/item/weapon/lazarus_injector/examine(mob/user)
..()
if(!loaded)
usr << "<span class='info'>[src] is empty.</span>"
user << "<span class='info'>[src] is empty.</span>"
/*********************Mob Capsule*************************/

View File

@@ -337,9 +337,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(A)
A.Entered(src)
*/
/mob/dead/observer/examine()
if(usr)
usr << desc
/mob/dead/observer/can_use_hands() return 0
/mob/dead/observer/is_active() return 0

View File

@@ -17,6 +17,7 @@ var/const/MAX_ACTIVE_TIME = 400
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
flags = FPRINT | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
throw_range = 5
var/real = 1 //Facehuggers are real, toys are not.
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
@@ -53,16 +54,17 @@ var/const/MAX_ACTIVE_TIME = 400
else
del(src)
/obj/item/clothing/mask/facehugger/examine()
/obj/item/clothing/mask/facehugger/examine(mob/user)
..()
if(!real) //Toy facehuggers are a child, avoid confusing examine text.
return
switch(stat)
if(DEAD,UNCONSCIOUS)
usr << "<span class='danger'>\The [src] is not moving.</span>"
user << "<span class='deadsay'>\The [src] is not moving.</span>"
if(CONSCIOUS)
usr << "<span class='danger'>\The [src] seems active.</span>"
user << "<span class='danger'>\The [src] seems active.</span>"
if (sterile)
usr << "<span class='danger'>It looks like \the [src]'s proboscis has been removed.</span>"
return
user << "<span class='danger'>It looks like \the [src]'s proboscis has been removed.</span>"
/obj/item/clothing/mask/facehugger/attackby()
Die()

View File

@@ -232,18 +232,14 @@
/obj/item/device/mmi/examine()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = {"<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n<span class='warning'>"}
if(src.brainmob && src.brainmob.key)
switch(src.brainmob.stat)
if(CONSCIOUS)
if(!src.brainmob.client) msg += "It appears to be lost in its own thoughts" //afk
if(UNCONSCIOUS) msg += "<span class='warning'>It seems to be in a deep dream-state</span>"
if(DEAD) msg += "<span class='deadsay'>It appears the brain has suffered irreversible tissue degeneration</span>"
usr << msg
return
/obj/item/device/mmi/examine(mob/user)
user << "<span class='info'>*---------*</span>"
..()
if(src.brainmob)
if(src.brainmob.stat == DEAD)
user << "<span class='deadsay'>It appears the brain has suffered irreversible tissue degeneration</span>" //suicided
else if(!src.brainmob.client)
user << "<span class='notice'>It appears to be lost in its own thoughts</span>" //closed game window
else if(!src.brainmob.key)
user << "<span class='warning'>It seems to be in a deep dream-state</span>" //ghosted
user << "<span class='info'>*---------*</span>"

View File

@@ -35,19 +35,15 @@
if(H.mind)
H.mind.transfer_to(brainmob)
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a brain."
brainmob << "<span class='notice'>You feel slightly disoriented. That's normal when you're just a brain.</span>"
callHook("debrain", list(brainmob))
/obj/item/organ/brain/examine() // -- TLE
set src in oview(12)
if (!( usr ))
return
usr << "This is \icon[src] \an [name]."
/obj/item/organ/brain/examine(mob/user)
..()
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
usr << "You can feel the small spark of life still left in this one."
user << "<span class='notice'>You can feel the small spark of life still left in this one.</span>"
else
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
user << "<span class='deadsay'>This one seems particularly lifeless. Perhaps it will regain some of its luster later..</span>"
/obj/item/organ/brain/removed(var/mob/living/target,var/mob/living/user)

View File

@@ -23,7 +23,7 @@
/obj/item/device/mmi/posibrain/attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "<span class='notice'>You carefully locate the manual activation switch and start the [src]'s boot process.</span>"
user << "<span class='notice'>You carefully locate the manual activation switch and start \the [src]'s boot process.</span>"
search_for_candidates()
/obj/item/device/mmi/posibrain/proc/search_for_candidates()
@@ -57,7 +57,7 @@
/obj/item/device/mmi/posibrain/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a [src]. Would you like to play as one?", "[src] request", "Yes", "No", "Never for this round")
var/response = alert(C, "Someone is requesting a personality for \a [src]. Would you like to play as one?", "[src] request", "Yes", "No", "Never for this round")
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
@@ -79,7 +79,7 @@
var/turf/T = get_turf(src.loc)
for (var/mob/M in viewers(T))
M.show_message("<span class='notice'>The [src] chimes quietly.</span>")
M.show_message("<span class='notice'>\The [src] chimes quietly.</span>")
icon_state = "posibrain-occupied"
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
@@ -116,32 +116,17 @@
O.<< "<span class='notice'>You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.</span>"
ghost_volunteers.Add(O)
/obj/item/device/mmi/posibrain/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\modules\mob\living\carbon\brain\posibrain.dm:86: var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
var/msg = {"<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n
<span class='warning'>"}
// END AUTOFIX
if(src.brainmob && src.brainmob.key)
switch(src.brainmob.stat)
if(CONSCIOUS)
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responsive.</span>\n"
if(DEAD) msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
else
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
msg += "<span class='info'>*---------*</span>"
usr << msg
return
/obj/item/device/mmi/posibrain/examine(mob/user)
user << "<span class='info'>*---------</span>*"
..()
if(src.brainmob)
if(src.brainmob.stat == DEAD)
user << "<span class='deadsay'>It appears to be completely inactive.</span>" //suicided
else if(!src.brainmob.client)
user << "<span class='notice'>It appears to be in stand-by mode.</span>" //closed game window
else if(!src.brainmob.key)
user << "<span class='warning'>It doesn't seem to be responsive.</span>" //ghosted
user << "<span class='info'>*---------*</span>"
/obj/item/device/mmi/posibrain/emp_act(severity)
if(!src.brainmob)
@@ -181,4 +166,4 @@
else
var/turf/T = get_turf(src.loc)
for (var/mob/M in viewers(T))
M.show_message("<span class='notice'>The [src] pings softly.</span>")
M.show_message("<span class='notice'>\The [src] pings softly.</span>")

View File

@@ -1,25 +1,12 @@
/mob/living/carbon/human/examine()
set src in view()
if(!usr || !src) return
if( usr.sdisabilities & BLIND || usr.blinded || usr.stat==UNCONSCIOUS )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
/mob/living/carbon/human/examine(mob/user)
var/list/obscured = check_obscured_slots()
var/skipgloves = 0
//var/skipsuitstorage = 0
var/skipjumpsuit = 0
var/skipshoes = 0
var/skipmask = 0
var/list/obscured = check_obscured_slots()
var/skipface = 0
/*
@@ -40,11 +27,6 @@
*/
if(wear_mask)
skipface |= wear_mask.flags_inv & HIDEFACE
@@ -197,7 +179,7 @@
else if(istype(wear_id, /obj/item/weapon/card/id)) //just in case something other than a PDA/ID card somehow gets in the ID slot :[
var/obj/item/weapon/card/id/idcard = wear_id
id = idcard.registered_name
if(id && (id != real_name) && (get_dist(src, usr) <= 1) && prob(10))
if(id && (id != real_name) && (get_dist(src, user) <= 1) && prob(10))
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[wear_id] \a [wear_id] yet something doesn't seem right...</span>\n"
else*/
msg += "[t_He] [t_is] wearing \icon[wear_id] \a [wear_id].\n"
@@ -223,8 +205,8 @@
if(M_DWARF in mutations)
msg += "[t_He] [t_is] a short, sturdy creature fond of drink and industry.\n"
var/distance = get_dist(usr,src)
if(istype(usr, /mob/dead/observer) || usr.stat == 2) // ghosts can see anything
var/distance = get_dist(user,src)
if(istype(user, /mob/dead/observer) || user.stat == 2) // ghosts can see anything
distance = 1
if(distance <= 3)
if(!has_brain())
@@ -233,22 +215,22 @@
msg += "<span class='warning'>[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.</span>\n"
if((stat == 2 || src.health < config.health_threshold_crit || status_flags & FAKEDEATH) && distance <= 3)
msg += "<span class='warning'>[t_He] does not appear to be breathing.</span>\n"
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0 && src.stat == 1 && distance <= 1)
for(var/mob/O in viewers(usr.loc, null))
O.show_message("[usr] checks [src]'s pulse.", 1)
if(istype(user, /mob/living/carbon/human) && user.stat == 0 && src.stat == 1 && distance <= 1)
for(var/mob/O in viewers(user.loc, null))
O.show_message("[user] checks [src]'s pulse.", 1)
spawn(15)
if(distance <= 1 && usr.stat != 1)
if(distance <= 1 && user.stat != 1)
if(pulse == PULSE_NONE)
usr << "<span class='deadsay'>[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]...</span>"
user << "<span class='deadsay'>[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]...</span>"
else
usr << "<span class='deadsay'>[t_He] has a pulse!</span>"
user << "<span class='deadsay'>[t_He] has a pulse!</span>"
msg += "<span class='warning'>"
if(nutrition < 100)
msg += "[t_He] [t_is] severely malnourished.\n"
else if(nutrition >= 500)
if(usr.nutrition < 100)
if(user.nutrition < 100)
msg += "[t_He] [t_is] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n"
else
msg += "[t_He] [t_is] quite chubby.\n"
@@ -428,7 +410,7 @@
msg += "[t_He] [t_is] repulsively uncanny!\n"
if(hasHUD(usr,"security"))
if(hasHUD(user,"security"))
var/perpname = "wot"
var/criminal = "None"
@@ -454,7 +436,7 @@
msg += {"<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>
<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a> <a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>\n"}
// END AUTOFIX
if(hasHUD(usr,"medical"))
if(hasHUD(user,"medical"))
var/perpname = "wot"
var/medical = "None"
@@ -487,7 +469,7 @@
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\n[t_He] is [pose]"
usr << msg
user << msg
//Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records.
/proc/hasHUD(mob/M as mob, hudtype)

View File

@@ -103,12 +103,12 @@
for(var/mob/M in range(tmob, 1))
if(tmob.pinned.len || ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
if ( !(world.time % 5) )
src << "\red [tmob] is restrained, you cannot push past"
src << "<span class='warning'>[tmob] is restrained, you cannot push past</span>"
now_pushing = 0
return
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
if ( !(world.time % 5) )
src << "\red [tmob] is restraining [M], you cannot push past"
src << "<span class='warning'>[tmob] is restraining [M], you cannot push past</span>"
now_pushing = 0
return
@@ -125,7 +125,7 @@
if(istype(tmob, /mob/living/carbon/human) && (M_FAT in tmob.mutations))
if(prob(40) && !(M_FAT in src.mutations))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
src << "<span class='danger'>You fail to push [tmob]'s fat ass out of the way.</span>"
now_pushing = 0
return
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
@@ -319,7 +319,7 @@
return
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [src] has been hit by [O]", 1)
M.show_message("<span class='warning'>[src] has been hit by [O]</span>", 1)
if (health > 0)
var/datum/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
if(!affecting) return
@@ -346,7 +346,7 @@
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
O.show_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", 1)
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
@@ -371,7 +371,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
O.show_message(text("<span class='danger'>The [M.name] glomps []!</span>", src), 1)
var/damage = rand(1, 3)
@@ -407,7 +407,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
O.show_message(text("<span class='danger'>The [M.name] has shocked []!</span>", src), 1)
Weaken(power)
if (stuttering < power)
@@ -855,7 +855,7 @@
U.handle_regular_hud_updates()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
usr << "<span class='warning'>Unable to locate a data core entry for this person.</span>"
else if (href_list["secrecord"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
@@ -884,7 +884,7 @@
read = 1
if(!read)
usr << "\red Unable to locate a data core entry for this person."
usr << "<span class='warning'>Unable to locate a data core entry for this person.</span>"
else if (href_list["secrecordComment"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
@@ -913,7 +913,7 @@
usr << "<a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>"
if(!read)
usr << "\red Unable to locate a data core entry for this person."
usr << "<span class='warning'>Unable to locate a data core entry for this person.</span>"
else if (href_list["secrecordadd"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
@@ -979,7 +979,7 @@
U.handle_regular_hud_updates()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
usr << "<span class='warning'>Unable to locate a data core entry for this person.</span>"
else if (href_list["medrecord"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
@@ -1009,7 +1009,7 @@
read = 1
if(!read)
usr << "\red Unable to locate a data core entry for this person."
usr << "<span class='warning'>Unable to locate a data core entry for this person.</span>"
else if (href_list["medrecordComment"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
@@ -1038,7 +1038,7 @@
usr << "<a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>"
if(!read)
usr << "\red Unable to locate a data core entry for this person."
usr << "<span class='warning'>Unable to locate a data core entry for this person.</span>"
else if (href_list["medrecordadd"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
@@ -1071,10 +1071,10 @@
// user << "<span class='alert'>There is no exposed flesh or thin material [above_neck(target_zone) ? "on their head" : "on their body"].</span>"
else if (href_list["lookitem"])
var/obj/item/I = locate(href_list["lookitem"])
I.examine()
usr.examination(I)
else if (href_list["lookmob"])
var/mob/M = locate(href_list["lookmob"])
M.examine()
usr.examination(M)
else
..()
@@ -1158,7 +1158,7 @@
/mob/living/carbon/human/proc/play_xylophone()
if(!src.xylophone)
visible_message("\red [src] begins playing his ribcage like a xylophone. It's quite spooky.","\blue You begin to play a spooky refrain on your ribcage.","\red You hear a spooky xylophone melody.")
visible_message("<span class='warning'>[src] begins playing his ribcage like a xylophone. It's quite spooky.</span>","<span class='notice'>You begin to play a spooky refrain on your ribcage.</span>","<span class='notice'>You hear a spooky xylophone melody.</span>")
var/song = pick('sound/effects/xylophone1.ogg','sound/effects/xylophone2.ogg','sound/effects/xylophone3.ogg')
playsound(loc, song, 50, 1, -1)
xylophone = 1
@@ -1268,7 +1268,7 @@
regenerate_icons()
check_dna()
visible_message("\blue \The [src] morphs and changes [get_visible_gender() == MALE ? "his" : get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "\blue You change your appearance!", "\red Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!")
visible_message("<span class='notice'>\The [src] morphs and changes [get_visible_gender() == MALE ? "his" : get_visible_gender() == FEMALE ? "her" : "their"] appearance!</span>", "<span class='notice'>You change your appearance!</span>", "<span class='warning'>Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!</span>")
/mob/living/carbon/human/proc/can_mind_interact(mob/M)
if(!ishuman(M)) return 0 //Can't see non humans with your fancy human mind.
var/turf/temp_turf = get_turf(M)
@@ -1300,10 +1300,10 @@
var/say = input ("What do you wish to say")
if(M_REMOTE_TALK in target.mutations)
target.show_message("\blue You hear [src.real_name]'s voice: [say]")
target.show_message("<span class='notice'>You hear [src.real_name]'s voice: [say]</span>")
else
target.show_message("\blue You hear a voice that seems to echo around the room: [say]")
usr.show_message("\blue You project your mind into [target.real_name]: [say]")
target.show_message("<span class='notice'>You hear a voice that seems to echo around the room: [say]</span>")
usr.show_message("<span class='notice'>You project your mind into [target.real_name]: [say]</span>")
for(var/mob/dead/observer/G in world)
G.show_message("<i>Telepathic message from <b>[src]</b> to <b>[target]</b>: [say]</i>")
@@ -1323,7 +1323,7 @@
return
if(istype(l_hand, /obj/item/tk_grab) || istype(r_hand, /obj/item/tk_grab/))
src << "\red Your mind is too busy with that telekinetic grab."
src << "<span class='warning'>Your mind is too busy with that telekinetic grab.</span>"
remoteview_target = null
reset_view(0)
return
@@ -1342,7 +1342,7 @@
var/mob/target = input ("Who do you want to project your mind to ?") as mob in creatures
if(istype(l_hand, /obj/item/tk_grab) || istype(r_hand, /obj/item/tk_grab/))
src << "\red Your mind is too busy with that telekinetic grab."
src << "<span class='warning'>Your mind is too busy with that telekinetic grab.</span>"
remoteview_target = null
reset_view(0)
return
@@ -1594,16 +1594,16 @@
if(usr == src)
self = 1
if(!self)
usr.visible_message("\blue [usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.",\
usr.visible_message("<span class='notice'>[usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.</span>",\
"You begin counting [src]'s pulse")
else
usr.visible_message("\blue [usr] begins counting their pulse.",\
usr.visible_message("<span class='notice'>[usr] begins counting their pulse.</span>",\
"You begin counting your pulse.")
if(src.pulse)
usr << "\blue [self ? "You have a" : "[src] has a"] pulse! Counting..."
usr << "<span class='notice'>[self ? "You have a" : "[src] has a"] pulse! Counting...</span>"
else
usr << "\red [src] has no pulse!" //it is REALLY UNLIKELY that a dead person would check his own pulse
usr << "<span class='warning'>[src] has no pulse!</span>" //it is REALLY UNLIKELY that a dead person would check his own pulse
return
usr << "Don't move until counting is finished."
@@ -1612,7 +1612,7 @@
if(usr.l_move_time >= time) //checks if our mob has moved during the sleep()
usr << "You moved while counting. Try again."
else
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
usr << "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>"
/mob/living/carbon/human/proc/set_species(var/new_species_name, var/force_organs, var/default_colour)

View File

@@ -1,11 +1,4 @@
/mob/living/carbon/slime/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
/mob/living/carbon/slime/examine(mob/user)
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.stat == DEAD)
msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n"
@@ -30,8 +23,7 @@
msg += "<span class='warning'>It is glowing brightly with high levels of electrical activity.</span>\n"
if(10)
msg += "<span class='warning'><B>It is radiating with massive levels of electrical activity!</B></span>\n"
msg += "<span class='danger'>It is radiating with massive levels of electrical activity!</span>\n"
msg += "*---------*</span>"
usr << msg
return
user << msg

View File

@@ -1,10 +1,4 @@
/mob/living/carbon/monkey/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
/mob/living/carbon/monkey/examine(mob/user)
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
@@ -41,5 +35,4 @@
msg += "*---------*</span>"
usr << msg
return
user << msg

View File

@@ -1,10 +1,4 @@
/mob/living/silicon/ai/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
/mob/living/silicon/ai/examine(mob/user)
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <EM>[src]</EM>!\n"
if (src.stat == DEAD)
@@ -27,5 +21,4 @@
msg += "</span>"
msg += "*---------*</span>"
usr << msg
return
user << msg

View File

@@ -1,10 +1,4 @@
/mob/living/silicon/robot/mommi/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
/mob/living/silicon/robot/mommi/examine(mob/user)
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
@@ -40,5 +34,4 @@
if(DEAD) msg += "<span class='deadsay'>It looks completely unsalvageable.</span>\n"
msg += "*---------*</span>"
usr << msg
return
user << msg

View File

@@ -1,4 +1,4 @@
/mob/living/silicon/pai/examine() //removed as it was pointless...moved to the pai-card instead.
/mob/living/silicon/pai/examine(mob/user) //removed as it was pointless...moved to the pai-card instead.
/* This is totaly pointless because this mob is contained inside a card!
set src in oview()

View File

@@ -1,12 +1,4 @@
/mob/living/silicon/robot/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
/mob/living/silicon/robot/examine(mob/user)
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\modules\mob\living\silicon\robot\examine.dm:9: var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>[custom_name ? ", [modtype] [braintype]" : ""]!\n"
var/msg = {"<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>[custom_name ? ", [modtype] [braintype]" : ""]!\n
@@ -43,5 +35,4 @@
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
usr << msg
return
user << msg

View File

@@ -50,9 +50,7 @@
del src
return
/mob/living/simple_animal/construct/examine()
set src in oview()
/mob/living/simple_animal/construct/examine(mob/user)
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.health < src.maxHealth)
msg += "<span class='warning'>"
@@ -63,8 +61,7 @@
msg += "</span>"
msg += "*---------*</span>"
usr << msg
return
user << msg
/mob/living/simple_animal/construct/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))

View File

@@ -319,7 +319,7 @@
src << "\red There is nothing of interest to take."
return 0
/mob/living/simple_animal/spiderbot/examine()
/mob/living/simple_animal/spiderbot/examine(mob/user)
..()
if(src.held_item)
usr << "It is carrying \a [src.held_item] \icon[src.held_item]."
user << "It is carrying \a [src.held_item] \icon[src.held_item]."

View File

@@ -29,12 +29,12 @@
var/image/cap_living = null //Where we store our cap icons so we dont generate them constantly to update our icon
var/image/cap_dead = null
/mob/living/simple_animal/hostile/mushroom/examine()
/mob/living/simple_animal/hostile/mushroom/examine(mob/user)
..()
if(health >= maxHealth)
usr << "<span class='info'>It looks healthy.</span>"
user << "<span class='info'>It looks healthy.</span>"
else
usr << "<span class='info'>It looks like it's been roughed up.</span>"
user << "<span class='info'>It looks like it's been roughed up.</span>"
/mob/living/simple_animal/hostile/mushroom/Life()
..()

View File

@@ -862,6 +862,20 @@ var/list/slot_equipment_priority = list( \
if (popup)
memory()
//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 for why this isn't atom/verb/examine()
/mob/verb/examination(atom/A as mob|obj|turf in view()) //It used to be oview(12), but I can't really say why
set name = "Examine"
set category = "IC"
// if( (sdisabilities & BLIND || blinded || stat) && !istype(src,/mob/dead/observer) )
if(is_blind(src))
src << "<span class='notice'>Something is there but you can't see it.</span>"
return
face_atom(A)
A.examine(src)
/mob/proc/update_flavor_text()
set src in usr
if(usr != src)

View File

@@ -1,6 +1,7 @@
/obj/item/weapon/paper_bin/nano
name = "Nano paper dispenser"
icon = 'icons/obj/bureaucracy.dmi'
desc = "This machine dispenses nano paper"
icon_state = "np_dispenser"
item_state = "sheet-metal"
throwforce = 1
@@ -60,17 +61,12 @@
update_icon()
/obj/item/weapon/paper_bin/nano/examine()
set src in oview(1)
var/desc = "This machine dispenses nano paper"
usr << desc
if(in_range(usr, src))
if(ressources)
usr << "There is [ressources] nano paper left in the dispenser!"
else
usr << "<span class='warning'>The nano paper dispenser is empty! add more plasteel to refil!</span>"
return
/obj/item/weapon/paper_bin/nano/examine(mob/user)
..()
if(ressources)
user << "<span class='info'>There is [ressources] nano paper left in the dispenser!</span>"
else
user << "<span class='warning'>The nano paper dispenser is empty! add more plasteel to refil!</span>"
/obj/item/weapon/paper_bin/nano/update_icon()

View File

@@ -5,7 +5,7 @@
/obj/item/weapon/paper
name = "paper"
gender = PLURAL
gender = NEUTER
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper"
throwforce = 0
@@ -47,26 +47,21 @@
if(info)
icon_state += "_words"
/obj/item/weapon/paper/examine()
set src in oview(1)
// ..() //We don't want them to see the dumb "this is a paper" thing every time.
// I didn't like the idea that people can read tiny pieces of paper from across the room.
// Now you need to be next to the paper in order to read it.
if(in_range(usr, src))
/obj/item/weapon/paper/examine(mob/user)
if(in_range(user, src))
var/info_2 = ""
if(img)
usr << browse_rsc(img.img, "tmp_photo.png")
user << browse_rsc(img.img, "tmp_photo.png")
info_2 = "<img src='tmp_photo.png' width='192' style='-ms-interpolation-mode:nearest-neighbor' /><br><a href='?src=\ref[src];picture=1'>Remove</a><br>"
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_2][stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
if(!(istype(user, /mob/living/carbon/human) || istype(user, /mob/dead/observer) || istype(user, /mob/living/silicon)))
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_2][stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(user, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_2][info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_2][info][stamps]</BODY></HTML>", "window=[name]")
onclose(user, "[name]")
else
usr << "<span class='notice'>It is too far away.</span>"
return
..() //Only show a regular description if it is too far away to read.
user << "<span class='notice'>It is too far away.</span>"
/obj/item/weapon/paper/verb/rename()
set name = "Rename paper"
@@ -83,7 +78,7 @@
return
/obj/item/weapon/paper/attack_self(mob/living/user as mob)
examine()
user.examination(src)
if(rigged && (Holiday == "April Fool's Day"))
if(spam_flag == 0)
spam_flag = 1

View File

@@ -61,12 +61,10 @@
new/obj/item/weapon/ribbon(get_turf(src))
qdel(src)
/obj/item/weapon/paper_pack/examine()
/obj/item/weapon/paper_pack/examine(mob/user)
..()
if(amount)
..()
usr << "There are [amount] sheets in the pack."
else
..()
user << "<span class='info'>There are [amount] sheets in the pack.</span>"
/obj/item/weapon/paper_pack/verb/ribbontie()
set name = "Untie Paper Pack"

View File

@@ -15,10 +15,10 @@
/obj/item/weapon/paper_bin/ashify()
new ashtype(src.loc)
papers=0
amount=0
update_icon()
new ashtype(src.loc)
papers=0
amount=0
update_icon()
/obj/item/weapon/paper_bin/getFireFuel()
return amount
@@ -77,14 +77,12 @@
amount++
/obj/item/weapon/paper_bin/examine()
set src in oview(1)
/obj/item/weapon/paper_bin/examine(mob/user)
..()
if(amount)
usr << "<span class='notice'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>"
user << "<span class='info'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>"
else
usr << "<span class='notice'>There are no papers in the bin.</span>"
return
user << "<span class='info'>There are no papers in the bin.</span>"
/obj/item/weapon/paper_bin/update_icon()

View File

@@ -36,7 +36,7 @@
/obj/item/weapon/photo/attack_self(mob/user)
examine()
user.examination(src)
/obj/item/weapon/photo/attackby(obj/item/weapon/P, mob/user)
@@ -48,15 +48,12 @@
..()
/obj/item/weapon/photo/examine()
set src in oview(1)
if(is_blind(usr)) return
if(in_range(usr, src))
show(usr)
usr << desc
/obj/item/weapon/photo/examine(mob/user)
..()
if(in_range(user, src))
show(user)
else
usr << "<span class='notice'>It is too far away.</span>"
user << "<span class='notice'>You can't make out the picture from here.</span>"
/obj/item/weapon/photo/proc/show(mob/user)
@@ -123,10 +120,9 @@
icon_on = "sepia-camera"
icon_off = "sepia-camera_off"
/obj/item/device/camera/examine()
set src in view(1)
/obj/item/device/camera/examine(mob/user)
..()
usr <<"<span class='notice'>It has [pictures_left] photos left.</span>"
user <<"<span class='info'>It has [pictures_left] photos left.</span>"
/obj/item/device/camera/ai_camera //camera AI can take pictures with

View File

@@ -68,9 +68,8 @@
/obj/item/weapon/fuel/examine()
set src in view(1)
if(usr && !usr.stat)
usr << "A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"]."
..()
user << "<span class='info'>A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"].</span>"
/obj/item/weapon/fuel/proc/injest(mob/M as mob)
switch(content)

View File

@@ -156,31 +156,27 @@
spawn(5)
src.update()
/obj/machinery/power/apc/examine()
set src in oview(1)
if(usr /*&& !usr.stat*/)
..()
if(stat & BROKEN)
usr << "Looks broken."
return
if(opened)
if(has_electronics && terminal)
usr << "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]."
else if (!has_electronics && terminal)
usr << "There are some wires but no any electronics."
else if (has_electronics && !terminal)
usr << "Electronics installed but not wired."
else /* if (!has_electronics && !terminal) */
usr << "There is no electronics nor connected wires."
/obj/machinery/power/apc/examine(mob/user)
..()
if(stat & BROKEN)
user << "Looks broken."
return
if(opened)
if(has_electronics && terminal)
user << "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]."
else if (!has_electronics && terminal)
user << "There are some wires but no any electronics."
else if (has_electronics && !terminal)
user << "Electronics installed but not wired."
else /* if (!has_electronics && !terminal) */
user << "There is no electronics nor connected wires."
else
if (stat & MAINT)
user << "The cover is closed. Something wrong with it: it doesn't work."
else if (malfhack)
user << "The cover is broken. It may be hard to force it open."
else
if (stat & MAINT)
usr << "The cover is closed. Something wrong with it: it doesn't work."
else if (malfhack)
usr << "The cover is broken. It may be hard to force it open."
else
usr << "The cover is closed."
user << "The cover is closed."
/obj/machinery/power/apc/update_icon()
if (!status_overlays)

View File

@@ -177,6 +177,7 @@
name = "cable coil"
icon = 'icons/obj/power.dmi'
icon_state = "coil_red"
gender = NEUTER
var/amount = MAXCOIL
var/max_amount = MAXCOIL
_color = "red"
@@ -220,16 +221,6 @@
icon_state = "coil_[_color]"
name = "cable coil"
/obj/item/weapon/cable_coil/examine()
set src in view(1)
if(amount == 1)
usr << "A short piece of power cable."
else if(amount == 2)
usr << "A piece of power cable."
else
usr << "A coil of power cable. There are [amount] lengths of cable in the coil."
/obj/item/weapon/cable_coil/verb/make_restraint()
set name = "Make Cable Restraints"
set category = "Object"

View File

@@ -5,7 +5,10 @@
/obj/item/weapon/cell/New()
..()
charge = maxcharge
if(maxcharge <= 2500)
desc = "The manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it."
else
desc = "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!"
spawn(5)
updateicon()
@@ -51,15 +54,12 @@
return power_used
/obj/item/weapon/cell/examine()
set src in view(1)
if(usr /*&& !usr.stat*/)
if(maxcharge <= 2500)
usr << "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%."
else
usr << "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%."
/obj/item/weapon/cell/examine(mob/user)
..()
if(crit_fail)
usr << "\red This power cell seems to be faulty."
user << "<span class='warning'>This power cell seems to be faulty.</span>"
else
user << "<span class='info'>The charge meter reads [round(src.percent() )]%.</span>"
/obj/item/weapon/cell/attack_self(mob/user as mob)
src.add_fingerprint(user)

Some files were not shown because too many files have changed in this diff Show More