Merge github.com:Baystation12/Baystation12

Conflicts:
	html/changelog.html
This commit is contained in:
cib
2012-05-22 14:50:00 +02:00
144 changed files with 7400 additions and 5721 deletions

View File

@@ -2,9 +2,7 @@ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
CREATE SCHEMA IF NOT EXISTS `tgstation` DEFAULT CHARACTER SET latin1 ;
USE `mydb` ;
USE `tgstation` ;
-- -----------------------------------------------------

View File

@@ -161,11 +161,11 @@
#define FILE_DIR "code/unused/powerarmor"
#define FILE_DIR "code/unused/spacecraft"
#define FILE_DIR "code/WorkInProgress"
#define FILE_DIR "code/WorkInProgress/AI_Visibility"
#define FILE_DIR "code/WorkInProgress/animusstation"
#define FILE_DIR "code/WorkInProgress/Apples"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/BirdMan"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jumper"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Tajara"
@@ -616,7 +616,6 @@
#include "code\game\mecha\working\firefighter.dm"
#include "code\game\mecha\working\ripley.dm"
#include "code\game\mecha\working\working.dm"
#include "code\game\objects\biomass.dm"
#include "code\game\objects\blood.dm"
#include "code\game\objects\bodybag.dm"
#include "code\game\objects\bombspawner.dm"
@@ -1143,10 +1142,15 @@
#include "code\modules\scripting\Scanner\Tokens.dm"
#include "code\modules\security levels\keycard authentication.dm"
#include "code\modules\security levels\security levels.dm"
#include "code\WorkInProgress\AI_Visibility.dm"
#include "code\WorkInProgress\buildmode.dm"
#include "code\WorkInProgress\explosion_particles.dm"
#include "code\WorkInProgress\AI_Visibility\ai.dm"
#include "code\WorkInProgress\AI_Visibility\cameranet.dm"
#include "code\WorkInProgress\AI_Visibility\chunk.dm"
#include "code\WorkInProgress\AI_Visibility\minimap.dm"
#include "code\WorkInProgress\AI_Visibility\util.dm"
#include "code\WorkInProgress\animusstation\atm.dm"
#include "code\WorkInProgress\Cael_Aislinn\power_monitor.dm"
#include "code\WorkInProgress\Cael_Aislinn\BirdMan\bird_transformation.dm"
#include "code\WorkInProgress\Cael_Aislinn\BirdMan\birdman.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_field.dm"

View File

@@ -108,8 +108,8 @@ Filter types:
else
filtered_out = null
filtered_out.update_values()
if(filtered_out)
filtered_out.update_values()
air2.merge(filtered_out)
air3.merge(removed)

View File

@@ -466,6 +466,8 @@ datum
//Outputs: 0 if the self-check failed (local airgroup breaks?)
// then -1 if sharer-check failed (sharing airgroup breaks?)
// then 1 if both checks pass (share succesful?)
if(!istype(sharer))
return
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/TRANSFER_FRACTION
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/TRANSFER_FRACTION
@@ -552,6 +554,10 @@ datum
//Inputs: Air datum to share with
//Outputs: Amount of gas exchanged (Negative if lost air, positive if gained.)
if(!istype(sharer))
return
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/TRANSFER_FRACTION
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/TRANSFER_FRACTION
var/delta_nitrogen = QUANTIZE(nitrogen_archived - sharer.nitrogen_archived)/TRANSFER_FRACTION

View File

@@ -378,25 +378,24 @@ turf
enemy_tile.consider_pressure_difference(connection_difference, direction)
else
air_master.active_singletons -= src //not active if not processing!
if(air)
air.react()
air.react()
if(active_hotspot)
if (!active_hotspot.process(possible_fire_spreads))
return 0
if(active_hotspot)
if (!active_hotspot.process(possible_fire_spreads))
return 0
if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
consider_superconductivity(starting = 1)
if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
consider_superconductivity(starting = 1)
if(air.check_tile_graphic())
update_visuals(air)
if(air.check_tile_graphic())
update_visuals(air)
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
// reset_delay() //hotspots always process quickly
hotspot_expose(air.temperature, CELL_VOLUME)
for(var/atom/movable/item in src)
item.temperature_expose(air, air.temperature, CELL_VOLUME)
temperature_expose(air, air.temperature, CELL_VOLUME)
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
hotspot_expose(air.temperature, CELL_VOLUME)
for(var/atom/movable/item in src)
item.temperature_expose(air, air.temperature, CELL_VOLUME)
temperature_expose(air, air.temperature, CELL_VOLUME)
return 1

View File

@@ -0,0 +1,107 @@
/mob/aiEye
var/list/visibleCameraChunks = list()
var/mob/ai = null
density = 0
/mob/living/silicon/ai/var/mob/aiEye/eyeobj = new()
/mob/living/silicon/ai/New()
..()
eyeobj.ai = src
spawn(20)
freelook()
/mob/living/silicon/ai/death(gibbed)
if(client && client.eye == eyeobj)
for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
c.remove(eyeobj)
client.eye = src
return ..(gibbed)
/mob/living/silicon/ai/verb/freelook()
set category = "AI Commands"
set name = "freelook"
current = null //cancel camera view first, it causes problems
cameraFollow = null
if(!eyeobj) //if it got deleted somehow (like an admin trying to fix things <.<')
eyeobj = new()
eyeobj.ai = src
client.eye = eyeobj
eyeobj.loc = loc
cameranet.visibility(eyeobj)
/mob/aiEye/Move()
. = ..()
if(.)
cameranet.visibility(src)
/client/AIMove(n, direct, var/mob/living/silicon/ai/user)
if(eye == user.eyeobj)
user.eyeobj.loc = get_step(user.eyeobj, direct)
cameranet.visibility(user.eyeobj)
else
return ..()
/turf/move_camera_by_click()
if(istype(usr, /mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = usr
if(AI.client.eye == AI.eyeobj)
return
return ..()
/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
if (user != src)
return
if (stat == 2)
return
var/list/L = list()
for (var/obj/machinery/camera/C in world)
L.Add(C)
camera_sort(L)
L = camera_network_sort(L)
var/list/D = list()
for (var/obj/machinery/camera/C in L)
if ( C.network in src.networks )
D[text("[]: [][]", C.network, C.c_tag, (C.status ? null : " (Deactivated)"))] = C
D["Cancel"] = "Cancel"
var/t = input(user, "Which camera should you change to?") as null|anything in D
if (!t || t == "Cancel")
return 0
var/obj/machinery/camera/C = D[t]
eyeobj.loc = C.loc
cameranet.visibility(eyeobj)
return
/mob/living/silicon/ai/cancel_camera()
set name = "Cancel Camera View"
set category = "OOC"
reset_view(null)
machine = null
/mob/living/silicon/ai/reset_view(atom/A)
if (client)
if(!eyeobj)
eyeobj = new()
eyeobj.ai = src
client.eye = eyeobj
client.perspective = EYE_PERSPECTIVE
if (istype(A, /atom/movable))
eyeobj.loc = locate(A.x, A.y, A.z)
else
eyeobj.loc = locate(src.x, src.y, src.z)
cameranet.visibility(eyeobj)

View File

@@ -0,0 +1,156 @@
//------------------------------------------------------------
//
// The Cameranet
//
// The cameranet is a single global instance of a unique
// datum, which contains logic for managing the individual
// chunks.
//
//------------------------------------------------------------
/datum/cameranet
var/list/cameras = list()
var/list/chunks = list()
var/network = "net1"
var/ready = 0
var/list/minimap = list()
var/generating_minimap = TRUE
var/datum/cameranet/cameranet = new()
/datum/cameranet/New()
..()
spawn(100)
init_minimap()
/datum/cameranet/proc/init_minimap()
for(var/x = 0, x <= world.maxx, x += 16)
for(var/y = 0, y <= world.maxy, y += 16)
sleep(1)
getCameraChunk(x, y, 5)
getCameraChunk(x, y, 1)
generating_minimap = FALSE
/datum/cameranet/proc/chunkGenerated(x, y, z)
var/key = "[x],[y],[z]"
return key in chunks
/datum/cameranet/proc/getCameraChunk(x, y, z)
var/key = "[x],[y],[z]"
if(!(key in chunks))
chunks[key] = new /datum/camerachunk(null, x, y, z)
return chunks[key]
// This proc updates what chunks are considered seen
// by an aiEye. As part of the process, it will force
// any newly visible chunks with pending unscheduled
// updates to update, and show the correct obscuring
// and dimming image sets. If you do not call this
// after the eye has moved, it may result in the
// affected AI gaining (partial) xray, seeing through
// now-closed doors, not seeing through open doors,
// or other visibility oddities, depending on if/when
// they last visited any of the chunks in the nearby
// area.
// It must be called manually, as there is no way to
// have a proc called automatically every time an
// object's loc changes.
/datum/cameranet/proc/visibility(mob/aiEye/ai)
var/x1 = max(0, ai.x - 16) & ~0xf
var/y1 = max(0, ai.y - 16) & ~0xf
var/x2 = min(world.maxx, ai.x + 16) & ~0xf
var/y2 = min(world.maxy, ai.y + 16) & ~0xf
var/list/visibleChunks = list()
for(var/x = x1; x <= x2; x += 16)
for(var/y = y1; y <= y2; y += 16)
visibleChunks += getCameraChunk(x, y, ai.z)
var/list/remove = ai.visibleCameraChunks - visibleChunks
var/list/add = visibleChunks - ai.visibleCameraChunks
for(var/datum/camerachunk/c in remove)
c.remove(ai)
for(var/datum/camerachunk/c in add)
c.add(ai)
// This proc should be called if a turf, or the contents
// of a turf, changes opacity. This includes such things
// as changing the turf, opening or closing a door, or
// anything else that would alter line of sight in the
// general area.
/datum/cameranet/proc/updateVisibility(turf/loc)
if(!chunkGenerated(loc.x & ~0xf, loc.y & ~0xf, loc.z))
return
var/datum/camerachunk/chunk = getCameraChunk(loc.x & ~0xf, loc.y & ~0xf, loc.z)
chunk.visibilityChanged(loc)
// This proc updates all relevant chunks when enabling or
// creating a camera, allowing freelook and the minimap to
// respond correctly.
/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
var/x1 = max(0, c.x - 16) & ~0xf
var/y1 = max(0, c.y - 16) & ~0xf
var/x2 = min(world.maxx, c.x + 16) & ~0xf
var/y2 = min(world.maxy, c.y + 16) & ~0xf
for(var/x = x1; x <= x2; x += 16)
for(var/y = y1; y <= y2; y += 16)
if(chunkGenerated(x, y, c.z))
var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
if(!(c in chunk.cameras))
chunk.cameras += c
chunk.hasChanged()
// This proc updates all relevant chunks when disabling or
// deleting a camera, allowing freelook and the minimap to
// respond correctly.
/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
var/x1 = max(0, c.x - 16) & ~0xf
var/y1 = max(0, c.y - 16) & ~0xf
var/x2 = min(world.maxx, c.x + 16) & ~0xf
var/y2 = min(world.maxy, c.y + 16) & ~0xf
for(var/x = x1; x <= x2; x += 16)
for(var/y = y1; y <= y2; y += 16)
if(chunkGenerated(x, y, c.z))
var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
if(!c)
chunk.hasChanged()
if(c in chunk.cameras)
chunk.cameras -= c
chunk.hasChanged()

View File

@@ -0,0 +1,221 @@
#define MINIMAP_UPDATE_DELAY 1200
/datum/camerachunk
var/list/turfs = list()
var/list/obscuredTurfs = list()
var/list/visibleTurfs = list()
var/list/dimTurfs = list()
var/list/obscured = list()
var/list/dim = list()
var/list/cameras = list()
var/list/seenby = list()
var/changed = 1
var/updating = 0
var/minimap_updating = 0
var/x
var/y
var/z
var/icon/minimap_icon = new('minimap.dmi', "chunk_base")
var/obj/minimap_obj/minimap_obj = new()
/datum/camerachunk/New(loc, x, y, z)
//Round X and Y down to a multiple of 16, if nessecary
src.x = x & ~0xF
src.y = y & ~0xF
src.z = z
rebuild_chunk()
// Completely re-calculate the whole chunk.
/datum/camerachunk/proc/rebuild_chunk()
for(var/mob/aiEye/eye in seenby)
if(!eye.ai)
seenby -= eye
continue
if(eye.ai.client)
eye.ai.client.images -= obscured
eye.ai.client.images -= dim
var/start = locate(x, y, z)
var/end = locate(min(x + 15, world.maxx), min(y + 15, world.maxy), z)
turfs = block(start, end)
dimTurfs = list()
visibleTurfs = list()
obscured = list()
dim = list()
cameras = list()
for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z)))
if(c.status)
cameras += c
for(var/obj/machinery/camera/c in cameras)
var/lum = c.luminosity
c.luminosity = 7
dimTurfs |= turfs & view(7, c)
visibleTurfs |= turfs & view(6, c)
c.luminosity = lum
obscuredTurfs = turfs - dimTurfs
dimTurfs -= visibleTurfs
for(var/turf/t in obscuredTurfs)
if(!t.obscured)
t.obscured = image('cameravis.dmi', t, "black", 15)
obscured += t.obscured
for(var/turf/t in dimTurfs)
if(!t.dim)
t.dim = image('cameravis.dmi', t, "dim", TURF_LAYER)
t.dim.mouse_opacity = 0
dim += t.dim
cameranet.minimap |= minimap_obj
for(var/mob/aiEye/eye in seenby)
if(eye.ai.client)
eye.ai.client.images |= obscured
eye.ai.client.images |= dim
/datum/camerachunk/proc/add(mob/aiEye/eye)
eye.visibleCameraChunks |= src
if(eye.ai.client)
eye.ai.client.images |= obscured
eye.ai.client.images |= dim
seenby |= eye
if(changed && !updating)
update()
changed = 0
/datum/camerachunk/proc/remove(mob/aiEye/eye)
eye.visibleCameraChunks -= src
if(eye.ai.client)
eye.ai.client.images -= obscured
eye.ai.client.images -= dim
seenby -= eye
/datum/camerachunk/proc/visibilityChanged(turf/loc)
if(!(loc in visibleTurfs))
return
hasChanged()
/datum/camerachunk/proc/hasChanged()
if(length(seenby) > 0)
if(!updating)
updating = 1
spawn(10)//Batch large changes, such as many doors opening or closing at once
update()
updating = 0
else
changed = 1
if(!minimap_updating)
minimap_updating = 1
spawn(MINIMAP_UPDATE_DELAY)
if(changed && !updating)
update()
changed = 0
update_minimap()
minimap_updating = 0
/datum/camerachunk/proc/update()
var/list/newDimTurfs = list()
var/list/newVisibleTurfs = list()
for(var/obj/machinery/camera/c in cameras)
var/lum = c.luminosity
c.luminosity = 7
newDimTurfs |= turfs & view(7, c)
newVisibleTurfs |= turfs & view(6, c)
c.luminosity = lum
var/list/dimAdded = newDimTurfs - dimTurfs
var/list/dimRemoved = dimTurfs - newDimTurfs
var/list/visAdded = newVisibleTurfs - visibleTurfs
var/list/visRemoved = visibleTurfs - newVisibleTurfs
visibleTurfs = newVisibleTurfs
dimTurfs = newDimTurfs
obscuredTurfs = turfs - dimTurfs
dimTurfs -= visibleTurfs
var/list/images_added = list()
var/list/images_removed = list()
for(var/turf/t in dimRemoved)
if(t.dim)
dim -= t.dim
images_removed += t.dim
if(!(t in visibleTurfs))
if(!t.obscured)
t.obscured = image('cameravis.dmi', t, "black", 15)
obscured += t.obscured
images_added += t.obscured
for(var/turf/t in dimAdded)
if(!(t in visibleTurfs))
if(!t.dim)
t.dim = image('cameravis.dmi', t, "dim", 15)
t.mouse_opacity = 0
dim += t.dim
images_added += t.dim
if(t.obscured)
obscured -= t.obscured
images_removed += t.obscured
for(var/turf/t in visAdded)
if(t.obscured)
obscured -= t.obscured
images_removed += t.obscured
for(var/turf/t in visRemoved)
if(t in obscuredTurfs)
if(!t.obscured)
t.obscured = image('cameravis.dmi', t, "black", 15)
obscured += t.obscured
images_added += t.obscured
for(var/mob/aiEye/eye in seenby)
if(eye.ai.client)
eye.ai.client.images -= images_removed
eye.ai.client.images |= images_added

View File

@@ -0,0 +1,137 @@
/client/var/minimap_view_z = 1
/obj/minimap_obj
var/datum/camerachunk/chunk
/obj/minimap_obj/Click(location, control, params)
if(!istype(usr, /mob/dead) && !istype(usr, /mob/living/silicon/ai) && !(usr.client && usr.client.holder && usr.client.holder.level >= 4))
return
var/list/par = params2list(params)
var/screen_loc = par["screen-loc"]
if(findtext(screen_loc, "minimap:") != 1)
return
screen_loc = copytext(screen_loc, length("minimap:") + 1)
var/x_text = copytext(screen_loc, 1, findtext(screen_loc, ","))
var/y_text = copytext(screen_loc, findtext(screen_loc, ",") + 1)
var/x = chunk.x
x += round((text2num(copytext(x_text, findtext(x_text, ":") + 1)) + 1) / 2)
var/y = chunk.y
y += round((text2num(copytext(y_text, findtext(y_text, ":") + 1)) + 1) / 2)
if(istype(usr, /mob/living/silicon/ai))
var/mob/living/silicon/ai/ai = usr
ai.freelook()
ai.eyeobj.loc = locate(max(1, x - 1), max(1, y - 1), usr.client.minimap_view_z)
cameranet.visibility(ai.eyeobj)
else
usr.loc = locate(max(1, x - 1), max(1, y - 1), usr.client.minimap_view_z)
/mob/dead/verb/Open_Minimap()
set category = "Ghost"
cameranet.show_minimap(client)
/mob/living/silicon/ai/verb/Open_Minimap()
set category = "AI Commands"
cameranet.show_minimap(client)
/client/proc/Open_Minimap()
set category = "Admin"
cameranet.show_minimap(src)
/mob/verb/Open_Minimap_Z()
set hidden = 1
if(!istype(src, /mob/dead) && !istype(src, /mob/living/silicon/ai) && !(client && client.holder && client.holder.level >= 4))
return
var/level = input("Select a Z level", "Z select", null) as null | anything in cameranet.minimap
if(level != null)
cameranet.show_minimap(client, level)
/datum/cameranet/proc/show_minimap(client/client, z_level = "z-1")
if(!istype(client.mob, /mob/dead) && !istype(client.mob, /mob/living/silicon/ai) && !(client.holder && client.holder.level >= 4))
return
if(z_level in cameranet.minimap)
winshow(client, "minimapwindow", 1)
for(var/key in cameranet.minimap)
client.screen -= cameranet.minimap[key]
client.screen |= cameranet.minimap[z_level]
if(cameranet.generating_minimap)
spawn(50)
show_minimap(client, z_level)
client.minimap_view_z = text2num(copytext(z_level, 3))
/datum/camerachunk/proc/update_minimap()
if(changed && !updating)
update()
minimap_icon.Blend(rgb(255, 0, 0), ICON_MULTIPLY)
var/list/turfs = visibleTurfs | dimTurfs
for(var/turf/turf in turfs)
var/x = (turf.x & 0xf) * 2
var/y = (turf.y & 0xf) * 2
if(turf.density)
minimap_icon.DrawBox(rgb(100, 100, 100), x + 1, y + 1, x + 2, y + 2)
continue
else if(istype(turf, /turf/space))
minimap_icon.DrawBox(rgb(0, 0, 0), x + 1, y + 1, x + 2, y + 2)
else
minimap_icon.DrawBox(rgb(200, 200, 200), x + 1, y + 1, x + 2, y + 2)
for(var/obj/structure/o in turf)
if(o.density)
if(istype(o, /obj/structure/window) && (o.dir == NORTH || o.dir == SOUTH || o.dir == EAST || o.dir == WEST))
if(o.dir == NORTH)
minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 2, x + 2, y + 2)
else if(o.dir == SOUTH)
minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 2, y + 1)
else if(o.dir == EAST)
minimap_icon.DrawBox(rgb(150, 150, 200), x + 3, y + 1, x + 2, y + 2)
else if(o.dir == WEST)
minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 1, y + 2)
else
minimap_icon.DrawBox(rgb(150, 150, 150), x + 1, y + 1, x + 2, y + 2)
break
for(var/obj/machinery/door/o in turf)
if(istype(o, /obj/machinery/door/window))
if(o.dir == NORTH)
minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 2, x + 2, y + 2)
else if(o.dir == SOUTH)
minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 1)
else if(o.dir == EAST)
minimap_icon.DrawBox(rgb(100, 150, 100), x + 2, y + 1, x + 2, y + 2)
else if(o.dir == WEST)
minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 1, y + 2)
else
minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 2)
break
minimap_obj.screen_loc = "minimap:[src.x / 16],[src.y / 16]"
minimap_obj.icon = minimap_icon

View File

@@ -0,0 +1,38 @@
/turf
var/image/obscured
var/image/dim
/turf/proc/visibilityChanged()
cameranet.updateVisibility(src)
/turf/New()
..()
cameranet.updateVisibility(src)
/obj/machinery/door/update_nearby_tiles(need_rebuild)
. = ..(need_rebuild)
cameranet.updateVisibility(loc)
/obj/machinery/camera/New()
..()
cameranet.addCamera(src)
/obj/machinery/camera/Del()
cameranet.removeCamera(src)
..()
/obj/machinery/camera/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
. = ..(W, user)
if(istype(W, /obj/item/weapon/wirecutters))
if(status)
cameranet.addCamera(src)
else
cameranet.removeCamera(src)
/proc/checkcameravis(atom/A)
for(var/obj/machinery/camera/C in view(A,7))
if(!C.status || C.stat == 2)
continue
return 1
return 0

View File

@@ -131,7 +131,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
radiation = 0
//update values
var/transfer_ratio = 50 / field_strength
var/transfer_ratio = field_strength / 50
major_radius = field_strength * 0.21875// max = 8.75
minor_radius = field_strength * 0.2125// max = 8.625
volume_covered = PI * major_radius * minor_radius * 2.5 * 2.5 * 2.5 * 7 * 7 * transfer_ratio
@@ -159,10 +159,12 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
var/datum/gas_mixture/plasma_captured = new /datum/gas_mixture()
//
plasma_captured.toxins = round(gas_covered.toxins * transfer_ratio)
//world << "\blue[plasma_captured.toxins] moles of plasma captured"
plasma_captured.temperature = gas_covered.temperature
//plasma_captured.update_values()
gas_covered.toxins -= plasma_captured.toxins
plasma_captured.update_values()
gas_covered.update_values()
//gas_covered.update_values()
//
held_plasma.merge(plasma_captured)
//
environment.merge(gas_covered)
@@ -187,7 +189,25 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
//if there is too much plasma in the field, lose some
/*if( held_plasma.toxins > (MOLES_CELLSTANDARD * 7) * (50 / field_strength) )
LosePlasma()*/
LosePlasma()
if(held_plasma.toxins > 1)
//lose a random amount of plasma back into the air, increased by the field strength (want to switch this over to frequency eventually)
var/loss_ratio = rand() * (0.05 + (0.05 * 50 / field_strength))
//world << "lost [loss_ratio*100]% of held plasma"
//
var/datum/gas_mixture/plasma_lost = new
plasma_lost.temperature = held_plasma.temperature
//
plasma_lost.toxins = held_plasma.toxins * loss_ratio
//plasma_lost.update_values()
held_plasma.toxins -= held_plasma.toxins * loss_ratio
//held_plasma.update_values()
//
environment.merge(plasma_lost)
radiation += loss_ratio * mega_energy * 0.1
mega_energy -= loss_ratio * mega_energy * 0.1
else
held_plasma.toxins = 0
//held_plasma.update_values()
//handle some reactants formatting
//helium-4 has no use at the moment, but a buttload of it is produced
@@ -293,30 +313,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
catcher.UpdateSize()
return changed
proc/LosePlasma()
if(held_plasma.toxins > 1)
//lose a random amount of plasma back into the air, increased by the field strength (want to switch this over to frequency eventually)
var/datum/gas_mixture/environment = loc.return_air()
var/loss_ratio = rand() * (0.05 + (0.05 * 50 / field_strength))
//world << "lost [loss_ratio*100]% of held plasma"
//
var/datum/gas_mixture/plasma_lost = new
plasma_lost.temperature = held_plasma.temperature
//
plasma_lost.toxins = held_plasma.toxins * loss_ratio
plasma_lost.update_values()
held_plasma.toxins -= held_plasma.toxins * loss_ratio
held_plasma.update_values()
//
environment.merge(plasma_lost)
radiation += loss_ratio * mega_energy * 0.1
mega_energy -= loss_ratio * mega_energy * 0.1
return 1
else
held_plasma.toxins = 0
held_plasma.update_values()
return 0
//the !!fun!! part
//reactions have to be individually hardcoded, see AttemptReaction() below this
proc/React()

View File

@@ -104,11 +104,11 @@
user.machine = null
user << browse(null, "window=fuel_injector")
return
var/t = "<B>Reactor Core Fuel Injector</B><BR>"
var/t = "<B>Reactor Core Fuel Injector</B><hr>"
t += "<b>Stage:</b> <font color=blue>[stage]</font><br>"
t += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];end_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];begin_injecting=1'>\[Enable\]</a>"]<br>"
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a>"
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a>"
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a><br>"
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a><br>"
/*
var/t = "<B>Reactor Core Fuel Control</B><BR>"
t += "Current fuel injection stage: [active_stage]<br>"
@@ -146,6 +146,7 @@
t += "</tr>"
t += "</table>"
*/
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=fuel_injector;size=500x800")
user.machine = src
@@ -178,26 +179,21 @@
for(var/reagent in owned_assembly_port.cur_assembly.rod_quantities)
//world << "checking [reagent]"
if(owned_assembly_port.cur_assembly.rod_quantities[reagent] > 0)
//world << " rods left: [owned_assembly_port.cur_assembly.rod_quantities[reagent]]]
//world << " rods left: [owned_assembly_port.cur_assembly.rod_quantities[reagent]]"
var/amount = owned_assembly_port.cur_assembly.rod_quantities[reagent] * fuel_usage
var/numparticles = round(amount * 1000)
if(numparticles < 1)
numparticles = 1
//world << " amount: [amount]"
//world << " numparticles: [numparticles]"
for(var/i=0, i<numparticles, i++)
var/obj/effect/accelerated_particle/particle = new(src.loc, src.dir)
particle.particle_type = reagent
particle.energy = 0
particle.icon_state = "particle_single"
particle.pixel_x = rand(-10,10)
particle.pixel_y = rand(-10,10)
var/extra_particles = round(rand(0, numparticles - i - 1))
//world << "[extra_particles + 1] [reagent] particles"
particle.additional_particles = extra_particles
particle.target = target_field
i += extra_particles
//world << "[reagent] particle injected"
//
var/obj/effect/accelerated_particle/particle = new/obj/effect/accelerated_particle(src.loc, src.dir)
particle.particle_type = reagent
particle.energy = 0
particle.icon_state = "particle"
particle.additional_particles = numparticles - 1
particle.target = target_field
//
owned_assembly_port.cur_assembly.rod_quantities[reagent] -= amount
amount_left += owned_assembly_port.cur_assembly.rod_quantities[reagent]
owned_assembly_port.cur_assembly.amount_depleted = amount_left / 300

View File

@@ -1,30 +1,35 @@
/mob/living/carbon/human/proc/Tajaraize()
if (monkeyizing)
return
for(var/obj/item/W in src)
drop_from_slot(W)
update_clothing()
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
overlays = list()
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
animation.icon_state = "blank"
animation.icon = 'mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
sleep(18)
//animation = null
var/mob/living/carbon/human/tajaran/O = new /mob/living/carbon/human/tajaran( loc )
del(animation)
del(O.organs)
O.organs = organs
for(var/name in O.organs)
for(var/name in O.organs) //Ensuring organ trasnfer
var/datum/organ/external/organ = O.organs[name]
organ.owner = O
for(var/obj/item/weapon/implant/implant in organ.implant)
implant.imp_in = O
for(var/obj/hud/H in contents) //Lets not get a duplicate hud
del(H)
for(var/named in vars) //Making them keep their crap.
if(istype(vars[named], /obj/item))
O.vars[named] = vars[named]
else if (named == "contents")
O.vars[named] = vars[named]
O.real_name = real_name
O.name = name
@@ -32,6 +37,7 @@
updateappearance(O,O.dna.uni_identity)
O.loc = loc
O.viruses = viruses
O.s_tone = s_tone
viruses = list()
for(var/datum/disease/D in O.viruses)
D.affected_mob = O
@@ -42,9 +48,14 @@
client.mob = O
if(mind)
mind.transfer_to(O)
del(O.stand_icon) //Force it to update.
del(O.lying_icon)
O.update_body()
O.update_face()
O.update_clothing()
spawn(1)
O.update_clothing()
O << "<B>You are now a Tajara.</B>"
spawn(0)//To prevent the proc from returning null.
del(src)

View File

@@ -9,7 +9,7 @@
universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans
taj_talk_understand = 1
voice_message = "mrowls"
examine_text = "one of the cat-like Tajarans."
examine_text = "one of the cat-like Tajarans"
/mob/living/carbon/human/tajaran/New()
var/g = "m"
@@ -28,7 +28,7 @@
..()
/mob/living/carbon/human/tajaran/update_clothing()
..()
// ..()
if (monkeyizing)
return
@@ -589,94 +589,3 @@
/mob/living/carbon/human/tajaran/co2overloadtime = null
/mob/living/carbon/human/tajaran/temperature_resistance = T0C+70
/* //This is silly. -- Erthilo
/mob/living/carbon/human/tajaran/Emissary/
unacidable = 1
var/aegis = 1
/mob/living/carbon/human/tajaran/Emissary/New()
..()
reagents.add_reagent("hyperzine", 5000) //From the dark, to the light, it's a supersonic flight!
// Gotta keep it going!
if (!(mutations & HULK))
mutations |= HULK
if (!(mutations & LASER))
mutations |= LASER
if (!(mutations & XRAY))
mutations |= XRAY
sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
see_in_dark = 8
see_invisible = 2
if (!(mutations & COLD_RESISTANCE))
mutations |= COLD_RESISTANCE
if (!(mutations & TK))
mutations |= TK
if(!(mutations & HEAL))
mutations |= HEAL
spawn(0)
while(src)
adjustBruteLoss(-10)
adjustToxLoss(-10)
adjustOxyLoss(-10)
adjustFireLoss(-10)
sleep(10)
/mob/living/carbon/human/tajaran/Emissary/ex_act()
return
/mob/living/carbon/human/tajaran/Emissary/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
if(istype(target , /obj/machinery/door/airlock))
if(target:locked)
target:locked = 0
if(!target:density)
return 1
if(target:operating > 0)
return
if(!ticker)
return 0
if(!target:operating)
target:operating = 1
target:animate("opening")
target:sd_SetOpacity(0)
sleep(10)
target:layer = 2.7
target:density = 0
target:update_icon()
target:sd_SetOpacity(0)
target:update_nearby_tiles()
target:operating = -1
user << "You force the door open, shearing the bolts and burning out the motor."
if(target:operating)
target:operating = -1
else if(istype(target , /obj/machinery/door/firedoor))
target:open()
/mob/living/carbon/human/tajaran/Emissary/Life()
..()
if (!(mutations & HULK))
mutations |= HULK
if((stat == 2) && aegis)
src.show_message("\red [src]'s eyes open suddenlly.", 3, "\red \"I gave a solemn vow to never die for long.\"", 2)
src.heal_overall_damage(9001,9001)
src.stat = 0
aegis = 0
*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,226 @@
//links to a power monitor computer and transmits the amount of energy in the associated powercable network
//uses the navbeacon sprite and transmits data via magic for now
/obj/machinery/powermonitor
icon = 'objects.dmi'
icon_state = "navbeacon0-f"
name = "power monitor"
desc = "A monitoring device used to track power in a cable network."
level = 1 // underfloor
layer = 2.5
anchored = 1
var/freq = 1427 // radio frequency
var/powernet_tag = "" //the text tag associated with this power monitor's network
var/open = 0 // true if cover is open
var/locked = 1 // true if controls are locked
var/list/codes // assoc. list of transponder codes
var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value"
req_access = list(access_engine)
New()
..()
var/turf/T = loc
hide(T.intact)
set_codes()
spawn(5) // must wait for map loading to finish
if(radio_controller)
radio_controller.add_object(src, freq, RADIO_POWER)
// set the transponder codes assoc list from codes_txt
proc/set_codes()
if(!codes_txt)
return
codes = new()
var/list/entries = dd_text2List(codes_txt, ";") // entries are separated by semicolons
for(var/e in entries)
var/index = findtext(e, "=") // format is "key=value"
if(index)
var/key = copytext(e, 1, index)
var/val = copytext(e, index+1)
codes[key] = val
else
codes[e] = "1"
// called when turf state changes
// hide the object if turf is intact
hide(var/intact)
invisibility = intact ? 101 : 0
updateicon()
// update the icon_state
proc/updateicon()
var/state="navbeacon[open]"
if(invisibility)
icon_state = "[state]-f" // if invisible, set icon to faded version
// in case revealed by T-scanner
else
icon_state = "[state]"
// look for a signal of the form "getpowerlevel"
// where X is any
// or the location
// or one of the set transponder keys
// if found, return a signal
receive_signal(datum/signal/signal)
var/request = signal.data["getpowermonitor"]
if(request && (request == "any" || request == powernet_tag) )
spawn(1)
post_signal()
// return a signal giving the power network energy level
proc/post_signal()
var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq)
if(!frequency) return
var/datum/signal/signal = new()
signal.source = src
signal.transmission_method = 1
signal.data["powerlevel"] = 1 //TODO
for(var/key in codes)
signal.data[key] = codes[key]
frequency.post_signal(src, signal, filter = RADIO_POWER)
attackby(var/obj/item/I, var/mob/user)
var/turf/T = loc
if(T.intact)
return // prevent intraction when T-scanner revealed
if(istype(I, /obj/item/weapon/screwdriver))
open = !open
user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.")
updateicon()
else if (istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
if(open)
if (src.allowed(user))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
else
user << "\red Access denied."
updateDialog()
else
user << "You must open the cover first!"
return
attack_ai(var/mob/user)
interact(user, 1)
attack_paw()
return
attack_hand(var/mob/user)
interact(user, 0)
proc/interact(var/mob/user, var/ai = 0)
var/turf/T = loc
if(T.intact)
return // prevent intraction when T-scanner revealed
if(!open && !ai) // can't alter controls if not open, unless you're an AI
user << "The monitor's control cover is closed."
return
var/dat = "<TT><B>Navigation Beacon</B><HR>"
if(locked && !ai)
dat += "<i>(swipe card to unlock controls)</i><BR>"
else if(!ai)
dat += "<i>(swipe card to lock controls)</i><BR>"
dat += "Frequency: "
if(!locked)
dat += "<A href='byond://?src=\ref[src];freq=-10'>-</A>"
dat += "<A href='byond://?src=\ref[src];freq=-2'>-</A>"
dat += "[format_frequency(freq)]"
if(!locked)
dat += "<A href='byond://?src=\ref[src];freq=2'>+</A>"
dat += "<A href='byond://?src=\ref[src];freq=10'>+</A>"
dat += "<hr>"
dat += "Power network tag: [powernet_tag ? powernet_tag : "(none)"]</A><BR>"
dat += "Transponder Codes:<UL>"
for(var/key in codes)
dat += "<LI>[key] ... [codes[key]]"
if(!locked)
dat += " <small><A href='byond://?src=\ref[src];edit=1;code=[key]'>(edit)</A>"
dat += " <A href='byond://?src=\ref[src];delete=1;code=[key]'>(delete)</A></small><BR>"
if(!locked)
dat += "<small><A href='byond://?src=\ref[src];add=1;'>(add new)</A></small><BR>"
dat += "<UL></TT>"
user << browse(dat, "window=powermonitor")
onclose(user, "powermonitor")
return
Topic(href, href_list)
..()
if (usr.stat)
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
if(open && !locked)
usr.machine = src
if (href_list["freq"])
freq = sanitize_frequency(freq + text2num(href_list["freq"]))
updateDialog()
else if(href_list["modifytag"])
var/newtag = input("Enter new power network tag", "Power Monitor", powernet_tag) as text|null
if(newtag)
powernet_tag = newtag
updateDialog()
else if(href_list["edit"])
var/codekey = href_list["code"]
var/newkey = input("Enter Transponder Code Key", "Power Monitor", codekey) as text|null
if(!newkey)
return
var/codeval = codes[codekey]
var/newval = input("Enter Transponder Code Value", "Power Monitor", codeval) as text|null
if(!newval)
newval = codekey
return
codes.Remove(codekey)
codes[newkey] = newval
updateDialog()
else if(href_list["delete"])
var/codekey = href_list["code"]
codes.Remove(codekey)
updateDialog()
else if(href_list["add"])
var/newkey = input("Enter New Transponder Code Key", "Power Monitor") as text|null
if(!newkey)
return
var/newval = input("Enter New Transponder Code Value", "Power Monitor") as text|null
if(!newval)
newval = "1"
return
if(!codes)
codes = new()
codes[newkey] = newval
updateDialog()

View File

@@ -21,7 +21,7 @@ log transactions
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
if(ishuman(user))
var/obj/item/weapon/card/id/user_id = src.scan_user(user)
if(istype(I,/obj/item/weapon/spacecash))
if(istype(I,/obj/item/weapon/money))
user_id.money += I:worth
del I
@@ -51,21 +51,21 @@ log transactions
//hueg switch for giving moneh out
switch(amount)
if(1)
new /obj/item/weapon/spacecash(loc)
new /obj/item/weapon/money(loc)
if(10)
new /obj/item/weapon/spacecash/c10(loc)
new /obj/item/weapon/money/c10(loc)
if(20)
new /obj/item/weapon/spacecash/c20(loc)
new /obj/item/weapon/money/c20(loc)
if(50)
new /obj/item/weapon/spacecash/c50(loc)
new /obj/item/weapon/money/c50(loc)
if(100)
new /obj/item/weapon/spacecash/c100(loc)
new /obj/item/weapon/money/c100(loc)
if(200)
new /obj/item/weapon/spacecash/c200(loc)
new /obj/item/weapon/money/c200(loc)
if(500)
new /obj/item/weapon/spacecash/c500(loc)
new /obj/item/weapon/money/c500(loc)
if(1000)
new /obj/item/weapon/spacecash/c1000(loc)
new /obj/item/weapon/money/c1000(loc)
else
usr << browse("You don't have that much money!<br/><a href=\"?src=\ref[src]\">Back</a>","window=atm")
return

View File

@@ -49,11 +49,19 @@
end = get_turf(locate(end.x+d,end.y,end.z))
dir = "h"
while (cur!=end)
var/can_place = 1
while (cur!=end && can_place)
if(cur.density == 1)
usr << "\blue You can't run [src] through a wall!"
return
can_place = 0
else
for(var/obj/O in cur)
if(O.density)
can_place = 0
break
cur = get_step_towards(cur,end)
if (!can_place)
usr << "\blue You can't run \the [src] through that!"
return
cur = start
var/tapetest = 0

View File

@@ -17,13 +17,13 @@ log transactions
idle_power_usage = 10
var
obj/item/weapon/card/id/card
obj/item/weapon/spacecash/cashes = list()
obj/item/weapon/money/cashes = list()
inserted = 0
accepted = 0
pincode = 0
attackby(var/obj/A, var/mob/user)
if(istype(A,/obj/item/weapon/spacecash))
if(istype(A,/obj/item/weapon/money))
cashes += A
user.drop_item()
A.loc = src
@@ -100,21 +100,21 @@ log transactions
card.money -= amount
switch(amount)
if(1)
new /obj/item/weapon/spacecash(loc)
new /obj/item/weapon/money(loc)
if(10)
new /obj/item/weapon/spacecash/c10(loc)
new /obj/item/weapon/money/c10(loc)
if(20)
new /obj/item/weapon/spacecash/c20(loc)
new /obj/item/weapon/money/c20(loc)
if(50)
new /obj/item/weapon/spacecash/c50(loc)
new /obj/item/weapon/money/c50(loc)
if(100)
new /obj/item/weapon/spacecash/c100(loc)
new /obj/item/weapon/money/c100(loc)
if(200)
new /obj/item/weapon/spacecash/c200(loc)
new /obj/item/weapon/money/c200(loc)
if(500)
new /obj/item/weapon/spacecash/c500(loc)
new /obj/item/weapon/money/c500(loc)
if(1000)
new /obj/item/weapon/spacecash/c1000(loc)
new /obj/item/weapon/money/c1000(loc)
else
user << "\red Error: Insufficient funds."
return
@@ -143,7 +143,7 @@ log transactions
if (usr.machine==src && get_dist(src, usr) <= 1 || istype(usr, /mob/living/silicon/ai))
if(href_list["eca"])
if(accepted)
for(var/obj/item/weapon/spacecash/M in cashes)
for(var/obj/item/weapon/money/M in cashes)
M.loc = loc
inserted = 0
if(!cashes)
@@ -154,6 +154,8 @@ log transactions
if(accepted)
card.money += inserted
inserted = 0
if(cashes)
cashes = null
if(href_list["lock"])
card = null
accepted = 0

View File

@@ -47,6 +47,7 @@
var/usewhitelist = 0
var/kick_inactive = 0 //force disconnect for inactive players
var/load_jobs_from_txt = 0
var/usealienwhitelist = 0
var/server
var/banappeals
@@ -233,6 +234,9 @@
if ("usewhitelist")
config.usewhitelist = 1
if ("usealienwhitelist")
config.usealienwhitelist = 1
if ("feature_object_spell_system")
config.feature_object_spell_system = 1

View File

@@ -392,6 +392,8 @@ client
//All BYOND links pass through client/Topic() FIRST and are then directed to [hsrc]/Topic() by the ..() call at the end.
client/Topic(href, href_list, hsrc)
file("topic_log") << "[time2text(world.realtime, "DDD MMM DD YYYY")] at [time2text(world.timeofday, "hh:mm:ss")], [ckey], \"[url_encode(href)]\""
sleep(10)
//search the href for script injection //This is a temporary measure
if( findtext(href,"<script",1,0) )

View File

@@ -842,15 +842,13 @@ proc/process_ghost_teleport_locs()
//Engineering
/area/engine
engineering
engine_smes
name = "Engineering SMES"
icon_state = "engine_smes"
requires_power = 0//This area only covers the batteries and they deal with their own power
engineering
name = "Engineering"
icon_state = "engine"
particle_accelerator
name = "Particle Accelerator"
icon_state = "engine_pa"
@@ -861,9 +859,8 @@ proc/process_ghost_teleport_locs()
engineering_break_room
name = "Engineering Breakroom"
icon_state = "engine_br"
icon_state = "engine_breakroom"
//new engine areas
control
name = "Engineering Control"
icon_state = "engine_control"
@@ -908,14 +905,52 @@ proc/process_ghost_teleport_locs()
name = "Engineering Foyer"
icon_state = "engine_foyer"
breakroom
name = "Engineering Break Room"
icon_state = "engine_breakroom"
core
name = "Engineering Core"
icon_state = "engine_core"
//reactor areas
reactor_core
name = "Reactor Core"
icon_state = "engine_core"
reactor_gas
name = "Reactor Gas Storage"
icon_state = "engine_atmos"
aux_control
name = "Reactor Auxiliary Control"
icon_state = "engine_aux"
turbine_control
name = "Turbine Control"
icon_state = "engine_turbine"
reactor_airlock
name = "Reactor Primary Entrance"
icon_state = "engine_airlock"
reactor_fuel_storage
name = "Reactor Fuel Storage"
icon_state = "engine_fuel"
reactor_fuel_ports
name = "Reactor Fuel Ports"
icon_state = "engine_port"
generators
name = "Generator Room"
icon_state = "engine_generators"
port_gyro_bay
name = "Port Gyrotron Bay"
icon_state = "engine_starboardgyro"
starboard_gyro_bay
name = "Starboard Gyrotron Bay"
icon_state = "engine_portgyro"
//Solars
/area/solar

View File

@@ -94,6 +94,7 @@ var
list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
list/admins = list( )
list/alien_whitelist = list( )
list/shuttles = list( )
list/reg_dna = list( )
// list/traitobj = list( )
@@ -229,3 +230,22 @@ var
// For FTP requests. (i.e. downloading runtime logs.)
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff.
// It turns out that /var/const can't handle lists, because lists use
// an initializer. Sigh. That's no reason that we shouldn't make
// actual "constant" lists explicit via naming convention and a
// separate location, though, so: below are all lists that should not
// ever be changed in code.
/var/global
AI_VERB_LIST = list(
/mob/living/silicon/ai/proc/ai_call_shuttle,
/mob/living/silicon/ai/proc/show_laws_verb,
/mob/living/silicon/ai/proc/ai_camera_track,
/mob/living/silicon/ai/proc/ai_alerts,
/mob/living/silicon/ai/proc/ai_camera_list,
/mob/living/silicon/ai/proc/ai_network_change,
/mob/living/silicon/ai/proc/ai_statuschange,
/mob/living/silicon/ai/proc/ai_hologram_change,
/mob/living/silicon/ai/proc/ai_roster,
)

View File

@@ -399,6 +399,10 @@
var/obj/screen/g_dither = null
var/obj/screen/blurry = null
var/list/darkMask = null
var/obj/screen/r_hand_hud_object = null
var/obj/screen/l_hand_hud_object = null
var/list/obj/screen/intent_small_hud_objects = null
var/show_intent_icons = 0
var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define!

View File

@@ -15,6 +15,33 @@
var/lasttry = 0
layer = 2.98
/obj/structure/closet/verb/open_close()
set name = "Open/Close"
set category = "Object"
set src in view(1)
if(!(usr))
return
if(!istype(src.loc, /turf) || usr.stat || usr.restrained() )
usr << "\red You can't interact with this!"
return
if(src.anchored)
usr << "\red You can't interact with this!"
return
if(istype(usr, /mob/living/silicon/robot))
src.attack_hand(usr)
return
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))
usr << "\red You can't interact with this!"
return
if(istype(usr, /mob/living/carbon/human))
src.attack_hand(usr)
if(istype(usr, /mob/living/carbon/alien))
src.attack_alien(usr)
if(istype(usr, /mob/living/carbon/monkey))
src.attack_paw(usr)
return
/obj/structure/closet/detective
name = "detective's closet"
desc = "Holds the detective's clothes while his coat rack is being repaired."
@@ -44,6 +71,8 @@
/obj/structure/closet/gmcloset
name = "formal closet"
desc = "It's a storage unit for formal clothing."
icon_state = "black"
icon_closed = "black"
/obj/structure/closet/emcloset
name = "emergency closet"
@@ -98,14 +127,20 @@
/obj/structure/closet/jcloset
name = "custodial closet"
desc = "It's a storage unit for janitorial clothes and gear."
icon_state = "mixed"
icon_closed = "mixed"
/obj/structure/closet/jcloset2
name = "cleaner's closet"
desc = "It's a storage unit for various cleaning items."
icon_state = "mixed"
icon_closed = "mixed"
/obj/structure/closet/lawcloset
name = "legal closet"
desc = "It's a storage unit for courtroom apparel and items."
icon_state = "blue"
icon_closed = "blue"
/obj/structure/closet/coffin
name = "coffin"
@@ -290,10 +325,10 @@
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/genetics_white
name = "genetics wardrobe"
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/robotics_black
name = "robotics wardrobe"
icon_state = "black"
icon_closed = "black"
/obj/structure/closet/wardrobe/medic_white
name = "doctor's wardrobe"
@@ -305,6 +340,11 @@
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/genetics_white
name = "genetics wardrobe"
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/nurse
name = "nurse's wardrobe"
icon_state = "white"

View File

@@ -127,8 +127,8 @@
desc = "Used to control blast doors."
icon_state = "lockdown"
circuit = "/obj/item/weapon/circuitboard/lockdown"
var/connected_doors[0][0]
var/department //each department has a hardcoded list of possible door networks
var/list/connected_doors
var/department //each department has a hardcoded list of possible door networks
/obj/machinery/computer/crew
name = "Crew monitoring computer"

View File

@@ -1044,11 +1044,12 @@
potency = 40
On_Consume()
if(!reagents.total_volume)
var/mob/M = usr
var/obj/item/weapon/corncob/W = new /obj/item/weapon/corncob( M )
M << "<span class='notice'>You chew on the corn, leaving nothing behind but a cob.</span>"
M.put_in_hand(W)
W.add_fingerprint(M)
var/mob/living/M = usr
if(M)
var/obj/item/weapon/corncob/W = new /obj/item/weapon/corncob( M )
M << "<span class='notice'>You chew on the corn, leaving nothing behind but a cob.</span>"
M.put_in_hand(W)
W.add_fingerprint(M)
New()
..()
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
@@ -2005,21 +2006,21 @@
New()
switch(rand(1,100))//(potency) //It wants to use the default potency instead of the new, so it was always 10. Will try to come back to this later - Cheridan
if(0 to 10)
new/obj/item/weapon/spacecash/(src.loc)
new/obj/item/weapon/money/(src.loc)
if(11 to 20)
new/obj/item/weapon/spacecash/c10(src.loc)
new/obj/item/weapon/money/c10(src.loc)
if(21 to 30)
new/obj/item/weapon/spacecash/c20(src.loc)
new/obj/item/weapon/money/c20(src.loc)
if(31 to 40)
new/obj/item/weapon/spacecash/c50(src.loc)
new/obj/item/weapon/money/c50(src.loc)
if(41 to 50)
new/obj/item/weapon/spacecash/c100(src.loc)
new/obj/item/weapon/money/c100(src.loc)
if(51 to 60)
new/obj/item/weapon/spacecash/c200(src.loc)
new/obj/item/weapon/money/c200(src.loc)
if(61 to 80)
new/obj/item/weapon/spacecash/c500(src.loc)
new/obj/item/weapon/money/c500(src.loc)
else
new/obj/item/weapon/spacecash/c1000(src.loc)
new/obj/item/weapon/money/c1000(src.loc)
spawn(5) //Workaround to keep harvesting from working weirdly.
del(src)

View File

@@ -264,7 +264,7 @@
icon_state = "wallet"
w_class = 2
can_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/money",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",
"/obj/item/device/flashlight/pen",
@@ -308,10 +308,10 @@
/obj/item/weapon/storage/wallet/random/New()
..()
var/item1_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
var/item1_type = pick( /obj/item/weapon/money/c10,/obj/item/weapon/money/c100,/obj/item/weapon/money/c1000,/obj/item/weapon/money/c20,/obj/item/weapon/money/c200,/obj/item/weapon/money/c50, /obj/item/weapon/money/c500)
var/item2_type
if(prob(50))
item2_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
item2_type = pick( /obj/item/weapon/money/c10,/obj/item/weapon/money/c100,/obj/item/weapon/money/c1000,/obj/item/weapon/money/c20,/obj/item/weapon/money/c200,/obj/item/weapon/money/c50, /obj/item/weapon/money/c500)
var/item3_type = pick( /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron )
spawn(2)

View File

@@ -113,7 +113,7 @@
desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars"
icon_state = "snack"
product_paths = "/obj/item/weapon/reagent_containers/food/snacks/candy;/obj/item/weapon/reagent_containers/food/drinks/dry_ramen;/obj/item/weapon/reagent_containers/food/snacks/chips;/obj/item/weapon/reagent_containers/food/snacks/sosjerky;/obj/item/weapon/reagent_containers/food/snacks/no_raisin;/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie;/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers"
// product_amounts = "10;10;10;10;10;10;10"
// product_amounts = "6;6;6;6;6;6;6"
product_prices = "1;1;1;1;1;1;1"
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_hidden = "/obj/item/weapon/reagent_containers/food/snacks/syndicake"

View File

@@ -158,9 +158,9 @@
name = "super compressed matter cartridge"
ammo = 30
/obj/item/weapon/spacecash
/obj/item/weapon/money
name = "stack of credits"
desc = "It's worth 1 credit."
desc = "A pile of 1 credit."
gender = PLURAL
icon = 'items.dmi'
icon_state = "spacecash"
@@ -172,90 +172,143 @@
throw_speed = 1
throw_range = 2
w_class = 1.0
var/currency
var/worth
var/split = 5
var/round = 0.01
var/access = list()
access = access_crate_cash
var/worth = 1
var/amount = 1
/obj/item/weapon/spacecash/c10
/obj/item/weapon/spacecash
New() // Just in case
spawn(1)
new/obj/item/weapon/money(loc)
del src
/obj/item/weapon/money/proc/updatedesc()
name = "stack of [currency]"
desc = "A pile of [worth] [currency]"
/obj/item/weapon/money/New(var/nloc, var/nworth=1,var/ncurrency = "credits")
if(!worth)
worth = nworth
if(!currency)
currency = ncurrency
split = round(worth/2,round)
updatedesc()
return ..(nloc)
/obj/item/weapon/money/c10
icon_state = "spacecash10"
access = access_crate_cash
desc = "It's worth 10 credits."
desc = "A pile of 10 credits."
worth = 10
/obj/item/weapon/spacecash/c20
/obj/item/weapon/money/c20
icon_state = "spacecash20"
access = access_crate_cash
desc = "It's worth 20 credits."
worth = 20
/obj/item/weapon/spacecash/c50
desc = "A pile of 20 credits."
/obj/item/weapon/money/c50
icon_state = "spacecash50"
access = access_crate_cash
desc = "It's worth 50 credits."
worth = 50
/obj/item/weapon/spacecash/c100
desc = "A pile of 50 credits."
/obj/item/weapon/money/c100
icon_state = "spacecash100"
access = access_crate_cash
desc = "It's worth 100 credits."
desc = "A pile of 100 credits."
worth = 100
/obj/item/weapon/spacecash/c200
/obj/item/weapon/money/c200
icon_state = "spacecash200"
access = access_crate_cash
desc = "It's worth 200 credits."
desc = "A pile of 200 credits."
worth = 200
/obj/item/weapon/spacecash/c500
/obj/item/weapon/money/c500
icon_state = "spacecash500"
access = access_crate_cash
desc = "It's worth 500 credits."
desc = "A pile of 500 credits."
worth = 500
/obj/item/weapon/spacecash/c1000
/obj/item/weapon/money/c1000
icon_state = "spacecash1000"
access = access_crate_cash
desc = "It's worth 1000 credits."
desc = "A pile of 1000 credits."
worth = 1000
/obj/item/weapon/spacecash/attack_self(var/mob/user)
var/dat = "<HEAD><TITLE>Space cash stack</TITLE></HEAD>"
dat += "Credit amount - [worth * amount]<br>"
dat += "<a href='?src=\ref[src];takemoney=1'>Take amount</a><br>"
user << browse(dat,"window=money")
/obj/item/weapon/spacecash/Topic(href, href_list)
if(href_list["takemoney"])
var/a = 1
a = input(usr,"How much you want take?") as num
if((a > src.amount) || (a < 0))
usr << "\red You don't have that many credits."
return
src.amount -= a
var/obj/item/weapon/spacecash/S
if(a <= 0)
return
switch(src.worth)
if(1)
S = new /obj/item/weapon/spacecash(get_turf(src))
if(10)
S = new /obj/item/weapon/spacecash/c10(get_turf(src))
if(20)
S = new /obj/item/weapon/spacecash/c20(get_turf(src))
if(50)
S = new /obj/item/weapon/spacecash/c50(get_turf(src))
if(100)
S = new /obj/item/weapon/spacecash/c100(get_turf(src))
if(200)
S = new /obj/item/weapon/spacecash/c200(get_turf(src))
if(500)
S = new /obj/item/weapon/spacecash/c500(get_turf(src))
if(1000)
S = new /obj/item/weapon/spacecash/c1000(get_turf(src))
S.amount = a
if(src.amount == 0)
del(src)
/obj/item/weapon/spacecash/attackby(var/obj/I, var/mob/user)
if(!I)
return
if(istype(I,src))
src.amount += I:amount
user << "You add [I:amount] credits to stack."
del(I)
/obj/item/weapon/money/attack_self(var/mob/user)
interact(user)
/obj/item/weapon/money/proc/interact(var/mob/user)
user.machine = src
var/dat
dat += "<BR>[worth] [currency]"
dat += "<BR>New pile:"
dat += "<A href='?src=\ref[src];sd=5'>-</a>"
dat += "<A href='?src=\ref[src];sd=1'>-</a>"
if(round<=0.1)
dat += "<A href='?src=\ref[src];sd=0.1'>-</a>"
if(round<=0.01)
dat += "<A href='?src=\ref[src];sd=0.01'>-</a>"
dat += "[split]"
if(round<=0.01)
dat += "<A href='?src=\ref[src];su=0.01'>+</a>"
if(round<=0.1)
dat += "<A href='?src=\ref[src];su=0.1'>+</a>"
dat += "<A href='?src=\ref[src];su=1'>+</a>"
dat += "<A href='?src=\ref[src];su=5'>+</a>"
dat += "<BR><A href='?src=\ref[src];split=1'>split</a>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/item/weapon/money/Topic(href, href_list)
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["su"])
var/samt = text2num(href_list["su"])
if(split+samt<worth)
split+=samt
if (href_list["sd"])
var/samt = text2num(href_list["sd"])
if(split-samt>0)
split-=samt
if(href_list["split"])
new /obj/item/weapon/money(get_turf(src),split,currency)
worth-=split
split = round(worth/2,round)
updatedesc()
src.add_fingerprint(usr)
src.updateUsrDialog()
for (var/mob/M in viewers(1, src.loc))
if (M.client && M.machine == src)
src.attack_self(M)
return
/obj/item/weapon/money/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/money))
var/mob/living/carbon/c = user
if(!uppertext(I:currency)==uppertext(currency))
c<<"You can't mix currencies!"
return ..()
else
worth+=I:worth
c<<"You combine the piles."
updatedesc()
del I
return ..()
/obj/item/device/mass_spectrometer

View File

@@ -170,10 +170,10 @@
thermal_conductivity = 0
opacity = 0
name = "Heat Shielding"
icon = 'thermal.dmi'
icon_state = "thermal"
heat_capacity = 625000 //twice the cap of a normal wall
walltype = "heatshield"
walltype = "thermal"
blocks_air = 1
/turf/simulated/wall/cult
name = "wall"

View File

@@ -4,7 +4,7 @@ var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/an
// /obj/creature =0,
// /obj/item/weapon/rcd =0,
// /obj/item/weapon/rcd_ammo =0,
// /obj/item/weapon/spacecash =0,
// /obj/item/weapon/money =0,
// /obj/item/weapon/cloaking_device =1,
// /obj/item/weapon/gun/energy/teleport_gun =0,
// /obj/item/weapon/rubber_chicken =0,

View File

@@ -67,7 +67,7 @@
if ((O.client && !( O.blinded )))
O << "\red [src] has been scanned by [user] with the [W]"
else
if (!( istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) &&!(istype(W, /obj/item/weapon/cleaner)) &&!(istype(W, /obj/item/weapon/chemsprayer)) &&!(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) )
if (!( istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) &&!(istype(W, /obj/item/weapon/cleaner)) &&!(istype(W, /obj/item/weapon/chemsprayer)) &&!(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) && !(istype(W, /obj/item/weapon/reagent_containers/glass/rag)) )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << "\red <B>[src] has been hit by [user] with [W]</B>"
@@ -213,7 +213,8 @@
for(var/obj/effect/decal/cleanable/blood/B in T.contents)
if(!B.blood_DNA[M.dna.unique_enzymes])
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
B.virus2 += M.virus2
if(!B.virus2)
B.virus2 = M.virus2
for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = new D.type
B.viruses += newDisease
@@ -348,6 +349,7 @@
..()
return
/atom/Click(location,control,params)
//world << "atom.Click() on [src] by [usr] : src.type is [src.type]"
if(!istype(src,/obj/item/weapon/gun))
@@ -652,25 +654,6 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
if ( !animal.restrained() )
attack_animal(animal)
/atom/DblClick(location, control, params) //TODO: DEFERRED: REWRITE
// world << "checking if this shit gets called at all"
@@ -730,35 +713,44 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
// ------- SHIFT-CLICK -------
var/parameters = params2list(params)
if(params)
var/parameters = params2list(params)
if(parameters["shift"]){
if(!isAI(usr))
ShiftClick(usr)
else
AIShiftClick(usr)
return
}
if(parameters["shift"]){
if(!isAI(usr))
ShiftClick(usr)
else
AIShiftClick(usr)
return
}
// ------- ALT-CLICK -------
// ------- ALT-CLICK -------
if(parameters["alt"]){
if(!isAI(usr))
AltClick(usr)
else
AIAltClick(usr)
return
}
if(parameters["alt"]){
if(!isAI(usr))
AltClick(usr)
else
AIAltClick(usr)
return
}
// ------- CTRL-CLICK -------
// ------- CTRL-CLICK -------
if(parameters["ctrl"]){
if(!isAI(usr))
CtrlClick(usr)
else
AICtrlClick(usr)
return
}
if(parameters["ctrl"]){
if(!isAI(usr))
CtrlClick(usr)
else
AICtrlClick(usr)
return
}
// ------- MIDDLE-CLICK -------
if(parameters["middle"]){
if(!isAI(usr))
MiddleClick(usr)
return
}
// ------- THROW -------
if(usr.in_throw_mode)
@@ -1083,6 +1075,11 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
return
/atom/proc/MiddleClick(var/mob/M as mob) // switch hands
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/U = M
U.swap_hand()
/*
/atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return

View File

@@ -85,6 +85,8 @@
src.load_motd()
src.load_rules()
src.load_admins()
if (config.usealienwhitelist)
load_alienwhitelist()
if (config.usewhitelist)
load_whitelist()
LoadBansjob()

View File

@@ -132,6 +132,7 @@ var/const/RADIO_AIRLOCK = "6"
var/const/RADIO_SECBOT = "7"
var/const/RADIO_MULEBOT = "8"
var/const/RADIO_MAGNETS = "9"
var/const/RADIO_POWER = "10"
var/global/datum/controller/radio/radio_controller

View File

@@ -181,6 +181,30 @@
else
return null
/proc/getblockstring(input,block,subblock,blocksize)
var/string
var/subpos = 1 // keeps track of the current sub block
var/blockpos = 1 // keeps track of the current block
for(var/i = 1, i <= length(input), i++) // loop through each letter
var/pushstring = copytext(input, i, i+1)
if(subpos == subblock && blockpos == block) // if the current block/subblock is selected, mark it
pushstring = "</font color><b>[copytext(input, i, i+1)]</b><font color='blue'>"
string += pushstring // push the string to the return string
if(subpos >= blocksize) // add a line break for every block
string += " </font color><font color='#285B5B'>|</font color><font color='blue'> "
subpos = 0
blockpos++
subpos++
return string
/proc/getblock(input,blocknumber,blocksize)
var/result
result = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
@@ -777,6 +801,7 @@
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
src.occupant.update_clothing()
src.occupant = null
src.icon_state = "scanner_0"
return
@@ -1009,13 +1034,17 @@
////////////////////////////////////////////////////////
if (href_list["unimenu"])
//src.temphtml = text("Unique Identifier: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.uni_identity)
src.temphtml = text("Unique Identifier: <font color='blue'>[getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]</FONT><BR><BR>")
//src.temphtml = text("Unique Identifier: <font color='blue'>[getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]</FONT><BR><BR>")
// New way of displaying DNA blocks
src.temphtml = text("Unique Identifier: <font color='blue'>[getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3)]</FONT><br><br>")
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.uniblock)
src.temphtml += text("<A href='?src=\ref[];unimenuminus=1'><-</A> Block <A href='?src=\ref[];unimenuplus=1'>-></A><BR><BR>", src, src)
src.temphtml += text("Selected Sub-Block: <font color='blue'><B>[]</B></FONT><BR>", src.subblock)
src.temphtml += text("<A href='?src=\ref[];unimenusubminus=1'><-</A> Sub-Block <A href='?src=\ref[];unimenusubplus=1'>-></A><BR><BR>", src, src)
src.temphtml += "<B>Modify Block:</B><BR>"
src.temphtml += text("<A href='?src=\ref[];unipulse=1'>Radiation</A><BR>", src)
src.temphtml += text("<A href='?src=\ref[];unipulse=1'>Irradiate</A><BR>", src)
src.delete = 0
if (href_list["unimenuplus"])
if (src.uniblock < 13)
@@ -1091,14 +1120,19 @@
var/temp2 = ""
for(var/i = 3, i <= length(temp_string2), i += 3)
temp2 += copytext(temp_string2, i-2, i+1) + " "
src.temphtml = text("Structural Enzymes: <font color='blue'>[temp1] [src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)] [temp2]</FONT><BR><BR>")
//src.temphtml = text("Structural Enzymes: <font color='blue'>[temp1] [src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)] [temp2]</FONT><BR><BR>")
//src.temphtml = text("Structural Enzymes: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.struc_enzymes)
// New shit, it doesn't suck (as much)
src.temphtml = text("Structural Enzymes: <font color='blue'>[getblockstring(src.connected.occupant.dna.struc_enzymes,strucblock,subblock,3)]</FONT><br><br>")
// SE of occupant, selected block, selected subblock, block size (3 subblocks)
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.strucblock)
src.temphtml += text("<A href='?src=\ref[];strucmenuminus=1'><-</A> <A href='?src=\ref[];strucmenuchoose=1'>Block</A> <A href='?src=\ref[];strucmenuplus=1'>-></A><BR><BR>", src, src, src)
src.temphtml += text("Selected Sub-Block: <font color='blue'><B>[]</B></FONT><BR>", src.subblock)
src.temphtml += text("<A href='?src=\ref[];strucmenusubminus=1'><-</A> Sub-Block <A href='?src=\ref[];strucmenusubplus=1'>-></A><BR><BR>", src, src)
src.temphtml += "<B>Modify Block:</B><BR>"
src.temphtml += text("<A href='?src=\ref[];strucpulse=1'>Radiation</A><BR>", src)
src.temphtml += text("<A href='?src=\ref[];strucpulse=1'>Irradiate</A><BR>", src)
src.delete = 0
if (href_list["strucmenuplus"])
if (src.strucblock < 27)

View File

@@ -150,10 +150,10 @@ var/datum/roundinfo/roundinfo = new()
//initialise our cinematic screen object
cinematic = new(src)
cinematic.icon = 'station_explosion.dmi'
cinematic.icon_state = "start"
cinematic.icon_state = "station_intact"
cinematic.layer = 20
cinematic.mouse_opacity = 0
cinematic.screen_loc = "1,3" //TODO resize them
cinematic.screen_loc = "1,0"
var/obj/structure/stool/bed/temp_buckle = new(src)
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
@@ -179,63 +179,61 @@ var/datum/roundinfo/roundinfo = new()
//Now animate the cinematic
switch(station_missed)
if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation
sleep(50)
world << sound('explosionfar.ogg')
if(1) //nuke was nearby but (mostly) missed
if( mode && !override )
override = mode.name
switch( override )
if("nuclear emergency")
flick("start_nuke",cinematic)
sleep(50)
if("nuclear emergency") //Nuke wasn't on station when it blew up
flick("intro_nuke",cinematic)
sleep(35)
world << sound('explosionfar.ogg')
flick("explode2",cinematic)
cinematic.icon_state = "loss_nuke2"
flick("station_intact_fade_red",cinematic)
cinematic.icon_state = "summary_nukefail"
else
sleep(50)
flick("intro_nuke",cinematic)
sleep(35)
world << sound('explosionfar.ogg')
flick("explode2",cinematic)
//flick("end",cinematic)
if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation
sleep(50)
world << sound('explosionfar.ogg')
else //station was destroyed
if( mode && !override )
override = mode.name
switch( override )
if("nuclear emergency")
flick("start_nuke",cinematic)
sleep(50)
if("nuclear emergency") //Nuke Ops successfully bombed the station
flick("intro_nuke",cinematic)
sleep(35)
flick("station_explode_fade_red",cinematic)
world << sound('explosionfar.ogg')
cinematic.icon_state = "end"
flick("explode",cinematic)
cinematic.icon_state = "loss_nuke"
if("AI malfunction")
flick("start_malf",cinematic)
sleep(50)
cinematic.icon_state = "summary_nukewin"
if("AI malfunction") //Malf (screen,explosion,summary)
flick("intro_malf",cinematic)
sleep(76)
flick("station_explode_fade_red",cinematic)
world << sound('explosionfar.ogg')
cinematic.icon_state = "end"
flick("explode",cinematic)
cinematic.icon_state = "loss_malf"
if("blob")
flick("start_blob",cinematic) //TODO: make a blob one
sleep(50)
cinematic.icon_state = "summary_malf"
if("blob") //Station nuked (nuke,explosion,summary)
flick("intro_nuke",cinematic)
sleep(35)
flick("station_explode_fade_red",cinematic)
world << sound('explosionfar.ogg')
cinematic.icon_state = "end"
flick("explode",cinematic)
cinematic.icon_state = "loss_blob" //TODO: make a blob one
else
//default station-destroyed ending
sleep(50)
cinematic.icon_state = "summary_selfdes"
else //Station nuked (nuke,explosion,summary)
flick("intro_nuke",cinematic)
sleep(35)
flick("station_explode_fade_red", cinematic)
world << sound('explosionfar.ogg')
cinematic.icon_state = "end"
flick("explode",cinematic)
cinematic.icon_state = "loss_general"
sleep(100)
cinematic.icon_state = "summary_selfdes"
//If its actually the end of the round, wait for it to end.
//Otherwise if its a verb it will continue on afterwards.
sleep(300)
//Tidy-up time!
if(cinematic) del(cinematic) //end the cinematic
if(temp_buckle) del(temp_buckle) //release everybody
return

View File

@@ -1,54 +1,105 @@
#define ui_dropbutton "SOUTH-1,7"
#define ui_swapbutton "SOUTH-1,7"
#define ui_iclothing "SOUTH-1,2"
#define ui_oclothing "SOUTH,2"
//Lower left, persistant menu
#define ui_inventory "1:6,1:5"
//Inventory close areas. When you pass your mouse over these areas they close the inventory.
#define ui_invclosearea1 "1,1 to 1:6,5"
#define ui_invclosearea2 "1,1 to 4,1:16"
#define ui_invclosearea3 "4:16,1 to 5:16,5"
#define ui_invclosearea4 "1,5:16 to 4,5:16"
//Lower center, persistant menu
#define ui_id "4:12,1:5"
#define ui_belt "5:14,1:5"
#define ui_back "6:14,1:5"
#define ui_rhand "7:16,1:5"
#define ui_lhand "8:16,1:5"
#define ui_swaphand1 "7:16,2:5"
#define ui_swaphand2 "8:16,2:5"
#define ui_storage1 "9:18,1:5"
#define ui_storage2 "10:20,1:5"
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
#define ui_borg_store "9:14,1:5" //borgs
#define ui_monkey_mask "5:14,1:5" //monkey
#define ui_monkey_back "6:14,1:5" //monkey
//Lower right, persistant menu
#define ui_dropbutton "12:24,2:7"
#define ui_throw "13:26,2:7"
#define ui_pull "14:28,2:7"
#define ui_acti "12:24,1:5"
#define ui_movi "13:26,1:5"
#define ui_zonesel "14:28,1:5"
//Gun buttons
#define ui_gun1 "11:22,2:7"
#define ui_gun2 "10:20,2:7"
#define ui_gun3 "9:18,2:7"
#define ui_gun_select "11:22,1:5"
//Middle right (damage indicators)
#define ui_pressure "14:28,6:13"
#define ui_oxygen "14:28,7:15"
#define ui_fire "14:28,8:17"
#define ui_toxin "14:28,9:19"
#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator.
#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator.
//Upper right (status indicators)
#define ui_nutrition "11:22,15:-5"
#define ui_internal "12:24,15:-5"
#define ui_health "13:26,15:-5"
#define ui_temp "14:28,15:-5"
//Pop-up inventory
#define ui_shoes "1:6,2:7"
#define ui_iclothing "2:8,2:7"
#define ui_gloves "3:10,2:7"
#define ui_sstore1 "1:6,3:9"
#define ui_oclothing "2:8,3:9"
#define ui_glasses "3:10,3:9"
#define ui_mask "1:6,4:11"
#define ui_head "2:8,4:11"
#define ui_lear "3:10,4:11"
#define ui_rear "4:12,4:11"
//Intent small buttons
#define ui_help_small "12:8,1:1"
#define ui_disarm_small "12:15,1:18"
#define ui_grab_small "12:32,1:18"
#define ui_harm_small "12:39,1:1"
//#define ui_swapbutton "6:-16,1:5" //Unused
//#define ui_headset "SOUTH,8"
#define ui_rhand "SOUTH,1"
#define ui_lhand "SOUTH,3"
#define ui_id "SOUTH-1,1"
#define ui_mask "SOUTH+1,1"
#define ui_back "SOUTH+1,3"
#define ui_storage1 "SOUTH-1,4"
#define ui_storage2 "SOUTH-1,5"
#define ui_sstore1 "SOUTH+1,4"
#define ui_hstore1 "SOUTH+1,6"
#define ui_hand "6:14,1:5"
#define ui_hstore1 "5,5"
#define ui_resist "EAST+1,SOUTH-1"
#define ui_gloves "SOUTH,5"
#define ui_glasses "SOUTH+1,5"
#define ui_lear "SOUTH,7"
#define ui_rear "SOUTH,6"
#define ui_head "SOUTH+1,2"
#define ui_shoes "SOUTH,4"
#define ui_belt "SOUTH-1,3"
#define ui_throw "SOUTH-1,8"
#define ui_oxygen "EAST+1, NORTH-4"
#define ui_pressure "EAST+1, NORTH-5"
#define ui_toxin "EAST+1, NORTH-6"
#define ui_internal "EAST+1, NORTH-2"
#define ui_fire "EAST+1, NORTH-8"
#define ui_temp "EAST+1, NORTH-10"
#define ui_health "EAST+1, NORTH-11"
#define ui_nutrition "EAST+1, NORTH-12"
#define ui_pull "SOUTH-1,10"
#define ui_hand "SOUTH-1,6"
#define ui_sleep "EAST+1, NORTH-13"
#define ui_rest "EAST+1, NORTH-14"
#define ui_acti "SOUTH-1,12"
#define ui_movi "SOUTH-1,14"
#define ui_iarrowleft "SOUTH-1,11"
#define ui_iarrowright "SOUTH-1,13"
#define ui_inv1 "SOUTH-1,1"
#define ui_inv2 "SOUTH-1,2"
#define ui_inv3 "SOUTH-1,3"
#define ui_gun1 "SOUTH,8"
#define ui_gun2 "SOUTH,9"
#define ui_gun3 "SOUTH,10"
#define ui_gun_select "SOUTH-1,9"
@@ -68,6 +119,10 @@ obj/hud/New(var/type = 0)
if(mymob:r_ear) mymob:r_ear:screen_loc = ui_rear
if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1
if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses
if(mymob:w_uniform) mymob:w_uniform:screen_loc = ui_iclothing
if(mymob:wear_suit) mymob:wear_suit:screen_loc = ui_oclothing
if(mymob:wear_mask) mymob:wear_mask:screen_loc = ui_mask
if(mymob:head) mymob:head:screen_loc = ui_head
else
if(istype(mymob, /mob/living/carbon/human))
if(mymob:shoes) mymob:shoes:screen_loc = null
@@ -76,6 +131,10 @@ obj/hud/New(var/type = 0)
if(mymob:r_ear) mymob:r_ear:screen_loc = null
if(mymob:s_store) mymob:s_store:screen_loc = null
if(mymob:glasses) mymob:glasses:screen_loc = null
if(mymob:w_uniform) mymob:w_uniform:screen_loc = null
if(mymob:wear_suit) mymob:wear_suit:screen_loc = null
if(mymob:wear_mask) mymob:wear_mask:screen_loc = null
if(mymob:head) mymob:head:screen_loc = null
/obj/hud/var/show_otherinventory = 1

View File

@@ -487,8 +487,8 @@
/proc/get_all_jobs()
return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Chef", "Botanist", "Quartermaster", "Cargo Technician",
"Shaft Miner", "Janitor", "Librarian", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer",
"Atmospheric Technician", "Roboticist", "Chief Medical Officer", "Medical Doctor", "Geneticist",
"Research Director", "Scientist", "Chemist", "Head of Security", "Warden", "Detective", "Security Officer")
"Atmospheric Technician", "Roboticist", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist",
"Research Director", "Scientist", "Head of Security", "Warden", "Detective", "Security Officer")
/proc/get_all_centcom_jobs()
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")

View File

@@ -100,7 +100,7 @@
if(!H) return 0
H.equip_if_possible(new /obj/item/device/radio/headset/heads/qm(H), H.slot_ears)
H.equip_if_possible(new /obj/item/clothing/under/rank/cargo(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/shoes/black(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/clothing/shoes/brown(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/device/pda/quartermaster(H), H.slot_belt)
H.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(H), H.slot_glasses)
H.equip_if_possible(new /obj/item/weapon/clipboard(H), H.slot_r_store)

View File

@@ -80,7 +80,7 @@
H.equip_if_possible(new /obj/item/device/radio/headset/headset_medsci(H), H.slot_ears)
H.equip_if_possible(new /obj/item/clothing/under/rank/chemist(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/shoes/white(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/device/pda/toxins(H), H.slot_belt)
H.equip_if_possible(new /obj/item/device/pda/medical(H), H.slot_belt)
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/chemist(H), H.slot_wear_suit)
return 1

View File

@@ -14,3 +14,21 @@ var/list/whitelist
return ("[M.ckey]" in whitelist)
#undef WHITELISTFILE
proc/load_alienwhitelist()
var/text = file2text("config/alienwhitelist.txt")
if (!text)
diary << "Failed to load config/alienwhitelist.txt\n"
else
alien_whitelist = dd_text2list(text, "\n")
/proc/is_alien_whitelisted(mob/M, var/species)
if(!alien_whitelist)
return
if((M.client) && (M.client.holder) && (M.client.holder.level) && (M.client.holder.level >= 5))
return 1
if(M && species)
for (var/s in alien_whitelist)
if(findtext(s,"[M.ckey] - [species]"))
return 1
return 0

View File

@@ -130,7 +130,7 @@
sleep(40) //because we're sleeping another second after this (a few lines down)
continue
else if(client.eye == eyeobj)
if(client.eye == eyeobj)
if(checkcameravis(target))
eyeobj.loc = target.loc
sleep(50)
@@ -159,7 +159,7 @@
//check other cameras
var/obj/machinery/camera/closest = C
for(var/obj/machinery/camera/C2 in world)
if (C2.network == src.networks)
if (C2.network in src.networks)
if (C2.z == target.z)
zmatched = 1
if (C2.status)

View File

@@ -193,17 +193,19 @@
del(ghost) //Don't leave ghosts everywhere!!
if(!src.occupant.dna)
src.occupant.dna = new /datum/dna( )
src.occupant.dna = new /datum/dna()
if(ui)
src.occupant.dna.uni_identity = ui
updateappearance(src.occupant, ui)
if(se)
src.occupant.dna.struc_enzymes = se
randmutb(src.occupant) //Sometimes the clones come out wrong.
for(var/i = 0 to 5)
randmutb(src.occupant) //Sometimes the clones come out wrong.
src.occupant:update_face()
src.occupant:update_body()
src.occupant:mutantrace = mrace
src.occupant:suiciding = 0
occupant.brainloss = 100
src.attempting = 0
return 1

View File

@@ -371,6 +371,7 @@
"\red You hear a whine as \the [src]'s is hit by something dense.")
H.UpdateDamageIcon()
H.updatehealth()
H.update_clothing()
playsound(src.loc, 'tablehit1.ogg', 50, 1, -3)
else //Lets do REAL DAMAGE, YEAH!
G.affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been smashed on a table by [G.assailant.name] ([G.assailant.ckey])</font>")
@@ -409,6 +410,7 @@
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
H.update_clothing()
playsound(src.loc, 'tablehit1.ogg', 50, 1, -3)
return
G.affecting.loc = src.loc

View File

@@ -217,8 +217,9 @@
if(2)
dat += "<h4>Current records</h4>"
dat += "<a href='byond://?src=\ref[src];menu=1'>Back</a><br><br>"
for(var/datum/data/record/R in geneticsrecords)
dat += "<a href='byond://?src=\ref[src];view_rec=\ref[R]'>[R.fields["id"]]-[R.fields["name"]]</a><br>"
for(var/id in geneticsrecords)
var/datum/data/record/R = geneticsrecords[id]
dat += "<a href='byond://?src=\ref[src];view_rec=[id]'>[R.fields["id"]]-[R.fields["name"]]</a><br>"
if(3)
dat += "<h4>Selected Record</h4>"
@@ -250,7 +251,7 @@
dat += {"<b>UI:</b> [src.active_record.fields["UI"]]<br>
<b>SE:</b> [src.active_record.fields["SE"]]<br><br>"}
if(wantspod)
dat += "<a href='byond://?src=\ref[src];clone=\ref[src.active_record]'>Clone</a><br>"
dat += "<a href='byond://?src=\ref[src];clone=[src.active_record.fields["id"]]'>Clone</a><br>"
if(4)
if (!src.active_record)
@@ -281,7 +282,7 @@
src.scanner.locked = 0
else if (href_list["view_rec"])
src.active_record = locate(href_list["view_rec"])
src.active_record = geneticsrecords[href_list["view_rec"]]
if ((isnull(src.active_record.fields["ckey"])) || (src.active_record.fields["ckey"] == ""))
del(src.active_record)
src.temp = "ERROR: Record Corrupt"
@@ -299,7 +300,7 @@
var/obj/item/weapon/card/id/C = usr.equipped()
if (istype(C)||istype(C, /obj/item/device/pda))
if(src.check_access(C))
geneticsrecords.Remove(src.active_record)
geneticsrecords.Remove(active_record["id"])
del(src.active_record)
src.temp = "Record deleted."
src.menu = 2
@@ -359,10 +360,11 @@
src.updateUsrDialog()
else if (href_list["clone"])
var/datum/data/record/C = locate(href_list["clone"])
var/datum/data/record/C = geneticsrecords[href_list["clone"]]
//Look for that player! They better be dead!
if(C)
var/mob/selected = find_dead_player("[C.fields["ckey"]]")
selected << 'chime.ogg' //probably not the best sound but I think it's reasonable
var/answer = alert(selected,"Do you want to return to life?","Cloning","Yes","No")
if(answer == "No")
selected = null
@@ -371,7 +373,7 @@
src.temp = "Unable to initiate cloning cycle." // most helpful error message in THE HISTORY OF THE WORLD
else if (src.pod1.growclone(selected, C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"],C.fields["changeling"],C.fields["original"]))
src.temp = "Cloning cycle activated."
geneticsrecords.Remove(C)
geneticsrecords.Remove(C.fields["id"])
del(C)
src.menu = 1
@@ -438,7 +440,7 @@
if (!isnull(subject.mind)) //Save that mind so traitors can continue traitoring after cloning.
R.fields["mind"] = "\ref[subject.mind]"
geneticsrecords += R //Save it to the global scan list.
geneticsrecords["[copytext(md5(subject.real_name), 2, 6)]"] = R //Save it to the global scan list.
src.temp = "Subject successfully scanned."
//Find a specific record by key.

View File

@@ -418,10 +418,10 @@
usr << "You can't call the shuttle because you are dead!"
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
var/confirm = alert("Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "Yes", "No")
call_shuttle_proc(src)
if(confirm == "Yes")
call_shuttle_proc(src)
// hack to display shuttle timer
if(emergency_shuttle.online)

View File

@@ -7,14 +7,12 @@
desc = "Used to control blast doors."
icon_state = "lockdown"
circuit = "/obj/item/weapon/circuitboard/lockdown"
var/connectedDoorIds[0][0]
var/department = ""
var/connected_doors[0][0]
var/connected_doors[0][0]
var/connected_doors
var/department*/
New()
..()
connected_doors = new/list()
//only load blast doors for map-defined departments for the moment
//door networks are hardcoded here.
switch(department)
@@ -47,11 +45,15 @@
connected_doors.Add("Patient Room 2 Shutters")
connected_doors.Add("Patient Room 3 Shutters")
for(var/net in connected_doors)
connected_doors[net] = new/list()
world << "network: [net]"
//loop through the world, grabbing all the relevant doors
spawn(1)
for(var/obj/machinery/door/poddoor/D in world)
if(D.lockdownNetwork in connected_doors)
var/list/L = connected_doors[D.lockdownNetwork]
if(D.id in connected_doors)
var/list/L = connected_doors[D.id]
L.Add(D)
attack_ai(mob/user)
@@ -61,19 +63,46 @@
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
power_change()
if(stat & BROKEN)
icon_state = "broken"
else
if( powered() )
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "c_unpowered"
stat |= NOPOWER
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=lockdown")
return
var/t = "<B>Lockdown Control</B><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><hr>"
t += "<table border=1>"
var/empty = 1
for(var/curNetId in connected_doors)
var/list/L = connected_doors[curNetId]
if(!L || L.len == 0)
continue
empty = 0
t += "<tr>"
t += "<td><b>" + curNetId + "<b></td>"
t += "<td><b><a href='?src=\ref[src];open_net=[curNetId]'>Disable lockdown</a> / <a href='?src=\ref[src];close_net=[curNetId]'>Enable lockdown</a></b></td>"
t += "</tr>"
for(var/obj/machinery/door/poddoor/D in connected_doors[curNetId])
t += "<tr>"
if(istype(D,/obj/machinery/door/poddoor/shutters))
t += "<td> Shutter</td>"
else
t += "<td> Blast door</td>"
if(D.density)
//t += "<td><a href='?src=\ref[D];open=1'>Open</a> - Close</td>"
t += "Closed"
else
//t += "<td>Open - <a href='?src=\ref[D];close=1'>Close</a></td>"
t += "Open"
t += "</tr>"
t += "</table>"
if(empty)
t += "\red No networks connected.<br>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=lockdown;size=500x800")
onclose(user, "lockdown")
Topic(href, href_list)
..()
@@ -82,87 +111,40 @@
usr.machine = null
return
if( href_list["openDoor"] )
var/obj/machinery/door/poddoor/D = href_list["door"]
if(D.density)
D.open()
if( href_list["open_net"] )
var/netTag = href_list["open_net"]
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(D.density) //for some reason, there's no var saying whether the door is open or not >.>
spawn(0)
D.open()
src.updateDialog()
return
if( href_list["closeDoor"] )
var/obj/machinery/door/poddoor/D = href_list["door"]
if(!D.density)
D.close()
if( href_list["close_net"] )
var/netTag = href_list["close_net"]
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(!D.density)
spawn(0)
D.close()
src.updateDialog()
return
if( href_list["close_all"] )
if(href_list["networkTag"] == "all")
for(var/netTag in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(D.doorTag == href_list["doorTag"])
if(!D.density)
spawn(0)
D.close()
else if(href_list["networkTag"] in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[href_list["networkTag"]])
if(D.doorTag == href_list["doorTag"])
if(!D.density)
spawn(0)
D.close()
for(var/netTag in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(!D.density)
spawn(0)
D.close()
src.updateDialog()
return
if( href_list["open_all"] )
if(href_list["networkTag"] == "all")
for(var/netTag in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(D.doorTag == href_list["doorTag"])
if(D.density)
spawn(0)
D.open()
else if(href_list["networkTag"] in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[href_list["networkTag"]])
if(D.doorTag == href_list["doorTag"])
if(D.density)
spawn(0)
D.open()
for(var/netTag in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(D.density)
spawn(0)
D.open()
src.updateDialog()
return
if(href_list["update"])
src.updateDialog()
return
proc
interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=lockdown")
return
var/t = "<B>Lockdown Control</B><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
t += "<table border=1>"
for(var/curNetId in connected_doors)
var/list/L = connected_doors[curNetId]
if(L.len == 0)
continue
t += "<tr>"
t += "<td><b>" + curNetId + "<b></td>"
t += "<td><b><a href='?src=\ref[src];open_all=1;networkTag=[curNetId]'>Open All</a> / <a href='?src=\ref[src];close_all=1;networkTag=[curNetId]'>Close All</a></b></td>"
t += "</tr>"
for(var/obj/machinery/door/poddoor/D in connected_doors[curNetId])
if(D.id == curNetId )
t += "<tr>"
t += "<td> [D.networkTag]</td>"
if(D.density)
t += "<td><a href='?src=\ref[D];open=1'>Open</a> - Close</td>"
else
t += "<td>Open - <a href='?src=\ref[D];close=1'>Close</a></td>"
t += "</tr>"
t += "</table>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=lockdown;size=500x800")
onclose(user, "lockdown")
src.updateDialog()

View File

@@ -286,7 +286,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
return 0
use_power(50)
if(istype(src, /obj/machinery/door/airlock/glass))
playsound(src.loc, 'windowdoor.ogg', 30, 1)
playsound(src.loc, 'windowdoor.ogg', 100, 1)
else
playsound(src.loc, 'airlock.ogg', 30, 1)
if (src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density)
@@ -300,7 +300,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
..()
use_power(50)
if(istype(src, /obj/machinery/door/airlock/glass))
playsound(src.loc, 'windowdoor.ogg', 30, 1)
playsound(src.loc, 'windowdoor.ogg', 100, 1)
else
playsound(src.loc, 'airlock.ogg', 30, 1)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src))
@@ -1612,7 +1612,7 @@ About the new airlock wires panel:
name = "CentCom Secure Airlock"
desc = "I hope you have insulated gloves...."
icon = 'Doorhatchele.dmi'
var/list/mob/morons
var/list/mob/morons = list()
pulse(var/wireColor)
if(prob(25))

View File

@@ -3,10 +3,7 @@
desc = "A type of powerful blast door."
icon = 'rapid_pdoor.dmi'
icon_state = "pdoor1"
var/lockdownNetwork
var/doorTag
var/id = 1.0
var/networkTag = ""
var/id = ""
/obj/machinery/door/poddoor/Bumped(atom/AM)
if(!density)

View File

@@ -31,8 +31,8 @@ Possible to do for anyone motivated enough:
/*There are pretty much only three ways to interact here.
I don't need to check for client since they're clicking on an object.
This may change in the future but for now will suffice.*/
if(user.client.eye!=src)//Set client eye on the object if it's not already.
user.current = src
if(user.eyeobj.loc!=src.loc)//Set client eye on the object if it's not already.
user.eyeobj.loc = src.loc
user.reset_view(src)
else if(!hologram)//If there is no hologram, possibly make one.
activate_holo(user)
@@ -41,7 +41,7 @@ Possible to do for anyone motivated enough:
return
/obj/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user)
if(!(stat & NOPOWER)&&user.client.eye==src)//If the projector has power and client eye is on it.
if(!(stat & NOPOWER)&&user.eyeobj.loc==src.loc)//If the projector has power and client eye is on it.
if(!hologram)//If there is not already a hologram.
create_holo(user)//Create one.
for(var/mob/M in viewers())
@@ -91,7 +91,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram/holopad/process()
if(hologram)//If there is a hologram.
if(master&&!master.stat&&master.client&&master.client.eye==src)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
if(master&&!master.stat&&master.client&&master.eyeobj.loc==src.loc)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
if( !(get_dist(src,hologram.loc)>3||stat & NOPOWER) )//If the hologram is not out of bounds and the machine has power.
return 1
clear_holo()//If not, we want to get rid of the hologram.

View File

@@ -180,6 +180,7 @@
viewingcode.Add(usr)
winshow(usr, "Telecomms IDE", 1) // show the IDE
winset(usr, "tcscode", "is-disabled=true")
winset(editingcode, "tcscode", "text=\"\"")
var/showcode = dd_replacetext(storedcode, "\"", "\\\"")
winset(usr, "tcscode", "text=\"[showcode]\"")

View File

@@ -334,8 +334,22 @@
if(stat & BROKEN) return
if (istype(user, /mob/living/silicon))
return src.attack_hand(user)
if (istype(W, /obj/item/weapon/card/emag) && !emagged)
user << "\red You short out the turret controls' access analysis module."
emagged = 1
locked = 0
if(user.machine==src)
src.attack_hand(user)
return
else if( get_dist(src, user) == 0 ) // trying to unlock the interface
if (src.allowed(usr))
if(emagged)
user << "<span class='notice'>The turret control is unresponsive.</span>"
return
locked = !locked
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the panel.</span>"
if (locked)
@@ -344,7 +358,7 @@
user << browse(null, "window=turretid")
else
if (user.machine==src)
src.attack_hand(usr)
src.attack_hand(user)
else
user << "<span class='warning'>Access denied.</span>"

View File

@@ -562,6 +562,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
R.word2 = w2
R.word3 = w3
R.check_icon()
if(!R.blood_DNA)
R.blood_DNA = list()
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
return
else

View File

@@ -985,6 +985,12 @@
occupant_message("<font color=\"red\"><B>The sleeper is already occupied!</B></font>")
return
target.forceMove(src)
if(target.buckled)
var/obj/structure/stool/bed/S = target.buckled
target.buckled = null
target.anchored = 0
target.lying = 0
S.buckled_mob = null
occupant = target
target.reset_view(src)
/*

View File

@@ -1,3 +1,5 @@
//UNTICKED DUE TO BUGGY SHIT
/obj/effect/biomass
icon = 'biomass.dmi'
icon_state = "stage1"

View File

@@ -168,6 +168,10 @@
return
/obj/structure/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(istype(O, /obj/screen) || istype(O, /obj/hud)) //fix for HUD elements making their way into the world -Pete
return
if(O.loc == user)
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
@@ -182,7 +186,7 @@
return
step_towards(O, src.loc)
if(user != O)
user.show_viewers(text("\red [] stuffs [] into []!", user, O, src))
user.show_viewers("\red [user] stuffs [O] into [src]!")
src.add_fingerprint(user)
return

View File

@@ -65,17 +65,17 @@
/obj/structure/closet/secure_closet/money_freezer/New()
..()
sleep(2)
new /obj/item/weapon/spacecash/c1000(src)
new /obj/item/weapon/spacecash/c1000(src)
new /obj/item/weapon/spacecash/c1000(src)
new /obj/item/weapon/spacecash/c500(src)
new /obj/item/weapon/spacecash/c500(src)
new /obj/item/weapon/spacecash/c500(src)
new /obj/item/weapon/spacecash/c500(src)
new /obj/item/weapon/spacecash/c500(src)
new /obj/item/weapon/spacecash/c200(src)
new /obj/item/weapon/spacecash/c200(src)
new /obj/item/weapon/spacecash/c200(src)
new /obj/item/weapon/spacecash/c200(src)
new /obj/item/weapon/spacecash/c200(src)
new /obj/item/weapon/money/c1000(src)
new /obj/item/weapon/money/c1000(src)
new /obj/item/weapon/money/c1000(src)
new /obj/item/weapon/money/c500(src)
new /obj/item/weapon/money/c500(src)
new /obj/item/weapon/money/c500(src)
new /obj/item/weapon/money/c500(src)
new /obj/item/weapon/money/c500(src)
new /obj/item/weapon/money/c200(src)
new /obj/item/weapon/money/c200(src)
new /obj/item/weapon/money/c200(src)
new /obj/item/weapon/money/c200(src)
new /obj/item/weapon/money/c200(src)

View File

@@ -12,7 +12,7 @@
..()
sleep(2)
new /obj/item/clothing/under/rank/cargotech(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/weapon/cartridge/quartermaster(src)
@@ -21,6 +21,12 @@
/obj/structure/closet/secure_closet/qm_personal
name = "Quartermaster's Locker"
req_access = list(access_qm)
icon_state = "secureqm1"
icon_closed = "secureqm"
icon_locked = "secureqm1"
icon_opened = "secureqmopen"
icon_broken = "secureqmbroken"
icon_off = "secureqmoff"
New()
..()

View File

@@ -1,12 +1,12 @@
/obj/structure/closet/secure_closet/engineering_chief
name = "Chief Engineer's Locker"
req_access = list(access_ce)
icon_state = "secureeng1"
icon_closed = "secureeng"
icon_locked = "secureeng1"
icon_opened = "toolclosetopen"
icon_broken = "secureengbroken"
icon_off = "secureengoff"
icon_state = "securece1"
icon_closed = "securece"
icon_locked = "securece1"
icon_opened = "secureceopen"
icon_broken = "securecebroken"
icon_off = "secureceoff"
New()
@@ -99,7 +99,7 @@
icon_state = "secureeng1"
icon_closed = "secureeng"
icon_locked = "secureeng1"
icon_opened = "toolclosetopen"
icon_opened = "secureengopen"
icon_broken = "secureengbroken"
icon_off = "secureengoff"

View File

@@ -52,7 +52,7 @@
/obj/structure/closet/secure_closet/doctor_personal
name = "Doctor's Locker"
name = "Medical Doctor's Locker"
req_access = list(access_medical)
icon_state = "securemed1"
icon_closed = "securemed"
@@ -185,12 +185,12 @@
/obj/structure/closet/secure_closet/chemical
name = "Chemical Closet"
desc = "Store dangerous chemicals in here."
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
icon_opened = "securemedopen"
icon_broken = "securemedbroken"
icon_off = "securemedoff"
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_medical)

View File

@@ -1,5 +1,5 @@
/obj/structure/closet/secure_closet/RD
name = "Research Director"
name = "Research Director's Locker"
req_access = list(access_rd)
icon_state = "rdsecure1"
icon_closed = "rdsecure"

View File

@@ -1,5 +1,5 @@
/obj/structure/closet/secure_closet/captains
name = "Captain's Closet"
name = "Captain's Locker"
req_access = list(access_captain)
icon_state = "capsecure1"
icon_closed = "capsecure"
@@ -29,7 +29,7 @@
/obj/structure/closet/secure_closet/hop
name = "Head of Personnel"
name = "Head of Personnel's Locker"
req_access = list(access_hop)
icon_state = "hopsecure1"
icon_closed = "hopsecure"
@@ -58,7 +58,7 @@
/obj/structure/closet/secure_closet/hos
name = "Head Of Security"
name = "Head of Security's Locker"
req_access = list(access_hos)
icon_state = "hossecure1"
icon_closed = "hossecure"
@@ -118,7 +118,7 @@
/obj/structure/closet/secure_closet/security
name = "Security Locker"
name = "Security Officer's Locker"
req_access = list(access_security)
icon_state = "sec1"
icon_closed = "sec"
@@ -154,7 +154,7 @@
/obj/structure/closet/secure_closet/detective
name = "Detective"
name = "Detective's Cabinet"
req_access = list(access_forensics_lockers)
icon_state = "cabinetdetective_locked"
icon_closed = "cabinetdetective"

View File

@@ -146,6 +146,27 @@ obj/structure/closet/wardrobe/hop/New()
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
return
/obj/structure/closet/wardrobe/robotics_black/New()
new /obj/item/clothing/under/rank/roboticist(src)
new /obj/item/clothing/under/rank/roboticist(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
return
/obj/structure/closet/wardrobe/chemistry_white/New()
new /obj/item/clothing/under/rank/chemist(src)
new /obj/item/clothing/under/rank/chemist(src)
new /obj/item/clothing/under/rank/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
/obj/structure/closet/wardrobe/genetics_white/New()
new /obj/item/clothing/under/rank/geneticist(src)
@@ -158,6 +179,20 @@ obj/structure/closet/wardrobe/hop/New()
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
/obj/structure/closet/wardrobe/virology_white/New()
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
/obj/structure/closet/wardrobe/grey/New()
new /obj/item/clothing/under/color/grey(src)
new /obj/item/clothing/under/color/grey(src)
@@ -194,16 +229,6 @@ obj/structure/closet/wardrobe/hop/New()
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/shoes/brown(src)
/obj/structure/closet/wardrobe/chemistry_white/New()
new /obj/item/clothing/under/rank/chemist(src)
new /obj/item/clothing/under/rank/chemist(src)
new /obj/item/clothing/under/rank/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
/obj/structure/closet/wardrobe/medic_white/New()
new /obj/item/clothing/under/rank/medical(src)
@@ -331,15 +356,3 @@ obj/structure/closet/wardrobe/hop/New()
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
/obj/structure/closet/wardrobe/virology_white/New()
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)

View File

@@ -542,7 +542,7 @@
return
tnote += "<i><b>&rarr; To [P.owner]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a>:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
// Give every ghost the ability to see all messages
for (var/mob/dead/observer/G in world)
@@ -559,6 +559,9 @@
playsound(P.loc, 'twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
O.show_message(text("\icon[P] *[P.ttone]*"))
if( P.loc && ishuman(P.loc) )
var/mob/living/carbon/human/H = P.loc
H << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
P.overlays = null
P.overlays += image('pda.dmi', "pda-r")
@@ -709,7 +712,7 @@
honkamt--
playsound(loc, 'bikehorn.ogg', 30, 1)
if(U.machine == src && !href_list["pAI_mess"])//Final safety.
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
else
U.machine = null

View File

@@ -466,7 +466,7 @@ Code:
else
for(var/obj/machinery/bot/mulebot/B in QC.botlist)
menu += "<A href='byond://?src=\ref[QC];op=control;bot=\ref[B]'>[B] at [B.loc.loc]</A><BR>"
menu += "<A href='byond://?src=\ref[QC];op=control;bot=\ref[B]'>[B] at [get_area(B)]</A><BR>"
menu += "<BR><A href='byond://?src=\ref[QC];op=scanbots'><img src=pda_scanner.png> Scan for active bots</A><BR>"

View File

@@ -8,6 +8,7 @@
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
user.drop_item()
src.layer = 5
user.update_clothing()
add_fingerprint(user)
return

View File

@@ -70,6 +70,41 @@
src.loc = T
obj/item/verb/pick_up()
set name = "Pick Up"
set category = "Object"
set src in view(1)
if(!(usr))
return
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
usr << "\red You can't pick things up!"
return
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
usr << "\red You can't pick things up!"
return
if(src.anchored) //Object isn't anchored
usr << "\red You can't pick that up!"
return
if(!usr.hand && usr.r_hand) //Right hand is not full
usr << "\red Your right hand is full."
return
if(usr.hand && usr.l_hand) //Left hand is not full
usr << "\red Your left hand is full."
return
if(!istype(src.loc, /turf)) //Object is on a turf
usr << "\red You can't pick that up!"
return
//All checks are done, time to pick it up!
if(istype(usr, /mob/living/carbon/human))
src.attack_hand(usr)
if(istype(usr, /mob/living/carbon/alien))
src.attack_alien(usr)
if(istype(usr, /mob/living/carbon/monkey))
src.attack_paw(usr)
return
/obj/item/examine()
set src in view()

View File

@@ -56,7 +56,7 @@ RSF
if (istype(A, /obj/structure/table) && matter >= 1)
user << "Dispensing Dosh..."
playsound(src.loc, 'click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A.loc )
new /obj/item/weapon/money/c10( A.loc )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
@@ -70,7 +70,7 @@ RSF
if (istype(A, /turf/simulated/floor) && matter >= 1)
user << "Dispensing Dosh..."
playsound(src.loc, 'click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A )
new /obj/item/weapon/money/c10( A )
if (isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!

View File

@@ -1,5 +1,8 @@
/obj/item/weapon/implant
name = "implant"
desc = "An implant. Not usually seen outside a body."
icon = 'items.dmi'
icon_state = "implant"
var
implanted = null
mob/imp_in = null
@@ -16,15 +19,24 @@
trigger(emote, source as mob)
return
activate()
return
attackby(obj/item/weapon/I as obj, mob/user as mob)
..()
if (istype(I, /obj/item/weapon/implanter))
if (I:imp)
return
else
src.loc = I
I:imp = src
// del(src)
I:update()
return
implanted(source as mob)
return
get_data()
return "No information available"
@@ -34,8 +46,8 @@
/obj/item/weapon/implant/uplink
name = "uplink"
desc = "Summon things."
name = "uplink implant"
desc = "A micro-telecrystal implant which allows for instant transportation of equipment."
var
activation_emote = "chuckle"
obj/item/device/uplink/radio/uplink = null
@@ -63,8 +75,8 @@
/obj/item/weapon/implant/tracking
name = "tracking"
desc = "Track with this."
name = "tracking implant"
desc = "An implant which relays information to the appropriate tracking computer."
var
id = 1.0
@@ -89,8 +101,8 @@ Implant Specifics:<BR>"}
//Nuke Agent Explosive
/obj/item/weapon/implant/dexplosive
name = "explosive"
desc = "And boom goes the weasel."
name = "explosive implant"
desc = "A military grade micro bio-explosive. Highly dangerous."
var/activation_emote = "deathgasp"
var/coded = 0
@@ -140,8 +152,8 @@ Implant Specifics:<BR>"}
/obj/item/weapon/implant/chem
name = "chem"
desc = "Injects things."
name = "chemical implant"
desc = "A micro-injector that can be triggered remotely."
allow_reagents = 1
get_data()
@@ -190,8 +202,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
/obj/item/weapon/implant/loyalty
name = "loyalty"
desc = "Makes you loyal or such."
name = "loyalty implant"
desc = "An implant which contains a small pod of nanobots which manipulate host mental functions to induce loyalty."
get_data()
var/dat = {"
@@ -220,8 +232,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
//BS12 Explosive
/obj/item/weapon/implant/explosive
name = "explosive"
desc = "And boom goes the weasel."
name = "explosive implant"
desc = "A military grade micro bio-explosive. Highly dangerous."
var/phrase = "supercalifragilisticexpialidocious"
@@ -263,8 +275,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
/obj/item/weapon/implant/death_alarm
name = "death alarm"
desc = "Danger Will Robinson!"
name = "death alarm implant"
desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
var/mobname = "Will Robinson"
get_data()
@@ -302,7 +314,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
/obj/item/weapon/implant/compressed
name = "compressed matter implant"
desc = "*fwooomp*"
desc = "Based on compressed matter technology, can store a single item."
var/activation_emote = "sigh"
var/obj/item/scanned = null

View File

@@ -569,8 +569,48 @@ CIRCULAR SAW
return 0
if(!S.bleeding)
user << "\red [H] is not bleeding in \his [S.display_name]!"
return 0
if(S.implant)
if(H != user)
H.visible_message( \
"\red [user] is attempting to remove the implant in [H]'s [S.display_name] with \the [src].", \
"\red [user] attempts to remove the implant in your [S.display_name] with \the [src]!")
else
H.visible_message( \
"\red [user] attempts to remove the implant in \his [S.display_name] with \the [src]!", \
"\red You attempt to remove the implant in your [S.display_name] with \the [src]!")
if(do_mob(user, H, 50))
if(prob(50))
if(H != user)
H.visible_message( \
"\red [user] successfully removes the implant in [H]'s [S.display_name] with \the [src]!", \
"\red [user] successfully removes the implant in your [S.display_name] with \the [src]!")
else
H.visible_message( \
"\red [user] successfully removes the implant in \his [S.display_name] with \the [src]!", \
"\red You successfully remove the implant in your [S.display_name] with \the [src]!")
for(var/obj/item/weapon/implant/implant in S.implant)
implant.loc = (get_turf(H))
implant.implanted = 0
S.implant = null
playsound(user, 'squelch1.ogg', 50, 1)
if(istype(implant, /obj/item/weapon/implant/explosive) || istype(implant, /obj/item/weapon/implant/uplink) || istype(implant, /obj/item/weapon/implant/dexplosive) || istype(implant, /obj/item/weapon/implant/explosive) || istype(implant, /obj/item/weapon/implant/compressed))
usr << "The implant disintegrates into nothing..."
del(implant)
else
if(H != user)
H.visible_message( \
"\red [user] fails to removes the implant!", \
"\red [user] fails to removes the implant!")
else
H.visible_message( \
"\red [user] fails to removes the implant!", \
"\red You fail to removes the implant!")
return 1
else
user << "\red [H] is not bleeding in \his [S.display_name]!"
return 0
if(H != user)
H.visible_message( \

View File

@@ -729,10 +729,12 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
..()
/obj/item/device/radio/proc/config(op)
for (var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
if(radio_controller)
for (var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections = new
channels = op
for (var/ch_name in op)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
if(radio_controller)
for (var/ch_name in op)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return

View File

@@ -79,18 +79,25 @@
src.closer.screen_loc = text("[],[]", mx, my)
return
/obj/item/weapon/secstorage/proc/orient2hud(mob/user as mob)
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/weapon/secstorage/proc/standard_orient_objs()
var/rows = 0
var/cols = 6
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx]:16,[cy]:16")
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = text("11:16,2:16")
return
if (src == user.l_hand)
src.orient_objs(3, 11, 3, 4)
else
if (src == user.r_hand)
src.orient_objs(1, 11, 1, 4)
else
if (src == user.back)
src.orient_objs(4, 10, 4, 3)
else
src.orient_objs(7, 8, 10, 7)
/obj/item/weapon/secstorage/proc/orient2hud(mob/user as mob)
standard_orient_objs()
return
/obj/item/weapon/secstorage/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -160,7 +167,7 @@
/obj/item/weapon/secstorage/dropped(mob/user as mob)
src.orient_objs(7, 8, 10, 7)
standard_orient_objs()
return
/obj/item/weapon/secstorage/MouseDrop(over_object, src_location, over_location)
@@ -168,6 +175,7 @@
if (src.locked == 1)
return
orient2hud(usr)
if ((over_object == usr && ((get_dist(src, usr) <= 1 ||src.locked == 0) || usr.contents.Find(src)))) //|| usr.telekinesis == 1
if (usr.s_active)
usr.s_active.close(usr)
@@ -258,6 +266,6 @@
src.closer.icon_state = "x"
src.closer.layer = 20
spawn( 5 )
src.orient_objs(7, 8, 10, 7)
standard_orient_objs()
return
return

View File

@@ -71,7 +71,7 @@
"You hear metal clanking")
else
buckled_mob.visible_message(\
"\blue [buckled_mob.name] unbuckled himself!",\
"\blue [buckled_mob.name] unbuckles!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
unbuckle()

View File

@@ -1,8 +1,4 @@
/obj/item/weapon/storage/backpack/MouseDrop(obj/over_object as obj)
// if (src.loc != usr)
// return
// if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))

View File

@@ -37,17 +37,6 @@
return
attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(src.loc == user)
playsound(src.loc, "rustle", 50, 1, -5)
if (user.s_active)
user.s_active.close(user)
src.show_to(user)
else
return ..()
/obj/item/weapon/storage/belt/utility
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.

View File

@@ -2,9 +2,9 @@
..()
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/money(src)
new /obj/item/weapon/money(src)
new /obj/item/weapon/money(src)
/obj/item/weapon/storage/bible/tajaran/New()
..()

View File

@@ -1,221 +1,11 @@
/obj/item/clothing/suit/storage
var/obj/screen/storage/boxes
var/obj/screen/close/closer
var/obj/slot1
var/obj/slot2
/obj/item/clothing/suit/storage/New()
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 9,7"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
src.closer.screen_loc = "9,7"
/obj/item/clothing/suit/storage/proc/view_inv(mob/user as mob)
if(!user.client)
return
user.client.screen += src.boxes
user.client.screen += src.closer
user.client.screen += src.contents
/obj/item/clothing/suit/storage/proc/close(mob/user as mob)
if(!user.client)
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
/obj/item/clothing/suit/storage/MouseDrop(atom/over_object)
if(ishuman(usr))
var/mob/living/carbon/human/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.wear_suit == src))
if (over_object.name == "r_hand")
if (!( M.r_hand ))
M.u_equip(src)
M.r_hand = src
else
if (over_object.name == "l_hand")
if (!( M.l_hand ))
M.u_equip(src)
M.l_hand = src
M.update_clothing()
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
src.view_inv(M)
src.orient_objs(7,7,9,7)
return
return
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.w_class > 2 || src.loc == W )
return
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
return
if(src.contents.len >= 2)
user << "\red There's nowhere to place that!"
return
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
else if(user.s_active == src)
close(user)
view_inv(user)
orient2hud(user)
W.dropped(user)
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
return attack_hand(user)
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
if (src.loc == user)
if (user.s_active)
user.s_active.close(user)
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
return
/obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob)
if (src == user.l_hand)
src.orient_objs(3, 4, 3, 3)
else if (src == user.r_hand)
src.orient_objs(1, 4, 1, 3)
else if (istype(user,/mob/living/carbon/human) && src == user:wear_suit)
src.orient_objs(1, 3, 2, 3)
else
src.orient_objs(4, 3, 4, 2)
return
/obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = "[tx],[ty] to [mx],[my]"
for(var/obj/O in src.contents)
O.screen_loc = "[cx],[cy]"
O.layer = 20
cx++
if (cx > mx)
cx = tx
cy--
src.closer.screen_loc = "[mx+1],[my]"
return
/obj/item/clothing/suit/storage/proc/show_to(mob/user as mob)
for(var/obj/item/weapon/mousetrap/MT in src)
if(MT.armed)
for(var/mob/O in viewers(user, null))
if(O == user)
user.show_message(text("\red <B>You reach into the [src.name], but there was a live mousetrap in there!</B>"), 1)
else
user.show_message(text("\red <B>[user] reaches into the [src.name] and sets off a hidden mousetrap!</B>"), 1)
MT.loc = user.loc
MT.triggered(user, user.hand ? "l_hand" : "r_hand")
MT.layer = OBJ_LAYER
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
user.client.screen += src.boxes
user.client.screen += src.closer
user.client.screen += src.contents
user.s_active = src
return
/*/obj/item/clothing/suit/storage/New()
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
spawn( 5 )
src.orient_objs(7, 8, 10, 7)
return
return
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, text2path(A) )) ok = 1
if(!ok)
user << "\red This container cannot hold [W]."
return
if (src.contents.len >= 7)
return
if ((W.w_class >= 3 || istype(W, /obj/item/weapon/storage) || src.loc == W))
return
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
src.orient2hud(user)
W.dropped(user)
add_fingerprint(user)
if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
for(var/mob/O in viewers(user, null))
O.show_message(text("\blue [] has added [] to []!", user, W, src), 1)
//Foreach goto(139)
return
/obj/item/clothing/suit/storage/dropped(mob/user as mob)
src.orient_objs(7, 8, 10, 7)
return
/obj/item/clothing/suit/storage/MouseDrop(over_object, src_location, over_location)
..()
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
return src.attack_hand(user)
return
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
if (src.loc == user)
if (user.s_active)
user.s_active.close(user)
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
//Foreach goto(76)
src.orient2hud(user)
src.add_fingerprint(user)
return
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item.
var/storage_slots = 2 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
/obj/item/clothing/suit/storage/proc/return_inv()
@@ -267,19 +57,169 @@
user.s_active = null
return
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
/obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = text("[],[] to [],[]", tx, ty, mx, my)
src.boxes.screen_loc = text("[tx]:,[ty] to [mx],[my]")
for(var/obj/O in src.contents)
O.screen_loc = text("[],[]", cx, cy)
O.screen_loc = text("[cx],[cy]")
O.layer = 20
cx++
if (cx > mx)
cx = tx
cy--
//Foreach goto(56)
src.closer.screen_loc = text("[],[]", mx, my)
src.closer.screen_loc = text("[mx+1],[my]")
return
*/
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/clothing/suit/storage/proc/standard_orient_objs(var/rows,var/cols)
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx]:16,[cy]:16")
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = text("[4+cols+1]:16,2:16")
return
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob)
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (contents.len > 7)
row_num = round((contents.len-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num,col_count)
return
//This proc is called when you want to place an item into the storage item.
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
return
..()
if(isrobot(user))
user << "\blue You're a robot. No."
return //Robots can't interact with storage items.
if(src.loc == W)
return //Means the item is already in the storage item
if(contents.len >= storage_slots)
user << "\red The [src] is full, make some space."
return //Storage item is full
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, text2path(A) ))
ok = 1
break
if(!ok)
user << "\red This [src] cannot hold [W]."
return
for(var/A in cant_hold) //Check for specific items which this container can't hold.
if(istype(W, text2path(A) ))
user << "\red This [src] cannot hold [W]."
return
if (W.w_class > max_w_class)
user << "\red This [W] is too big for \the [src]"
return
var/sum_w_class = W.w_class
for(var/obj/item/I in contents)
sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
if(sum_w_class > max_combined_w_class)
user << "\red The [src] is full, make some space."
return
if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage)))
if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm.
user << "\red The [src] cannot hold [W] as it's a storage item of the same size."
return //To prevent the stacking of the same sized items.
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
src.orient2hud(user)
W.dropped(user)
add_fingerprint(user)
/obj/item/weapon/storage/dropped(mob/user as mob)
return
/obj/item/clothing/suit/storage/MouseDrop(atom/over_object)
if(ishuman(usr))
var/mob/living/carbon/human/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.wear_suit == src))
if (over_object.name == "r_hand")
if (!( M.r_hand ))
M.u_equip(src)
M.r_hand = src
else
if (over_object.name == "l_hand")
if (!( M.l_hand ))
M.u_equip(src)
M.l_hand = src
M.update_clothing()
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
usr.s_active.close(usr)
src.show_to(usr)
return
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
//playsound(src.loc, "rustle", 50, 1, -5) // what
return src.attack_hand(user)
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
src.orient2hud(user)
if (src.loc == user)
if (user.s_active)
user.s_active.close(user)
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.add_fingerprint(user)
return
/obj/item/clothing/suit/storage/New()
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
orient2hud()
return
/obj/item/weapon/storage/emp_act(severity)
if(!istype(src.loc, /mob/living))
for(var/obj/O in contents)
O.emp_act(severity)
..()

View File

@@ -206,12 +206,6 @@
..()
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
/obj/structure/closet/crate/open()
playsound(src.loc, 'click.ogg', 15, 1, -3)

View File

@@ -62,11 +62,11 @@
return
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
//The numbers are calculated from the bottom-left (Right hand slot on the map) being 1,1.
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = text("[tx],[ty] to [mx],[my]")
src.boxes.screen_loc = text("[tx]:,[ty] to [mx],[my]")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx],[cy]")
O.layer = 20
@@ -77,23 +77,29 @@
src.closer.screen_loc = text("[mx+1],[my]")
return
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/weapon/storage/proc/standard_orient_objs(var/rows,var/cols)
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
for(var/obj/O in src.contents)
O.screen_loc = text("[cx]:16,[cy]:16")
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = text("[4+cols+1]:16,2:16")
return
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/obj/item/weapon/storage/proc/orient2hud(mob/user as mob)
var/mob/living/carbon/human/H = user
var/col_num = 0
var/row_count = min(7,storage_slots) -1 //For belts, the meanings of the two variables are inverted, so we don't have to declare new ones
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (contents.len > 7)
col_num = round((contents.len-1) / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items.
if (src == user.l_hand)
src.orient_objs(3-col_num, 3+row_count, 3, 3)
else if(src == user.r_hand)
src.orient_objs(1, 3+row_count, 1+col_num, 3)
else if(src == user.back)
src.orient_objs(4-col_num, 3+row_count, 4, 3)
else if(istype(user, /mob/living/carbon/human) && src == H.belt)//only humans have belts
src.orient_objs(1, 3+col_num, 1+row_count, 3)
else
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
row_num = round((contents.len-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num,col_count)
return
//This proc is called when you want to place an item into the storage item.
@@ -129,7 +135,7 @@
return
if (W.w_class > max_w_class)
user << "\red This [W] is too big for this [src]"
user << "\red This [W] is too big for \the [src]"
return
if(istype(W, /obj/item/weapon/tray))
@@ -186,15 +192,11 @@
return
/obj/item/weapon/storage/dropped(mob/user as mob)
var/col_num = 0
var/row_count = min(7,storage_slots) -1
if (contents.len > 7)
col_num = round((contents.len-1) / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items.
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
return
/obj/item/weapon/storage/MouseDrop(over_object, src_location, over_location)
..()
orient2hud(usr)
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if (usr.s_active)
usr.s_active.close(usr)
@@ -244,14 +246,7 @@
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
spawn( 5 )
var/col_num = 0
var/row_count = min(7,storage_slots) -1
if (contents.len > 7)
if(contents.len % 7)
col_num = round(contents.len / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items.
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
return
orient2hud()
return
/obj/item/weapon/storage/emp_act(severity)

View File

@@ -189,6 +189,7 @@ TABLE AND RACK OBJECT INTERATIONS
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
H.update_clothing()
playsound(src.loc, 'tablehit1.ogg', 50, 1, -3)
return
G.affecting.loc = src.loc

View File

@@ -1,5 +1,5 @@
/mob/verb/listen_ooc()
set name = "Un/Mute OOC"
set name = "Hear/Stop Hearing OOC"
set category = "OOC"
if (src.client)

View File

@@ -238,9 +238,8 @@ obj/machinery/computer/forensic_scanning
var/list/blood = outputs[3]
if(blood && blood.len)
temp += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
var/list/templist2 = blood[j]
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [templist2[2]], DNA: [templist2[1]]<br>"
for(var/named in blood)
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [blood[named]], DNA: [named]<br>"
temp += "<br><a href='?src=\ref[src];operation=database;delete_record=[href_list["identifier"]]'>{Delete this Dossier}</a>"
temp += "<br><a href='?src=\ref[src];operation=databaseprint;identifier=[href_list["identifier"]]'>{Print}</a>"
else
@@ -743,11 +742,30 @@ proc/blood_incompatible(donor,receiver)
return 0
/obj/item/weapon/rag
New() // So I don't have to grab maplock
spawn(1)
new/obj/item/weapon/reagent_containers/glass/rag(loc)
del src
/obj/item/weapon/reagent_containers/glass/rag
name = "damp rag"
desc = "For cleaning up messes, I suppose."
desc = "For cleaning up messes, you suppose."
w_class = 1
icon = 'toy.dmi'
icon_state = "rag"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5)
volume = 5
can_be_placed_into = null
attack(atom/target as obj|turf|area, mob/user as mob , flag)
if(ismob(target) && target.reagents && reagents.total_volume)
user.visible_message("\red \The [target] has been smothered with \the [src] by \the [user]!", "\red You smother \the [target] with \the [src]!", "You hear some struggling and muffled cries of surprise")
src.reagents.reaction(target, TOUCH)
spawn(5) src.reagents.clear_reagents()
return
else
..()
afterattack(atom/A as obj|turf|area, mob/user as mob)
if(istype(A))
@@ -756,3 +774,10 @@ proc/blood_incompatible(donor,receiver)
user.visible_message("[user] finishes wiping off the [A]!")
A.clean_blood()
return
examine()
if (!( usr ))
return
usr << "That's \a [src]."
usr << desc
return

View File

@@ -733,7 +733,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/obj/item/briefcase_item in sec_briefcase)
del(briefcase_item)
for(var/i=3, i>0, i--)
sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000
sec_briefcase.contents += new /obj/item/weapon/money/c1000
sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/mateba
sec_briefcase.contents += new /obj/item/ammo_magazine/a357

View File

@@ -104,7 +104,7 @@ datum
on_mob_life(var/mob/living/M)
if(!data || !data["blood_type"])
..()
else if(istype(M, /mob/living/carbon/human) && blood_incompatible(data["blood_type"],M.dna.b_type))
else if(istype(M, /mob/living/carbon/human) && blood_incompatible(data["blood_type"],M.dna.b_type) && !M.changeling)
M.adjustToxLoss(rand(0.5,1.5))
M.adjustOxyLoss(rand(1,1.5))
..()
@@ -1862,7 +1862,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(50)) M:heal_organ_damage(1,0)
if(prob(1)) M:heal_organ_damage(0.5,0) //This should stop being able to heal out of crit from eating a donut
M:nutrition += nutriment_factor // For hunger and fatness
/*
// If overeaten - vomit and fall down

View File

@@ -185,9 +185,10 @@
if(W:amount >= 1)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
W:use(1)
user << "\blue You put in the glass lens."
src.state = 5
if(W)
W:use(1)
user << "\blue You put in the glass lens."
src.state = 5
if(5)
if(istype(W, /obj/item/weapon/crowbar))
playsound(src.loc, 'Crowbar.ogg', 50, 1)

View File

@@ -46,6 +46,12 @@
item_state = "glasses"
prescription = 1
/obj/item/clothing/glasses/regular/hipster
name = "Prescription Glasses"
desc = "Made by Uncool. Co."
icon_state = "hipster_glasses"
item_state = "hipster_glasses"
/obj/item/clothing/glasses/gglasses
name = "Green Glasses"
desc = "Forest green glasses, like the kind you'd wear when hatching a nasty scheme."
@@ -69,16 +75,6 @@
item_state = "bigsunglasses"
protective_temperature = 1400
//ultimate glasses
/obj/item/clothing/glasses/hud/security/jensenshades
name = "Augmented shades"
desc = "Polarized bioneural eyewear, designed to augment your vision."
icon_state = "jensenshades"
item_state = "jensenshades"
protective_temperature = 1500
vision_flags = SEE_MOBS
invisa_view = 2
/obj/item/clothing/glasses/sunglasses/sechud
name = "HUDSunglasses"
desc = "Sunglasses with a HUD."

View File

@@ -82,42 +82,50 @@
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records."
icon_state = "securityhud"
/obj/item/clothing/glasses/hud/security/jensenshades
name = "Augmented shades"
desc = "Polarized bioneural eyewear, designed to augment your vision."
icon_state = "jensenshades"
item_state = "jensenshades"
protective_temperature = 1500
vision_flags = SEE_MOBS
invisa_view = 2
process_hud(var/mob/M)
if(!M) return
if(!M.client) return
var/client/C = M.client
var/icon/tempHud = 'hud.dmi'
for(var/mob/living/carbon/human/perp in view(M))
if(!C) continue
var/perpname = "wot"
if(perp.wear_id)
C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered_name
else if(istype(perp.wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = perp.wear_id
perpname = tempPda.owner
else
perpname = perp.name
C.images += image(tempHud,perp,"hudunknown")
/obj/item/clothing/glasses/hud/security/process_hud(var/mob/M)
if(!M) return
if(!M.client) return
var/client/C = M.client
var/icon/tempHud = 'hud.dmi'
for(var/mob/living/carbon/human/perp in view(M))
if(!C) continue
var/perpname = "wot"
if(perp.wear_id)
C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered_name
else if(istype(perp.wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = perp.wear_id
perpname = tempPda.owner
else
perpname = perp.name
C.images += image(tempHud,perp,"hudunknown")
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
C.images += image(tempHud,perp,"hudwanted")
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
C.images += image(tempHud,perp,"hudprisoner")
break
for(var/named in perp.organs)
var/datum/organ/external/E = perp.organs[named]
for(var/obj/item/weapon/implant/I in E.implant)
if(I.implanted)
if(istype(I,/obj/item/weapon/implant/tracking))
C.images += image(tempHud,perp,"hud_imp_tracking")
if(istype(I,/obj/item/weapon/implant/loyalty))
C.images += image(tempHud,perp,"hud_imp_loyal")
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
C.images += image(tempHud,perp,"hudwanted")
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
C.images += image(tempHud,perp,"hudprisoner")
break
for(var/named in perp.organs)
var/datum/organ/external/E = perp.organs[named]
for(var/obj/item/weapon/implant/I in E.implant)
if(I.implanted)
if(istype(I,/obj/item/weapon/implant/tracking))
C.images += image(tempHud,perp,"hud_imp_tracking")
if(istype(I,/obj/item/weapon/implant/loyalty))
C.images += image(tempHud,perp,"hud_imp_loyal")

View File

@@ -23,7 +23,7 @@
/obj/item/clothing/suit/armor/hos/jensen
name = "armored trenchoat"
name = "armored trenchcoat"
desc = "A trenchoat augmented with a special alloy for some protection and style"
icon_state = "jensencoat"
item_state = "jensencoat"

View File

@@ -62,4 +62,4 @@
item_state = "judge"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/cigpacket,/obj/item/weapon/spacecash)
allowed = list(/obj/item/weapon/cigpacket,/obj/item/weapon/money)

View File

@@ -629,6 +629,7 @@
name = "exceptional plump pie"
desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!"
reagents.add_reagent("nutriment", 15)
reagents.add_reagent("tricordrazine", 5)
bitesize = 2
else
reagents.add_reagent("nutriment", 10)
@@ -855,7 +856,7 @@
New()
..()
reagents.add_reagent("toxin", 1)
reagents.add_reagent("carbon", 1)
reagents.add_reagent("carbon", 3)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/sliceable/meatsteak
@@ -906,17 +907,17 @@
reagents.add_reagent("amatoxin", 6)
reagents.add_reagent("psilocybin", 3)
bitesize = 3
/*
/obj/item/weapon/reagent_containers/food/snacks/poppypretzel
name = "Poppy pretzel"
desc = "" //TODO
desc = "It's all twisted up!"
icon_state = "poppypretzel"
bitesize = 2
New()
..()
reagents.add_reagent("nutriment", 5)
bitesize = 2
*/
/obj/item/weapon/reagent_containers/food/snacks/meatballsoup
name = "Meatball soup"
@@ -947,7 +948,7 @@
..()
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("blood", 15)
reagents.add_reagent("water", 10)
reagents.add_reagent("water", 5)
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/clownstears
@@ -956,7 +957,7 @@
icon_state = "clownstears"
New()
..()
reagents.add_reagent("nutriment", 1)
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("banana", 5)
reagents.add_reagent("water", 10)
bitesize = 5
@@ -969,7 +970,7 @@
New()
..()
reagents.add_reagent("nutriment", 10)
reagents.add_reagent("water", 10)
reagents.add_reagent("water", 5)
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/nettlesoup
@@ -980,8 +981,8 @@
New()
..()
reagents.add_reagent("nutriment", 10)
reagents.add_reagent("water", 7)
reagents.add_reagent("tricordrazine", 3)
reagents.add_reagent("water", 5)
reagents.add_reagent("tricordrazine", 5)
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/mysterysoup
@@ -1038,7 +1039,7 @@
..()
reagents.add_reagent("water", 10)
bitesize = 5
if(prob(5))
if(prob(25))
src.desc = "A wish come true!"
reagents.add_reagent("nutriment", 10)
@@ -1205,6 +1206,7 @@
New()
..()
reagents.add_reagent("nutriment", 12)
reagents.add_reagent("carbon", 2)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/grilledcheese
@@ -1248,7 +1250,7 @@
reagents.add_reagent("nutriment", 20)
reagents.add_reagent("tomatojuice", 5)
reagents.add_reagent("imidazoline", 5)
reagents.add_reagent("water", 10)
reagents.add_reagent("water", 5)
bitesize = 10
/obj/item/weapon/reagent_containers/food/snacks/metroidtoast
@@ -1280,7 +1282,7 @@
New()
..()
reagents.add_reagent("nutriment", 12)
reagents.add_reagent("water", 20)
reagents.add_reagent("water", 5)
bitesize = 4
/obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat
@@ -1438,6 +1440,7 @@
name = "exceptional plump helmet biscuit"
desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!"
reagents.add_reagent("nutriment", 15)
reagents.add_reagent("tricordrazine", 5)
bitesize = 2
else
reagents.add_reagent("nutriment", 5)

View File

@@ -14,6 +14,7 @@
icon_state = "miningsec1"
icon_closed = "miningsec"
icon_locked = "miningsec1"
icon_opened = "miningsecopen"
icon_broken = "miningsecbroken"
icon_off = "miningsecoff"
req_access = list(access_mining)

View File

@@ -8,6 +8,7 @@
src.mov_int = list( )
src.vimpaired = list( )
src.darkMask = list( )
src.intent_small_hud_objects = list( )
src.g_dither = new src.h_type( src )
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
@@ -49,6 +50,41 @@
src.adding += using
action_intent = using
//intent small hud objects
using = new src.h_type( src )
using.name = "help"
using.icon = 'screen1_alien.dmi'
using.icon_state = "help_small"
using.screen_loc = ui_help_small
using.layer = 21
src.intent_small_hud_objects += using
using = new src.h_type( src )
using.name = "disarm"
using.icon = 'screen1_alien.dmi'
using.icon_state = "disarm_small"
using.screen_loc = ui_disarm_small
using.layer = 21
src.intent_small_hud_objects += using
using = new src.h_type( src )
using.name = "grab"
using.icon = 'screen1_alien.dmi'
using.icon_state = "grab_small"
using.screen_loc = ui_grab_small
using.layer = 21
src.intent_small_hud_objects += using
using = new src.h_type( src )
using.name = "harm"
using.icon = 'screen1_alien.dmi'
using.icon_state = "harm_small"
using.screen_loc = ui_harm_small
using.layer = 21
src.intent_small_hud_objects += using
//end intent small hud objects
using = new src.h_type( src )
using.name = "mov_intent"
using.dir = SOUTHWEST
@@ -59,6 +95,7 @@
src.adding += using
move_intent = using
/*
using = new src.h_type(src) //Right hud bar
using.dir = SOUTH
using.icon = 'screen1_alien.dmi'
@@ -79,7 +116,9 @@
using.screen_loc = "EAST+1,SOUTH-1"
using.layer = 19
src.adding += using
*/
/*
using = new src.h_type( src )
using.name = "arrowleft"
using.icon = 'screen1_alien.dmi'
@@ -97,6 +136,7 @@
using.screen_loc = ui_iarrowright
using.layer = 19
src.adding += using
*/
using = new src.h_type( src )
using.name = "drop"
@@ -115,7 +155,7 @@
using.dir = SOUTH
using.icon = 'screen1_alien.dmi'
using.icon_state = "equip"
using.screen_loc = ui_iclothing
using.screen_loc = ui_alien_oclothing
using.layer = 19
src.adding += using
@@ -125,7 +165,7 @@
using.dir = WEST
using.icon = 'screen1_alien.dmi'
using.icon_state = "equip"
using.screen_loc = ui_id
using.screen_loc = ui_rhand
using.layer = 19
src.adding += using
@@ -135,7 +175,7 @@
using.dir = EAST
using.icon = 'screen1_alien.dmi'
using.icon_state = "equip"
using.screen_loc = ui_belt
using.screen_loc = ui_lhand
using.layer = 19
src.adding += using
@@ -162,11 +202,12 @@
using.name = "head"
using.icon = 'screen1_alien.dmi'
using.icon_state = "hair"
using.screen_loc = ui_oclothing
using.screen_loc = ui_alien_head
using.layer = 19
src.adding += using
//end of equippable shit
/*
using = new src.h_type( src )
using.name = "resist"
using.icon = 'screen1_alien.dmi'
@@ -174,8 +215,7 @@
using.screen_loc = ui_resist
using.layer = 19
src.adding += using
*/
using = new src.h_type( src )
using.name = null
@@ -241,7 +281,7 @@
mymob.healths.icon = 'screen1_alien.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.healths.screen_loc = ui_alien_health
mymob.pullin = new /obj/screen( null )
mymob.pullin.icon = 'screen1_alien.dmi'
@@ -265,6 +305,7 @@
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
/*
mymob.hands = new /obj/screen( null )
mymob.hands.icon = 'screen1_alien.dmi'
mymob.hands.icon_state = "hand"
@@ -285,6 +326,7 @@
mymob.rest.screen_loc = ui_rest
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
*/
mymob.zone_sel = new /obj/screen/zone_sel( null )
@@ -293,6 +335,6 @@
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.hands, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -398,7 +398,7 @@
overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
else
overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
wear_suit.screen_loc = ui_iclothing
wear_suit.screen_loc = ui_alien_oclothing
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
if (handcuffed)
handcuffed.loc = loc
@@ -420,7 +420,7 @@
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
if (head.blood_DNA)
overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
head.screen_loc = ui_oclothing
head.screen_loc = ui_alien_head
if (l_store)
l_store.screen_loc = ui_storage1
@@ -435,12 +435,12 @@
if (r_hand)
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1)
r_hand.screen_loc = ui_id
r_hand.screen_loc = ui_rhand
if (l_hand)
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1)
l_hand.screen_loc = ui_belt
l_hand.screen_loc = ui_lhand

View File

@@ -61,6 +61,7 @@
src.adding += using
move_intent = using
/*
using = new src.h_type(src) //Right hud bar
using.dir = SOUTH
using.icon = 'screen1_alien.dmi'
@@ -81,7 +82,9 @@
using.screen_loc = "EAST+1,SOUTH-1"
using.layer = 19
src.adding += using
*/
/*
using = new src.h_type( src )
using.name = "arrowleft"
using.icon = 'screen1_alien.dmi'
@@ -100,7 +103,6 @@
using.layer = 19
src.adding += using
using = new src.h_type( src )
using.name = "resist"
using.icon = 'screen1_alien.dmi'
@@ -108,7 +110,7 @@
using.screen_loc = ui_resist
using.layer = 19
src.adding += using
*/
using = new src.h_type( src )
@@ -171,7 +173,7 @@
mymob.healths.icon = 'screen1_alien.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.healths.screen_loc = ui_alien_health
mymob.pullin = new /obj/screen( null )
mymob.pullin.icon = 'screen1_alien.dmi'
@@ -194,7 +196,7 @@
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
/*
mymob.sleep = new /obj/screen( null )
mymob.sleep.icon = 'screen1_alien.dmi'
mymob.sleep.icon_state = "sleep0"
@@ -206,7 +208,7 @@
mymob.rest.icon_state = "rest0"
mymob.rest.name = "rest"
mymob.rest.screen_loc = ui_rest
*/
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.overlays = null
@@ -214,7 +216,7 @@
mymob.client.screen = null
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -1,5 +1,7 @@
/obj/hud/proc/brain_hud(var/ui_style='screen1_old.dmi')
ui_style='screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
blurry = new h_type( src )
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
blurry.name = "Blurry"

View File

@@ -173,12 +173,32 @@
usr << "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>"
return
src.hand = !( src.hand )
if (!( src.hand ))
if(hud_used.l_hand_hud_object && hud_used.r_hand_hud_object)
if(hand) //This being 1 means the left hand is in use
hud_used.l_hand_hud_object.icon_state = "hand_active"
hud_used.r_hand_hud_object.icon_state = "hand_inactive"
else
hud_used.l_hand_hud_object.icon_state = "hand_inactive"
hud_used.r_hand_hud_object.icon_state = "hand_active"
/*if (!( src.hand ))
src.hands.dir = NORTH
else
src.hands.dir = SOUTH
src.hands.dir = SOUTH*/
return
/mob/living/carbon/proc/activate_hand(var/selhand) //0 or "r" or "right" for right hand; 1 or "l" or "left" for left hand.
if(istext(selhand))
selhand = lowertext(selhand)
if(selhand == "right" || selhand == "r")
selhand = 0
if(selhand == "left" || selhand == "l")
selhand = 1
if(selhand != src.hand)
swap_hand()
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if (src.health > 0)
if(src == M && istype(src, /mob/living/carbon/human))
@@ -262,11 +282,12 @@
if(src.sleeping_willingly)
src.sleeping = 0
src.sleeping_willingly = 0
// Update the hands-indicator on re-join.
/* // Update the hands-indicator on re-join.
if (!( src.hand ))
src.hands.dir = NORTH
else
src.hands.dir = SOUTH
*/
/mob/living/carbon/human/proc/GetOrgans()
var/list/L = list( )

View File

@@ -1,5 +1,7 @@
/obj/hud/proc/human_hud(var/ui_style='screen1_old.dmi')
ui_style='screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
src.adding = list( )
src.other = list( )
src.intents = list( )
@@ -8,6 +10,7 @@
src.mov_int = list( )
src.vimpaired = list( )
src.darkMask = list( )
src.intent_small_hud_objects = list( )
src.g_dither = new src.h_type( src )
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
@@ -53,6 +56,41 @@
src.adding += using
action_intent = using
//intent small hud objects
using = new src.h_type( src )
using.name = "help"
using.icon = ui_style
using.icon_state = "help_small"
using.screen_loc = ui_help_small
using.layer = 21
src.intent_small_hud_objects += using
using = new src.h_type( src )
using.name = "disarm"
using.icon = ui_style
using.icon_state = "disarm_small"
using.screen_loc = ui_disarm_small
using.layer = 21
src.intent_small_hud_objects += using
using = new src.h_type( src )
using.name = "grab"
using.icon = ui_style
using.icon_state = "grab_small"
using.screen_loc = ui_grab_small
using.layer = 21
src.intent_small_hud_objects += using
using = new src.h_type( src )
using.name = "harm"
using.icon = ui_style
using.icon_state = "harm_small"
using.screen_loc = ui_harm_small
using.layer = 21
src.intent_small_hud_objects += using
//end intent small hud objects
using = new src.h_type( src )
using.name = "mov_intent"
using.dir = SOUTHWEST
@@ -63,6 +101,7 @@
src.adding += using
move_intent = using
/*
using = new src.h_type(src) //Right hud bar
using.dir = SOUTH
using.icon = ui_style
@@ -101,6 +140,7 @@
using.screen_loc = ui_iarrowright
using.layer = 19
src.adding += using
*/
using = new src.h_type( src )
using.name = "drop"
@@ -117,7 +157,7 @@
using.icon_state = "center"
using.screen_loc = ui_iclothing
using.layer = 19
src.adding += using
src.other += using
using = new src.h_type( src )
using.name = "o_clothing"
@@ -126,7 +166,7 @@
using.icon_state = "equip"
using.screen_loc = ui_oclothing
using.layer = 19
src.adding += using
src.other += using
/* using = new src.h_type( src )
using.name = "headset"
@@ -141,25 +181,49 @@
using.name = "r_hand"
using.dir = WEST
using.icon = ui_style
using.icon_state = "equip"
using.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_rhand
using.layer = 19
src.r_hand_hud_object = using
src.adding += using
using = new src.h_type( src )
using.name = "l_hand"
using.dir = EAST
using.icon = ui_style
using.icon_state = "equip"
using.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_lhand
using.layer = 19
src.l_hand_hud_object = using
src.adding += using
using = new src.h_type( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new src.h_type( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
using = new src.h_type( src )
using.name = "id"
using.dir = SOUTHWEST
using.dir = NORTH
using.icon = ui_style
using.icon_state = "equip"
using.icon_state = "id"
using.screen_loc = ui_id
using.layer = 19
src.adding += using
@@ -171,13 +235,13 @@
using.icon_state = "equip"
using.screen_loc = ui_mask
using.layer = 19
src.adding += using
src.other += using
using = new src.h_type( src )
using.name = "back"
using.dir = NORTHEAST
using.dir = NORTH
using.icon = ui_style
using.icon_state = "equip"
using.icon_state = "back"
using.screen_loc = ui_back
using.layer = 19
src.adding += using
@@ -201,11 +265,13 @@
using = new src.h_type( src )
using.name = "suit storage"
using.icon = ui_style
using.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
using.icon_state = "belt"
using.screen_loc = ui_sstore1
using.layer = 19
src.other += using
/*
using = new src.h_type( src )
using.name = "resist"
using.icon = ui_style
@@ -213,12 +279,13 @@
using.screen_loc = ui_resist
using.layer = 19
src.adding += using
*/
using = new src.h_type( src )
using.name = "other"
using.icon = ui_style
using.icon_state = "other"
using.screen_loc = ui_shoes
using.screen_loc = ui_inventory
using.layer = 20
src.adding += using
@@ -256,7 +323,6 @@
using = new src.h_type( src )
using.name = "l_ear"
using.dir = EAST
using.icon = ui_style
using.icon_state = "ears"
using.screen_loc = ui_lear
@@ -265,7 +331,6 @@
using = new src.h_type( src )
using.name = "r_ear"
using.dir = WEST
using.icon = ui_style
using.icon_state = "ears"
using.screen_loc = ui_rear
@@ -278,7 +343,7 @@
using.icon_state = "hair"
using.screen_loc = ui_head
using.layer = 19
src.adding += using
src.other += using
using = new src.h_type( src )
using.name = "shoes"
@@ -467,6 +532,8 @@
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
/*
mymob.i_select = new /obj/screen( null )
mymob.i_select.icon_state = "selector"
@@ -542,6 +609,7 @@
mymob.pain.screen_loc = "1,1 to 15,15"
mymob.pain.layer = 17
/*
mymob.hands = new /obj/screen( null )
mymob.hands.icon = ui_style
mymob.hands.icon_state = "hand"
@@ -560,6 +628,7 @@
mymob.rest.icon_state = "rest0"
mymob.rest.name = "rest"
mymob.rest.screen_loc = ui_rest
*/
/*/Monkey blockers
@@ -658,7 +727,7 @@
mymob.client.screen = null
//, mymob.i_select, mymob.m_select
mymob.client.screen += list( mymob.pain, mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.hands, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.pressure, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
mymob.client.screen += list( mymob.pain, mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
mymob.client.screen += src.adding + src.other
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo

View File

@@ -20,6 +20,7 @@
var/g_eyes = 0.0
var/b_eyes = 0.0
var/s_tone = 0.0
var/species = "Human"
age = 30.0
var/used_skillpoints = 0
var/skill_specialization = null
@@ -1059,8 +1060,6 @@
overlays += image("icon" = 'belt_mirror.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
s_store.screen_loc = ui_sstore1
if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
//to hide / show them.
if (client)
if (i_select)
if (intent)
@@ -1177,6 +1176,8 @@
overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
back.screen_loc = ui_back
if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
//to hide / show them.
if (handcuffed)
pulling = null
var/h1 = handcuffed.icon_state

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