Merge branch 'dev' into ofDryingAndRacks

This commit is contained in:
Kelenius
2015-02-03 20:51:27 +03:00
119 changed files with 991 additions and 674 deletions
+1 -1
View File
@@ -463,7 +463,6 @@
#include "code\game\objects\objs.dm"
#include "code\game\objects\structures.dm"
#include "code\game\objects\weapons.dm"
#include "code\game\objects\closets\walllocker.dm"
#include "code\game\objects\effects\aliens.dm"
#include "code\game\objects\effects\bump_teleporter.dm"
#include "code\game\objects\effects\chemsmoke.dm"
@@ -683,6 +682,7 @@
#include "code\game\objects\structures\crates_lockers\closets\malfunction.dm"
#include "code\game\objects\structures\crates_lockers\closets\syndicate.dm"
#include "code\game\objects\structures\crates_lockers\closets\utility_closets.dm"
#include "code\game\objects\structures\crates_lockers\closets\walllocker.dm"
#include "code\game\objects\structures\crates_lockers\closets\wardrobe.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\bar.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\cargo.dm"
+9 -3
View File
@@ -205,9 +205,15 @@ datum/pipeline
var/gas_density = air.total_moles/air.volume
thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*T20C) ), 1)
//if the h/e pipes radiate less than the AVERAGE_SOLAR_RADIATION, then they will heat up, otherwise they will cool down. It turns out the critical temperature is -26 C
var/heat_gain = surface*(AVERAGE_SOLAR_RADIATION - STEFAN_BOLTZMANN_CONSTANT*thermal_conductivity*(air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4)
// We only get heat from the star on the exposed surface area.
// If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase.
var/heat_gain = AVERAGE_SOLAR_RADIATION * RADIATOR_EXPOSED_SURFACE_AREA * thermal_conductivity
// Previously, the temperature would enter equilibrium at 26C or 294K.
// Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on.
// It currently should stabilise at 85K or -183C.
heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4
air.add_thermal_energy(heat_gain)
if(network)
network.update = 1
network.update = 1
+2 -2
View File
@@ -98,8 +98,8 @@
//is_blocked_turf(var/turf/T)
usr << "\blue You finish placing the [src]." //Git Test
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob)
if (istype(A, /obj/machinery/door/airlock))
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
if (proximity && istype(A, /obj/machinery/door/airlock))
var/turf/T = get_turf(A)
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
P.loc = locate(T.x,T.y,T.z)
@@ -35,7 +35,7 @@
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
log += "<tr><td width='40%'>[H.get_id_name()]</td>"
log += "<tr><td width='40%'>[H.get_authentification_name()] ([H.get_assignment()])</td>"
switch(C.sensor_mode)
if(1)
+3 -2
View File
@@ -174,8 +174,9 @@
vendmode = 1
if("cancel")
relap.loc = src.loc
relap = null
if(relap)
relap.loc = src.loc
relap = null
vendmode = 0
src.updateUsrDialog()
+2
View File
@@ -1,3 +1,5 @@
#define RAND_F(L, H) (rand()*(H-L) + L)
// Credits to Nickr5 for the useful procs I've taken from his library resource.
var/const/E = 2.71828183
+5 -1
View File
@@ -46,7 +46,11 @@
playsound(loc, hitsound, 50, 1, -1)
return hit
else
user.visible_message("<span class='danger'>[M] has been [pick(attack_verb)] with [src] by [user]!</span>")
if(attack_verb.len)
user.visible_message("<span class='danger'>[M] has been [pick(attack_verb)] with [src] by [user]!</span>")
else
user.visible_message("<span class='danger'>[M] has been attacked with [src] by [user]!</span>")
if (hitsound)
playsound(loc, hitsound, 50, 1, -1)
switch(damtype)
+1 -1
View File
@@ -307,7 +307,7 @@ var/global/datum/controller/radio/radio_controller
//1 = radio transmission
//2 = subspace transmission
var/data = list()
var/list/data = list()
var/encryption
var/frequency = 0
+1
View File
@@ -866,6 +866,7 @@ client
return
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/datum/organ/internal)-/datum/organ/internal
if(!new_organ) return
if(!M)
usr << "Mob doesn't exist anymore"
+4 -2
View File
@@ -173,10 +173,11 @@ using /obj/effect/datacore/proc/manifest_inject( ), or manifest_insert( )
*/
var/global/list/PDA_Manifest = list()
var/global/ManifestJSON
/obj/effect/datacore/proc/get_manifest_json()
if(PDA_Manifest.len)
return PDA_Manifest
return
var/heads[0]
var/sec[0]
var/eng[0]
@@ -247,7 +248,8 @@ var/global/list/PDA_Manifest = list()
"bot" = bot,\
"misc" = misc\
)
return PDA_Manifest
ManifestJSON = list2json(PDA_Manifest)
return
+4 -4
View File
@@ -1,7 +1,7 @@
proc/log_and_message_admins(var/message as text)
log_admin("[usr]([usr.ckey]) " + message)
message_admins("[usr]([usr.ckey]) " + message)
log_admin(usr ? "[usr]([usr.ckey]) [message]" : "EVENT [message]")
message_admins(usr ? "[usr]([usr.ckey]) [message]" : "EVENT [message]")
proc/admin_log_and_message_admins(var/message as text)
log_admin("[key_name(usr)] " + message)
message_admins("[key_name_admin(usr)] " + message, 1)
log_admin(usr ? "[key_name(usr)] [message]" : "EVENT [message]")
message_admins(usr ? "[key_name(usr)] [message]" : "EVENT [message]", 1)
+1 -1
View File
@@ -12,7 +12,7 @@ proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
if(P.Mob.see_invisible < patient.invisibility)
continue
if(!(local_scanner || hassensorlevel(P, SUIT_SENSOR_VITAL)))
if(!(local_scanner || hassensorlevel(patient, SUIT_SENSOR_VITAL)))
continue
P.Client.images += patient.hud_list[HEALTH_HUD]
+1 -1
View File
@@ -47,7 +47,7 @@
/proc/get_receiver_reception(var/receiver, var/datum/signal/signal)
if(receiver && check_signal(signal))
var/turf/pos = get_turf(receiver)
if(pos.z in signal.data["level"])
if(pos && (pos.z in signal.data["level"]))
return TELECOMMS_RECEPTION_RECEIVER
return TELECOMMS_RECEPTION_NONE
+4 -1
View File
@@ -195,7 +195,10 @@ its easier to just keep the beam vertical.
f_name = "some "
else
f_name = "a "
f_name += "<span class='danger'>blood-stained</span> [name][infix]!"
if(blood_color != "#030303")
f_name += "<span class='danger'>blood-stained</span> [name][infix]!"
else
f_name += "oil-stained [name][infix]."
user << "\icon[src] That's [f_name] [suffix]"
@@ -657,7 +657,7 @@ var/list/datum/dna/hivemind_bank = list()
src << "<span class='notice'>We return our vocal glands to their original location.</span>"
return
var/mimic_voice = input("Enter a name to mimic.", "Mimic Voice", null) as text
var/mimic_voice = stripped_input(usr, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN)
if(!mimic_voice)
return
@@ -856,4 +856,4 @@ var/list/datum/dna/hivemind_bank = list()
changeling.absorbed_species += T.species.name
feedback_add_details("changeling_powers","ED")
return 1
return 1
+1 -1
View File
@@ -113,7 +113,7 @@
world.Reboot()
var/datum/disease2/disease/lethal = new
lethal.makerandom(1)
lethal.makerandom(3)
lethal.infectionchance = 5
// the more doctors, the more will be infected
+1 -4
View File
@@ -151,8 +151,6 @@
var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
var/pltext = "<font size=2><b>Player list:</b></font>"
for(var/mob/M in player_list)
if(M.client)
clients++
@@ -187,7 +185,6 @@
text += " (<b>[escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]</b>) and <b>[ghosts] ghosts</b>.</b><br>"
else
text += "There were <b>no survivors</b> (<b>[ghosts] ghosts</b>).</b>"
text += "<br>" + pltext //print player list after the general info
world << text
if(clients > 0)
@@ -553,7 +550,7 @@ proc/get_nt_opposed()
var/list/refined_log = new()
for(var/datum/uplink_item/UI in H.purchase_log)
var/obj/I = new UI.path
refined_log.Add("[H.purchase_log[UI]]x\icon[I][I.name]")
refined_log.Add("[H.purchase_log[UI]]x\icon[I][UI.name]")
del(I)
purchases = english_list(refined_log, nothing_text = "")
if(uplink_true)
+1 -1
View File
@@ -11,7 +11,7 @@ var/global/list/turf/synd_spawn = list()
/datum/game_mode/nuclear
name = "mercenary"
config_tag = "nuclear"
config_tag = "mercenary"
required_players = 15
required_players_secret = 25 // 25 players - 5 players to be the nuke ops = 20 players remaining
required_enemies = 1
+1 -1
View File
@@ -91,7 +91,7 @@
//REMOTEVIEWBLOCK = getAssignedBlock("REMOTEVIEW", numsToAssign, DNA_HARDER_BOUNDS)
//REGENERATEBLOCK = getAssignedBlock("REGENERATE", numsToAssign, DNA_HARDER_BOUNDS)
//INCREASERUNBLOCK = getAssignedBlock("INCREASERUN", numsToAssign, DNA_HARDER_BOUNDS)
//REMOTETALKBLOCK = getAssignedBlock("REMOTETALK", numsToAssign, DNA_HARDER_BOUNDS)
REMOTETALKBLOCK = getAssignedBlock("REMOTETALK", numsToAssign, DNA_HARDER_BOUNDS)
//MORPHBLOCK = getAssignedBlock("MORPH", numsToAssign, DNA_HARDER_BOUNDS)
//COLDBLOCK = getAssignedBlock("COLD", numsToAssign)
//HALLUCINATIONBLOCK = getAssignedBlock("HALLUCINATION", numsToAssign)
+4 -3
View File
@@ -281,9 +281,6 @@
src.speak(message)
src.visible_message("<b>[src]</b> points at [C.name]!")
src.last_newpatient_speak = world.time
if(declare_treatment)
var/area/location = get_area(src)
broadcast_medical_hud_message("[src.name] is treating <b>[C]</b> in <b>[location]</b>", src)
break
else
continue
@@ -438,6 +435,10 @@
src.patient.reagents.add_reagent(reagent_id,src.injection_amount)
visible_message("\red <B>[src] injects [src.patient] with the syringe!</B>")
if(declare_treatment)
var/area/location = get_area(src)
broadcast_medical_hud_message("[src.name] is treating <b>[C]</b> in <b>[location]</b>", src)
src.icon_state = "medibot[src.on]"
src.currently_healing = 0
return
+9 -2
View File
@@ -36,6 +36,9 @@
wires = new(src)
assembly = new(src)
assembly.state = 4
invalidateCameraCache()
/* // Use this to look for cameras that have the same c_tag.
for(var/obj/machinery/camera/C in cameranet.cameras)
var/list/tempnetwork = C.network&src.network
@@ -61,6 +64,7 @@
/obj/machinery/camera/emp_act(severity)
if(!isEmpProof())
if(prob(100/severity))
invalidateCameraCache()
stat |= EMPED
SetLuminosity(0)
kick_viewers()
@@ -71,7 +75,7 @@
stat &= ~EMPED
cancelCameraAlarm()
update_icon()
invalidateCameraCache()
..()
/obj/machinery/camera/bullet_act(var/obj/item/projectile/P)
@@ -118,7 +122,7 @@
destroy()
/obj/machinery/camera/attackby(obj/W as obj, mob/living/user as mob)
invalidateCameraCache()
// DECONSTRUCTION
if(isscrewdriver(W))
//user << "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>"
@@ -199,6 +203,7 @@
//legacy support, if choice is != 1 then just kick viewers without changing status
kick_viewers()
else
invalidateCameraCache()
set_status( !src.status )
if (!(src.status))
visible_message("\red [user] has deactivated [src]!")
@@ -218,6 +223,7 @@
//Used when someone breaks a camera
/obj/machinery/camera/proc/destroy()
invalidateCameraCache()
stat |= BROKEN
kick_viewers()
triggerCameraAlarm()
@@ -232,6 +238,7 @@
/obj/machinery/camera/proc/set_status(var/newstatus)
if (status != newstatus)
status = newstatus
invalidateCameraCache()
// now disconnect anyone using the camera
//Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they couldn't use it anyway?
+5 -1
View File
@@ -236,7 +236,11 @@
return 1
/proc/trackable(var/mob/living/M)
return near_camera(M) || (M.loc.z in config.station_levels && hassensorlevel(M, SUIT_SENSOR_TRACKING))
var/turf/T = get_turf(M)
if(T && (T.z in config.station_levels) && hassensorlevel(M, SUIT_SENSOR_TRACKING))
return 1
return near_camera(M)
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
if (!istype(user))
+39 -17
View File
@@ -1,5 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/proc/invalidateCameraCache()
for(var/obj/machinery/computer/security/s in world)
s.camera_cache = null
/obj/machinery/computer/security
name = "security camera monitor"
@@ -10,6 +13,7 @@
var/list/network = list("SS13")
var/mapping = 0//For the overview file, interesting bit of code.
circuit = /obj/item/weapon/circuitboard/security
var/camera_cache = null
attack_ai(var/mob/user as mob)
@@ -32,29 +36,46 @@
data["current"] = null
var/list/L = list()
for (var/obj/machinery/camera/C in cameranet.cameras)
if(can_access_camera(C))
L.Add(C)
if(isnull(camera_cache))
var/list/L = list()
for (var/obj/machinery/camera/C in cameranet.cameras)
if(can_access_camera(C))
L.Add(C)
camera_sort(L)
camera_sort(L)
var/cameras[0]
for(var/obj/machinery/camera/C in L)
var/cam[0]
cam["name"] = sanitize(C.c_tag)
cam["deact"] = !C.can_use()
cam["camera"] = "\ref[C]"
cam["x"] = C.x
cam["y"] = C.y
cam["z"] = C.z
var/cameras[0]
for(var/obj/machinery/camera/C in L)
var/cam[0]
cam["name"] = C.c_tag
cam["deact"] = !C.can_use()
cam["camera"] = "\ref[C]"
cam["x"] = C.x
cam["y"] = C.y
cam["z"] = C.z
cameras[++cameras.len] = cam
cameras[++cameras.len] = cam
if(C == current)
data["current"] = cam
var/list/camera_list = list("cameras" = cameras)
camera_cache=list2json(camera_list)
else
if(current)
var/cam[0]
cam["name"] = current.c_tag
cam["deact"] = !current.can_use()
cam["camera"] = "\ref[current]"
cam["x"] = current.x
cam["y"] = current.y
cam["z"] = current.z
if(C == current)
data["current"] = cam
data["cameras"] = cameras
if(ui)
ui.load_cached_data(camera_cache)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
@@ -65,6 +86,7 @@
// adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
ui.load_cached_data(camera_cache)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -496,8 +496,14 @@
return
emergency_shuttle.call_transfer()
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
//delay events in case of an autotransfer
if (isnull(user))
event_manager.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes
event_manager.delay_events(EVENT_LEVEL_MAJOR, 9000)
log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.")
message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1)
return
+3 -2
View File
@@ -876,6 +876,7 @@ About the new airlock wires panel:
src.welded = 1
else
src.welded = null
playsound(src, 'sound/items/Welder.ogg', 100, 1)
src.update_icon()
return
else
@@ -904,7 +905,7 @@ About the new airlock wires panel:
beingcrowbarred = 1 //derp, Agouri
else
beingcrowbarred = 0
if( beingcrowbarred && src.p_open && (operating == -1 || (src.locked && welded && !src.arePowerSystemsOn() && BROKEN) || (density && welded && operating != 1 && !src.arePowerSystemsOn() && !src.locked)) )
if( beingcrowbarred && src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
if(do_after(user,40))
@@ -924,7 +925,7 @@ About the new airlock wires panel:
da.created_name = src.name
da.update_state()
if(operating == -1)
if(operating == -1 || (stat & BROKEN))
new /obj/item/weapon/circuitboard/broken(src.loc)
operating = 0
else
+10 -8
View File
@@ -190,7 +190,7 @@
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/detective_scanner))
return
if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
if(src.operating > 0 || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
src.add_fingerprint(user)
if(!Adjacent(user))
user = null
@@ -252,13 +252,6 @@
repairing = null
return
if(src.density && (operable() && istype(I, /obj/item/weapon/card/emag)))
flick("door_spark", src)
sleep(6)
open()
operating = -1
return 1
//psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them.
if(src.density && istype(I, /obj/item/weapon) && user.a_intent == "hurt" && !istype(I, /obj/item/weapon/card))
var/obj/item/weapon/W = I
@@ -271,6 +264,15 @@
take_damage(W.force)
return
if(src.operating) return
if(src.density && (operable() && istype(I, /obj/item/weapon/card/emag)))
flick("door_spark", src)
sleep(6)
open()
operating = -1
return 1
if(src.allowed(user) && operable())
if(src.density)
open()
+13 -5
View File
@@ -186,13 +186,14 @@
add_fingerprint(user)
if(operating)
return//Already doing something.
if(istype(C, /obj/item/weapon/weldingtool))
if(istype(C, /obj/item/weapon/weldingtool) && !repairing)
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(0, user))
blocked = !blocked
user.visible_message("<span class='danger'>\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.")
playsound(src, 'sound/items/Welder.ogg', 100, 1)
update_icon()
return
@@ -203,7 +204,7 @@
update_icon()
return
if(blocked && istype(C, /obj/item/weapon/crowbar))
if(blocked && istype(C, /obj/item/weapon/crowbar) && !repairing)
if(!hatch_open)
user << "<span class='danger'>You must open the maintenance hatch first!</span>"
else
@@ -215,19 +216,24 @@
user.visible_message("<span class='danger'>[user] has removed the electronics from \the [src].</span>",
"You have removed the electronics from [src].")
new/obj/item/weapon/airalarm_electronics(src.loc)
if (stat & BROKEN)
new /obj/item/weapon/circuitboard/broken(src.loc)
else
new/obj/item/weapon/airalarm_electronics(src.loc)
var/obj/structure/firedoor_assembly/FA = new/obj/structure/firedoor_assembly(src.loc)
FA.anchored = 1
FA.density = 1
FA.wired = 1
FA.update_icon()
del(src)
return
if(blocked)
user << "<span class='danger'>\The [src] is welded solid!</span>"
user << "<span class='danger'>\The [src] is welded shut!</span>"
return
if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/melee/energy/blade) || istype(C,/obj/item/weapon/twohanded/fireaxe))
if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/twohanded/fireaxe))
if(operating)
return
@@ -262,6 +268,8 @@
spawn(0)
close()
return
return ..()
// CHECK PRESSURE
/obj/machinery/door/firedoor/process()
+24 -3
View File
@@ -5,7 +5,8 @@ obj/structure/firedoor_assembly
icon_state = "door_construction"
anchored = 0
opacity = 0
density = 0
density = 1
var/wired = 0
obj/structure/firedoor_assembly/update_icon()
if(anchored)
@@ -14,7 +15,28 @@ obj/structure/firedoor_assembly/update_icon()
icon_state = "door_construction"
obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
if(istype(C, /obj/item/weapon/airalarm_electronics))
if(istype(C, /obj/item/stack/cable_coil) && !wired && anchored)
var/obj/item/stack/cable_coil/cable = C
if (cable.get_amount() < 1)
user << "<span class='warning'>You need one length of coil to wire \the [src].</span>"
return
user.visible_message("[user] wires \the [src].", "You start to wire \the [src].")
if(do_after(user, 40) && !wired && anchored)
if (cable.use(1))
wired = 1
user << "<span class='notice'>You wire \the [src].</span>"
else if(istype(C, /obj/item/weapon/wirecutters) && wired )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].")
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You cut the wires!</span>"
new/obj/item/stack/cable_coil(src.loc, 1)
wired = 0
else if(istype(C, /obj/item/weapon/airalarm_electronics) && wired)
if(anchored)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",
@@ -26,7 +48,6 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
user << "<span class='warning'>You must secure \the [src] first!</span>"
else if(istype(C, /obj/item/weapon/wrench))
anchored = !anchored
density = !density
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] has [anchored ? "" : "un" ]secured \the [src]!</span>",
"You have [anchored ? "" : "un" ]secured \the [src]!")
+4
View File
@@ -230,6 +230,10 @@ Class Procs:
/mob/living/silicon/ai/canUseTopic(atom/movable/M)
if(stat)
return
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
// unless it's on the same level as the object it's interacting with.
if(!(z == M.z || M.z in config.player_levels))
return
//stop AIs from leaving windows open and using then after they lose vision
//apc_override is needed here because AIs use their own APC when powerless
if(cameranet && !cameranet.checkTurfVis(get_turf(M)) && !apc_override)
+6 -1
View File
@@ -154,6 +154,12 @@
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
return 0
if (get_dist(src, user) > 0 && !issilicon(user))
user << "<span class='notice'>You are too far away.</span>"
user.unset_machine()
user << browse(null, "window=turretid")
return 0
if(locked && !issilicon(user))
user << "<span class='notice'>Access denied.</span>"
return 0
@@ -175,7 +181,6 @@
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
Status: []<BR>
Behaviour controls are [locked ? "locked" : "unlocked"]"},
"<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>" )
if(!locked || issilicon(user))
+12
View File
@@ -43,6 +43,7 @@ var/list/ai_status_emotions = list(
if(istype(M, /obj/machinery/ai_status_display))
var/obj/machinery/ai_status_display/AISD = M
AISD.emotion = emote
AISD.update()
//if Friend Computer, change ALL displays
else if(istype(M, /obj/machinery/status_display))
@@ -72,6 +73,9 @@ var/list/ai_status_emotions = list(
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
src.emotion = emote
/obj/machinery/ai_status_display/process()
return
/obj/machinery/ai_status_display/proc/update()
if(mode==0) //Blank
overlays.Cut()
@@ -91,3 +95,11 @@ var/list/ai_status_emotions = list(
if(overlays.len)
overlays.Cut()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
/obj/machinery/ai_status_display/power_change()
..()
if(stat & NOPOWER)
if(overlays.len)
overlays.Cut()
else
update()
+1 -1
View File
@@ -3,7 +3,7 @@
/obj/machinery/status_display/supply_display/update()
if(!..() && mode == STATUS_DISPLAY_CUSTOM)
message1 = "SUPPLY"
message1 = "CARGO"
message2 = ""
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
@@ -64,36 +64,12 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(long_range_link == 0 && machine.long_range_link == 0)
continue
// If we're sending a copy, be sure to create the copy for EACH machine and paste the data
var/datum/signal/copy = new
var/datum/signal/copy
if(copysig)
copy = new
copy.transmission_method = 2
copy.frequency = signal.frequency
// Copy the main data contents! Workaround for some nasty bug where the actual array memory is copied and not its contents.
copy.data = list(
"mob" = signal.data["mob"],
"mobtype" = signal.data["mobtype"],
"realname" = signal.data["realname"],
"name" = signal.data["name"],
"job" = signal.data["job"],
"key" = signal.data["key"],
"vmessage" = signal.data["vmessage"],
"vname" = signal.data["vname"],
"vmask" = signal.data["vmask"],
"compression" = signal.data["compression"],
"message" = signal.data["message"],
"connection" = signal.data["connection"],
"radio" = signal.data["radio"],
"slow" = signal.data["slow"],
"traffic" = signal.data["traffic"],
"type" = signal.data["type"],
"server" = signal.data["server"],
"reject" = signal.data["reject"],
"level" = signal.data["level"],
"verb" = signal.data["verb"],
"language" = signal.data["language"]
)
copy.data = signal.data.Copy()
// Keep the "original" signal constant
if(!signal.data["original"])
@@ -101,10 +77,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
else
copy.data["original"] = signal.data["original"]
else
del(copy)
send_count++
if(machine.is_freq_listening(signal))
machine.traffic++
@@ -232,13 +204,13 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
else if(on)
produce_heat()
delay = initial(delay)
/obj/machinery/telecomms/proc/produce_heat()
if (!produces_heat)
return
if (!use_power)
return
@@ -252,11 +224,11 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/datum/gas_mixture/removed = env.remove(transfer_moles)
if(removed)
var/heat_produced = idle_power_usage //obviously can't produce more heat than the machine draws from it's power source
if (traffic <= 0)
heat_produced *= 0.30 //if idle, produce less heat.
removed.add_thermal_energy(heat_produced)
env.merge(removed)
+7 -2
View File
@@ -91,7 +91,7 @@
var/turf/T = get_turf(R)
if (!T)
continue
if(T.z == 2 || T.z > 7)
if(!(T.z in config.player_levels))
continue
var/tmpname = T.loc.name
if(areaindex[tmpname])
@@ -118,7 +118,12 @@
areaindex[tmpname] = 1
L[tmpname] = I
var/desc = input("Please select a location to lock in.", "Locking Computer") in L
var/desc = input("Please select a location to lock in.", "Locking Computer") in L|null
if(!desc)
return
if(get_dist(src, usr) > 1 && !issilicon(usr))
return
src.locked = L[desc]
for(var/mob/O in hearers(src, null))
O.show_message("\blue Locked In", 2)
+10 -3
View File
@@ -66,15 +66,20 @@
return
/obj/machinery/turretid/proc/can_use(mob/user)
if(ailock && issilicon(user))
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
return 0
if (get_dist(src, user) > 0 && !issilicon(user))
user << "<span class='notice'>You are too far away.</span>"
user.unset_machine()
user << browse(null, "window=turretid")
return 0
if(ailock && issilicon(user))
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
if(locked && !issilicon(user))
user << "<span class='notice'>Access denied.</span>"
return 0
return 1
/obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user)
@@ -124,7 +129,9 @@
if (!istype(loc, /area))
return
var/area/area = loc
var/dat = ""
var/dat = text({"Status: []<BR>
Behaviour controls are [locked ? "locked" : "unlocked"]"},
"<A href='?src=\ref[src];operation=toggleon'>[enabled ? "On" : "Off"]</A>" )
if(!locked || issilicon(user))
dat += text({"<BR><BR>
+1 -1
View File
@@ -5,7 +5,7 @@
initial_icon = "engineering_pod"
internal_damage_threshold = 80
step_in = 4
step_energy_drain = 15
step_energy_drain = 10
max_temperature = 20000
health = 150
infra_luminosity = 6
@@ -114,13 +114,19 @@ var/global/list/image/splatter_cache=list()
amount = 2
/obj/effect/decal/cleanable/blood/drip
name = "drips of blood"
desc = "It's red."
gender = PLURAL
icon = 'icons/effects/drip.dmi'
icon_state = "1"
random_icon_states = list("1","2","3","4","5")
amount = 0
name = "drips of blood"
desc = "It's red."
gender = PLURAL
icon = 'icons/effects/drip.dmi'
icon_state = "1"
random_icon_states = list("1","2","3","4","5")
amount = 0
var/list/drips = list()
/obj/effect/decal/cleanable/blood/drip/New()
..()
spawn(1)
drips |= icon_state
/obj/effect/decal/cleanable/blood/writing
icon_state = "tracks"
+8 -4
View File
@@ -70,8 +70,12 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
lighting_controller.processing = 0
var/approximate_intensity = (devastation_range * 3) + (heavy_impact_range * 2) + light_impact_range
var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild
if(defer_powernet_rebuild != 2)
// Large enough explosion. For performance reasons, powernets will be rebuilt manually
if(!defer_powernet_rebuild && (approximate_intensity > 25))
defer_powernet_rebuild = 1
if(heavy_impact_range > 1)
@@ -110,9 +114,9 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
sleep(8)
if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
if(!powernet_rebuild_was_deferred_already)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
if(!powernet_rebuild_was_deferred_already && defer_powernet_rebuild)
makepowernets()
defer_powernet_rebuild = 0
return 1
+2 -7
View File
@@ -35,7 +35,7 @@
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
var/zoomdevicename = null //name used for message when binoculars/scope is used
@@ -115,12 +115,7 @@
size = "bulky"
if(5.0)
size = "huge"
else
//if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking"
usr << "This is a [blood_DNA ? blood_color != "#030303" ? "bloody " : "oil-stained " : ""]\icon[src][src.name]. It is a [size] item."
if(src.desc)
usr << src.desc
return
return ..(user, distance, "", "It is a [size] item.")
/obj/item/attack_hand(mob/user as mob)
if (!user) return
+9 -2
View File
@@ -464,7 +464,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["convo_job"] = sanitize(c["job"])
break
if(mode==41)
data["manifest"] = data_core.get_manifest_json()
data_core.get_manifest_json()
if(mode==3)
@@ -535,12 +535,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
nanoUI = data
// update the ui if it exists, returns null if no ui is passed/found
if(ui)
ui.load_cached_data(ManifestJSON)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400)
// when the ui is first opened this is the data it will use
ui.load_cached_data(ManifestJSON)
ui.set_initial_data(data)
// open the new ui window
ui.open()
@@ -61,6 +61,8 @@
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
else
..()
/obj/item/weapon/kitchen/utensil/fork
name = "fork"
+22 -5
View File
@@ -117,10 +117,16 @@
ui_interact(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/mob/living/carbon/location = null
if(istype(loc, /obj/item/weapon/rig)) // check for tanks in rigs
if(istype(loc.loc, /mob/living/carbon))
location = loc.loc
else if(istype(loc, /mob/living/carbon))
location = loc
var/using_internal
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(istype(location))
if(location.internal==src)
using_internal = 1
@@ -133,9 +139,20 @@
data["valveOpen"] = using_internal ? 1 : 0
data["maskConnected"] = 0
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
if(istype(location))
var/mask_check = 0
if(location.internal == src) // if tank is current internal
mask_check = 1
else if(src in location) // or if tank is in the mobs possession
if(!location.internal) // and they do not have any active internals
mask_check = 1
else if(istype(src.loc, /obj/item/weapon/rig) && src.loc in location) // or the rig is in the mobs possession
if(!location.internal) // and they do not have any active internals
mask_check = 1
if(mask_check)
if(location.wear_mask && (location.wear_mask.flags & AIRTIGHT))
data["maskConnected"] = 1
else if(istype(location, /mob/living/carbon/human))
+8 -5
View File
@@ -13,7 +13,7 @@
user.put_in_hands(tape)
*/
/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user as mob)
/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user)
if(!istype(W, /obj/item/weapon/paper))
return
@@ -30,14 +30,14 @@
w_class = 1
layer = 4
anchored = 1 //it's sticky, no you cant move it
var/obj/item/weapon/stuck = null
/obj/item/weapon/ducttape/New()
..()
flags |= NOBLUDGEON
/obj/item/weapon/ducttape/examine(mob/user as mob)
/obj/item/weapon/ducttape/examine(mob/user)
return stuck.examine(user)
/obj/item/weapon/ducttape/proc/attach(var/obj/item/weapon/W)
@@ -47,7 +47,7 @@
name = W.name + " (taped)"
overlays = W.overlays
/obj/item/weapon/ducttape/attack_self(mob/user as mob)
/obj/item/weapon/ducttape/attack_self(mob/user)
if(!stuck)
return
@@ -60,7 +60,7 @@
overlays = null
del(src)
/obj/item/weapon/ducttape/afterattack(var/A, mob/user as mob, flag, params)
/obj/item/weapon/ducttape/afterattack(var/A, mob/user, flag, params)
if(!in_range(user, A) || istype(A, /obj/machinery/door) || !stuck)
return
@@ -70,6 +70,9 @@
var/dir_offset = 0
if(target_turf != source_turf)
dir_offset = get_dir(source_turf, target_turf)
if(!(dir_offset in cardinal))
user << "You cannot reach that from here." // can only place stuck papers in cardinal directions, to
return // reduce papers around corners issue.
user.drop_from_inventory(src)
forceMove(source_turf)
@@ -191,7 +191,8 @@
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
@@ -206,6 +207,8 @@
return
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
usr.drop_item()
if(W)
W.loc = src.loc
@@ -66,12 +66,15 @@
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(src.large)
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
user << "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>"
user << "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>"
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
user.drop_item()
if(W)
W.loc = src.loc
@@ -70,6 +70,8 @@
if(opened)
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
user.drop_item()
if(W)
W.loc = src.loc
+56 -28
View File
@@ -15,25 +15,70 @@
var/basestate
var/shardtype = /obj/item/weapon/shard
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
// var/silicate = 0 // number of units of silicate
// var/icon/silicateIcon = null // the silicated icon
var/silicate = 0 // number of units of silicate
/obj/structure/window/examine(mob/user)
. = ..(user)
if(health == maxhealth)
user << "<span class='notice'>It looks fully intact.</span>"
else
var/perc = health / maxhealth
if(perc > 0.75)
user << "<span class='notice'>It has a few cracks.</span>"
else if(perc > 0.5)
user << "<span class='warning'>It looks slightly damaged.</span>"
else if(perc > 0.25)
user << "<span class='warning'>It looks moderately damaged.</span>"
else
user << "<span class='danger'>It looks heavily damaged.</span>"
if(silicate)
if (silicate < 30)
user << "<span class='notice'>It has a thin layer of silicate.</span>"
else if (silicate < 70)
user << "<span class='notice'>It is covered in silicate.</span>"
else
user << "<span class='notice'>There is a thick layer of silicate covering it.</span>"
/obj/structure/window/proc/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = src.health
src.health = max(0, src.health - damage)
if(src.health <= 0)
src.shatter()
var/initialhealth = health
if(silicate)
damage = damage * (1 - silicate / 200)
health = max(0, health - damage)
if(health <= 0)
shatter()
else
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
if(src.health < src.maxhealth / 4 && initialhealth >= src.maxhealth / 4)
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message("[src] looks like it's about to shatter!" )
else if(src.health < src.maxhealth / 2 && initialhealth >= src.maxhealth / 2)
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
visible_message("[src] looks seriously damaged!" )
else if(src.health < src.maxhealth * 3/4 && initialhealth >= src.maxhealth * 3/4)
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
visible_message("Cracks begin to appear in [src]!" )
return
/obj/structure/window/proc/apply_silicate(var/amount)
if(health < maxhealth) // Mend the damage
health = min(health + amount * 3, maxhealth)
if(health == maxhealth)
visible_message("[src] looks fully repaired." )
else // Reinforce
silicate = min(silicate + amount, 100)
updateSilicate()
/obj/structure/window/proc/updateSilicate()
if (overlays)
overlays.Cut()
var/image/img = image(src.icon, src.icon_state)
img.color = "#ffffff"
img.alpha = silicate * 255 / 100
overlays += img
/obj/structure/window/proc/shatter(var/display_message = 1)
playsound(src, "shatter", 70, 1)
if(display_message)
@@ -251,7 +296,7 @@
update_nearby_tiles(need_rebuild=1) //Compel updates before
set_dir(turn(dir, 90))
// updateSilicate()
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
@@ -267,27 +312,10 @@
update_nearby_tiles(need_rebuild=1) //Compel updates before
set_dir(turn(dir, 270))
// updateSilicate()
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
/*
/obj/structure/window/proc/updateSilicate()
if(silicateIcon && silicate)
icon = initial(icon)
var/icon/I = icon(icon,icon_state,dir)
var/r = (silicate / 100) + 1
var/g = (silicate / 70) + 1
var/b = (silicate / 50) + 1
I.SetIntensity(r,g,b)
icon = I
silicateIcon = I
*/
/obj/structure/window/New(Loc, start_dir=null, constructed=0)
..()
+5 -2
View File
@@ -125,7 +125,7 @@
/turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
if(adj_temp > max_temperature)
take_damage(log(rand(0.9, 1.1) * (adj_temp - max_temperature)))
take_damage(log(RAND_F(0.9, 1.1) * (adj_temp - max_temperature)))
return ..()
@@ -273,7 +273,7 @@
user << rotting_touch_message
if(rotting_destroy_touch)
dismantle_wall()
return 1
return 1
if(..()) return 1
@@ -475,6 +475,9 @@
else if(istype(W,/obj/item/weapon/rcd)) //I bitterly resent having to write this. ~Z
return
else if(istype(W, /obj/item/weapon/reagent_containers))
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
else
return attack_hand(user)
@@ -5,7 +5,7 @@
opacity = 1
density = 1
damage_cap = 1000
damage_cap = 500
max_temperature = 6000
armor = 0.1 // Only 10% damage from gunfire, it's made from strong alloys and stuff.
@@ -291,7 +291,10 @@
var/obj/item/light_fixture_frame/small/AH = W
AH.try_build(src)
return
else if(istype(W, /obj/item/weapon/reagent_containers))
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
else if(!d_state)
return attack_hand(user)
+2 -1
View File
@@ -59,7 +59,8 @@
//Do 175 damage divided by the number of damage types applied.
if(damagetype & BRUTELOSS)
adjustBruteLoss(175/damage_mod)
adjustBruteLoss(30/damage_mod) //hack to prevent gibbing
adjustOxyLoss(145/damage_mod)
if(damagetype & FIRELOSS)
adjustFireLoss(175/damage_mod)
+1
View File
@@ -653,6 +653,7 @@ var/global/floorIsLava = 0
<A href='?src=\ref[src];secretsfun=flicklights'>Ghost Mode</A><BR>
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
<A href='?src=\ref[src];secretsfun=paintball'>Paintball Mode</A><BR>
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
<A href='?src=\ref[src];secretsfun=launchshuttle'>Launch a shuttle</A><BR>
+23 -26
View File
@@ -46,6 +46,7 @@ var/list/admin_verbs_admin = list(
/client/proc/cmd_admin_create_centcom_report,
/client/proc/check_words, /*displays cult-words*/
/client/proc/check_ai_laws, /*shows AI and borg laws*/
/client/proc/rename_ai, /*properly renames the AI*/
/client/proc/check_antagonists,
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
@@ -282,7 +283,7 @@ var/list/admin_verbs_mentor = list(
if(holder.rights & R_SERVER) verbs += admin_verbs_server
if(holder.rights & R_DEBUG)
verbs += admin_verbs_debug
if(config.debugparanoid && !check_rights(R_ADMIN))
if(config.debugparanoid && !check_rights(R_ADMIN))
verbs.Remove(admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on.
if(holder.rights & R_POSSESS) verbs += admin_verbs_possess
if(holder.rights & R_PERMISSIONS) verbs += admin_verbs_permissions
@@ -308,24 +309,7 @@ var/list/admin_verbs_mentor = list(
admin_verbs_rejuv,
admin_verbs_sounds,
admin_verbs_spawn,
/*Debug verbs added by "show debug verbs"*/
/client/proc/Cell,
/client/proc/do_not_use_these,
/client/proc/camera_view,
/client/proc/sec_camera_report,
/client/proc/intercom_view,
/client/proc/atmosscan,
/client/proc/powerdebug,
/client/proc/count_objects_on_z_level,
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control,
/client/proc/jump_to_dead_group,
/client/proc/startSinglo,
/client/proc/ticklag,
/client/proc/cmd_admin_grantfullaccess,
/client/proc/kaboom,
/client/proc/splash,
/client/proc/cmd_admin_areatest
debug_verbs
)
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
@@ -608,12 +592,14 @@ var/list/admin_verbs_mentor = list(
var/datum/disease2/disease/D = new /datum/disease2/disease()
var/greater = ((input("Is this a lesser or greater disease?", "Give Disease") in list("Lesser", "Greater")) == "Greater")
D.makerandom(greater)
if (!greater)
D.infectionchance = 1
var/severity = 1
var/greater = input("Is this a lesser, greater, or badmin disease?", "Give Disease") in list("Lesser", "Greater", "Badmin")
switch(greater)
if ("Lesser") severity = 1
if ("Greater") severity = 2
if ("Badmin") severity = 99
D.makerandom(severity)
D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
if(istype(T,/mob/living/carbon/human))
@@ -626,8 +612,8 @@ var/list/admin_verbs_mentor = list(
infect_virus2(T,D,1)
feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].", 1)
log_admin("[key_name(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].", 1)
/client/proc/make_sound(var/obj/O in world) // -- TLE
set category = "Special Verbs"
@@ -706,6 +692,17 @@ var/list/admin_verbs_mentor = list(
if(holder)
src.holder.output_ai_laws()
/client/proc/rename_ai(mob/living/silicon/ai/AI in world)
set name = "Rename AI"
set category = "Admin"
if(holder)
var/new_name = trim_strip_input(src, "Enter new AI name. Leave blank or as is to cancel.", "Enter new AI Name", AI.name)
if(new_name && new_name != AI.name)
admin_log_and_message_admins("has renamed the AI '[AI.name]' to '[new_name]'")
AI.SetName(new_name)
feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//---- bs12 verbs ----
+10
View File
@@ -2399,6 +2399,16 @@
W.item_color = "schoolgirl"
message_admins("[key_name_admin(usr)] activated Japanese Animes mode")
world << sound('sound/AI/animes.ogg')
if("paintball")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","PB")
for(var/species in all_species)
var/datum/species/S = all_species[species]
S.blood_color = "rainbow"
for(var/obj/effect/decal/cleanable/blood/B in world)
B.basecolor = "rainbow"
B.update_icon()
message_admins("[key_name_admin(usr)] activated Paintball mode")
if("eagles")//SCRAW
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
+2 -2
View File
@@ -517,7 +517,7 @@ var/global/list/gear_datums = list()
cost = 2
slot = slot_wear_suit
/datum/gear/gponcho
/datum/gear/bponcho
display_name = "poncho, blue"
path = /obj/item/clothing/suit/poncho/blue
cost = 3
@@ -529,7 +529,7 @@ var/global/list/gear_datums = list()
cost = 3
slot = slot_wear_suit
/datum/gear/rponcho
/datum/gear/pponcho
display_name = "poncho, purple"
path = /obj/item/clothing/suit/poncho/purple
cost = 3
+8 -7
View File
@@ -399,8 +399,6 @@ BLIND // can't see anything
*/
var/obj/item/clothing/tie/hastie = null
var/displays_id = 1
var/rolled_down = 0
var/basecolor
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
/obj/item/clothing/under/update_clothing_icon()
@@ -526,11 +524,14 @@ BLIND // can't see anything
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(copytext(item_color,-2) != "_d")
basecolor = item_color
if(basecolor + "_d_s" in icon_states('icons/mob/uniform.dmi'))
body_parts_covered = "[basecolor]" ? LEGS|LOWER_TORSO : UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]"
if(initial(item_color) + "_d_s" in icon_states('icons/mob/uniform.dmi'))
if (item_color == initial(item_color))
body_parts_covered &= LOWER_TORSO|LEGS|FEET
item_color = "[initial(item_color)]_d"
else
body_parts_covered = initial(body_parts_covered)
item_color = initial(item_color)
update_clothing_icon()
else
usr << "<span class='notice'>You cannot roll down the uniform!</span>"
+2 -1
View File
@@ -12,6 +12,7 @@
siemens_coefficient = 0.9
var/gas_filter_strength = 1 //For gas mask filters
var/list/filtered_gases = list("phoron", "sleeping_agent")
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 75, rad = 0)
/obj/item/clothing/mask/gas/filter_air(datum/gas_mixture/air)
var/datum/gas_mixture/filtered = new
@@ -32,7 +33,7 @@
desc = "A modernised version of the classic design, this mask will not only filter out phoron but it can also be connected to an air supply."
icon_state = "plaguedoctor"
item_state = "gas_mask"
armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 75, rad = 0)
armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 90, rad = 0)
body_parts_covered = HEAD|FACE
/obj/item/clothing/mask/gas/swat
+1 -1
View File
@@ -24,7 +24,7 @@
body_parts_covered = 0
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 25, rad = 0)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0)
/obj/item/clothing/mask/fakemoustache
name = "fake moustache"
+9 -2
View File
@@ -138,7 +138,7 @@
piece.name = "[suit_type] [initial(piece.name)]"
piece.desc = "It seems to be part of a [src.name]."
piece.icon_state = "[initial(icon_state)]"
piece.armor = armor
piece.armor = armor.Copy()
piece.min_cold_protection_temperature = min_cold_protection_temperature
piece.max_heat_protection_temperature = max_heat_protection_temperature
piece.siemens_coefficient = siemens_coefficient
@@ -227,7 +227,7 @@
if(!failed_to_seal && M.back == src && piece == compare_piece)
if(!instant)
if(!do_after(M,SEAL_DELAY))
if(!do_after(M,SEAL_DELAY,needhand=0))
failed_to_seal = 1
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]"
@@ -251,6 +251,13 @@
else
helmet.flags &= ~AIRTIGHT
helmet.update_light(wearer)
//sealed pieces become airtight, protecting against diseases
if (!seal_target)
piece.armor["bio"] = 100
else
piece.armor["bio"] = src.armor["bio"]
else
failed_to_seal = 1
+16 -8
View File
@@ -18,19 +18,27 @@
/datum/event/carp_migration/start()
if(severity == EVENT_LEVEL_MAJOR)
for(var/i = 1 to rand(3,5))
spawn_fish(landmarks_list.len)
else if(severity == EVENT_LEVEL_MODERATE)
spawn_fish(landmarks_list.len)
else if(severity == EVENT_LEVEL_MODERATE)
spawn_fish(rand(4, 6)) //12 to 30 carp, in small groups
else
spawn_fish(rand(1, 5))
spawn_fish(rand(1, 3), 1, 2) //1 to 6 carp, alone or in pairs
/datum/event/carp_migration/proc/spawn_fish(var/num_groups, var/group_size_min=3, var/group_size_max=5)
var/list/spawn_locations = list()
/datum/event/carp_migration/proc/spawn_fish(var/limit)
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(C.loc))
if(spawned_carp.len >= limit)
return
spawn_locations.Add(C.loc)
spawn_locations = shuffle(spawn_locations)
num_groups = min(num_groups, spawn_locations.len)
var/i = 1
while (i <= num_groups)
var/group_size = rand(group_size_min, group_size_max)
for (var/j = 1, j <= group_size, j++)
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(spawn_locations[i]))
i++
/datum/event/carp_migration/end()
for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp)
+17 -17
View File
@@ -25,7 +25,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
if(!next_event_time)
set_event_delay()
if(delayed)
if(delayed || !config.allow_random_events)
next_event_time += (world.time - last_world_time)
else if(world.time > next_event_time)
start_event()
@@ -139,22 +139,22 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
/datum/event_container/moderate
severity = EVENT_LEVEL_MODERATE
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 10),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 5, list(ASSIGNMENT_ENGINEER = 25, ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 10, list(ASSIGNMENT_ENGINEER = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 50, list(ASSIGNMENT_AI = 25, ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 25, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 15, list(ASSIGNMENT_ENGINEER = 5, ASSIGNMENT_JANITOR = 15)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 5, list(ASSIGNMENT_SECURITY = 5), 1),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5,list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 25, ASSIGNMENT_CYBORG = 25, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SCIENTIST = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 200, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
)
/datum/event_container/major
+9 -1
View File
@@ -45,6 +45,10 @@
log_debug("Event '[EM.name]' has completed at [worldtime2text()].")
/datum/event_manager/proc/delay_events(var/severity, var/delay)
var/list/datum/event_container/EC = event_containers[severity]
EC.next_event_time += delay
/datum/event_manager/proc/Interact(var/mob/living/user)
var/html = GetInteractWindow()
@@ -75,6 +79,7 @@
/datum/event_manager/proc/GetInteractWindow()
var/html = "<A align='right' href='?src=\ref[src];refresh=1'>Refresh</A>"
html += "<A align='right' href='?src=\ref[src];pause_all=[!config.allow_random_events]'>Pause All - [config.allow_random_events ? "Pause" : "Resume"]</A>"
if(selected_event_container)
var/event_time = max(0, selected_event_container.next_event_time - world.time)
@@ -92,7 +97,7 @@
html += "<td>[EM.max_weight]</td>"
html += "<td><A align='right' href='?src=\ref[src];toggle_oneshot=\ref[EM]'>[EM.one_shot]</A></td>"
html += "<td><A align='right' href='?src=\ref[src];toggle_enabled=\ref[EM]'>[EM.enabled]</A></td>"
html += "<td><span class='alert'>[EM.get_weight()]</span></td>"
html += "<td><span class='alert'>[EM.get_weight(number_active_with_role())]</span></td>"
html += "<td><A align='right' href='?src=\ref[src];remove=\ref[EM];EC=\ref[selected_event_container]'>Remove</A></td>"
html += "</tr>"
html += "</table>"
@@ -207,6 +212,9 @@
var/datum/event_container/EC = locate(href_list["pause"])
EC.delayed = !EC.delayed
admin_log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.")
else if(href_list["pause_all"])
config.allow_random_events = text2num(href_list["pause_all"])
admin_log_and_message_admins("has [config.allow_random_events ? "resumed" : "paused"] countdown for all events.")
else if(href_list["interval"])
var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
if(delay && delay > 0)
+2 -1
View File
@@ -8,7 +8,8 @@
power_failure(0)
/datum/event/grid_check/announce()
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg')
if (prob(30))
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg')
/datum/event/grid_check/end()
power_restore()
+29 -3
View File
@@ -1,11 +1,36 @@
datum/event/viral_infection
var/list/viruses = list()
datum/event/viral_infection/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
//generate 1-3 viruses. This way there's an upper limit on how many individual diseases need to be cured if many people are initially infected
var/num_diseases = rand(1,3)
for (var/i=0, i < num_diseases, i++)
var/datum/disease2/disease/D = new /datum/disease2/disease
var/strength = 1 //whether the disease is of the greater or lesser variety
if (severity >= EVENT_LEVEL_MAJOR && prob(75))
strength = 2
D.makerandom(strength)
viruses += D
datum/event/viral_infection/announce()
command_announcement.Announce("Confirmed outbreak of level five biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
var/level
if (severity == EVENT_LEVEL_MUNDANE)
return
else if (severity == EVENT_LEVEL_MODERATE)
level = pick("one", "two", "three", "four")
else
level = "five"
if (severity == EVENT_LEVEL_MAJOR || prob(60))
command_announcement.Announce("Confirmed outbreak of level [level] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
datum/event/viral_infection/start()
if(!viruses.len) return
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.client && G.stat != DEAD)
@@ -13,9 +38,10 @@ datum/event/viral_infection/start()
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
severity = severity == 1 ? 1 : severity - 1
severity = max(EVENT_LEVEL_MUNDANE, severity - 1)
var/actual_severity = severity * rand(1, 3)
while(actual_severity > 0 && candidates.len)
infect_mob_random_lesser(candidates[1])
var/datum/disease2/disease/D = pick(viruses)
infect_mob(candidates[1], D.getcopy())
candidates.Remove(candidates[1])
actual_severity--
+2 -2
View File
@@ -217,8 +217,8 @@ proc/populate_seed_list()
"water",
"potassium",
"plasticide",
"slimetoxin",
"aslimetoxin",
"mutationtoxin",
"amutationtoxin",
"inaprovaline",
"space_drugs",
"paroxetine",
+2
View File
@@ -362,6 +362,8 @@
SV.life()
if(!SV) continue
if(SV.energy < 2) //If tile isn't fully grown
var/chance
if(seed)
+1 -1
View File
@@ -143,7 +143,7 @@ Works together with spawning an observer, noted above.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
ghost.key = key
if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
return ghost
@@ -871,6 +871,7 @@
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]")
log_say("[key_name(usr)] sent a telepathic message to [key_name(target)]: [say]")
for(var/mob/dead/observer/G in world)
G.show_message("<i>Telepathic message from <b>[src]</b> to <b>[target]</b>: [say]</i>")
@@ -120,7 +120,7 @@ emp_act
/mob/living/carbon/human/proc/getarmor_organ(var/datum/organ/external/def_zone, var/type)
if(!type) return 0
var/protection = 0
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform)
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes)
for(var/gear in protective_gear)
if(gear && istype(gear ,/obj/item/clothing))
var/obj/item/clothing/C = gear
@@ -640,9 +640,10 @@ It can still be worn/put on as normal.
W.hold.close(usr)
usr.put_in_hands(tie)
suit.hastie = null*/
suit.hastie.on_removed(usr)
suit.hastie = null
target.update_inv_w_uniform()
if(suit && suit.hastie)
suit.hastie.on_removed(usr)
suit.hastie = null
target.update_inv_w_uniform()
if("id")
slot_to_process = slot_wear_id
if (target.wear_id)
+11 -14
View File
@@ -407,11 +407,10 @@
loc.assume_air(breath)
//spread some viruses while we are at it
if (virus2.len > 0)
if (prob(10) && get_infection_chance(src))
// log_debug("[src] : Exhaling some viruses")
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
if (virus2.len > 0 && prob(10))
// log_debug("[src] : Exhaling some viruses")
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
proc/get_breath_from_internal(volume_needed)
@@ -1426,21 +1425,19 @@
client.screen |= G.overlay
if(G.vision_flags)
sight |= G.vision_flags
if(!druggy)
if(!druggy && !seer)
see_invisible = SEE_INVISIBLE_MINIMUM
if(istype(G,/obj/item/clothing/glasses/night))
if(istype(G,/obj/item/clothing/glasses/night) && !seer)
see_invisible = SEE_INVISIBLE_MINIMUM
/* HUD shit goes here, as long as it doesn't modify sight flags */
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
var/obj/item/clothing/glasses/hud/O = G
if(istype(G, /obj/item/clothing/glasses/sunglasses/sechud))
var/obj/item/clothing/glasses/sunglasses/sechud/O = G
if(O.hud) O.hud.process_hud(src)
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
else if(istype(G, /obj/item/clothing/glasses/hud))
var/obj/item/clothing/glasses/hud/O = G
var/obj/item/clothing/glasses/sunglasses/sechud/S = G
O = S.hud
if(istype(O))
O.process_hud(src)
if(!druggy)
see_invisible = SEE_INVISIBLE_LIVING
if(!druggy && !seer) see_invisible = SEE_INVISIBLE_LIVING
proc/handle_random_events()
// Puke if toxloss is too high
@@ -35,23 +35,29 @@
if("head", "mouth", "eyes")
// ----- HEAD ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target] across \his cheek!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target]'s [pick("head", "neck")] [pick("", "", "", "with spread [pick(attack_noun)]")]!</span>")
if(5) user.visible_message("<span class='danger'>[pick("[user] [pick(attack_verb)] [target] across \his face!", "[user] rakes \his [pick(attack_noun)] across [target]'s face!")]</span>")
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot")
if(1 to 2)
user.visible_message("<span class='danger'>[user] scratched [target] across \his cheek!</span>")
if(3 to 4)
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target]'s [pick("head", "neck")]!</span>") //'with spread claws' sounds a little bit odd, just enough that conciseness is better here I think
if(5)
user.visible_message(pick(
"<span class='danger'>[user] rakes \his [pick(attack_noun)] across [target]'s face!</span>",
"<span class='danger'>[user] tears \his [pick(attack_noun)] into [target]'s face!</span>",
))
else
// ----- BODY ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.display_name]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!</span>")
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] deep into [target]'s [affecting.display_name]!</span>")
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.display_name]!</span>")
/datum/unarmed_attack/claws/strong
attack_verb = list("slash")
attack_verb = list("slashed")
damage = 10
shredding = 1
/datum/unarmed_attack/bite/strong
attack_verb = list("maul")
attack_verb = list("mauled")
damage = 15
shredding = 1
@@ -35,17 +35,18 @@
switch(zone) // strong punches can have effects depending on where they hit
if("head", "mouth", "eyes")
// Induce blurriness
target.visible_message("<span class='danger'>[target] looks dazed.</span>", "<span class='danger'>You see stars.</span>")
target.visible_message("<span class='danger'>[target] looks momentarily disoriented.</span>", "<span class='danger'>You see stars.</span>")
target.apply_effect(attack_damage*2, EYE_BLUR, armour)
if("l_arm", "l_hand")
if (target.l_hand)
// Disarm left hand
target.visible_message("<span class='danger'>[src] [pick("dropped", "let go off")] \the [target.l_hand][pick("", " with a scream")]!</span>")
//Urist McAssistant dropped the macguffin with a scream just sounds odd. Plus it doesn't work with NO_PAIN
target.visible_message("<span class='danger'>\The [target.l_hand] was knocked right out of [src]'s grasp!</span>")
target.drop_l_hand()
if("r_arm", "r_hand")
if (target.r_hand)
// Disarm right hand
target.visible_message("<span class='danger'>[src] [pick("dropped", "let go off")] \the [target.r_hand][pick("", " with a scream")]!</span>")
target.visible_message("<span class='danger'>\The [target.r_hand] was knocked right out of [src]'s grasp!</span>")
target.drop_r_hand()
if("chest")
if(!target.lying)
@@ -113,21 +114,30 @@
if("head", "mouth", "eyes")
// ----- HEAD ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target] across \his cheek!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] struck [target] in the head[pick("", " with a closed fist")]!</span>")
if(5) user.visible_message("<span class='danger'>[user] gave [target] a resounding slap to the face!</span>")
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_let", "l_foot", "r_foot")
if(1 to 2)
user.visible_message("<span class='danger'>[user] slapped [target] across \his cheek!</span>")
if(3 to 4)
user.visible_message(pick(
80; "<span class='danger'>[user] [pick(attack_verb)] [target] in the head!</span>", //striking someone with a 'closed fist' is called punching them.
20; "<span class='danger'>[user] struck [target] in the head[pick("", " with a closed fist")]!</span>"
))
if(5)
user.visible_message(pick(
10; "<span class='danger'>[user] gave [target] a resounding slap to the face!</span>",
90; "<span class='danger'>[user] smashed \his [pick(attack_noun)] into [target]'s [organ]!</span>"
))
else
// ----- BODY ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target]'s [organ]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target] in \his [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] slammed \his [pick(attack_noun)] into [target]'s [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] smashed \his [pick(attack_noun)] into [target]'s [organ]!</span>")
else
user.visible_message("<span class='danger'>[user] [pick("punched", "threw a punch", "struck", "slapped", "rammed their [pick(attack_noun)] into")] [target]'s [organ]!</span>")
user.visible_message("<span class='danger'>[user] [pick("punched", "threw a punch", "struck", "slapped", "slammed their [pick(attack_noun)] into")] [target]'s [organ]!</span>") //why do we have a separate set of verbs for lying targets?
/datum/unarmed_attack/kick
attack_verb = list("kicked", "kneed")
attack_noun = list("kick", "knee strike")
attack_verb = list("kicked", "kicked", "kicked", "kneed")
attack_noun = list("kick", "kick", "kick", "knee strike")
attack_sound = "swing_hit"
damage = 0
@@ -161,7 +171,7 @@
attack_damage = Clamp(attack_damage, 1, 5)
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] gave [target] a light [pick(attack_noun)] to the [organ]!</span>")
if(1 to 2) user.visible_message("<span class='danger'>[user] threw [target] a glancing [pick(attack_noun)] to the [organ]!</span>") //it's not that they're kicking lightly, it's that the kick didn't quite connect
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target] in \his [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] landed a strong [pick(attack_noun)] against [target]'s [organ]!</span>")
@@ -204,6 +214,6 @@
attack_damage = Clamp(attack_damage, 1, 5)
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] [pick("clomped on", "treaded on")] [target]'s [organ]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[pick("[user] stomped down on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down onto")] [target]'s [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a devastating stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>")
if(1 to 2) user.visible_message("<span class='danger'>[user] [pick("stepped on", "treaded on")] [target]'s [organ]!</span>") //stepped on conveys the same meaning and is more recognizable as an actual word than "clomped"
if(3 to 4) user.visible_message("<span class='danger'>[pick("[user] stomped on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down onto")] [target]'s [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a powerful stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>") //Devastated lol. No. We want to say that the stomp was powerful or forceful, not that it /wrought devastation/
+1 -1
View File
@@ -54,4 +54,4 @@
var/obj/item/device/aicard/card = loc
card.update_icon()
return ..(gibbed)
return ..(gibbed,"gives one shrill beep before falling lifeless.")
@@ -12,6 +12,7 @@
status_flags = GODMODE // You can't damage it.
mouse_opacity = 0
see_in_dark = 7
invisibility = INVISIBILITY_MAXIMUM
// Movement code. Returns 0 to stop air movement from moving it.
/mob/aiEye/Move()
+1 -1
View File
@@ -59,7 +59,7 @@
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
src.see_invisible = SEE_INVISIBLE_LIVING
//Congratulations! You've found a way for AI's to run without using power!
@@ -234,3 +234,7 @@
sight_mode |= module_state_3:sight_mode
else
src << "<span class='notice'>You need to disable a module first!</span>"
/mob/living/silicon/robot/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
return 1
+18 -26
View File
@@ -23,6 +23,11 @@ var/list/robot_verbs_default = list(
var/integrated_light_power = 6
var/datum/wires/robot/wires
//Icon stuff
var/icontype //Persistent icontype tracking allows for cleaner icon updates
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
//Hud stuff
var/obj/screen/cells = null
@@ -106,6 +111,8 @@ var/list/robot_verbs_default = list(
robot_modules_background.icon_state = "block"
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
ident = rand(1, 999)
module_sprites["Basic"] = "robot"
icontype = "Default"
updatename("Default")
updateicon()
@@ -227,11 +234,10 @@ var/list/robot_verbs_default = list(
modules+="Combat"
modtype = input("Please, select a module!", "Robot", null, null) in modules
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
if(module)
return
module_sprites = list()
switch(modtype)
if("Standard")
module = new /obj/item/weapon/robot_module/standard(src)
@@ -958,38 +964,25 @@ var/list/robot_verbs_default = list(
overlays.Cut()
if(stat == 0)
overlays += "eyes"
overlays.Cut()
overlays += "eyes-[icon_state]"
else
overlays -= "eyes"
if(opened && custom_sprite == 1) //Custom borgs also have custom panels, heh
if(wiresexposed)
overlays += "[src.ckey]-openpanel +w"
else if(cell)
overlays += "[src.ckey]-openpanel +c"
else
overlays += "[src.ckey]-openpanel -c"
overlays += "eyes-[module_sprites[icontype]]"
if(opened)
var/panelprefix = custom_sprite ? src.ckey : "ov"
if(wiresexposed)
overlays += "ov-openpanel +w"
overlays += "[panelprefix]-openpanel +w"
else if(cell)
overlays += "ov-openpanel +c"
overlays += "[panelprefix]-openpanel +c"
else
overlays += "ov-openpanel -c"
overlays += "[panelprefix]-openpanel -c"
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
overlays += "[icon_state]-shield"
overlays += "[module_sprites[icontype]]-shield"
if(modtype == "Combat")
var/base_icon = ""
base_icon = icon_state
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
icon_state = "[icon_state]-roll"
icon_state = "[module_sprites[icontype]]-roll"
else
icon_state = base_icon
icon_state = module_sprites[icontype]
return
//Call when target overlay should be added/removed
@@ -1222,8 +1215,6 @@ var/list/robot_verbs_default = list(
else
triesleft--
var/icontype
if (custom_sprite == 1)
icontype = "Custom"
triesleft = 0
@@ -1304,4 +1295,5 @@ var/list/robot_verbs_default = list(
if(2) //New Module
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] module change detected: [name] has loaded the [module.name].</span><br>"
if(3) //New Name
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"
if(oldname != newname)
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"
@@ -34,8 +34,11 @@
if(!stacktypes || !stacktypes.len) return
for(var/T in stacktypes)
var/O = locate(T) in src.modules
var/obj/item/stack/S = O
var/obj/item/stack/S
for(var/obj/O in src.modules)
if(O.type == T)
S = O
break
if(!S)
src.modules -= null
@@ -43,6 +46,9 @@
src.modules |= S
S.amount = 1
if(!istype(S))
continue
if(S && S.amount < stacktypes[T])
S.amount++
@@ -68,7 +68,7 @@
/mob/living/simple_animal/cat/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H)) return ..()
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
get_scooped(H)
+4 -2
View File
@@ -1,7 +1,7 @@
json_writer
proc
WriteObject(list/L)
WriteObject(list/L, cached_data = null)
. = "{"
var/i = 1
for(var/k in L)
@@ -9,7 +9,9 @@ json_writer
. += {"\"[k]\":[write(val)]"}
if(i++ < L.len)
. += ","
.+= "}"
if(cached_data)
. = copytext(., 1, lentext(.)) + ",\"cached\":[cached_data]}"
. += "}"
write(val)
if(isnum(val))
+2 -2
View File
@@ -7,6 +7,6 @@ proc
var/static/json_reader/_jsonr = new()
return _jsonr.ReadObject(_jsonr.ScanJson(json))
list2json(list/L)
list2json(list/L, var/cached_data = null)
var/static/json_writer/_jsonw = new()
return _jsonw.WriteObject(L)
return _jsonw.WriteObject(L, cached_data)
+17 -2
View File
@@ -57,6 +57,8 @@ nanoui is used to open and update nano browser uis
// the current status/visibility of the ui
var/status = STATUS_INTERACTIVE
var/cached_data = null
// Only allow users with a certain user.stat to get updates. Defaults to 0 (concious)
var/allowed_user_stat = 0 // -1 = ignore, 0 = alive, 1 = unconcious or alive, 2 = dead concious or alive
@@ -366,7 +368,7 @@ nanoui is used to open and update nano browser uis
template_data_json = list2json(templates)
var/list/send_data = get_send_data(initial_data)
var/initial_data_json = list2json(send_data)
var/initial_data_json = list2json(send_data, cached_data)
var/url_parameters_json = list2json(list("src" = "\ref[src]"))
@@ -442,6 +444,19 @@ nanoui is used to open and update nano browser uis
winset(user, window_id, "on-close=\"nanoclose [params]\"")
/**
* Appends already processed json txt to the list2json proc when setting initial-data and data pushes
* Used for data that is fucking huge like manifests and camera lists that doesn't change often.
* And we only want to process them when they change.
* Fuck javascript
*
* @return nothing
*/
/datum/nanoui/proc/load_cached_data(var/data)
cached_data = data
return
/**
* Push data to an already open UI window
*
@@ -455,7 +470,7 @@ nanoui is used to open and update nano browser uis
var/list/send_data = get_send_data(data)
//user << list2json(data) // used for debugging
user << output(list2params(list(list2json(send_data))),"[window_id].browser:receiveUpdateData")
user << output(list2params(list(list2json(send_data,cached_data))),"[window_id].browser:receiveUpdateData")
/**
* This Topic() proc is called whenever a user clicks on a link within a Nano UI
+13 -22
View File
@@ -290,29 +290,24 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
source.data["blood_type"] = donor.dna.b_type
// Are we dripping or splattering?
if(!large)
// Only a certain number of drips can be on a given turf.
var/list/drips = list()
var/list/drip_icons = list("1","2","3","4","5")
for(var/obj/effect/decal/cleanable/blood/drip/drop in T)
drips += drop
drip_icons.Remove(drop.icon_state)
// If we have too many drips, remove them and spawn a proper blood splatter.
if(drips.len >= 5)
//TODO: copy all virus data from drips to new splatter?
for(var/obj/effect/decal/cleanable/blood/drip/drop in drips)
del drop
else
decal_type = /obj/effect/decal/cleanable/blood/drip
var/list/drips = list()
// Only a certain number of drips (or one large splatter) can be on a given turf.
for(var/obj/effect/decal/cleanable/blood/drip/drop in T)
drips |= drop.drips
del(drop)
if(!large && drips.len < 3)
decal_type = /obj/effect/decal/cleanable/blood/drip
// Find a blood decal or create a new one.
B = locate(decal_type) in T
if(!B)
B = new decal_type(T)
var/obj/effect/decal/cleanable/blood/drip/drop = B
if(istype(drop) && drips && drips.len && !large)
drop.overlays |= drips
drop.drips |= drips
// If there's no data to copy, call it quits here.
if(!source)
return B
@@ -330,11 +325,7 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
else
B.blood_DNA[source.data["blood_DNA"]] = "O+"
// Update virus information. //Looks like this is out of date.
//for(var/datum/disease/D in source.data["viruses"])
// var/datum/disease/new_virus = D.Copy(1)
// source.viruses += new_virus
// new_virus.holder = B
// Update virus information.
if(source.data["virus2"])
B.virus2 = virus_copylist(source.data["virus2"])
+6 -6
View File
@@ -562,7 +562,7 @@ Note that amputating the affected organ does in fact remove the infection from t
O.setAmputatedTree()
//Handles dismemberment
/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0)
/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0,var/amputation=0)
if(destspawn) return
if(override)
status |= ORGAN_DESTROYED
@@ -579,9 +579,13 @@ Note that amputating the affected organ does in fact remove the infection from t
germ_level = 0
// If any organs are attached to this, destroy them
for(var/datum/organ/external/O in children)
O.droplimb(1, no_explode, amputation)
//Replace all wounds on that arm with one wound on parent organ.
wounds.Cut()
if (parent)
if (parent && !amputation)
var/datum/wound/W
if(max_damage < 50)
W = new/datum/wound/lost_limb/small(max_damage)
@@ -591,10 +595,6 @@ Note that amputating the affected organ does in fact remove the infection from t
parent.update_damages()
update_damages()
// If any organs are attached to this, destroy them
for(var/datum/organ/external/O in children)
O.droplimb(1)
var/obj/organ //Dropped limb object
switch(body_part)
if(HEAD)
+10 -3
View File
@@ -6,9 +6,13 @@
var/label = null
var/labels_left = 30
var/mode = 0 //off or on.
/obj/item/weapon/hand_labeler/attack()
return
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(!proximity)
return
if(!mode) //if it's off, give up.
return
if(A == loc) // if placing the labeller into something (e.g. backpack)
@@ -24,10 +28,13 @@
user << "<span class='notice'>Label too big.</span>"
return
if(ishuman(A))
user << "<span class='notice'>You can't label humans.</span>"
user << "<span class='notice'>The label refuses to stick to [A.name].</span>"
return
if(issilicon(A))
user << "<span class='notice'>You can't label cyborgs.</span>"
user << "<span class='notice'>The label refuses to stick to [A.name].</span>"
return
if(isobserver(A))
user << "<span class='notice'>[src] passes through [A.name].</span>"
return
if(istype(A, /obj/item/weapon/reagent_containers/glass))
user << "<span class='notice'>The label can't stick to the [A.name]. (Try using a pen)</span>"
+5 -2
View File
@@ -35,8 +35,9 @@
user.drop_from_inventory(P)
P.loc = src
if(istype(user,/mob/living/carbon/human))
user:update_inv_l_hand()
user:update_inv_r_hand()
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
else if(istype(W, /obj/item/weapon/photo))
amount++
if(screen == 2)
@@ -57,6 +58,8 @@
user << "<span class='notice'>You add \the [W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
del(W)
else
if(istype(W, /obj/item/weapon/tape_roll))
return 0
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/toy/crayon))
usr << browse("", "window=[name]") //Closes the dialog
P = src[page]
+14 -5
View File
@@ -105,8 +105,11 @@ display round(lastgen) and phorontank amount
var/sheet_path = /obj/item/stack/sheet/mineral/phoron
var/board_path = "/obj/item/weapon/circuitboard/pacman"
var/sheet_left = 0 // How much is left of the sheet
var/time_per_sheet = 40
var/heat = 0
//produces up to 80 kW and lasts for 20 minutes with 50 sheets
var/time_per_sheet = 96
power_gen = 20000
/obj/machinery/power/port_gen/pacman/initialize()
..()
@@ -329,9 +332,12 @@ display round(lastgen) and phorontank amount
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
icon_state = "portgen1"
sheet_path = /obj/item/stack/sheet/mineral/uranium
power_gen = 15000
time_per_sheet = 65
board_path = "/obj/item/weapon/circuitboard/pacman/super"
//produces 80 kW like the PACMAN but 50 sheets will last for 2 hours
power_gen = 20000
time_per_sheet = 576
overheat()
explosion(src.loc, 3, 3, 3, -1)
@@ -339,8 +345,11 @@ display round(lastgen) and phorontank amount
name = "M.R.S.P.A.C.M.A.N.-type Portable Generator"
icon_state = "portgen2"
sheet_path = /obj/item/stack/sheet/mineral/tritium
power_gen = 40000
time_per_sheet = 80
board_path = "/obj/item/weapon/circuitboard/pacman/mrs"
//produces 200 kW and lasts for 1 hour with 50 sheets
power_gen = 50000
time_per_sheet = 288
overheat()
explosion(src.loc, 4, 4, 4, -1)
+2
View File
@@ -294,6 +294,8 @@
for(var/obj/structure/cable/Cable in net2.cables) //merge cables
net1.add_cable(Cable)
if(!net2) return net1
for(var/obj/machinery/power/Node in net2.nodes) //merge power machines
if(!Node.connect_to_network())
Node.disconnect_from_network() //if somehow we can't connect the machine to the new powernet, disconnect it from the old nonetheless
+3 -2
View File
@@ -16,9 +16,11 @@
/datum/powernet/New()
powernets += src
..()
/datum/powernet/Del()
powernets -= src
..()
//Returns the amount of excess power (before refunding to SMESs) from last tick.
//This is for machines that might adjust their power consumption using this data.
@@ -110,8 +112,7 @@
S.restore() // and restore some of the power that was used
//updates the viewed load (as seen on power computers)
viewload = 0.8*viewload + 0.2*load
viewload = round(viewload)
viewload = round(load)
//reset the powernet
load = 0
@@ -206,8 +206,6 @@ var/global/list/uneatable = list(
/obj/machinery/singularity/proc/eat()
set background = 1
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
// Let's just make this one loop.
for(var/atom/X in orange(grav_pull,src))
var/dist = get_dist(X, src)
@@ -226,9 +224,6 @@ var/global/list/uneatable = list(
// Turf and movable atoms
else if(dist <= consume_range && (isturf(X) || istype(X, /atom/movable)))
consume(X)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
return
@@ -567,11 +562,7 @@ var/global/list/uneatable = list(
/obj/machinery/singularity/narsie/wizard/eat()
set background = 1
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
for(var/atom/X in orange(consume_range,src))
if(isturf(X) || istype(X, /atom/movable))
consume(X)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
return
+9 -2
View File
@@ -301,6 +301,13 @@
data["outputMax"] = output_level_max
data["outputLoad"] = round(output_used)
if(outputting)
data["outputting"] = 2 // smes is outputting
else if(!outputting && output_attempt)
data["outputting"] = 1 // smes is online but not outputting because it's charge level is too low
else
data["outputting"] = 0 // smes is not outputting
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
@@ -322,11 +329,11 @@
return 1
if( href_list["cmode"] )
inputting(!inputting)
inputting(!input_attempt)
update_icon()
else if( href_list["online"] )
outputting(!outputting)
outputting(!output_attempt)
update_icon()
else if( href_list["input"] )
switch( href_list["input"] )
+4 -26
View File
@@ -427,7 +427,7 @@ datum
holder.remove_reagent(src.id, 0.25 * REAGENTS_METABOLISM)
return
/* silicate
silicate
name = "Silicate"
id = "silicate"
description = "A compound that can be used to reinforce glass."
@@ -437,31 +437,9 @@ datum
reaction_obj(var/obj/O, var/volume)
src = null
if(istype(O,/obj/structure/window))
if(O:silicate <= 200)
O:silicate += volume
O:health += volume * 3
if(!O:silicateIcon)
var/icon/I = icon(O.icon,O.icon_state,O.dir)
var/r = (volume / 100) + 1
var/g = (volume / 70) + 1
var/b = (volume / 50) + 1
I.SetIntensity(r,g,b)
O.icon = I
O:silicateIcon = I
else
var/icon/I = O:silicateIcon
var/r = (volume / 100) + 1
var/g = (volume / 70) + 1
var/b = (volume / 50) + 1
I.SetIntensity(r,g,b)
O.icon = I
O:silicateIcon = I
return*/
var/obj/structure/window/W = O
W.apply_silicate(volume)
return
oxygen
name = "Oxygen"
+2 -2
View File
@@ -55,14 +55,14 @@ datum
empulse(location, round(created_volume / 24), round(created_volume / 14), 1)
holder.clear_reagents()
return
/*
silicate
name = "Silicate"
id = "silicate"
result = "silicate"
required_reagents = list("aluminum" = 1, "silicon" = 1, "oxygen" = 1)
result_amount = 3
*/
stoxin
name = "Soporific"
id = "stoxin"
@@ -21,7 +21,7 @@
..()
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob)
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/closet) \
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart))
return
@@ -46,7 +46,7 @@
user << "<span class='notice'>\The [src] is empty!</span>"
return
Spray_at(A)
Spray_at(A, user, proximity)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
@@ -61,28 +61,39 @@
log_game("[key_name(user)] fired Space lube from \a [src].")
return
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj)
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_size)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity)
if (A.density && proximity)
A.visible_message("[usr] sprays [A] with [src].")
var/obj/D = new/obj()
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
spawn(0)
D.reagents.reaction(A)
sleep(5)
del(D)
else
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_size)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
var/turf/A_turf = get_turf(A)//BS12
var/turf/A_turf = get_turf(A)//BS12
spawn(0)
for(var/i=0, i<spray_size, i++)
step_towards(D,A)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
spawn(0)
for(var/i=0, i<spray_size, i++)
step_towards(D,A)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
// When spraying against the wall, also react with the wall, but
// not its contents. BS12
if(get_dist(D, A_turf) == 1 && A_turf.density)
D.reagents.reaction(A_turf)
sleep(2)
sleep(3)
del(D)
// When spraying against the wall, also react with the wall, but
// not its contents. BS12
if(get_dist(D, A_turf) == 1 && A_turf.density)
D.reagents.reaction(A_turf)
sleep(2)
sleep(3)
del(D)
return
@@ -102,7 +102,7 @@
spawned_obj.desc += " It is made of [source_material]."
else
spawned_obj.desc = "It is made of [source_material]."
source_material.loc = null
del(source_material)
spawn_progress_time = 0
max_spawn_time = rand(30,100)
+2 -4
View File
@@ -67,8 +67,7 @@
/datum/surgery_step/open_encased/retract
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
/obj/item/weapon/crowbar = 75
)
min_duration = 30
@@ -124,8 +123,7 @@
/datum/surgery_step/open_encased/close
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
/obj/item/weapon/crowbar = 75
)
min_duration = 20
+1 -1
View File
@@ -305,7 +305,7 @@
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cuts off [target]'s [affected.display_name] with \the [tool].", \
"\blue You cut off [target]'s [affected.display_name] with \the [tool].")
affected.droplimb(1,0)
affected.droplimb(1,1,1)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
+1 -1
View File
@@ -98,7 +98,7 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool)
//We had proper tools! (or RNG smiled.) and user did not move or change hands.
if(prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
else if (tool in user.contents && user.Adjacent(M)) //or
else if ((tool in user.contents) && user.Adjacent(M)) //or
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
else // This failing silently was a pain.
user << "\red You must remain close to your patient to conduct surgery."
+1 -1
View File
@@ -337,7 +337,7 @@
load.forceMove(dest)
load.set_dir(get_dir(loc, dest))
load.anchored = initial(load.anchored)
load.anchored = 0 //we can only load non-anchored items, so it makes sense to set this to false
load.pixel_x = initial(load.pixel_x)
load.pixel_y = initial(load.pixel_y)
load.layer = initial(load.layer)

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