Merge branch 'master' into upstream-merge-32188

This commit is contained in:
deathride58
2017-11-21 19:53:58 +00:00
committed by GitHub
285 changed files with 56239 additions and 56588 deletions
-12
View File
@@ -84,18 +84,6 @@
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
/* // Uncomment to debug chemical reaction list.
/client/verb/debug_chemical_list()
for (var/reaction in chemical_reactions_list)
. += "chemical_reactions_list\[\"[reaction]\"\] = \"[chemical_reactions_list[reaction]]\"\n"
if(islist(chemical_reactions_list[reaction]))
var/list/L = chemical_reactions_list[reaction]
for(var/t in L)
. += " has: [t]\n"
to_chat(world, .)
*/
//creates every subtype of prototype (excluding prototype) and adds it to list L.
//if no list/L is provided, one is created.
/proc/init_subtypes(prototype, list/L)
+1 -2
View File
@@ -865,8 +865,7 @@ The _flatIcons list is a cache for generated icon files.
/mob/proc/AddCamoOverlay(atom/A)//A is the atom which we are using as the overlay.
var/icon/opacity_icon = new(A.icon, A.icon_state)//Don't really care for overlays/underlays.
//Now we need to culculate overlays+underlays and add them together to form an image for a mask.
//var/icon/alpha_mask = getFlatIcon(src)//Accurate but SLOW. Not designed for running each tick. Could have other uses I guess.
var/icon/alpha_mask = getIconMask(src)//Which is why I created that proc. Also a little slow since it's blending a bunch of icons together but good enough.
var/icon/alpha_mask = getIconMask(src)//getFlatIcon(src) is accurate but SLOW. Not designed for running each tick. This is also a little slow since it's blending a bunch of icons together but good enough.
opacity_icon.AddAlphaMask(alpha_mask)//Likely the main source of lag for this proc. Probably not designed to run each tick.
opacity_icon.ChangeOpacity(0.4)//Front end for MapColors so it's fast. 0.5 means half opacity and looks the best in my opinion.
for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it.
-8
View File
@@ -27,7 +27,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
//Stores information regarding runs yet to be merged.
//Run i starts at runBase[i] and extends for runLen[i] elements.
//runBase[i] + runLen[i] == runBase[i+1]
//var/stackSize
var/list/runBases = list()
var/list/runLens = list()
@@ -326,8 +325,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
while(offset < maxOffset && call(cmp)(key, fetchElement(L,base+hint-offset)) < 0) //we are iterating backwards
lastOffset = offset
offset = (offset << 1) + 1 //1 3 7 15
//if(offset <= 0) //int overflow, not an issue here since we are using floats
// offset = maxOffset
if(offset > maxOffset)
offset = maxOffset
@@ -341,8 +338,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
while(offset < maxOffset && call(cmp)(key, fetchElement(L,base+hint+offset)) >= 0)
lastOffset = offset
offset = (offset << 1) + 1
//if(offset <= 0) //int overflow, not an issue here since we are using floats
// offset = maxOffset
if(offset > maxOffset)
offset = maxOffset
@@ -575,7 +570,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
//If array is small, do an insertion sort
if(remaining < MIN_MERGE)
//var/initRunLen = countRunAndMakeAscending(start, end)
binarySort(start, end, start/*+initRunLen*/)
return
@@ -637,8 +631,6 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
break
++end1
++cursor1
//if(++cursor1 >= end1)
// break
val2 = fetchElement(L,cursor2)
-4
View File
@@ -19,10 +19,6 @@
if(month == MM && day == DD)
return 1
// Uncomment this out when debugging!
//else
//return 1
//returns timestamp in a sql and ISO 8601 friendly format
/proc/SQLtime(timevar)
if(!timevar)
-6
View File
@@ -64,7 +64,6 @@ Turf and target are separate in case you want to teleport some distance from a t
errorx = abs(errorx)//Error should never be negative.
errory = abs(errory)
//var/errorxy = round((errorx+errory)/2)//Used for diagonal boxes.
switch(target.dir)//This can be done through equations but switch is the simpler method. And works fast to boot.
//Directs on what values need modifying.
@@ -340,10 +339,6 @@ Turf and target are separate in case you want to teleport some distance from a t
moblist.Add(M)
for(var/mob/living/simple_animal/M in sortmob)
moblist.Add(M)
// for(var/mob/living/silicon/hivebot/M in world)
// mob_list.Add(M)
// for(var/mob/living/silicon/hive_mainframe/M in world)
// mob_list.Add(M)
for(var/mob/living/carbon/true_devil/M in sortmob)
moblist.Add(M)
return moblist
@@ -1447,7 +1442,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
var/target_loc = target.loc
var/endtime = world.time+time
// var/starttime = world.time
. = TRUE
while (world.time < endtime)
stoplag(1)
+47 -50
View File
@@ -1,50 +1,47 @@
//this function places received data into element with specified id.
#define js_byjax {"
function replaceContent() {
var args = Array.prototype.slice.call(arguments);
var id = args\[0\];
var content = args\[1\];
var callback = null;
if(args\[2\]){
callback = args\[2\];
if(args\[3\]){
args = args.slice(3);
}
}
var parent = document.getElementById(id);
if(typeof(parent)!=='undefined' && parent!=null){
parent.innerHTML = content?content:'';
}
if(callback && window\[callback\]){
window\[callback\].apply(null,args);
}
}
"}
/*
sends data to control_id:replaceContent
receiver - mob
control_id - window id (for windows opened with browse(), it'll be "windowname.browser")
target_element - HTML element id
new_content - HTML content
callback - js function that will be called after the data is sent
callback_args - arguments for callback function
Be sure to include required js functions in your page, or it'll raise an exception.
*/
/proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null)
if(receiver && target_element && control_id) // && winexists(receiver, control_id))
var/list/argums = list(target_element, new_content)
if(callback)
argums += callback
if(callback_args)
argums += callback_args
argums = list2params(argums)
/* if(callback_args)
argums += "&[list2params(callback_args)]"
*/
receiver << output(argums,"[control_id]:replaceContent")
return
//this function places received data into element with specified id.
#define js_byjax {"
function replaceContent() {
var args = Array.prototype.slice.call(arguments);
var id = args\[0\];
var content = args\[1\];
var callback = null;
if(args\[2\]){
callback = args\[2\];
if(args\[3\]){
args = args.slice(3);
}
}
var parent = document.getElementById(id);
if(typeof(parent)!=='undefined' && parent!=null){
parent.innerHTML = content?content:'';
}
if(callback && window\[callback\]){
window\[callback\].apply(null,args);
}
}
"}
/*
sends data to control_id:replaceContent
receiver - mob
control_id - window id (for windows opened with browse(), it'll be "windowname.browser")
target_element - HTML element id
new_content - HTML content
callback - js function that will be called after the data is sent
callback_args - arguments for callback function
Be sure to include required js functions in your page, or it'll raise an exception.
*/
/proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null)
if(receiver && target_element && control_id) // && winexists(receiver, control_id))
var/list/argums = list(target_element, new_content)
if(callback)
argums += callback
if(callback_args)
argums += callback_args
argums = list2params(argums)
receiver << output(argums,"[control_id]:replaceContent")
return
-6
View File
@@ -80,12 +80,6 @@
set_waypoint(A)
return
/*
AI restrained() currently does nothing
if(restrained())
RestrainedClickOn(A)
else
*/
A.attack_ai(src)
/*
+3 -3
View File
@@ -23,9 +23,6 @@
//Middle left indicators
#define ui_lingchemdisplay "WEST,CENTER-1:15"
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
#define ui_crafting "12:-10,1:5"
#define ui_building "12:-10,1:21"
#define ui_language_menu "11:6,2:-11"
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
@@ -85,6 +82,9 @@
#define ui_acti "EAST-3:24,SOUTH:5"
#define ui_zonesel "EAST-1:28,SOUTH:5"
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
#define ui_crafting "EAST-4:22,SOUTH:5"
#define ui_building "EAST-4:22,SOUTH:21"
#define ui_language_menu "EAST-4:6,SOUTH:21"
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
+16 -2
View File
@@ -180,6 +180,7 @@
icon_state = "toy9magazine"
max_ammo = 30
multiple_sprites = 2
materials = list(MAT_METAL = 200)
/obj/item/gun/ballistic/automatic/x9/toy
name = "\improper Foam Force X9"
@@ -193,6 +194,7 @@
spread = 90 //MAXIMUM XCOM MEMES (actually that'd be 180 spread)
w_class = WEIGHT_CLASS_BULKY
weapon_weight = WEAPON_HEAVY
origin_tech = "combat=1;magnets=1"
/datum/design/foam_x9
name = "Foam Force X9 Rifle"
@@ -293,6 +295,7 @@
/obj/item/gun/ballistic/automatic/pistol/mag/nopin
pin = null
spawnwithmagazine = FALSE
/datum/design/magpistol
name = "Magpistol"
@@ -351,6 +354,7 @@
fire_sound = 'sound/weapons/magpistol.ogg'
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
origin_tech = "combat=1;magnets=1"
/obj/item/ammo_box/foambox/mag
name = "ammo box (Magnetic Foam Darts)"
@@ -459,6 +463,7 @@
/obj/item/gun/ballistic/automatic/magrifle/nopin
pin = null
spawnwithmagazine = FALSE
/datum/design/magrifle
name = "Magrifle"
@@ -497,6 +502,7 @@
max_ammo = 15
multiple_sprites = 2
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/mag
materials = list(MAT_METAL = 200)
/obj/item/gun/ballistic/automatic/magrifle/toy
name = "foamag rifle"
@@ -505,7 +511,7 @@
needs_permit = FALSE
mag_type = /obj/item/ammo_box/magazine/toy/foamag
casing_ejector = FALSE
origin_tech = "combat=2;engineering=2;magnets=2"
origin_tech = "combat=1;engineering=1;magnets=1"
spread = 60
w_class = WEIGHT_CLASS_BULKY
weapon_weight = WEAPON_HEAVY
@@ -639,6 +645,7 @@
charge_delay = 2
recoil = 2
cell_type = /obj/item/stock_parts/cell/toymagburst
origin_tech = "combat=1;magnets=1"
/obj/item/stock_parts/cell/toymagburst
name = "toy mag burst rifle power supply"
@@ -695,6 +702,7 @@
fire_delay = 0
spread = 60
actions_types = list()
origin_tech = "combat=1;magnets=1"
/obj/item/gun/ballistic/automatic/toy/pistol/stealth/update_icon()
..()
@@ -921,6 +929,7 @@ obj/item/projectile/bullet/c10mm/soporific
desc = "A toy laser with a classic, retro feel and look. Compatible with existing laser tag systems."
ammo_type = list(/obj/item/ammo_casing/energy/laser/raytag)
selfcharge = TRUE
origin_tech = "combat=1;magnets=1"
/datum/design/toyray
name = "RayTag Gun"
@@ -1176,6 +1185,7 @@ obj/item/projectile/bullet/c10mm/soporific
mag_type = /obj/item/ammo_box/magazine/toy/pistol
can_suppress = FALSE
actions_types = list(/datum/action/item_action/pick_color)
origin_tech = "combat=1;magnets=1"
/datum/design/foam_p37
name = "Foam Force Mk.37F"
@@ -1231,4 +1241,8 @@ obj/item/gun/energy/e_gun/cx/worn_overlays(isinhands, icon_file)
if(isinhands)
var/mutable_appearance/body_inhand = mutable_appearance(icon_file, "cxe_body")
body_inhand.color = body_color
. += body_inhand
. += body_inhand
/obj/item/ammo_box/magazine/toy/pistol //forcing this might be a bad idea, but it'll fix the foam gun infinite material exploit
..()
materials = list(MAT_METAL = 200)
-2
View File
@@ -57,8 +57,6 @@ SUBSYSTEM_DEF(events)
/datum/controller/subsystem/events/proc/spawnEvent()
set waitfor = FALSE //for the admin prompt
if(!CONFIG_GET(flag/allow_random_events))
// var/datum/round_event_control/E = locate(/datum/round_event_control/dust) in control
// if(E) E.runEvent()
return
var/gamemode = SSticker.mode.config_tag
-7
View File
@@ -505,14 +505,7 @@ SUBSYSTEM_DEF(shuttle)
// Then we want the point closest to -infinity,-infinity
var/x2 = min(x0, x1)
var/y2 = min(y0, y1)
/*
var/lowx = topleft.x + SHUTTLE_TRANSIT_BORDER
var/lowy = topleft.y + SHUTTLE_TRANSIT_BORDER
var/turf/low_point = locate(lowx, lowy, topleft.z)
new /obj/effect/landmark/stationary(low_point)
to_chat(world, "Starting at the low point, we go [x2],[y2]")
*/
// Then invert the numbers
var/transit_x = topleft.x + SHUTTLE_TRANSIT_BORDER + abs(x2)
var/transit_y = topleft.y + SHUTTLE_TRANSIT_BORDER + abs(y2)
+2
View File
@@ -193,6 +193,8 @@ SUBSYSTEM_DEF(ticker)
if(!setup())
//setup failed
current_state = GAME_STATE_STARTUP
start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
timeLeft = null
Master.SetRunLevel(RUNLEVEL_LOBBY)
if(GAME_STATE_PLAYING)
-2
View File
@@ -15,8 +15,6 @@
var/list/stored_profiles = list() //list of datum/changelingprofile
var/datum/changelingprofile/first_prof = null
//var/list/absorbed_dna = list()
//var/list/protected_dna = list() //dna that is not lost when capacity is otherwise full
var/dna_max = 6 //How many extra DNA strands the changeling can store for transformation.
var/absorbedcount = 0
var/chem_charges = 20
-12
View File
@@ -220,18 +220,6 @@
// This is added to mob so that it can be used without a reference to the browser object
// There is probably a better place for this...
/mob/proc/browse_rsc_icon(icon, icon_state, dir = -1)
/*
var/icon/I
if (dir >= 0)
I = new /icon(icon, icon_state, dir)
else
I = new /icon(icon, icon_state)
setDir("default")
var/filename = "[ckey("[icon]_[icon_state]_[dir]")].png"
src << browse_rsc(I, filename)
return filename
*/
// Registers the on-close verb for a browse window (client/verb/.windowclose)
+9 -2
View File
@@ -2,9 +2,10 @@
dupe_mode = COMPONENT_DUPE_ALLOWED
var/cleanable
var/description
var/mutable_appearance/pic
/datum/component/decal/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_GOD, _color, _layer=TURF_LAYER)
/datum/component/decal/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_GOD, _color, _layer=TURF_LAYER, _description)
if(!isatom(parent) || !_icon || !_icon_state)
. = COMPONENT_INCOMPATIBLE
CRASH("A turf decal was applied incorrectly to [parent.type]: icon:[_icon ? _icon : "none"] icon_state:[_icon_state ? _icon_state : "none"]")
@@ -15,6 +16,7 @@
pic.color = _color
cleanable = _cleanable
description = _description
apply()
@@ -22,6 +24,8 @@
RegisterSignal(COMSIG_ATOM_DIR_CHANGE, .proc/rotate_react)
if(_cleanable)
RegisterSignal(COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react)
if(_description)
RegisterSignal(COMSIG_PARENT_EXAMINE, .proc/examine)
/datum/component/decal/Destroy()
remove()
@@ -50,4 +54,7 @@
/datum/component/decal/proc/clean_react(strength)
if(strength >= cleanable)
qdel(src)
qdel(src)
/datum/component/decal/proc/examine(mob/user)
to_chat(user, description)
@@ -22,8 +22,6 @@
var/last_insert_success
var/precise_insertion = FALSE
var/datum/callback/precondition
//MAX_STACK_SIZE = 50
//MINERAL_MATERIAL_AMOUNT = 2000
/datum/component/material_container/Initialize(list/mat_list, max_amt = 0, _show_on_examine = FALSE, list/allowed_types, datum/callback/_precondition)
materials = list()
-15
View File
@@ -418,24 +418,9 @@
item = "[VV_HTML_ENCODE(name)] = /icon (<span class='value'>[value]</span>)"
#endif
/* else if (istype(value, /image))
#ifdef VARSICON
var/rnd = rand(1, 10000)
var/image/I = value
src << browse_rsc(I.icon, "tmp[REF(value)][rnd].png")
html += "[name] = <img src=\"tmp[REF(value)][rnd].png\">"
#else
html += "[name] = /image (<span class='value'>[value]</span>)"
#endif
*/
else if (isfile(value))
item = "[VV_HTML_ENCODE(name)] = <span class='value'>'[value]'</span>"
//else if (istype(value, /client))
// var/client/C = value
// item = "<a href='?_src_=vars;Vars=[REF(value)]'>[VV_HTML_ENCODE(name)] [REF(value)]</a> = [C] [C.type]"
else if (istype(value, /datum))
var/datum/D = value
if ("[D]" != "[D.type]") //if the thing as a name var, lets use it.
-2
View File
@@ -35,6 +35,4 @@
affected_mob.visible_message("<span class='danger'>[affected_mob] coughs up a swarm of bees!</span>", \
"<span class='userdanger'>You cough up a swarm of bees!</span>")
new /mob/living/simple_animal/hostile/poison/bees(affected_mob.loc)
//if(5)
//Plus if you die, you explode into bees
return
-12
View File
@@ -13,12 +13,6 @@
..()
switch(stage)
if(2)
/*
if(affected_mob.sleeping && prob(40)) //removed until sleeping is fixed
to_chat(affected_mob, "\blue You feel better.")
cure()
return
*/
if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
@@ -36,12 +30,6 @@
if(prob(1))
to_chat(affected_mob, "<span class='danger'>Mucous runs down the back of your throat.</span>")
if(3)
/*
if(affected_mob.sleeping && prob(25)) //removed until sleeping is fixed
to_chat(affected_mob, "\blue You feel better.")
cure()
return
*/
if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
cure()
+3 -2
View File
@@ -29,7 +29,7 @@ GLOBAL_LIST_INIT(huds, list(
var/list/hud_icons = list() //these will be the indexes for the atom's hud_list
/datum/atom_hud/proc/remove_hud_from(mob/M)
if(!M)
if(!M || !hudusers[M])
return
if (!--hudusers[M])
hudusers -= M
@@ -79,7 +79,8 @@ GLOBAL_LIST_INIT(huds, list(
/mob/proc/reload_huds()
for(var/datum/atom_hud/hud in (GLOB.huds|GLOB.active_alternate_appearances))
if(hud && hud.hudusers[src])
hud.add_hud_to(src)
for(var/atom/A in hud.hudatoms)
hud.add_to_single_hud(src, A)
/mob/dead/new_player/reload_huds()
return
+37 -43
View File
@@ -106,43 +106,43 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/maintenance/department/chapel
name = "Chapel Maintenance"
icon_state = "fpmaint"
icon_state = "maint_chapel"
/area/maintenance/department/chapel/monastery
name = "Monastery Maintenance"
icon_state = "fpmaint"
icon_state = "maint_monastery"
/area/maintenance/department/crew_quarters/bar
name = "Bar Maintenance"
icon_state = "fsmaint"
icon_state = "maint_bar"
/area/maintenance/department/crew_quarters/dorms
name = "Dormitory Maintenance"
icon_state = "fsmaint"
icon_state = "maint_dorms"
/area/maintenance/department/crew_quarters/locker
name = "Locker Room Maintenance"
icon_state = "pmaint"
icon_state = "maint_locker"
/area/maintenance/department/eva
name = "EVA Maintenance"
icon_state = "fpmaint"
icon_state = "maint_eva"
/area/maintenance/department/electrical
name = "Electrical Maintenance"
icon_state = "yellow"
icon_state = "maint_electrical"
/area/maintenance/department/engine/atmos
name = "Atmospherics Maintenance"
icon_state = "fpmaint"
icon_state = "maint_atmos"
/area/maintenance/department/security
name = "Security Maintenance"
icon_state = "fpmaint"
icon_state = "maint_sec"
/area/maintenance/department/security/brig
name = "Brig Maintenance"
icon_state = "fpmaint"
icon_state = "maint_brig"
/area/maintenance/department/medical
name = "Medbay Maintenance"
@@ -154,19 +154,19 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/maintenance/department/science
name = "Science Maintenance"
icon_state = "asmaint"
icon_state = "maint_sci"
/area/maintenance/department/cargo
name = "Cargo Maintenance"
icon_state = "apmaint"
icon_state = "maint_cargo"
/area/maintenance/department/bridge
name = "Bridge Maintenance"
icon_state = "maintcentral"
icon_state = "maint_bridge"
/area/maintenance/department/engine
name = "Engineering Maintenance"
icon_state = "amaint"
icon_state = "maint_engi"
/area/maintenance/department/science/xenobiology
name = "Xenobiology Maintenance"
@@ -511,10 +511,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Research Director's Private Quarters"
icon_state = "rd_private"
/area/mint
name = "Mint"
icon_state = "green"
/area/comms
name = "Communications Relay"
icon_state = "tcomsatcham"
@@ -616,7 +612,10 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/crew_quarters/abandoned_gambling_den
name = "Abandoned Gambling Den"
icon_state = "bar"
icon_state = "abandoned_g_den"
/area/crew_quarters/abandoned_gambling_den/secondary
icon_state = "abandoned_g_den_2"
/area/crew_quarters/theatre
name = "Theatre"
@@ -874,7 +873,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/gateway
name = "Gateway"
icon_state = "teleporter"
icon_state = "gateway"
music = "signal"
ambientsounds = ENGINEERING
@@ -1051,33 +1050,41 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Security Checkpoint"
icon_state = "checkpoint1"
/area/security/checkpoint/checkpoint2
name = "Security Checkpoint"
icon_state = "security"
/area/security/checkpoint/auxiliary
icon_state = "checkpoint_aux"
/area/security/checkpoint/tertiary
icon_state = "checkpoint_tert"
/area/security/checkpoint/escape
icon_state = "checkpoint_esc"
/area/security/checkpoint/supply
name = "Security Post - Cargo Bay"
icon_state = "checkpoint1"
icon_state = "checkpoint_supp"
/area/security/checkpoint/engineering
name = "Security Post - Engineering"
icon_state = "checkpoint1"
icon_state = "checkpoint_engi"
/area/security/checkpoint/medical
name = "Security Post - Medbay"
icon_state = "checkpoint1"
icon_state = "checkpoint_med"
/area/security/checkpoint/science
name = "Security Post - Science"
icon_state = "checkpoint1"
icon_state = "checkpoint_sci"
/area/security/checkpoint/science/research
name = "Security Post - Research Division"
icon_state = "checkpoint1"
icon_state = "checkpoint_res"
/area/security/checkpoint/customs
name = "Customs"
icon_state = "bridge"
icon_state = "customs_point"
/area/security/checkpoint/customs/auxiliary
icon_state = "customs_point_aux"
/area/security/vacantoffice
name = "Vacant Office"
@@ -1364,16 +1371,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "eva"
ambientsounds = HIGHSEC
/area/ai_monitored/storage/secure
name = "AI Satellite Storage"
icon_state = "storage"
ambientsounds = HIGHSEC
/area/ai_monitored/storage/emergency
name = "Emergency Storage"
icon_state = "storage"
ambientsounds = HIGHSEC
/area/ai_monitored/storage/satellite
name = "AI Satellite Maint"
icon_state = "storage"
@@ -1511,7 +1508,6 @@ GLOBAL_LIST_INIT(the_station_areas, list (
/area/library,
/area/maintenance,
/area/medical,
// /area/mint, //not present on map
/area/quartermaster,
/area/science,
/area/security,
@@ -1519,9 +1515,7 @@ GLOBAL_LIST_INIT(the_station_areas, list (
/area/storage,
/area/teleporter,
/area/ai_monitored/storage/eva, //do not try to simplify to "/area/ai_monitored" --rastaf0
// /area/ai_monitored/storage/secure, //not present on map
// /area/ai_monitored/storage/emergency, //not present on map
/area/ai_monitored/turret_protected/ai_upload, //do not try to simplify to "/area/ai_monitored/turret_protected" --rastaf0
/area/ai_monitored/turret_protected/ai_upload_foyer,
/area/ai_monitored/turret_protected/ai,
))
))
-2
View File
@@ -257,8 +257,6 @@
if(desc)
to_chat(user, desc)
// *****RM
//to_chat(user, "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]")
if(reagents && (is_open_container() || is_transparent())) //is_open_container() isn't really the right proc for this, but w/e
to_chat(user, "It contains:")
+19 -18
View File
@@ -154,33 +154,34 @@
return
if(!can_buy(40))
return
B.max_integrity = initial(B.max_integrity) * 0.25 //factories that produced a blobbernaut have much lower health
B.obj_integrity = min(B.obj_integrity, B.max_integrity)
B.update_icon()
B.visible_message("<span class='warning'><b>The blobbernaut [pick("rips", "tears", "shreds")] its way out of the factory blob!</b></span>")
playsound(B.loc, 'sound/effects/splat.ogg', 50, 1)
var/mob/living/simple_animal/hostile/blob/blobbernaut/blobber = new /mob/living/simple_animal/hostile/blob/blobbernaut(get_turf(B))
flick("blobbernaut_produce", blobber)
B.naut = blobber
blobber.factory = B
blobber.overmind = src
blobber.update_icons()
blobber.notransform = 1 //stop the naut from moving around
blobber.adjustHealth(blobber.maxHealth * 0.5)
blob_mobs += blobber
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [blob_reagent_datum.name] blobbernaut?", ROLE_BLOB, null, ROLE_BLOB, 50, blobber) //players must answer rapidly
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [blob_reagent_datum.name] blobbernaut?", ROLE_BLOB, null, ROLE_BLOB, 50) //players must answer rapidly
if(candidates.len) //if we got at least one candidate, they're a blobbernaut now.
B.max_integrity = initial(B.max_integrity) * 0.25 //factories that produced a blobbernaut have much lower health
B.obj_integrity = min(B.obj_integrity, B.max_integrity)
B.update_icon()
B.visible_message("<span class='warning'><b>The blobbernaut [pick("rips", "tears", "shreds")] its way out of the factory blob!</b></span>")
playsound(B.loc, 'sound/effects/splat.ogg', 50, 1)
var/mob/living/simple_animal/hostile/blob/blobbernaut/blobber = new /mob/living/simple_animal/hostile/blob/blobbernaut(get_turf(B))
flick("blobbernaut_produce", blobber)
B.naut = blobber
blobber.factory = B
blobber.overmind = src
blobber.update_icons()
blobber.adjustHealth(blobber.maxHealth * 0.5)
blob_mobs += blobber
var/client/C = pick(candidates)
blobber.key = C.key
SEND_SOUND(blobber, sound('sound/effects/blobattack.ogg'))
SEND_SOUND(blobber, sound('sound/effects/attackblob.ogg'))
to_chat(blobber, "<b>You are a blobbernaut!</b>")
to_chat(blobber, "You are powerful, hard to kill, and slowly regenerate near nodes and cores, but will slowly die if not near the blob or if the factory that made you is killed.")
to_chat(blobber, "You are powerful, hard to kill, and slowly regenerate near nodes and cores, <span class='cultlarge'>but will slowly die if not near the blob</span> or if the factory that made you is killed.")
to_chat(blobber, "You can communicate with other blobbernauts and overminds via <b>:b</b>")
to_chat(blobber, "Your overmind's blob reagent is: <b><font color=\"[blob_reagent_datum.color]\">[blob_reagent_datum.name]</b></font>!")
to_chat(blobber, "The <b><font color=\"[blob_reagent_datum.color]\">[blob_reagent_datum.name]</b></font> reagent [blob_reagent_datum.shortdesc ? "[blob_reagent_datum.shortdesc]" : "[blob_reagent_datum.description]"]")
if(blobber)
blobber.notransform = 0
else
to_chat(src, "<span class='warning'>You could not conjure a sentience for your blobbernaut. Your points have been refunded. Try again later.</span>")
add_points(40)
/mob/camera/blob/verb/relocate_core()
set category = "Blob"
+4 -9
View File
@@ -113,19 +113,14 @@
var/objective_count = 1
for(var/datum/objective/objective in team.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[objective_count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
text += "<br><B>Objective #[objective_count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "SUCCESS"))
else
text += "<br><B>Objective #[objective_count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
text += "<br><B>Objective #[objective_count]</B>: [objective.explanation_text] <font color='red'>Fail.</font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "FAIL"))
win = FALSE
if(!(istype(objective, /datum/objective/crew)))
win = FALSE
objective_count++
if(win)
text += "<br><font color='green'><B>The blood brothers were successful!</B></font>"
SSblackbox.record_feedback("tally", "brother_success", 1, "SUCCESS")
else
text += "<br><font color='red'><B>The blood brothers have failed!</B></font>"
SSblackbox.record_feedback("tally", "brother_success", 1, "FAIL")
text += "<br>"
to_chat(world, text)
+6 -13
View File
@@ -113,20 +113,13 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th
if(changeling.objectives.len)
var/count = 1
for(var/datum/objective/objective in changeling.objectives)
if(istype(objective, /datum/objective/crew))
if(objective.check_completion())
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <font color='green'><b>Success!</b></font> <font color='grey'>(Optional)</font>"
SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "SUCCESS"))
else
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <span class='danger'>Fail.</span> <font color='grey'>(Optional)</font>"
SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "FAIL"))
if(objective.check_completion())
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <font color='green'><b>Success!</b></font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "SUCCESS"))
else
if(objective.check_completion())
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <font color='green'><b>Success!</b></font>"
SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "SUCCESS"))
else
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <span class='danger'>Fail.</span>"
SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "FAIL"))
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <span class='danger'>Fail.</span> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.record_feedback("nested tally", "changeling_objective", 1, list("[objective.type]", "FAIL"))
if(!(istype(objective, /datum/objective/crew)))
changelingwin = 0
count++
-2
View File
@@ -44,8 +44,6 @@
contractName = "of revival"
if(CONTRACT_KNOWLEDGE)
contractName = "for knowledge"
//if(CONTRACT_UNWILLING) //Makes round unfun.
// contractName = "against their will"
update_explanation_text()
/datum/objective/devil/soulquality/update_explanation_text()
@@ -26,6 +26,7 @@
var/max_teams = 4
var/list/datum/objective_team/abductor_team/abductor_teams = list()
var/finished = FALSE
var/static/team_count = 0
/datum/game_mode/abduction/announce()
to_chat(world, "<B>The current game mode is - Abduction!</B>")
@@ -44,7 +45,11 @@
return TRUE
/datum/game_mode/abduction/proc/make_abductor_team(datum/mind/agent, datum/mind/scientist)
var/team_number = abductor_teams.len+1
team_count++ //TODO: Fix the edge case of abductor game mode rolling twice+ and failing to setup on first time.
var/team_number = team_count
if(team_number > max_teams)
return //or should it try to stuff them in anway ?
var/datum/objective_team/abductor_team/team = new
team.team_number = team_number
@@ -1,16 +1,6 @@
/datum/objective/sintouched
completed = 1
/* NO ERP OBJECTIVE FOR YOU.
/datum/objective/sintouched/lust
/datum/objective/sintouched/lust/New()
var/mob/dead/D = pick(dead_mob_list)
if(prob(50) && D)
explanation_text = "You know that [D] has perished.... and you think [D] is kinda cute. Make sure everyone knows how HOT [D]'s lifeless body is."
else
explanation_text = "Go get married, then immediately cheat on your new spouse." */
/datum/objective/sintouched/gluttony
explanation_text = "Everything is so delicious. Go eat everything."
-8
View File
@@ -178,14 +178,6 @@
disk_rescued = 0
break
var/crew_evacuated = (SSshuttle.emergency.mode == SHUTTLE_ENDGAME)
//var/operatives_are_dead = is_operatives_are_dead()
//nukes_left
//station_was_nuked
//derp //Used for tracking if the syndies actually haul the nuke to the station //no
//herp //Used for tracking if the syndies got the shuttle off of the z-level //NO, DON'T FUCKING NAME VARS LIKE THIS
if(nuke_off_station == NUKE_SYNDICATE_BASE)
SSticker.mode_result = "loss - syndicate nuked - disk secured"
+6 -13
View File
@@ -113,20 +113,13 @@
if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
var/count = 1
for(var/datum/objective/objective in traitor.objectives)
if(istype(objective, /datum/objective/crew))
if(objective.check_completion())
objectives += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font> <font color='grey'>(Optional)</font>"
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "SUCCESS"))
else
objectives += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font> <font color='grey'>(Optional)</font>"
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "FAIL"))
if(objective.check_completion())
objectives += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "SUCCESS"))
else
if(objective.check_completion())
objectives += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "SUCCESS"))
else
objectives += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "FAIL"))
objectives += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.record_feedback("nested tally", "traitor_objective", 1, list("[objective.type]", "FAIL"))
if(!(istype(objective, /datum/objective/crew)))
traitorwin = FALSE
count++
+8 -15
View File
@@ -47,7 +47,7 @@
for(var/datum/mind/wizard in wizards)
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
return FALSE
for(var/obj/item/phylactery/P in GLOB.poi_list) //TODO : IsProperlyDead()
if(P.mind && P.mind.has_antag_datum(/datum/antagonist/wizard))
return FALSE
@@ -55,7 +55,7 @@
if(SSevents.wizardmode) //If summon events was active, turn it off
SSevents.toggleWizardmode()
SSevents.resetFrequency()
return TRUE
/datum/game_mode/wizard/declare_completion()
@@ -89,20 +89,13 @@
var/count = 1
var/wizardwin = 1
for(var/datum/objective/objective in wizard.objectives)
if(istype(objective, /datum/objective/crew))
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font> <font color='grey'>(Optional)</font>"
SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "SUCCESS"))
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font> <font color='grey'>(Optional)</font>"
SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "FAIL"))
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "SUCCESS"))
else
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "SUCCESS"))
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "FAIL"))
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font> [istype(objective, /datum/objective/crew) ? "<font color='grey'>(Optional)</font>" : ""]"
SSblackbox.record_feedback("nested tally", "wizard_objective", 1, list("[objective.type]", "FAIL"))
if(!(istype(objective, /datum/objective/crew)))
wizardwin = 0
count++
+72 -74
View File
@@ -1,74 +1,72 @@
/obj/machinery/computer/operating
name = "operating computer"
desc = "Used to monitor the vitals of a patient during surgery."
icon_screen = "crew"
icon_keyboard = "med_key"
circuit = /obj/item/circuitboard/computer/operating
var/mob/living/carbon/human/patient
var/obj/structure/table/optable/table
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/operating/Initialize()
. = ..()
find_table()
/obj/machinery/computer/operating/proc/find_table()
for(var/dir in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, dir))
if(table)
table.computer = src
break
/obj/machinery/computer/operating/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/computer/operating/interact(mob/user)
var/dat = ""
if(table)
dat += "<B>Patient information:</B><BR>"
if(table.check_patient())
patient = table.patient
dat += get_patient_info()
else
patient = null
dat += "<B>No patient detected</B>"
else
dat += "<B>Operating table not found.</B>"
var/datum/browser/popup = new(user, "op", "Operating Computer", 400, 500)
popup.set_content(dat)
popup.open()
/obj/machinery/computer/operating/proc/get_patient_info()
var/dat = {"
<div class='statusLabel'>Patient:</div> [patient.stat ? "<span class='bad'>Non-Responsive</span>" : "<span class='good'>Stable</span>"]<BR>
<div class='statusLabel'>Blood Type:</div> [patient.dna.blood_type]
<BR>
<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: [max(patient.health, 0)]%;' class='progressFill good'></div></div><div class='statusValue'>[patient.health]%</div></div>
<div class='line'><div class='statusLabel'>\> Brute Damage:</div><div class='progressBar'><div style='width: [max(patient.getBruteLoss(), 0)]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getBruteLoss()]%</div></div>
<div class='line'><div class='statusLabel'>\> Resp. Damage:</div><div class='progressBar'><div style='width: [max(patient.getOxyLoss(), 0)]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getOxyLoss()]%</div></div>
<div class='line'><div class='statusLabel'>\> Toxin Content:</div><div class='progressBar'><div style='width: [max(patient.getToxLoss(), 0)]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getToxLoss()]%</div></div>
<div class='line'><div class='statusLabel'>\> Burn Severity:</div><div class='progressBar'><div style='width: [max(patient.getFireLoss(), 0)]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getFireLoss()]%</div></div>
"}
if(patient.surgeries.len)
dat += "<BR><BR><B>Initiated Procedures</B><div class='statusDisplay'>"
for(var/datum/surgery/procedure in patient.surgeries)
dat += "[capitalize(procedure.name)]<BR>"
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
dat += "Next step: [capitalize(surgery_step.name)]"
if(surgery_step.repeatable)
dat += " or "
var/datum/surgery_step/next_step = procedure.get_surgery_next_step()
if(next_step)
dat += "[capitalize(next_step.name)]"
else
dat += "finish operation"
dat += "<BR>"
dat += "</div>"
return dat
/obj/machinery/computer/operating
name = "operating computer"
desc = "Used to monitor the vitals of a patient during surgery."
icon_screen = "crew"
icon_keyboard = "med_key"
circuit = /obj/item/circuitboard/computer/operating
var/mob/living/carbon/human/patient
var/obj/structure/table/optable/table
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/operating/Initialize()
. = ..()
find_table()
/obj/machinery/computer/operating/proc/find_table()
for(var/direction in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, direction))
if(table)
table.computer = src
break
/obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "operating_computer", name, 350, 470, master_ui, state)
ui.open()
/obj/machinery/computer/operating/ui_data(mob/user)
var/list/data = list()
data["table"] = table
if(table)
data["patient"] = list()
if(table.check_patient())
patient = table.patient
switch(patient.stat)
if(CONSCIOUS)
data["patient"]["stat"] = "Conscious"
data["patient"]["statstate"] = "good"
if(SOFT_CRIT)
data["patient"]["stat"] = "Conscious"
data["patient"]["statstate"] = "average"
if(UNCONSCIOUS)
data["patient"]["stat"] = "Unconscious"
data["patient"]["statstate"] = "average"
if(DEAD)
data["patient"]["stat"] = "Dead"
data["patient"]["statstate"] = "bad"
data["patient"]["health"] = patient.health
data["patient"]["blood_type"] = patient.dna.blood_type
data["patient"]["maxHealth"] = patient.maxHealth
data["patient"]["minHealth"] = HEALTH_THRESHOLD_DEAD
data["patient"]["bruteLoss"] = patient.getBruteLoss()
data["patient"]["fireLoss"] = patient.getFireLoss()
data["patient"]["toxLoss"] = patient.getToxLoss()
data["patient"]["oxyLoss"] = patient.getOxyLoss()
if(patient.surgeries.len)
data["procedures"] = list()
for(var/datum/surgery/procedure in patient.surgeries)
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
var/alternative_step
if(surgery_step.repeatable)
var/datum/surgery_step/next_step = procedure.get_surgery_next_step()
if(next_step)
alternative_step = capitalize(next_step.name)
else
alternative_step = "Finish operation"
data["procedures"] += list(list(
"name" = capitalize(procedure.name),
"next_step" = capitalize(surgery_step.name),
"alternative_step" = alternative_step
))
return data
+4 -3
View File
@@ -111,15 +111,16 @@
if(!(flags_1 & NODECONSTRUCT_1))
if(circuit) //no circuit, no computer frame
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer(src.loc)
A.dir = dir
A.circuit = circuit
A.anchored = TRUE
if(stat & BROKEN)
if(user)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
else
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
new /obj/item/shard(src.loc)
new /obj/item/shard(src.loc)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
new /obj/item/shard(drop_location())
new /obj/item/shard(drop_location())
A.state = 3
A.icon_state = "3"
else
+32 -20
View File
@@ -8,7 +8,7 @@
switch(state)
if(0)
if(istype(P, /obj/item/wrench))
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start wrenching the frame into place...</span>")
if(do_after(user, 20*P.toolspeed, target = src))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
@@ -21,19 +21,19 @@
if(!WT.isOn())
to_chat(user, "<span class='warning'>[WT] must be on to complete this task!</span>")
return
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
if(do_after(user, 20*P.toolspeed, target = src))
if(!src || !WT.isOn())
return
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
var/obj/item/stack/sheet/metal/M = new (loc, 5)
var/obj/item/stack/sheet/metal/M = new (drop_location(), 5)
M.add_fingerprint(user)
qdel(src)
return
if(1)
if(istype(P, /obj/item/wrench))
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
if(do_after(user, 20*P.toolspeed, target = src))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
@@ -43,7 +43,7 @@
if(istype(P, /obj/item/circuitboard/computer) && !circuit)
if(!user.transferItemToLoc(P, null))
return
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You place [P] inside the frame.</span>")
icon_state = "1"
circuit = P
@@ -54,13 +54,13 @@
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
return
if(istype(P, /obj/item/screwdriver) && circuit)
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw [circuit] into place.</span>")
state = 2
icon_state = "2"
return
if(istype(P, /obj/item/crowbar) && circuit)
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove [circuit].</span>")
state = 1
icon_state = "0"
@@ -70,7 +70,7 @@
return
if(2)
if(istype(P, /obj/item/screwdriver) && circuit)
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = 1
icon_state = "1"
@@ -78,7 +78,7 @@
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start adding cables to the frame...</span>")
if(do_after(user, 20*P.toolspeed, target = src))
if(C.get_amount() >= 5 && state == 2)
@@ -91,11 +91,11 @@
return
if(3)
if(istype(P, /obj/item/wirecutters))
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = 2
icon_state = "2"
var/obj/item/stack/cable_coil/A = new (loc)
var/obj/item/stack/cable_coil/A = new (drop_location())
A.amount = 5
A.add_fingerprint(user)
return
@@ -106,7 +106,7 @@
to_chat(user, "<span class='warning'>You need two glass sheets to continue construction!</span>")
return
else
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
if(do_after(user, 20, target = src))
if(G.get_amount() >= 2 && state == 3)
@@ -117,17 +117,18 @@
return
if(4)
if(istype(P, /obj/item/crowbar))
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = 3
icon_state = "3"
var/obj/item/stack/sheet/glass/G = new (loc, 2)
var/obj/item/stack/sheet/glass/G = new (drop_location(), 2)
G.add_fingerprint(user)
return
if(istype(P, /obj/item/screwdriver))
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
var/obj/B = new src.circuit.build_path (src.loc, circuit)
var/obj/B = new circuit.build_path (loc, circuit)
B.dir = dir
transfer_fingerprints_to(B)
qdel(src)
return
@@ -138,8 +139,19 @@
/obj/structure/frame/computer/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(state == 4)
new /obj/item/shard(loc)
new /obj/item/shard(loc)
new /obj/item/shard(drop_location())
new /obj/item/shard(drop_location())
if(state >= 3)
new /obj/item/stack/cable_coil(loc , 5)
..()
new /obj/item/stack/cable_coil(drop_location(), 5)
..()
/obj/structure/frame/computer/AltClick(mob/user)
..()
if(!in_range(src, user) || !isliving(user) || user.incapacitated())
return
if(anchored)
to_chat(usr, "<span class='warning'>You must unwrench [src] before rotating it!</span>")
return
setDir(turn(dir, -90))
@@ -129,8 +129,8 @@
/obj/machinery/computer/gulag_teleporter_computer/proc/findteleporter()
var/obj/machinery/gulag_teleporter/teleporterf = null
for(dir in GLOB.cardinals)
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, dir))
for(var/direction in GLOB.cardinals)
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, direction))
if(teleporterf && teleporterf.is_operational())
return teleporterf
-4
View File
@@ -100,10 +100,6 @@
dat += text("<td>[]</td>", R.fields["p_stat"])
dat += text("<td>[]</td></tr>", R.fields["m_stat"])
dat += "</table><hr width='75%' />"
// if(GLOB.data_core.general)
// for(var/datum/data/record/R in sortRecord(GLOB.data_core.general))
// dat += "<A href='?src=[REF(src)];d_rec=[R.fields["id"]]'>[R.fields["id"]]: [R.fields["name"]]<BR>"
// //Foreach goto(132)
dat += "<HR><A href='?src=[REF(src)];screen=1'>Back</A>"
if(3)
dat += "<B>Records Maintenance</B><HR>\n<A href='?src=[REF(src)];back=1'>Backup To Disk</A><BR>\n<A href='?src=[REF(src)];u_load=1'>Upload From Disk</A><BR>\n<A href='?src=[REF(src)];del_all=1'>Delete All Records</A><BR>\n<BR>\n<A href='?src=[REF(src)];screen=1'>Back</A>"
-3
View File
@@ -119,9 +119,6 @@
//Message Logs
if(1)
var/index = 0
//var/recipient = "Unspecified" //name of the person
//var/sender = "Unspecified" //name of the sender
//var/message = "Blank" //transferred message
dat += "<center><A href='?src=[REF(src)];back=1'>Back</a> - <A href='?src=[REF(src)];refresh=1'>Refresh</center><hr>"
dat += "<table border='1' width='100%'><tr><th width = '5%'>X</th><th width='15%'>Sender</th><th width='15%'>Recipient</th><th width='300px' word-wrap: break-word>Message</th></tr>"
for(var/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
+2 -2
View File
@@ -27,8 +27,8 @@
/obj/machinery/computer/teleporter/proc/link_power_station()
if(power_station)
return
for(dir in GLOB.cardinals)
power_station = locate(/obj/machinery/teleport/station, get_step(src, dir))
for(var/direction in GLOB.cardinals)
power_station = locate(/obj/machinery/teleport/station, get_step(src, direction))
if(power_station)
break
return power_station
+4 -4
View File
@@ -261,7 +261,7 @@
justzap = TRUE
addtimer(CALLBACK(src, .proc/unzap), 10)
return
else /*if(src.justzap)*/
else
return
else if(user.hallucinating() && ishuman(user) && prob(4) && !operating)
var/mob/living/carbon/human/H = user
@@ -1358,7 +1358,7 @@
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "ai_airlock", name, 550, 430, master_ui, state)
ui = new(user, src, ui_key, "ai_airlock", name, 550, 456, master_ui, state)
ui.open()
/obj/machinery/door/airlock/ui_data()
@@ -1371,8 +1371,6 @@
power["backup_timeleft"] = src.secondsBackupPowerLost
data["power"] = power
data["density"] = density
data["welded"] = welded
data["shock"] = secondsElectrified == 0 ? 2 : 0
data["shock_timeleft"] = secondsElectrified
data["id_scanner"] = !aiDisabledIdScanner
@@ -1381,6 +1379,8 @@
data["lights"] = lights // bolt lights
data["safe"] = safe // safeties
data["speed"] = normalspeed // safe speed
data["welded"] = welded // welded
data["opened"] = !density // opened
var/list/wire = list()
wire["main_1"] = !wires.is_cut(WIRE_POWER1)
-3
View File
@@ -63,9 +63,6 @@
spark_system = null
return ..()
//process()
//return
/obj/machinery/door/CollidedWith(atom/movable/AM)
if(operating || emagged)
return
+3 -2
View File
@@ -45,8 +45,9 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
return
if(usr.stat || usr.restrained() || !usr.canmove)
return
src.setDir(turn(src.dir, 90))
return
setDir(turn(dir, -90))
to_chat(usr, "<span class='notice'>You adjust [src]'s dish to face to the [dir2text(dir)].</span>")
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
/obj/machinery/doppler_array/AltClick(mob/living/user)
if(!istype(user) || user.incapacitated())
-1
View File
@@ -73,7 +73,6 @@
if(src.z in GLOB.station_z_levels)
add_overlay("overlay_[GLOB.security_level]")
else
//var/green = SEC_LEVEL_GREEN
add_overlay("overlay_[SEC_LEVEL_GREEN]")
if(detecting)
-8
View File
@@ -119,7 +119,6 @@
if(!colour2 && !T.density)
var/datum/gas_mixture/environment = T.return_air()
var/turf_total = environment.total_moles()
//var/turf_total = T.co2 + T.oxygen + T.poison + T.sl_gas + T.n2
var/t1 = turf_total / MOLES_CELLSTANDARD * 150
@@ -242,9 +241,6 @@
else
colour = rgb(255,128,128)
//if(istype(AM, /obj/structure/blob))
// colour = rgb(255,0,255)
var/area/A = T.loc
if(A.fire)
@@ -296,10 +292,6 @@
src.close(user)
/* if(seccomp == src)
drawmap(user)
else
user.clearmap()*/
return
+1 -1
View File
@@ -20,7 +20,7 @@ Buildable meters
w_class = WEIGHT_CLASS_NORMAL
level = 2
var/piping_layer = PIPING_LAYER_DEFAULT
var/RPD_type //TEMP: kill this once RPDs get a rewrite pls
var/RPD_type
/obj/item/pipe/directional
RPD_type = PIPE_UNARY
+6 -6
View File
@@ -35,8 +35,8 @@
/obj/machinery/teleport/hub/proc/link_power_station()
if(power_station)
return
for(dir in list(NORTH,EAST,SOUTH,WEST))
power_station = locate(/obj/machinery/teleport/station, get_step(src, dir))
for(var/direction in GLOB.cardinals)
power_station = locate(/obj/machinery/teleport/station, get_step(src, direction))
if(power_station)
break
return power_station
@@ -127,13 +127,13 @@
efficiency = E - 1
/obj/machinery/teleport/station/proc/link_console_and_hub()
for(dir in list(NORTH,EAST,SOUTH,WEST))
teleporter_hub = locate(/obj/machinery/teleport/hub, get_step(src, dir))
for(var/direction in GLOB.cardinals)
teleporter_hub = locate(/obj/machinery/teleport/hub, get_step(src, direction))
if(teleporter_hub)
teleporter_hub.link_power_station()
break
for(dir in list(NORTH,EAST,SOUTH,WEST))
teleporter_console = locate(/obj/machinery/computer/teleporter, get_step(src, dir))
for(var/direction in GLOB.cardinals)
teleporter_console = locate(/obj/machinery/computer/teleporter, get_step(src, direction))
if(teleporter_console)
teleporter_console.link_power_station()
break
-10
View File
@@ -622,16 +622,6 @@
IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY CANISTER CHARGES in vending_items.dm
*/
/*
/obj/machinery/vending/atmospherics //Commenting this out until someone ponies up some actual working, broken, and unpowered sprites - Quarxink
name = "Tank Vendor"
desc = "A vendor with a wide variety of masks and gas tanks."
icon = 'icons/obj/objects.dmi'
icon_state = "dispenser"
product_paths = "/obj/item/tank/internals/oxygen;/obj/item/tank/internals/plasma;/obj/item/tank/internals/emergency_oxygen;/obj/item/tank/internals/emergency_oxygen/engi;/obj/item/clothing/mask/breath"
product_amounts = "10;10;10;5;25"
*/
/obj/machinery/vending/boozeomat
name = "\improper Booze-O-Mat"
desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one."
-11
View File
@@ -15,17 +15,6 @@
max_equip = 3
var/squeak = 0
/*
/obj/mecha/combat/honker/New()
..()
weapons += new /datum/mecha_weapon/honker(src)
weapons += new /datum/mecha_weapon/missile_rack/banana_mortar(src)
weapons += new /datum/mecha_weapon/missile_rack/mousetrap_mortar(src)
selected_weapon = weapons[1]
return
*/
/obj/mecha/combat/honker/get_stats_part()
var/integrity = obj_integrity/max_integrity*100
var/cell_charge = get_charge()
+125 -13
View File
@@ -42,6 +42,12 @@
/obj/effect/turf_decal/stripes/corner
icon_state = "warninglinecorner"
/obj/effect/turf_decal/stripes/box
icon_state = "warn_box"
/obj/effect/turf_decal/stripes/full
icon_state = "warn_full"
/obj/effect/turf_decal/stripes/asteroid/line
icon_state = "ast_warn"
@@ -51,32 +57,138 @@
/obj/effect/turf_decal/stripes/asteroid/corner
icon_state = "ast_warn_corner"
/obj/effect/turf_decal/stripes/asteroid/box
icon_state = "ast_warn_box"
/obj/effect/turf_decal/stripes/asteroid/full
icon_state = "ast_warn_full"
/obj/effect/turf_decal/stripes/white/line
icon_state = "warningline_white"
/obj/effect/turf_decal/stripes/white/end
icon_state = "warn_end_white"
/obj/effect/turf_decal/stripes/white/corner
icon_state = "warninglinecorner_white"
/obj/effect/turf_decal/stripes/white/box
icon_state = "warn_box_white"
/obj/effect/turf_decal/stripes/white/full
icon_state = "warn_full_white"
/obj/effect/turf_decal/stripes/red/line
icon_state = "warningline_red"
/obj/effect/turf_decal/stripes/red/end
icon_state = "warn_end_red"
/obj/effect/turf_decal/stripes/red/corner
icon_state = "warninglinecorner_red"
/obj/effect/turf_decal/stripes/red/box
icon_state = "warn_box_red"
/obj/effect/turf_decal/stripes/red/full
icon_state = "warn_full_red"
/obj/effect/turf_decal/delivery
icon_state = "delivery"
/obj/effect/turf_decal/delivery/white
icon_state = "delivery_white"
/obj/effect/turf_decal/delivery/red
icon_state = "delivery_red"
/obj/effect/turf_decal/bot
icon_state = "bot"
/obj/effect/turf_decal/bot/right
icon_state = "bot_right"
/obj/effect/turf_decal/bot/left
icon_state = "bot_left"
/obj/effect/turf_decal/bot_white
icon_state = "bot_white"
/obj/effect/turf_decal/bot_white/right
icon_state = "bot_right_white"
/obj/effect/turf_decal/bot_white/left
icon_state = "bot_left_white"
/obj/effect/turf_decal/bot_red
icon_state = "bot_red"
/obj/effect/turf_decal/bot_red/right
icon_state = "bot_right_red"
/obj/effect/turf_decal/bot_red/left
icon_state = "bot_left_red"
/obj/effect/turf_decal/loading_area
icon_state = "loading_area"
icon_state = "loadingarea"
/obj/effect/turf_decal/loading_area/white
icon_state = "loadingarea_white"
/obj/effect/turf_decal/loading_area/red
icon_state = "loadingarea_red"
/obj/effect/turf_decal/sand
icon_state = "sandyfloor"
/obj/effect/turf_decal/sand/warning
icon_state = "sandy_warn"
/obj/effect/turf_decal/sand/warning/corner
icon_state = "sandy_warn_corner"
/obj/effect/turf_decal/sand/plating
icon_state = "sandyplating"
/obj/effect/turf_decal/sand/plating/warning
icon_state = "sandy_plating_warn"
/obj/effect/turf_decal/sand/plating/warning/corner
icon_state = "sandy_plating_warn_corner"
/obj/effect/turf_decal/plaque
icon_state = "plaque"
/obj/effect/turf_decal/caution
icon_state = "caution"
/obj/effect/turf_decal/caution/white
icon_state = "caution_white"
/obj/effect/turf_decal/caution/red
icon_state = "caution_red"
/obj/effect/turf_decal/caution/stand_clear
icon_state = "stand_clear"
/obj/effect/turf_decal/caution/stand_clear/white
icon_state = "stand_clear_white"
/obj/effect/turf_decal/caution/stand_clear/red
icon_state = "stand_clear_red"
/obj/effect/turf_decal/arrows
icon_state = "arrows"
/obj/effect/turf_decal/arrows/white
icon_state = "arrows_white"
/obj/effect/turf_decal/arrows/red
icon_state = "arrows_red"
/obj/effect/turf_decal/box
icon_state = "box"
/obj/effect/turf_decal/box/corners
icon_state = "box_corners"
/obj/effect/turf_decal/box/white
icon_state = "box_white"
/obj/effect/turf_decal/box/white/corners
icon_state = "box_corners_white"
/obj/effect/turf_decal/box/red
icon_state = "box_red"
/obj/effect/turf_decal/box/red/corners
icon_state = "box_corners_red"
+5 -2
View File
@@ -59,8 +59,11 @@
obj_integrity = myseed.endurance
max_integrity = myseed.endurance
var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow)
if(G)
set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color)
if(ispath(G)) // Seeds were ported to initialize so their genes are still typepaths here, luckily their initializer is smart enough to handle us doing this
myseed.genes -= G
G = new G
myseed.genes += G
set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color)
setDir(CalcDir())
var/base_icon_state = initial(icon_state)
if(!floor)
+32 -1
View File
@@ -162,4 +162,35 @@
name = "25% cyborg mask spawner"
loot = list(
/obj/item/clothing/mask/gas/cyborg = 25,
"" = 75)
"" = 75)
/obj/effect/spawner/lootdrop/aimodule_harmless // These shouldn't allow the AI to start butchering people
name = "harmless AI module spawner"
loot = list(
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/full/asimovpp,
/obj/item/aiModule/core/full/hippocratic,
/obj/item/aiModule/core/full/paladin_devotion,
/obj/item/aiModule/core/full/paladin
)
/obj/effect/spawner/lootdrop/aimodule_neutral // These shouldn't allow the AI to start butchering people without reason
name = "neutral AI module spawner"
loot = list(
/obj/item/aiModule/core/full/corp,
/obj/item/aiModule/core/full/maintain,
/obj/item/aiModule/core/full/drone,
/obj/item/aiModule/core/full/peacekeeper,
/obj/item/aiModule/core/full/reporter,
/obj/item/aiModule/core/full/robocop,
/obj/item/aiModule/core/full/liveandletlive
)
/obj/effect/spawner/lootdrop/aimodule_harmful // These will get the shuttle called
name = "harmful AI module spawner"
loot = list(
/obj/item/aiModule/core/full/antimov,
/obj/item/aiModule/core/full/balance,
/obj/item/aiModule/core/full/tyrant,
/obj/item/aiModule/core/full/thermurderdynamic
)
-1
View File
@@ -51,7 +51,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/item_color = null //this needs deprecating, soonish
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
var/permeability_coefficient = 1 // for chemicals/diseases
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
+8
View File
@@ -564,3 +564,11 @@ AI MODULES
/obj/item/aiModule/core/full/balance
name = "'Guardian of Balance' Core AI Module"
law_id = "balance"
/obj/item/aiModule/core/full/maintain
name = "'Station Efficiency' Core AI Module"
law_id = "maintain"
/obj/item/aiModule/core/full/peacekeeper
name = "'Peacekeeper' Core AI Module"
law_id = "peacekeeper"
+125 -399
View File
@@ -13,7 +13,6 @@ RPD
#define CATEGORY_DISPOSALS 1
//find the defines in code\_DEFINES\pipe_construction.dm
GLOBAL_LIST_INIT(atmos_pipe_recipes, list(
"Pipes" = list(
new /datum/pipe_info/pipe("Pipe", /obj/machinery/atmospherics/pipe/simple),
@@ -60,10 +59,8 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info
var/name
var/icon
var/icon_state
var/id = -1
var/categoryId
var/dirtype = PIPE_BENDABLE
/datum/pipe_info/proc/Render(dispenser)
@@ -80,26 +77,51 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info/proc/Params()
return ""
/datum/pipe_info/proc/get_preview(selected_dir)
var/list/dirs
switch(dirtype)
if(PIPE_STRAIGHT, PIPE_BENDABLE)
dirs = list("[NORTH]" = "Vertical", "[EAST]" = "Horizontal")
if(dirtype == PIPE_BENDABLE)
dirs += list("[NORTHWEST]" = "West to North", "[NORTHEAST]" = "North to East",
"[SOUTHWEST]" = "South to West", "[SOUTHEAST]" = "East to South")
if(PIPE_TRINARY, PIPE_TRIN_M)
dirs = list("[NORTH]" = "West South East", "[EAST]" = "North West South",
"[SOUTH]" = "East North West", "[WEST]" = "South East North")
if(dirtype == PIPE_TRIN_M)
dirs += list("[SOUTHEAST]" = "West South East", "[NORTHEAST]" = "North West South",
"[NORTHWEST]" = "East North West", "[SOUTHWEST]" = "South East North")
if(PIPE_UNARY)
dirs = list("[NORTH]" = "North", "[EAST]" = "East", "[SOUTH]" = "South", "[WEST]" = "West")
if(PIPE_ONEDIR)
dirs = list("[SOUTH]" = name)
/datum/pipe_info/pipe
categoryId = CATEGORY_ATMOS
icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
var/list/rows = list()
var/list/row = list("previews" = list())
var/i = 0
for(var/dir in dirs)
var/flipped = (dirtype == PIPE_TRIN_M) && (text2num(dir) in GLOB.diagonals)
row["previews"] += list(list("selected" = (text2num(dir) == selected_dir), "dir" = dir2text(text2num(dir)), "dir_name" = dirs[dir], "icon_state" = icon_state, "flipped" = flipped))
if(i++ || dirtype == PIPE_ONEDIR)
rows += list(row)
row = list("previews" = list())
i = 0
return rows
/datum/pipe_info/pipe/New(label, obj/machinery/atmospherics/path)
name = label
id = path
icon_state = initial(path.pipe_state)
dirtype = initial(path.construction_type)
var/obj/item/pipe/c = initial(path.construction_type)
dirtype = initial(c.RPD_type)
/datum/pipe_info/pipe/Params()
return "makepipe=[id]&type=[dirtype]"
/datum/pipe_info/meter
categoryId = CATEGORY_ATMOS
dirtype = PIPE_ONEDIR
icon = 'icons/obj/meter.dmi'
icon_state = "meterX"
dirtype = PIPE_ONEDIR
/datum/pipe_info/meter/New(label)
name = label
@@ -107,11 +129,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info/meter/Params()
return "makemeter=[id]&type=[dirtype]"
/datum/pipe_info/disposal
categoryId = CATEGORY_DISPOSALS
icon = 'icons/obj/atmospherics/pipes/disposal.dmi'
/datum/pipe_info/disposal/New(label, obj/path, dt=PIPE_UNARY)
name = label
id = path
@@ -126,7 +143,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
return "dmake=[id]&type=[dirtype]"
/obj/item/pipe_dispenser
name = "Rapid Piping Device (RPD)"
desc = "A device used to rapidly pipe things."
@@ -144,29 +160,35 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/working = 0
var/p_type = /obj/machinery/atmospherics/pipe/simple
var/p_conntype = PIPE_BENDABLE
var/p_dir = 1
var/mode = ATMOS_MODE
var/p_dir = NORTH
var/p_flipped = FALSE
var/p_class = ATMOS_MODE
var/list/paint_colors = list(
"grey" = rgb(255,255,255),
"red" = rgb(255,0,0),
"blue" = rgb(0,0,255),
"cyan" = rgb(0,256,249),
"green" = rgb(30,255,0),
"yellow" = rgb(255,198,0),
"purple" = rgb(130,43,255)
"Grey" = rgb(255,255,255),
"Red" = rgb(255,0,0),
"Blue" = rgb(0,0,255),
"Cyan" = rgb(0,256,249),
"Green" = rgb(30,255,0),
"Yellow" = rgb(255,198,0),
"Purple" = rgb(130,43,255)
)
var/paint_color="grey"
var/paint_color="Grey"
var/screen = CATEGORY_ATMOS //Starts on the atmos tab.
var/piping_layer = PIPING_LAYER_DEFAULT
var/datum/pipe_info/recipe
var/static/datum/pipe_info/first_atmos
var/static/datum/pipe_info/first_disposal
/obj/item/pipe_dispenser/New()
. = ..()
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
if(!first_atmos)
first_atmos = GLOB.atmos_pipe_recipes[GLOB.atmos_pipe_recipes[1]][1]
if(!first_disposal)
first_disposal = GLOB.disposal_pipe_recipes[GLOB.disposal_pipe_recipes[1]][1]
recipe = first_atmos
/obj/item/pipe_dispenser/Destroy()
qdel(spark_system)
@@ -174,7 +196,7 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
return ..()
/obj/item/pipe_dispenser/attack_self(mob/user)
show_menu(user)
ui_interact(user)
/obj/item/pipe_dispenser/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] points the end of the RPD down [user.p_their()] throat and presses a button! It looks like [user.p_theyre()] trying to commit suicide...</span>")
@@ -182,386 +204,85 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
playsound(get_turf(user), 'sound/items/deconstruct.ogg', 50, 1)
return(BRUTELOSS)
/obj/item/pipe_dispenser/proc/render_dir_img(_dir,pic,title,flipped=0)
var/selected=" class=\"imglink\""
if(_dir == p_dir)
selected=" class=\"imglink selected\""
return "<a href=\"?src=[REF(src)];setdir=[_dir];flipped=[flipped]\" title=\"[title]\"[selected]\"><img src=\"[pic]\" /></a>"
/obj/item/pipe_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/icon_states/multiple_icons/pipes)
assets.send(user)
ui = new(user, src, ui_key, "rpd", name, 300, 550, master_ui, state)
ui.open()
/obj/item/pipe_dispenser/proc/show_menu(mob/user)
if(!user || !src)
return 0
var/dat = {"<h2>Type</h2>
<b>Utilities:</b>
<ul>"}
if(p_class != EATING_MODE)
dat += "<li><a href='?src=[REF(src)];eatpipes=1;type=-1'>Eat Pipes</a></li>"
else
dat += "<li><span class='linkOn'>Eat Pipes</span></li>"
if(p_class != PAINT_MODE)
dat += "<li><a href='?src=[REF(src)];paintpipes=1;type=-1'>Paint Pipes</a></li>"
else
dat += "<li><span class='linkOn'>Paint Pipes</span></li>"
dat += "</ul>"
/obj/item/pipe_dispenser/ui_data(mob/user)
var/list/data = list(
"mode" = mode,
"screen" = screen,
"piping_layer" = piping_layer,
"preview_rows" = recipe.get_preview(p_dir),
"categories" = list(),
"paint_colors" = list()
)
dat += "<b>Category:</b><ul>"
if(screen == CATEGORY_ATMOS)
var/list/recipes = GLOB.disposal_pipe_recipes
var/datum/pipe_info/first_recipe = recipes[recipes[1]][1]
dat += "<span class='linkOn'>Atmospherics</span> "
dat += "<A href='?src=[REF(src)]&screen=[CATEGORY_DISPOSALS]&[first_recipe.Params()]'>Disposals</A><BR>"
dat += "Atmospherics Piping Layer: "
var/list/recipes
if(screen == ATMOS_MODE)
recipes = GLOB.atmos_pipe_recipes
else if(screen == DISPOSALS_MODE)
recipes = GLOB.disposal_pipe_recipes
for(var/c in recipes)
var/list/cat = recipes[c]
var/list/r = list()
for(var/i in 1 to cat.len)
var/datum/pipe_info/info = cat[i]
r += list(list("pipe_name" = info.name, "pipe_index" = i, "selected" = (info == recipe)))
data["categories"] += list(list("cat_name" = c, "recipes" = r))
var/layers_total = PIPING_LAYER_MAX - PIPING_LAYER_MIN + 1
for(var/iter = PIPING_LAYER_MIN, iter <= layers_total, iter++)
if(iter == piping_layer)
dat += "<span class='linkOn'>[iter]</span>"
else
dat += "<A href='?src=[REF(src)];setlayer=[iter]'>[iter]</A>"
dat += "<BR>"
data["paint_colors"] = list()
for(var/c in paint_colors)
data["paint_colors"] += list(list("color_name" = c, "color_hex" = paint_colors[c], "selected" = (c == paint_color)))
else if(screen == CATEGORY_DISPOSALS)
var/list/recipes = GLOB.atmos_pipe_recipes
var/datum/pipe_info/first_recipe = recipes[recipes[1]][1]
dat += "<A href='?src=[REF(src)]&screen=[CATEGORY_ATMOS]&[first_recipe.Params()]'>Atmospherics</A> "
dat += "<span class='linkOn'>Disposals</span><BR>"
return data
dat += "</ul>"
var/icon/preview=null
var/datbuild = ""
var/recipes = GLOB.atmos_pipe_recipes + GLOB.disposal_pipe_recipes
for(var/category in recipes)
var/list/cat_recipes = recipes[category]
for(var/i in cat_recipes)
var/datum/pipe_info/I = i
var/found=0
if(I.id == p_type)
if((p_class == ATMOS_MODE || p_class == METER_MODE) && I.categoryId == CATEGORY_ATMOS)
found = 1
else if(p_class == DISPOSALS_MODE && I.categoryId == CATEGORY_DISPOSALS)
found = 1
if(found)
preview = new /icon(I.icon, I.icon_state)
if(screen == I.categoryId)
if(I.id == p_type && p_class >= 0)
datbuild += "<li><span class='linkOn'>[I.name]</span></li>"
else
datbuild += I.Render(src)
if(length(datbuild) > 0)
dat += "<b>[category]:</b><ul>"
dat += datbuild
datbuild = ""
dat += "</ul>"
var/color_css=""
var/color_picker=""
for(var/color_name in paint_colors)
var/color=paint_colors[color_name]
color_css += {"
a.color.[color_name] {
color: [color];
}
a.color.[color_name]:hover {
border:1px solid [color];
}
a.color.[color_name].selected {
background-color: [color];
}
"}
var/selected=""
if(color_name==paint_color)
selected = " selected"
color_picker += {"<a class="color [color_name][selected]" href="?src=[REF(src)];set_color=[color_name]">&bull;</a>"}
var/dirsel="<h2>Direction</h2>"
switch(p_conntype)
if(-1)
if(p_class==PAINT_MODE)
dirsel = "<h2>Color</h2>[color_picker]"
else
dirsel = ""
if(PIPE_STRAIGHT) // Straight, N-S, W-E
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"vertical.png","Vertical")
dirsel += render_dir_img(EAST,"horizontal.png","Horizontal")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="vertical">&#8597;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="horizontal">&harr;</a>
</p>
"}
if(PIPE_BENDABLE) // Bent, N-W, N-E etc
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nw.png")
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "ne.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "sw.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "se.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"vertical.png","Vertical")
dirsel += render_dir_img(EAST,"horizontal.png","Horizontal")
dirsel += "<br />"
dirsel += render_dir_img(NORTHWEST,"nw.png","West to North")
dirsel += render_dir_img(NORTHEAST,"ne.png","North to East")
dirsel += "<br />"
dirsel += render_dir_img(SOUTHWEST,"sw.png","South to West")
dirsel += render_dir_img(SOUTHEAST,"se.png","East to South")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="vertical">&#8597;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="horizontal">&harr;</a>
<br />
<a href="?src=[REF(src)];setdir=[NORTHWEST]" title="West to North">&#9565;</a>
<a href="?src=[REF(src)];setdir=[NORTHEAST]" title="North to East">&#9562;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTHWEST]" title="South to West">&#9559;</a>
<a href="?src=[REF(src)];setdir=[SOUTHEAST]" title="East to South">&#9556;</a>
</p>
"}
if(PIPE_TRINARY) // Manifold
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"s.png","West South East")
dirsel += render_dir_img(EAST,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(SOUTH,"n.png","East North West")
dirsel += render_dir_img(WEST,"e.png","South East North")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTH]" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_TRIN_M) // Mirrored ones
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "sm.png") //each mirror icon is 45 anticlockwise from it's real direction
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "wm.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nm.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "em.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"s.png","West South East")
dirsel += render_dir_img(EAST,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(SOUTH,"n.png","East North West")
dirsel += render_dir_img(WEST,"e.png","South East North")
dirsel += "<br />"
dirsel += render_dir_img(SOUTHEAST,"sm.png","West South East", 1)
dirsel += render_dir_img(NORTHEAST,"wm.png","North West South", 1)
dirsel += "<br />"
dirsel += render_dir_img(NORTHWEST,"nm.png","East North West", 1)
dirsel += render_dir_img(SOUTHWEST,"em.png","South East North", 1)
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTH]" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="South, East, North">&#9568;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTHEAST];flipped=1" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[NORTHEAST];flipped=1" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[NORTHWEST];flipped=1" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[SOUTHWEST];flipped=1" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_UNARY) // Stuff with four directions - includes pumps etc.
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "n.png")
user << browse_rsc(new /icon(preview, dir=EAST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "s.png")
user << browse_rsc(new /icon(preview, dir=WEST), "w.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"n.png","North")
dirsel += render_dir_img(EAST, "e.png","East")
dirsel += render_dir_img(SOUTH,"s.png","South")
dirsel += render_dir_img(WEST, "w.png","West")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="North">&uarr;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="East">&rarr;</a>
<a href="?src=[REF(src)];setdir=[SOUTH]" title="South">&darr;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="West">&larr;</a>
</p>
"}
if(PIPE_ONEDIR) // Single icon_state (eg 4-way manifolds)
if(preview)
user << browse_rsc(new /icon(preview), "pipe.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"pipe.png","Pipe")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="Pipe">&#8597;</a>
</p>
"}
var/datsytle = {"
<style type="text/css">
a.imglink {
padding: none;
text-decoration:none;
border-style:none;
background:none;
margin: 1px;
}
a.imglink:hover {
background:none;
color:none;
}
a.imglink.selected img {
border: 1px solid #24722e;
background: #2f943c;
}
a img {
border: 1px solid #161616;
background: #40628a;
}
a.color {
padding: 5px 10px;
font-size: large;
font-weight: bold;
border: 1px solid #161616;
}
a.selected img,
a:hover {
background: #0066cc;
color: #ffffff;
}
[color_css]
</style>"}
dat = datsytle + dirsel + dat
var/datum/browser/popup = new(user, "pipedispenser", name, 300, 550)
popup.set_content(dat)
popup.open()
return
/obj/item/pipe_dispenser/Topic(href, href_list)
if(!usr.canUseTopic(src))
usr << browse(null, "window=pipedispenser")
/obj/item/pipe_dispenser/ui_act(action, params)
if(..())
return
usr.set_machine(src)
add_fingerprint(usr)
if(href_list["screen"])
screen = text2num(href_list["screen"])
show_menu(usr)
if(href_list["setdir"])
p_dir = text2num(href_list["setdir"])
if(href_list["flipped"])
p_flipped = text2num(href_list["flipped"])
else
p_flipped = FALSE
show_menu(usr)
if(href_list["setlayer"])
if(!isnum(href_list["setlayer"]))
piping_layer = text2num(href_list["setlayer"])
else
piping_layer = href_list["setlayer"]
show_menu(usr)
if(href_list["eatpipes"])
p_class = EATING_MODE
p_conntype = -1
p_dir = 1
if(!usr.canUseTopic(src))
return
var/playeffect = TRUE
switch(action)
if("color")
paint_color = params["paint_color"]
if("mode")
mode = text2num(params["mode"])
if("screen")
if(mode == screen)
mode = text2num(params["screen"])
screen = text2num(params["screen"])
recipe = screen == DISPOSALS_MODE ? first_disposal : first_atmos
p_dir = NORTH
playeffect = FALSE
if("piping_layer")
piping_layer = text2num(params["piping_layer"])
playeffect = FALSE
if("pipe_type")
var/static/list/recipes
if(!recipes)
recipes = GLOB.disposal_pipe_recipes + GLOB.atmos_pipe_recipes
recipe = recipes[params["category"]][text2num(params["pipe_type"])]
p_dir = NORTH
if("setdir")
p_dir = text2dir(params["dir"])
p_flipped = text2num(params["flipped"])
playeffect = FALSE
if(playeffect)
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["paintpipes"])
p_class = PAINT_MODE
p_conntype = -1
p_dir = 1
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["set_color"])
paint_color = href_list["set_color"]
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makepipe"])
p_type = text2path(href_list["makepipe"])
var/obj/item/pipe/path = text2path(href_list["type"])
p_conntype = initial(path.RPD_type)
p_dir = NORTH
p_class = ATMOS_MODE
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makemeter"])
p_class = METER_MODE
p_type = text2num(href_list["makemeter"])
p_conntype = text2num(href_list["type"])
p_dir = NORTH
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["dmake"])
p_type = text2path(href_list["dmake"])
p_conntype = text2num(href_list["type"])
p_dir = NORTH
p_class = DISPOSALS_MODE
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
/obj/item/pipe_dispenser/pre_attackby(atom/A, mob/user)
if(!user.IsAdvancedToolUser() || istype(A, /turf/open/space/transit))
return ..()
var/atmos_piping_mode = p_class == ATMOS_MODE || p_class == METER_MODE
var/atmos_piping_mode = mode == ATMOS_MODE || mode == METER_MODE
var/temp_piping_layer
if(atmos_piping_mode)
if(istype(A, /obj/machinery/atmospherics))
@@ -569,16 +290,20 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
temp_piping_layer = AM.piping_layer
A = get_turf(user)
var/static/list/make_pipe_whitelist
if(!make_pipe_whitelist)
make_pipe_whitelist = list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe)
//make sure what we're clicking is valid for the current mode
var/can_make_pipe = ((atmos_piping_mode || p_class == DISPOSALS_MODE) && (isturf(A)) || istype(A, /obj/structure/lattice) || istype(A, /obj/structure/girder))
var/can_make_pipe = (atmos_piping_mode || mode == DISPOSALS_MODE) && (isturf(A) || is_type_in_list(A, make_pipe_whitelist))
//So that changing the menu settings doesn't affect the pipes already being built.
var/queued_p_type = p_type
var/queued_p_type = recipe.id
var/queued_p_dir = p_dir
var/queued_p_flipped = p_flipped
. = FALSE
switch(p_class) //if we've gotten this var, the target is valid
switch(mode) //if we've gotten this var, the target is valid
if(PAINT_MODE) //Paint pipes
if(!istype(A, /obj/machinery/atmospherics/pipe))
return ..()
@@ -620,6 +345,7 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
P.setPipingLayer(temp_piping_layer)
else
P.setPipingLayer(piping_layer)
P.add_atom_colour(paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
if(METER_MODE) //Making pipe meters
if(!can_make_pipe)
@@ -29,7 +29,6 @@
var/access = 0 //Bit flags_1 for cartridge access
// var/access_flora = 0
var/remote_door_id = ""
var/bot_access_flags = 0 //Bit flags_1. Selection: SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT
@@ -110,13 +109,6 @@
icon_state = "cart-s"
access = CART_NEWSCASTER
/*
/obj/item/cartridge/botanist
name = "\improper Green Thumb v4.20 cartridge"
icon_state = "cart-b"
access_flora = 1
*/
/obj/item/cartridge/roboticist
name = "\improper B.O.O.P. Remote Control cartridge"
desc = "Packed with heavy duty triple-bot interlink!"
@@ -669,9 +661,6 @@ Code:
var/mob/living/simple_animal/bot/Bot
// if(!SC)
// menu = "Interlink Error - Please reinsert cartridge."
// return
if(active_bot)
menu += "<B>[active_bot]</B><BR> Status: (<A href='byond://?src=[REF(src)];op=control;bot=[REF(active_bot)]'><img src=pda_refresh.png><i>refresh</i></A>)<BR>"
menu += "Model: [active_bot.model]<BR>"
@@ -28,8 +28,8 @@
..()
disrupt()
/obj/item/device/chameleon/attack_self()
toggle()
/obj/item/device/chameleon/attack_self(mob/user)
toggle(user)
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
if(!proximity)
@@ -51,7 +51,7 @@
return TRUE
return FALSE
/obj/item/device/chameleon/proc/toggle()
/obj/item/device/chameleon/proc/toggle(mob/user)
if(!can_use || !saved_appearance)
return
if(active_dummy)
@@ -59,15 +59,15 @@
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
qdel(active_dummy)
active_dummy = null
to_chat(usr, "<span class='notice'>You deactivate \the [src].</span>")
to_chat(user, "<span class='notice'>You deactivate \the [src].</span>")
new /obj/effect/temp_visual/emp/pulse(get_turf(src))
else
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
C.activate(usr, saved_appearance, src)
to_chat(usr, "<span class='notice'>You activate \the [src].</span>")
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(get_turf(user))
C.activate(user, saved_appearance, src)
to_chat(user, "<span class='notice'>You activate \the [src].</span>")
new /obj/effect/temp_visual/emp/pulse(get_turf(src))
usr.cancel_camera()
user.cancel_camera()
/obj/item/device/chameleon/proc/disrupt(delete_dummy = 1)
if(active_dummy)
@@ -100,6 +100,9 @@
/obj/effect/dummy/chameleon/proc/activate(mob/M, saved_appearance, obj/item/device/chameleon/C)
appearance = saved_appearance
if(istype(M.buckled, /obj/vehicle))
var/obj/vehicle/V = M.buckled
V.riding_datum.force_dismount(M)
M.loc = src
master = C
master.active_dummy = src
@@ -4,7 +4,6 @@
/**
* Multitool -- A multitool is used for hacking electronic devices.
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
*
*/
@@ -35,9 +35,3 @@
src.code = "beacon"
src.add_fingerprint(usr)
return
/*
//Probably a better way of doing this, I'm lazy.
/obj/item/device/radio/beacon/bacon/proc/digest_delay()
spawn(600)
qdel(src)*/ //Bacon beacons are no more rip in peace
@@ -454,18 +454,6 @@
if(message_mode == MODE_WHISPER || message_mode == MODE_WHISPER_CRIT)
raw_message = stars(raw_message)
talk_into(speaker, raw_message, , spans, language=message_language)
/*
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
if ((R.frequency == frequency && message))
return 1
else if
else
return null
return
*/
/obj/item/device/radio/proc/receive_range(freq, level)
// check if this radio can receive on the given frequency, and if so,
@@ -375,16 +375,12 @@ GLOBAL_LIST_INIT(adamantine_recipes, list(
sheettype = "abductor"
GLOBAL_LIST_INIT(abductor_recipes, list ( \
/* new/datum/stack_recipe("alien chair", /obj/structure/chair, one_per_turf = 1, on_floor = 1), \ */
new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien locker", /obj/structure/closet/abductor, 2, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien table frame", /obj/structure/table_frame/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien airlock assembly", /obj/structure/door_assembly/door_assembly_abductor, 4, time = 20, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \
/* null, \
new/datum/stack_recipe("Abductor Agent Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Abductor Sciencist Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1)*/
))
/obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge = TRUE)
@@ -254,7 +254,6 @@
adjusted_contents++
numbered_contents.Add( new/datum/numbered_display(I) )
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if(adjusted_contents > 7)
+1 -1
View File
@@ -349,7 +349,7 @@
var/injection_amount = 1
amount_per_transfer_from_this = 5
container_type = OPENCONTAINER_1
spillable = 0
spillable = FALSE
possible_transfer_amounts = list(5,10,15)
/obj/item/reagent_containers/chemtank/ui_action_click()
@@ -95,7 +95,7 @@
handle_layer()
/obj/structure/chair/proc/spin()
setDir(turn(dir, 90))
setDir(turn(dir, -90))
/obj/structure/chair/setDir(newdir)
..()
@@ -53,11 +53,6 @@
if ("delete")
qdel(src)
//If you want to re-add fire, just add "fire" = 15 to the pick list.
/*if ("fire")
new /obj/structure/closet/firecloset(src.loc)
qdel(src)*/
/*
* Fire Closet
*/
+100 -60
View File
@@ -1,48 +1,55 @@
// Basic ladder. By default links to the z-level above/below.
/obj/structure/ladder
name = "ladder"
desc = "A sturdy metal ladder."
icon = 'icons/obj/structures.dmi'
icon_state = "ladder11"
var/id = null
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
var/obj/structure/ladder/down = null //the ladder below this one
var/obj/structure/ladder/up = null //the ladder above this one
var/auto_connect = FALSE
anchored = TRUE
var/obj/structure/ladder/down //the ladder below this one
var/obj/structure/ladder/up //the ladder above this one
/obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission
name = "sturdy ladder"
desc = "An extremely sturdy metal ladder."
/obj/structure/ladder/Initialize(mapload)
GLOB.ladders += src
/obj/structure/ladder/Initialize(mapload, obj/structure/ladder/up, obj/structure/ladder/down)
..()
if (up)
src.up = up
up.down = src
up.update_icon()
if (down)
src.down = down
down.up = src
down.update_icon()
return INITIALIZE_HINT_LATELOAD
/obj/structure/ladder/Destroy()
/obj/structure/ladder/Destroy(force)
if ((resistance_flags & INDESTRUCTIBLE) && !force)
return QDEL_HINT_LETMELIVE
if(up && up.down == src)
up.down = null
up.update_icon()
if(down && down.up == src)
down.up = null
down.update_icon()
GLOB.ladders -= src
. = ..()
return ..()
/obj/structure/ladder/LateInitialize()
for(var/obj/structure/ladder/L in GLOB.ladders)
if(L.id == id || (auto_connect && L.auto_connect && L.x == x && L.y == y))
if(L.height == (height - 1))
down = L
continue
if(L.height == (height + 1))
up = L
continue
// By default, discover ladders above and below us vertically
var/turf/T = get_turf(src)
if(up && down) //if both our connections are filled
if (!down)
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z - 1))
down = L
L.up = src // Don't waste effort looping the other way
L.update_icon()
break
if (!up)
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z + 1))
up = L
L.down = src // Don't waste effort looping the other way
L.update_icon()
break
update_icon()
update_icon()
/obj/structure/ladder/update_icon()
if(up && down)
@@ -57,23 +64,34 @@
else //wtf make your ladders properly assholes
icon_state = "ladder00"
/obj/structure/ladder/singularity_pull()
if (!(resistance_flags & INDESTRUCTIBLE))
visible_message("<span class='danger'>[src] is torn to pieces by the gravitational pull!</span>")
qdel(src)
/obj/structure/ladder/proc/travel(going_up, mob/user, is_ghost, obj/structure/ladder/ladder)
if(!is_ghost)
show_fluff_message(going_up,user)
show_fluff_message(going_up, user)
ladder.add_fingerprint(user)
var/turf/T = get_turf(ladder)
var/atom/movable/AM
if(user.pulling)
AM = user.pulling
user.pulling.forceMove(get_turf(ladder))
user.forceMove(get_turf(ladder))
AM.forceMove(T)
user.forceMove(T)
if(AM)
user.start_pulling(AM)
/obj/structure/ladder/proc/use(mob/user, is_ghost=FALSE)
if (!is_ghost && !in_range(src, user))
return
/obj/structure/ladder/proc/use(mob/user,is_ghost=0)
if(up && down)
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
if (up && down)
var/result = alert("Go up or down [src]?", "Ladder", "Up", "Down", "Cancel")
if (!is_ghost && !in_range(src, user))
return // nice try
switch(result)
if("Up")
travel(TRUE, user, is_ghost, up)
if("Down")
@@ -83,7 +101,7 @@
else if(up)
travel(TRUE, user, is_ghost, up)
else if(down)
travel(FALSE, user,is_ghost, down)
travel(FALSE, user, is_ghost, down)
else
to_chat(user, "<span class='warning'>[src] doesn't seem to lead anywhere!</span>")
@@ -91,44 +109,66 @@
add_fingerprint(user)
/obj/structure/ladder/attack_hand(mob/user)
if(can_use(user))
use(user)
use(user)
/obj/structure/ladder/attack_paw(mob/user)
return attack_hand(user)
return use(user)
/obj/structure/ladder/attackby(obj/item/W, mob/user, params)
return attack_hand(user)
return use(user)
/obj/structure/ladder/attack_robot(mob/living/silicon/robot/R)
if(R.Adjacent(src))
return attack_hand(R)
return use(R)
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
use(user,1)
use(user, TRUE)
/obj/structure/ladder/proc/show_fluff_message(up,mob/user)
if(up)
user.visible_message("[user] climbs up \the [src].","<span class='notice'>You climb up \the [src].</span>")
/obj/structure/ladder/proc/show_fluff_message(going_up, mob/user)
if(going_up)
user.visible_message("[user] climbs up [src].","<span class='notice'>You climb up [src].</span>")
else
user.visible_message("[user] climbs down \the [src].","<span class='notice'>You climb down \the [src].</span>")
/obj/structure/ladder/proc/can_use(mob/user)
return 1
/obj/structure/ladder/unbreakable/Destroy(force)
if(force)
. = ..()
else
return QDEL_HINT_LETMELIVE
/obj/structure/ladder/unbreakable/singularity_pull()
return
/obj/structure/ladder/auto_connect //They will connect to ladders with the same X and Y without needing to share an ID
auto_connect = TRUE
user.visible_message("[user] climbs down [src].","<span class='notice'>You climb down [src].</span>")
/obj/structure/ladder/singularity_pull()
visible_message("<span class='danger'>[src] is torn to pieces by the gravitational pull!</span>")
qdel(src)
// Indestructible away mission ladders which link based on a mapped ID and height value rather than X/Y/Z.
/obj/structure/ladder/unbreakable
name = "sturdy ladder"
desc = "An extremely sturdy metal ladder."
resistance_flags = INDESTRUCTIBLE
var/id
var/height = 0 // higher numbers are considered physically higher
/obj/structure/ladder/unbreakable/Initialize()
GLOB.ladders += src
return ..()
/obj/structure/ladder/unbreakable/Destroy()
. = ..()
if (. != QDEL_HINT_LETMELIVE)
GLOB.ladders -= src
/obj/structure/ladder/unbreakable/LateInitialize()
// Override the parent to find ladders based on being height-linked
if (!id || (up && down))
update_icon()
return
for (var/O in GLOB.ladders)
var/obj/structure/ladder/unbreakable/L = O
if (L.id != id)
continue // not one of our pals
if (!down && L.height == height - 1)
down = L
L.up = src
L.update_icon()
if (up)
break // break if both our connections are filled
else if (!up && L.height == height + 1)
up = L
L.down = src
L.update_icon()
if (down)
break // break if both our connections are filled
update_icon()
+2 -2
View File
@@ -378,8 +378,8 @@
/obj/structure/table/optable/New()
..()
for(var/dir in GLOB.cardinals)
computer = locate(/obj/machinery/computer/operating, get_step(src, dir))
for(var/direction in GLOB.cardinals)
computer = locate(/obj/machinery/computer/operating, get_step(src, direction))
if(computer)
computer.table = src
break
+1 -1
View File
@@ -11,7 +11,7 @@
canSmoothWith = list(/turf/open/floor/fakepit, /turf/open/chasm)
density = TRUE //This will prevent hostile mobs from pathing into chasms, while the canpass override will still let it function like an open turf
var/static/list/falling_atoms = list() //Atoms currently falling into the chasm
var/static/list/forbidden_types = typecacheof(list(/obj/effect/portal, /obj/singularity, /obj/structure/stone_tile, /obj/item/projectile, /obj/effect/abstract, /obj/effect/temp_visual))
var/static/list/forbidden_types = typecacheof(list(/obj/effect/portal, /obj/singularity, /obj/structure/stone_tile, /obj/item/projectile, /obj/effect/abstract, /obj/effect/temp_visual, /obj/effect/light_emitter/tendril, /obj/effect/collapse))
var/drop_x = 1
var/drop_y = 1
var/drop_z = 1
@@ -19,22 +19,22 @@
initial_gas_mix = "TEMP=2.7"
/turf/open/floor/plasteel/black
icon_state = "dark"
/turf/open/floor/plasteel/black/telecomms
/turf/open/floor/plasteel/dark
icon_state = "darkfull"
/turf/open/floor/plasteel/dark/telecomms
initial_gas_mix = "n2=100;TEMP=80"
/turf/open/floor/plasteel/black/telecomms/mainframe
/turf/open/floor/plasteel/dark/telecomms/mainframe
name = "Mainframe Floor"
/turf/open/floor/plasteel/black/telecomms/server
/turf/open/floor/plasteel/dark/telecomms/server
name = "Server Base"
/turf/open/floor/plasteel/black/telecomms/server/walkway
/turf/open/floor/plasteel/dark/telecomms/server/walkway
name = "Server Walkway"
/turf/open/floor/plasteel/airless/black
/turf/open/floor/plasteel/airless/dark
icon_state = "darkfull"
/turf/open/floor/plasteel/dark/side
icon_state = "dark"
/turf/open/floor/plasteel/black/side
icon_state = "black" //NOTICE ME SEMPAI: floors.dmi contains two sprites named black, remove the incorrect one
/turf/open/floor/plasteel/black/corner
icon_state = "blackcorner"
/turf/open/floor/plasteel/dark/corner
icon_state = "darkcorner"
@@ -224,20 +224,16 @@
/turf/open/floor/plasteel/arrival/corner
icon_state = "arrivalcorner"
/turf/open/floor/plasteel/caution
icon_state = "caution"
/turf/open/floor/plasteel/caution/corner
icon_state = "cautioncorner"
/turf/open/floor/plasteel/escape
icon_state = "escape"
/turf/open/floor/plasteel/escape/corner
icon_state = "escapecorner"
/turf/open/floor/plasteel/whitebot
icon_state = "whitebot"
/turf/open/floor/plasteel/whitebot/delivery
icon_state = "whitedelivery"
/turf/open/floor/plasteel/caution
icon_state = "caution"
/turf/open/floor/plasteel/caution/corner
icon_state = "cautioncorner"
/turf/open/floor/plasteel/redyellow
@@ -284,19 +280,6 @@
icon_state = "yellowcornersiding"
/turf/open/floor/plasteel/podhatch
icon_state = "podhatch"
/turf/open/floor/plasteel/podhatch/corner
icon_state = "podhatchcorner"
/turf/open/floor/plasteel/loadingarea
icon_state = "loadingarea"
/turf/open/floor/plasteel/loadingarea/dirty
icon_state = "loadingareadirty1"
/turf/open/floor/plasteel/loadingarea/dirtydirty
icon_state = "loadingareadirty2"
/turf/open/floor/plasteel/asteroid
icon_state = "asteroidfloor"
/turf/open/floor/plasteel/airless/asteroid
@@ -333,12 +316,6 @@
/turf/open/floor/plasteel/hydrofloor
icon_state = "hydrofloor"
/turf/open/floor/plasteel/delivery
icon_state = "delivery"
/turf/open/floor/plasteel/bot
icon_state = "bot"
/turf/open/floor/plasteel/freezer
icon_state = "freezerfloor"
@@ -358,7 +335,11 @@
icon_state = "cafeteria"
/turf/open/floor/plasteel/vault
icon_state = "vaultfull"
/turf/open/floor/plasteel/vault/side
icon_state = "vault"
/turf/open/floor/plasteel/vault/corner
icon_state = "vaultcorner"
/turf/open/floor/plasteel/vault/telecomms
initial_gas_mix = "n2=100;TEMP=80"
/turf/open/floor/plasteel/vault/telecomms/mainframe
@@ -13,8 +13,6 @@
icon = 'icons/turf/walls/gold_wall.dmi'
icon_state = "gold"
sheet_type = /obj/item/stack/sheet/mineral/gold
//var/electro = 1
//var/shocked = null
explosion_block = 0 //gold is a soft metal you dingus.
canSmoothWith = list(/turf/closed/wall/mineral/gold, /obj/structure/falsewall/gold)
@@ -24,8 +22,6 @@
icon = 'icons/turf/walls/silver_wall.dmi'
icon_state = "silver"
sheet_type = /obj/item/stack/sheet/mineral/silver
//var/electro = 0.75
//var/shocked = null
canSmoothWith = list(/turf/closed/wall/mineral/silver, /obj/structure/falsewall/silver)
/turf/closed/wall/mineral/diamond
+3 -2
View File
@@ -117,6 +117,9 @@ GLOBAL_PROTECT(security_mode)
warning("/tg/station 13 uses many file operations, a few shell()s, and some external call()s. Trusted mode is recommended. You can download our source code for your own browsing and compilation at https://github.com/tgstation/tgstation")
/world/Topic(T, addr, master, key)
SERVER_TOOLS_ON_TOPIC //redirect to server tools if necessary
var/static/list/topic_handlers = TopicHandlers()
var/list/input = params2list(T)
var/datum/world_topic/handler
@@ -128,8 +131,6 @@ GLOBAL_PROTECT(security_mode)
if((!handler || initial(handler.log)) && config && CONFIG_GET(flag/log_world_topic))
WRITE_FILE(GLOB.world_game_log, "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]")
SERVER_TOOLS_ON_TOPIC //redirect to server tools if necessary
if(!handler)
return
-1
View File
@@ -174,7 +174,6 @@ GLOBAL_PROTECT(Banlist)
/datum/admins/proc/unbanpanel()
var/count = 0
var/dat
//var/dat = "<HR><B>Unban Player:</B> \blue(U) = Unban , (E) = Edit Ban\green (Total<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >"
GLOB.Banlist.cd = "/base"
for (var/A in GLOB.Banlist.dir)
count++
-18
View File
@@ -616,24 +616,6 @@
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
/*
/datum/admins/proc/get_sab_desc(var/target)
switch(target)
if(1)
return "Destroy at least 70% of the plasma canisters on the station"
if(2)
return "Destroy the AI"
if(3)
var/count = 0
for(var/mob/living/carbon/monkey/Monkey in world)
if(Monkey.z in GLOB.station_z_levels)
count++
return "Kill all [count] of the monkeys on the station"
if(4)
return "Cut power to at least 80% of the station"
else
return "Error: Invalid sabotage target: [target]"
*/
/datum/admins/proc/spawn_atom(object as text)
set category = "Debug"
set desc = "(atom path) Spawn an atom"
+40 -23
View File
@@ -507,6 +507,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
var/list/areas_all = list()
var/list/areas_with_APC = list()
var/list/areas_with_multiple_APCs = list()
var/list/areas_with_air_alarm = list()
var/list/areas_with_RC = list()
var/list/areas_with_light = list()
@@ -528,6 +529,8 @@ GLOBAL_PROTECT(LastAdminCalledProc)
var/area/A = APC.area
if(!(A.type in areas_with_APC))
areas_with_APC.Add(A.type)
else if(A.type in areas_all)
areas_with_multiple_APCs.Add(A.type)
for(var/obj/machinery/airalarm/AA in GLOB.machines)
var/area/A = get_area(AA)
@@ -567,33 +570,48 @@ GLOBAL_PROTECT(LastAdminCalledProc)
var/list/areas_without_intercom = areas_all - areas_with_intercom
var/list/areas_without_camera = areas_all - areas_with_camera
to_chat(world, "<b>AREAS WITHOUT AN APC:</b>")
for(var/areatype in areas_without_APC)
to_chat(world, "* [areatype]")
if(areas_without_APC.len)
to_chat(world, "<b>AREAS WITHOUT AN APC:</b>")
for(var/areatype in areas_without_APC)
to_chat(world, "* [areatype]")
to_chat(world, "<b>AREAS WITHOUT AN AIR ALARM:</b>")
for(var/areatype in areas_without_air_alarm)
to_chat(world, "* [areatype]")
if(areas_with_multiple_APCs.len)
to_chat(world, "<b>AREAS WITH MULTIPLE APCS:</b>")
for(var/areatype in areas_with_multiple_APCs)
to_chat(world,"* [areatype]")
to_chat(world, "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>")
for(var/areatype in areas_without_RC)
to_chat(world, "* [areatype]")
if(areas_without_air_alarm.len)
to_chat(world, "<b>AREAS WITHOUT AN AIR ALARM:</b>")
for(var/areatype in areas_without_air_alarm)
to_chat(world, "* [areatype]")
to_chat(world, "<b>AREAS WITHOUT ANY LIGHTS:</b>")
for(var/areatype in areas_without_light)
to_chat(world, "* [areatype]")
if(areas_without_RC.len)
to_chat(world, "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>")
for(var/areatype in areas_without_RC)
to_chat(world, "* [areatype]")
to_chat(world, "<b>AREAS WITHOUT A LIGHT SWITCH:</b>")
for(var/areatype in areas_without_LS)
to_chat(world, "* [areatype]")
if(areas_without_light.len)
to_chat(world, "<b>AREAS WITHOUT ANY LIGHTS:</b>")
for(var/areatype in areas_without_light)
to_chat(world, "* [areatype]")
to_chat(world, "<b>AREAS WITHOUT ANY INTERCOMS:</b>")
for(var/areatype in areas_without_intercom)
to_chat(world, "* [areatype]")
if(areas_without_LS.len)
to_chat(world, "<b>AREAS WITHOUT A LIGHT SWITCH:</b>")
for(var/areatype in areas_without_LS)
to_chat(world, "* [areatype]")
to_chat(world, "<b>AREAS WITHOUT ANY CAMERAS:</b>")
for(var/areatype in areas_without_camera)
to_chat(world, "* [areatype]")
if(areas_without_intercom.len)
to_chat(world, "<b>AREAS WITHOUT ANY INTERCOMS:</b>")
for(var/areatype in areas_without_intercom)
to_chat(world, "* [areatype]")
if(areas_without_camera.len)
to_chat(world, "<b>AREAS WITHOUT ANY CAMERAS:</b>")
for(var/areatype in areas_without_camera)
to_chat(world, "* [areatype]")
if(!(areas_with_APC.len || areas_with_multiple_APCs.len || areas_with_air_alarm.len || areas_with_RC.len || areas_with_light.len || areas_with_LS.len || areas_with_intercom.len || areas_with_camera.len))
to_chat(world, "<b>No problem areas!</b>")
/client/proc/cmd_admin_areatest_station()
set category = "Mapping"
@@ -782,7 +800,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
set category = "Debug"
set name = "Display overlay Log"
set desc = "Display SSoverlays log of everything that's passed through it."
render_stats(SSoverlays.stats, src)
/client/proc/cmd_display_init_log()
@@ -918,4 +936,3 @@ GLOBAL_PROTECT(LastAdminCalledProc)
return
sort = sortlist[sort]
profile_show(src, sort)
-18
View File
@@ -229,15 +229,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
if(B.z == num_level)
count++
atom_list += A
/*
var/atom/temp_atom
for(var/i = 0; i <= (atom_list.len/10); i++)
var/line = ""
for(var/j = 1; j <= 10; j++)
if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
to_chat(world, line)*/
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects Zlevel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -258,15 +249,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
for(var/atom/A in world)
if(istype(A,type_path))
count++
/*
var/atom/temp_atom
for(var/i = 0; i <= (atom_list.len/10); i++)
var/line = ""
for(var/j = 1; j <= 10; j++)
if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
to_chat(world, line)*/
to_chat(world, "There are [count] objects of type [type_path] in the game world")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -2
View File
@@ -139,8 +139,7 @@
if(usr.incapacitated())
return
setDir(turn(dir, 90))
return
setDir(turn(dir, -90))
/obj/item/device/assembly/infra/AltClick(mob/user)
..()
-15
View File
@@ -39,10 +39,6 @@
/obj/item/device/assembly/signaler/interact(mob/user, flag1)
if(is_secured(user))
var/t1 = "-------"
// if ((src.b_stat && !( flag1 )))
// t1 = text("-------<BR>\nGreen Wire: []<BR>\nRed Wire: []<BR>\nBlue Wire: []<BR>\n", (src.wires & 4 ? "<A href='?src=[REF(src)];wires=4'>Cut Wire</A>" : "<A href='?src=[REF(src)];wires=4'>Mend Wire</A>"), (src.wires & 2 ? "<A href='?src=[REF(src)];wires=2'>Cut Wire</A>" : "<A href='?src=[REF(src)];wires=2'>Mend Wire</A>"), (src.wires & 1 ? "<A href='?src=[REF(src)];wires=1'>Cut Wire</A>" : "<A href='?src=[REF(src)];wires=1'>Mend Wire</A>"))
// else
// t1 = "-------" Speaker: [src.listening ? "<A href='byond://?src=[REF(src)];listen=0'>Engaged</A>" : "<A href='byond://?src=[REF(src)];listen=1'>Disengaged</A>"]<BR>
var/dat = {"
<TT>
@@ -123,17 +119,6 @@ Code:
return
/*
for(var/obj/item/device/assembly/signaler/S in world)
if(!S)
continue
if(S == src)
continue
if((S.frequency == src.frequency) && (S.code == src.code))
spawn(0)
if(S)
S.pulse(0)
return 0*/
/obj/item/device/assembly/signaler/receive_signal(datum/signal/signal)
if(!signal)
@@ -423,22 +423,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
continue reaction_loop
//at this point, all minimum requirements for the reaction are satisfied.
/* currently no reactions have maximum requirements, so we can leave the checks commented out for a slight performance boost
var/list/max_reqs = reaction.max_requirements.Copy()
if((max_reqs["TEMP"] && temp > max_reqs["TEMP"]) \
|| (max_reqs["ENER"] && ener > max_reqs["ENER"]))
continue
max_reqs -= "TEMP"
max_reqs -= "ENER"
for(var/id in max_reqs)
if(cached_gases[id] && cached_gases[id][MOLES] > max_reqs[id])
continue reaction_loop
//at this point, all requirements for the reaction are satisfied. we can now react()
*/
. |= reaction.react(src, dump_location)
//to_chat(world,reaction.name)
if (. & STOP_REACTIONS)
break
if(.)
@@ -17,9 +17,12 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /
/proc/gas_id2path(id)
var/list/meta_gas = GLOB.meta_gas_info
if(id in meta_gas)
return id
for(var/path in meta_gas)
if(meta_gas[path][META_GAS_ID] == id)
return path
return ""
/*||||||||||||||/----------\||||||||||||||*\
||||||||||||||||[GAS DATUMS]||||||||||||||||
@@ -277,11 +277,7 @@
"power" = info["power"],
"scrubbing" = info["scrubbing"],
"widenet" = info["widenet"],
"filter_co2" = info["filter_co2"],
"filter_toxins" = info["filter_toxins"],
"filter_n2o" = info["filter_n2o"],
"filter_rare" = info["filter_rare"],
"filter_water_vapor" = info["filter_water_vapor"]
"filter_types" = info["filter_types"]
))
data["mode"] = mode
data["modes"] = list()
@@ -337,8 +333,8 @@
if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN))
locked = !locked
. = TRUE
if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "rare_scrub","water_vapor_scrub", "widenet", "scrubbing")
send_signal(device_id, list("[action]" = text2num(params["val"])))
if("power", "toggle_filter", "widenet", "scrubbing")
send_signal(device_id, list("[action]" = params["val"]))
. = TRUE
if("excheck")
send_signal(device_id, list("checks" = text2num(params["val"])^1))
@@ -197,7 +197,6 @@ Acts like a normal vent, but has an input AND output.
spawn(2)
broadcast_status()
return //do not update_icon
//if(signal.data["tag"])
spawn(2)
broadcast_status()
update_icon()
@@ -124,7 +124,7 @@
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_filter", name, 475, 180, master_ui, state)
ui = new(user, src, ui_key, "atmos_filter", name, 475, 195, master_ui, state)
ui.open()
/obj/machinery/atmospherics/components/trinary/filter/ui_data()
@@ -133,13 +133,11 @@
data["pressure"] = round(target_pressure)
data["max_pressure"] = round(MAX_OUTPUT_PRESSURE)
if(filter_type) //ui code is garbage and this is needed for it to work grr
if(ispath(filter_type)) //we need to send the gas ID. if it's a path, get it from the metainfo list...
data["filter_type"] = GLOB.meta_gas_info[filter_type][META_GAS_ID]
else //...otherwise, it's already in the form we need.
data["filter_type"] = filter_type
else
data["filter_type"] = "none"
data["filter_types"] = list()
data["filter_types"] += list(list("name" = "Nothing", "path" = "", "selected" = !filter_type))
for(var/path in GLOB.meta_gas_info)
var/list/gas = GLOB.meta_gas_info[path]
data["filter_types"] += list(list("name" = gas[META_GAS_NAME], "id" = gas[META_GAS_ID], "selected" = (path == gas_id2path(filter_type))))
return data
@@ -169,7 +167,7 @@
if("filter")
filter_type = null
var/filter_name = "nothing"
var/gas = text2path(params["mode"]) || gas_id2path(params["mode"])
var/gas = gas_id2path(params["mode"])
if(gas in GLOB.meta_gas_info)
filter_type = gas
filter_name = GLOB.meta_gas_info[gas][META_GAS_NAME]
@@ -17,12 +17,7 @@
var/on = FALSE
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
var/scrub_CO2 = TRUE
var/scrub_Toxins = FALSE
var/scrub_N2O = FALSE
var/scrub_Rare = FALSE
var/scrub_WaterVapor = FALSE
var/filter_types = list(/datum/gas/carbon_dioxide)
var/volume_rate = 200
var/widenet = 0 //is this scrubber acting on the 3x3 area around it.
@@ -64,16 +59,7 @@
var/amount = idle_power_usage
if(scrubbing & SCRUBBING)
if(scrub_CO2)
amount += idle_power_usage
if(scrub_Toxins)
amount += idle_power_usage
if(scrub_N2O)
amount += idle_power_usage
if(scrub_Rare)
amount += idle_power_usage
if(scrub_WaterVapor)
amount += idle_power_usage
amount += idle_power_usage * length(filter_types)
else //scrubbing == SIPHONING
amount = active_power_usage
@@ -115,6 +101,12 @@
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
var/list/f_types = list()
for(var/path in GLOB.meta_gas_info)
var/list/gas = GLOB.meta_gas_info[path]
f_types += list(list("gas_id" = gas[META_GAS_ID], "gas_name" = gas[META_GAS_NAME], "enabled" = (path in filter_types)))
signal.data = list(
"tag" = id_tag,
"frequency" = frequency,
@@ -123,11 +115,7 @@
"power" = on,
"scrubbing" = scrubbing,
"widenet" = widenet,
"filter_co2" = scrub_CO2,
"filter_toxins" = scrub_Toxins,
"filter_n2o" = scrub_N2O,
"filter_rare" =scrub_Rare,
"filter_water_vapor" = scrub_WaterVapor,
"filter_types" = f_types,
"sigtype" = "status"
)
@@ -175,14 +163,7 @@
return FALSE
if(scrubbing & SCRUBBING)
var/should_we_scrub = FALSE
for(var/id in env_gases)
if(id == /datum/gas/nitrogen || id == /datum/gas/oxygen)
continue
if(env_gases[id][MOLES])
should_we_scrub = TRUE
break
if(should_we_scrub)
if(length(env_gases & filter_types))
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
//Take a gas sample
@@ -197,55 +178,10 @@
var/list/filtered_gases = filtered_out.gases
filtered_out.temperature = removed.temperature
if(scrub_Toxins && removed_gases[/datum/gas/plasma])
ADD_GAS(/datum/gas/plasma, filtered_gases)
filtered_gases[/datum/gas/plasma][MOLES] = removed_gases[/datum/gas/plasma][MOLES]
removed_gases[/datum/gas/plasma][MOLES] = 0
if(scrub_CO2 && removed_gases[/datum/gas/carbon_dioxide])
ADD_GAS(/datum/gas/carbon_dioxide, filtered_gases)
filtered_gases[/datum/gas/carbon_dioxide][MOLES] = removed_gases[/datum/gas/carbon_dioxide][MOLES]
removed_gases[/datum/gas/carbon_dioxide][MOLES] = 0
if(scrub_N2O && removed_gases[/datum/gas/nitrous_oxide])
ADD_GAS(/datum/gas/nitrous_oxide, filtered_gases)
filtered_gases[/datum/gas/nitrous_oxide][MOLES] = removed_gases[/datum/gas/nitrous_oxide][MOLES]
removed_gases[/datum/gas/nitrous_oxide][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/bz])
ADD_GAS(/datum/gas/bz, filtered_gases)
filtered_gases[/datum/gas/bz][MOLES] = removed_gases[/datum/gas/bz][MOLES]
removed_gases[/datum/gas/bz][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/hypernoblium])
ADD_GAS(/datum/gas/hypernoblium, filtered_gases)
filtered_gases[/datum/gas/hypernoblium][MOLES] = removed_gases[/datum/gas/hypernoblium][MOLES]
removed_gases[/datum/gas/hypernoblium][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/stimulum])
ADD_GAS(/datum/gas/stimulum, filtered_gases)
filtered_gases[/datum/gas/stimulum][MOLES] = removed_gases[/datum/gas/stimulum][MOLES]
removed_gases[/datum/gas/stimulum][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/pluoxium])
ADD_GAS(/datum/gas/pluoxium, filtered_gases)
filtered_gases[/datum/gas/pluoxium][MOLES] = removed_gases[/datum/gas/pluoxium][MOLES]
removed_gases[/datum/gas/pluoxium][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/nitryl])
ADD_GAS(/datum/gas/nitryl, filtered_gases)
filtered_gases[/datum/gas/nitryl][MOLES] = removed_gases[/datum/gas/nitryl][MOLES]
removed_gases[/datum/gas/nitryl][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/tritium])
ADD_GAS(/datum/gas/tritium, filtered_gases)
filtered_gases[/datum/gas/tritium][MOLES] = removed_gases[/datum/gas/tritium][MOLES]
removed_gases[/datum/gas/tritium][MOLES] = 0
if(scrub_WaterVapor && removed_gases[/datum/gas/water_vapor])
ADD_GAS(/datum/gas/water_vapor, filtered_gases)
filtered_gases[/datum/gas/water_vapor][MOLES] = removed_gases[/datum/gas/water_vapor][MOLES]
removed_gases[/datum/gas/water_vapor][MOLES] = 0
for(var/gas in filter_types & removed_gases)
ADD_GAS(gas, filtered_gases)
filtered_gases[gas][MOLES] = removed_gases[gas][MOLES]
removed_gases[gas][MOLES] = 0
removed.garbage_collect()
@@ -303,30 +239,8 @@
if("toggle_scrubbing" in signal.data)
scrubbing = !scrubbing
if("co2_scrub" in signal.data)
scrub_CO2 = text2num(signal.data["co2_scrub"])
if("toggle_co2_scrub" in signal.data)
scrub_CO2 = !scrub_CO2
if("tox_scrub" in signal.data)
scrub_Toxins = text2num(signal.data["tox_scrub"])
if("toggle_tox_scrub" in signal.data)
scrub_Toxins = !scrub_Toxins
if("n2o_scrub" in signal.data)
scrub_N2O = text2num(signal.data["n2o_scrub"])
if("toggle_n2o_scrub" in signal.data)
scrub_N2O = !scrub_N2O
if("rare_scrub" in signal.data)
scrub_Rare = text2num(signal.data["rare_scrub"])
if("toggle_rare_scrub" in signal.data)
scrub_Rare = !scrub_Rare
if("water_vapor_scrub" in signal.data)
scrub_WaterVapor = text2num(signal.data["water_vapor_scrub"])
if("toggle_water_vapor_scrub" in signal.data)
scrub_WaterVapor = !scrub_WaterVapor
if("toggle_filter" in signal.data)
filter_types ^= gas_id2path(signal.data["toggle_filter"])
if("init" in signal.data)
name = signal.data["init"]
@@ -66,7 +66,7 @@
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "portable_scrubber", name, 420, 335, master_ui, state)
ui = new(user, src, ui_key, "portable_scrubber", name, 420, 435, master_ui, state)
ui.open()
/obj/machinery/portable_atmospherics/scrubber/ui_data()
@@ -75,6 +75,12 @@
data["connected"] = connected_port ? 1 : 0
data["pressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["id_tag"] = -1 //must be defined in order to reuse code between portable and vent scrubbers
data["filter_types"] = list()
for(var/path in GLOB.meta_gas_info)
var/list/gas = GLOB.meta_gas_info[path]
data["filter_types"] += list(list("gas_id" = gas[META_GAS_ID], "gas_name" = gas[META_GAS_NAME], "enabled" = (path in scrubbing)))
if(holding)
data["holding"] = list()
data["holding"]["name"] = holding.name
@@ -93,6 +99,9 @@
holding.loc = get_turf(src)
holding = null
. = TRUE
if("toggle_filter")
scrubbing ^= gas_id2path(params["val"])
. = TRUE
update_icon()
/obj/machinery/portable_atmospherics/scrubber/huge
@@ -47,7 +47,7 @@
/obj/item/paper/fluff/awaymissions/academy/grade/aplus
name = "Summoning Midterm Exam"
info = "Grade: A+ Educator's Notes: Excellent form."
/obj/item/paper/fluff/awaymissions/academy/grade/bminus
name = "Summoning Midterm Exam"
info = "Grade: B- Educator's Notes: Keep applying yourself, you're showing improvement."
@@ -55,7 +55,7 @@
/obj/item/paper/fluff/awaymissions/academy/grade/dminus
name = "Summoning Midterm Exam"
info = "Grade: D- Educator's Notes: SEE ME AFTER CLASS."
/obj/item/paper/fluff/awaymissions/academy/grade/failure
name = "Pyromancy Evaluation"
info = "Current Grade: F. Educator's Notes: No improvement shown despite multiple private lessons. Suggest additional tutilage."
@@ -335,7 +335,7 @@
target_mob.Move(T)
/obj/structure/ladder/unbreakable/rune
name = "Teleportation Rune"
name = "\improper Teleportation Rune"
desc = "Could lead anywhere."
icon = 'icons/obj/rune.dmi'
icon_state = "1"
@@ -347,7 +347,6 @@
/obj/structure/ladder/unbreakable/rune/show_fluff_message(up,mob/user)
user.visible_message("[user] activates \the [src].","<span class='notice'>You activate \the [src].</span>")
/obj/structure/ladder/can_use(mob/user)
if(user.mind in SSticker.mode.wizards)
return 0
return 1
/obj/structure/ladder/unbreakable/rune/use(mob/user, is_ghost=FALSE)
if(is_ghost || !(user.mind in SSticker.mode.wizards))
..()
+33 -12
View File
@@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
//Generates assets based on iconstates of a single icon
/datum/asset/simple/icon_states
var/icon
var/direction = SOUTH
var/list/directions = list(SOUTH)
var/frame = 1
var/movement_states = FALSE
@@ -189,19 +189,26 @@ GLOBAL_LIST_EMPTY(asset_datums)
verify = FALSE
/datum/asset/simple/icon_states/register()
for(var/icon_state_name in icon_states(icon))
var/asset = icon(icon, icon_state_name, direction, frame, movement_states)
if (!asset)
continue
asset = fcopy_rsc(asset) //dedupe
var/asset_name = sanitize_filename("[prefix].[icon_state_name].png")
if (generic_icon_names)
asset_name = "[generate_asset_name(asset)].png"
/datum/asset/simple/icon_states/register(_icon = icon)
for(var/icon_state_name in icon_states(_icon))
for(var/direction in directions)
var/asset = icon(_icon, icon_state_name, direction, frame, movement_states)
if (!asset)
continue
asset = fcopy_rsc(asset) //dedupe
var/prefix2 = (directions.len > 1) ? "[dir2text(direction)]." : ""
var/asset_name = sanitize_filename("[prefix].[prefix2][icon_state_name].png")
if (generic_icon_names)
asset_name = "[generate_asset_name(asset)].png"
assets[asset_name] = asset
register_asset(asset_name, asset)
..()
/datum/asset/simple/icon_states/multiple_icons
var/list/icons
/datum/asset/simple/icon_states/multiple_icons/register()
for(var/i in icons)
..(i)
//DEFINITIONS FOR ASSET DATUMS START HERE.
@@ -351,3 +358,17 @@ GLOBAL_LIST_EMPTY(asset_datums)
/datum/asset/simple/icon_states/emojis
icon = 'icons/emoji.dmi'
generic_icon_names = TRUE
/datum/asset/simple/icon_states/multiple_icons/pipes
icons = list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi')
prefix = "pipe"
/datum/asset/simple/icon_states/multiple_icons/pipes/New()
directions = GLOB.alldirs
..()
/datum/asset/simple/icon_states/multiple_icons/pipes/register()
..()
var/meter = icon('icons/obj/atmospherics/pipes/simple.dmi', "meterX", SOUTH, frame, movement_states)
if(meter)
register_asset(sanitize_filename("[prefix].south.meterX.png"), fcopy_rsc(meter))
-8
View File
@@ -31,7 +31,6 @@
// asset_cache
if(href_list["asset_cache_confirm_arrival"])
//to_chat(src, "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED.")
var/job = text2num(href_list["asset_cache_confirm_arrival"])
//because we skip the limiter, we have to make sure this is a valid arrival and not somebody tricking us
// into letting append to a list without limit.
@@ -131,13 +130,6 @@
if(filelength > UPLOAD_LIMIT)
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>")
return 0
/* //Don't need this at the moment. But it's here if it's needed later.
//Helps prevent multiple files being uploaded at once. Or right after eachother.
var/time_to_wait = fileaccess_timer - world.time
if(time_to_wait > 0)
to_chat(src, "<font color='red'>Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>")
return 0
fileaccess_timer = world.time + FTPDELAY */
return 1
-2
View File
@@ -239,8 +239,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
S["real_name"] >> name
if(!name)
name = "Character[i]"
/*if(i!=1)
dat += " | " */
dat += "<a style='white-space:nowrap;' href='?_src_=prefs;preference=changeslot;num=[i];' [i == default_slot ? "class='linkOn'" : ""]>[name]</a> "
dat += "</center>"
@@ -18,7 +18,6 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
item_state = "welding"
materials = list(MAT_METAL=1750, MAT_GLASS=400)
// var/up = 0
flash_protect = 2
tint = 2
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 60)
@@ -13,6 +13,7 @@
name = "purple bartender's uniform"
icon_state = "purplebartender"
item_state = "purplebartender"
item_color = "purplebartender"
alt_covers_chest = 1
/obj/item/clothing/under/rank/captain //Alright, technically not a 'civilian' but its better then giving a .dm file for a single define.
@@ -1,51 +1,51 @@
/mob
var/bloody_hands = 0
/obj/item/clothing/gloves
var/transfer_blood = 0
/obj/item/reagent_containers/glass/rag
name = "damp rag"
desc = "For cleaning up messes, you suppose."
w_class = WEIGHT_CLASS_TINY
icon = 'icons/obj/toy.dmi'
icon_state = "rag"
/mob
var/bloody_hands = 0
/obj/item/clothing/gloves
var/transfer_blood = 0
/obj/item/reagent_containers/glass/rag
name = "damp rag"
desc = "For cleaning up messes, you suppose."
w_class = WEIGHT_CLASS_TINY
icon = 'icons/obj/toy.dmi'
icon_state = "rag"
flags_1 = NOBLUDGEON_1
container_type = OPENCONTAINER_1
amount_per_transfer_from_this = 5
possible_transfer_amounts = list()
volume = 5
spillable = 0
/obj/item/reagent_containers/glass/rag/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
if(!proximity)
return
if(iscarbon(A) && A.reagents && reagents.total_volume)
var/mob/living/carbon/C = A
var/reagentlist = pretty_string_from_reagent_list(reagents)
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
reagents.reaction(C, INGEST)
reagents.trans_to(C, reagents.total_volume)
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
log_game("[key_name(user)] smothered [key_name(A)] with a damp rag containing [reagentlist]")
log_attack("[key_name(user)] smothered [key_name(A)] with a damp rag containing [reagentlist]")
else
reagents.reaction(C, TOUCH)
reagents.clear_reagents()
log_game("[key_name(user)] touched [key_name(A)] with a damp rag containing [reagentlist]")
log_attack("[key_name(user)] touched [key_name(A)] with a damp rag containing [reagentlist]")
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
else if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
if(do_after(user,30, target = A))
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")
A.clean_blood()
A.wash_cream()
return
amount_per_transfer_from_this = 5
possible_transfer_amounts = list()
volume = 5
spillable = FALSE
/obj/item/reagent_containers/glass/rag/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
if(!proximity)
return
if(iscarbon(A) && A.reagents && reagents.total_volume)
var/mob/living/carbon/C = A
var/reagentlist = pretty_string_from_reagent_list(reagents)
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
reagents.reaction(C, INGEST)
reagents.trans_to(C, reagents.total_volume)
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
log_game("[key_name(user)] smothered [key_name(A)] with a damp rag containing [reagentlist]")
log_attack("[key_name(user)] smothered [key_name(A)] with a damp rag containing [reagentlist]")
else
reagents.reaction(C, TOUCH)
reagents.clear_reagents()
log_game("[key_name(user)] touched [key_name(A)] with a damp rag containing [reagentlist]")
log_attack("[key_name(user)] touched [key_name(A)] with a damp rag containing [reagentlist]")
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
else if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
if(do_after(user,30, target = A))
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")
A.clean_blood()
A.wash_cream()
return
+5 -1
View File
@@ -26,7 +26,11 @@
var/mob/living/carbon/human/agent = makeBody(pick_n_take(candidates))
var/mob/living/carbon/human/scientist = makeBody(pick_n_take(candidates))
GM.post_setup_team(GM.make_abductor_team(agent.mind, scientist.mind))
var/team = GM.make_abductor_team(agent.mind, scientist.mind)
if(!team)
return MAP_ERROR
GM.post_setup_team(team)
spawned_mobs += list(agent, scientist)
return SUCCESSFUL_SPAWN
-1
View File
@@ -471,7 +471,6 @@
else //If tile is fully grown
SV.entangle_mob()
//if(prob(25))
SV.spread()
if(i >= length)
break
+52 -6
View File
@@ -13,6 +13,7 @@
possible_transfer_amounts = list(5,10,15,20,25,30,50)
volume = 50
resistance_flags = 0
var/isGlass = TRUE //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it
/obj/item/reagent_containers/food/drinks/on_reagent_change()
if (gulp_size < 5)
@@ -98,7 +99,27 @@
reagents.handle_reactions()
..()
/obj/item/reagent_containers/food/drinks/throw_impact(atom/target, mob/thrower)
. = ..()
if(!.) //if the bottle wasn't caught
smash(target, thrower, TRUE)
/obj/item/reagent_containers/food/drinks/proc/smash(atom/target, mob/thrower, ranged = FALSE)
if(!isGlass)
return
if(bartender_check(target) && ranged)
return
var/obj/item/broken_bottle/B = new (loc)
B.icon_state = icon_state
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
B.icon = I
if(prob(33))
new/obj/item/shard(drop_location())
playsound(src, "shatter", 70, 1)
transfer_fingerprints_to(B)
qdel(src)
@@ -121,8 +142,9 @@
volume = 5
flags_1 = CONDUCT_1
container_type = OPENCONTAINER_1
spillable = 1
spillable = TRUE
resistance_flags = FIRE_PROOF
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/trophy/gold_cup
name = "gold cup"
@@ -168,22 +190,24 @@
desc = "Careful, the beverage you're about to enjoy is extremely hot."
icon_state = "coffee"
list_reagents = list("coffee" = 30)
spillable = 1
spillable = TRUE
resistance_flags = FREEZE_PROOF
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/ice
name = "Ice Cup"
desc = "Careful, cold ice, do not chew."
icon_state = "coffee"
list_reagents = list("ice" = 30)
spillable = 1
spillable = TRUE
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/mug/ // parent type is literally just so empty mug sprites are a thing
name = "mug"
desc = "A drink served in a classy mug."
icon_state = "tea"
item_state = "coffee"
spillable = 1
spillable = TRUE
/obj/item/reagent_containers/food/drinks/mug/on_reagent_change()
if(reagents.total_volume)
@@ -211,6 +235,7 @@
icon_state = "ramen"
list_reagents = list("dry_ramen" = 30)
foodtype = GRAIN
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/beer
name = "Space Beer"
@@ -233,7 +258,8 @@
icon_state = "water_cup_e"
possible_transfer_amounts = list()
volume = 10
spillable = 1
spillable = TRUE
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/sillycup/on_reagent_change()
if(reagents.total_volume)
@@ -247,6 +273,22 @@
icon_state = "juicebox"
volume = 15 //I figure if you have to craft these it should at least be slightly better than something you can get for free from a watercooler
/obj/item/reagent_containers/food/drinks/sillycup/smallcarton/smash(atom/target, mob/thrower, ranged = FALSE)
if(bartender_check(target) && ranged)
return
var/obj/item/broken_bottle/B = new (loc)
B.icon_state = icon_state
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
B.icon = I
B.name = "broken carton"
B.force = 0
B.throwforce = 0
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
transfer_fingerprints_to(B)
qdel(src)
/obj/item/reagent_containers/food/drinks/sillycup/smallcarton/on_reagent_change()
if (reagents.reagent_list.len)
switch(reagents.get_master_reagent_id())
@@ -299,6 +341,7 @@
materials = list(MAT_METAL=1500)
amount_per_transfer_from_this = 10
volume = 100
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/flask
name = "flask"
@@ -306,6 +349,7 @@
icon_state = "flask"
materials = list(MAT_METAL=250)
volume = 60
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/flask/gold
name = "captain's flask"
@@ -324,7 +368,7 @@
desc = "A cup with the british flag emblazoned on it."
icon_state = "britcup"
volume = 30
spillable = 1
spillable = TRUE
///Lavaland bowls and bottles///
@@ -335,6 +379,7 @@
icon_state = "mushroom_bowl"
w_class = WEIGHT_CLASS_SMALL
resistance_flags = 0
isGlass = FALSE
//////////////////////////soda_cans//
@@ -346,6 +391,7 @@
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
container_type = NONE
spillable = FALSE
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == "head")
@@ -12,21 +12,18 @@
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
var/const/duration = 13 //Directly relates to the 'knockdown' duration. Lowered by armor (i.e. helmets)
var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it
isGlass = TRUE
foodtype = ALCOHOL
/obj/item/reagent_containers/food/drinks/bottle/throw_impact(atom/target,mob/thrower)
..()
smash(target,thrower,1)
/obj/item/reagent_containers/food/drinks/bottle/proc/smash(mob/living/target, mob/living/user, ranged = 0)
/obj/item/reagent_containers/food/drinks/bottle/smash(mob/living/target, mob/thrower, ranged = FALSE)
//Creates a shattering noise and replaces the bottle with a broken_bottle
var/new_location = get_turf(src)
var/obj/item/broken_bottle/B = new /obj/item/broken_bottle(new_location)
if(bartender_check(target) && ranged)
return
var/obj/item/broken_bottle/B = new (loc)
if(!ranged)
user.put_in_hands(B)
B.icon_state = src.icon_state
thrower.put_in_hands(B)
B.icon_state = icon_state
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
@@ -35,14 +32,14 @@
if(isGlass)
if(prob(33))
new/obj/item/shard(new_location)
new/obj/item/shard(drop_location())
playsound(src, "shatter", 70, 1)
else
B.name = "broken carton"
B.force = 0
B.throwforce = 0
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
src.transfer_fingerprints_to(B)
transfer_fingerprints_to(B)
qdel(src)
@@ -116,7 +113,7 @@
SplashReagents(target)
//Finally, smash the bottle. This kills (del) the bottle.
src.smash(target, user)
smash(target, user)
return
@@ -311,7 +308,7 @@
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = 0
isGlass = FALSE
list_reagents = list("orangejuice" = 100)
foodtype = FRUIT
@@ -322,7 +319,7 @@
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = 0
isGlass = FALSE
list_reagents = list("cream" = 100)
foodtype = DAIRY
@@ -333,7 +330,7 @@
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = 0
isGlass = FALSE
list_reagents = list("tomatojuice" = 100)
foodtype = VEGETABLES
@@ -344,7 +341,7 @@
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
isGlass = 0
isGlass = FALSE
list_reagents = list("limejuice" = 100)
foodtype = FRUIT
@@ -367,7 +364,7 @@
B.reagents.copy_to(src,100)
if(!B.isGlass)
desc += " You're not sure if making this out of a carton was the brightest idea."
isGlass = 0
isGlass = FALSE
return
/obj/item/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/target,mob/thrower)
@@ -8,7 +8,7 @@
volume = 50
materials = list(MAT_GLASS=500)
max_integrity = 20
spillable = 1
spillable = TRUE
resistance_flags = ACID_PROOF
unique_rename = 1
@@ -271,3 +271,18 @@
bonus_reagents = list("nutriment" = 1, "vitamin" = 1)
filling_color = "#800000"
tastes = list("meat" = 1, "butter" = 1)
/obj/item/reagent_containers/food/snacks/kebab/rat
name = "rat-kebab"
desc = "Not so delicious rat meat, on a stick."
icon_state = "ratkebab"
w_class = WEIGHT_CLASS_NORMAL
list_reagents = list("nutriment" = 6, "vitamin" = 2)
tastes = list("rat meat" = 1, "metal" = 1)
foodtype = MEAT | GROSS
/obj/item/reagent_containers/food/snacks/kebab/rat/double
name = "double rat-kebab"
icon_state = "doubleratkebab"
tastes = list("rat meat" = 2, "metal" = 1)
bonus_reagents = list("nutriment" = 6, "vitamin" = 2)
+5 -6
View File
@@ -1,5 +1,4 @@
/obj/item/bombcore/pizza
parent_type = /obj/item/bombcore/miniature
/obj/item/bombcore/miniature/pizza
name = "pizza bomb"
desc = "Special delivery!"
icon_state = "pizzabomb_inactive"
@@ -23,7 +22,7 @@
var/obj/item/reagent_containers/food/snacks/pizza/pizza
var/obj/item/bombcore/pizza/bomb
var/obj/item/bombcore/miniature/pizza/bomb
var/bomb_active = FALSE // If the bomb is counting down.
var/bomb_defused = TRUE // If the bomb is inert.
var/bomb_timer = 1 // How long before blowing the bomb.
@@ -53,7 +52,7 @@
else
var/obj/item/pizzabox/box = boxes.len ? boxes[boxes.len] : src
if(boxes.len)
desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile."
desc = "A pile of boxes suited for pizzas. There appear to be [boxes.len + 1] boxes in the pile."
if(box.boxtag != "")
desc = "[desc] The [boxes.len ? "top box" : "box"]'s tag reads: [box.boxtag]"
@@ -156,7 +155,7 @@
var/list/add = list()
add += newbox
add += newbox.boxes
if(!user.transferItemToLoc(add, src))
if(!user.transferItemToLoc(newbox, src))
return
boxes += add
newbox.boxes.Cut()
@@ -184,7 +183,7 @@
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
update_icon()
return
else if(istype(I, /obj/item/bombcore/pizza))
else if(istype(I, /obj/item/bombcore/miniature/pizza))
if(open && !bomb)
if(!user.transferItemToLoc(I, src))
return
@@ -170,3 +170,21 @@
)
result = /obj/item/reagent_containers/food/snacks/pigblanket
subcategory = CAT_MEAT
/datum/crafting_recipe/food/ratkebab
name = "Rat Kebab"
reqs = list(
/obj/item/stack/rods = 1,
/obj/item/reagent_containers/food/snacks/deadmouse = 1
)
result = /obj/item/reagent_containers/food/snacks/kebab/rat
category = CAT_MEAT
/datum/crafting_recipe/food/doubleratkebab
name = "Double Rat Kebab"
reqs = list(
/obj/item/stack/rods = 1,
/obj/item/reagent_containers/food/snacks/deadmouse = 2
)
result = /obj/item/reagent_containers/food/snacks/kebab/rat/double
category = CAT_MEAT
-1
View File
@@ -78,7 +78,6 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs",
var/copiedobjs = list()
for (var/turf/T in refined_src)
//var/datum/coords/C_src = refined_src[T]
var/coordstring = refined_src[T]
var/turf/B = refined_trg[coordstring]
if(!istype(B))
@@ -5,7 +5,7 @@
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "honeycomb"
possible_transfer_amounts = list()
spillable = 0
spillable = FALSE
disease_amount = 0
volume = 10
amount_per_transfer_from_this = 0
+1 -1
View File
@@ -375,7 +375,7 @@
pocell.maxcharge *= CG.rate*1000
pocell.charge = pocell.maxcharge
pocell.name = "[G.name] battery"
pocell.desc = "A rechargeable plant based power cell. This one has a power rating of [pocell.maxcharge], and you should not swallow it."
pocell.desc = "A rechargeable plant based power cell. This one has a power rating of [DisplayPower(pocell.maxcharge)], and you should not swallow it."
if(G.reagents.has_reagent("plasma", 2))
pocell.rigged = 1

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