Merge remote-tracking branch 'upstream/dev-freeze' into 150702-SpellFixes

This commit is contained in:
PsiOmegaDelta
2015-08-11 12:20:54 +02:00
223 changed files with 3804 additions and 2723 deletions
+3
View File
@@ -1248,6 +1248,7 @@
#include "code\modules\mob\living\silicon\decoy\death.dm"
#include "code\modules\mob\living\silicon\decoy\decoy.dm"
#include "code\modules\mob\living\silicon\decoy\life.dm"
#include "code\modules\mob\living\silicon\pai\admin.dm"
#include "code\modules\mob\living\silicon\pai\death.dm"
#include "code\modules\mob\living\silicon\pai\examine.dm"
#include "code\modules\mob\living\silicon\pai\life.dm"
@@ -1279,6 +1280,7 @@
#include "code\modules\mob\living\silicon\robot\drone\drone_damage.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_items.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_say.dm"
#include "code\modules\mob\living\simple_animal\bees.dm"
#include "code\modules\mob\living\simple_animal\corpse.dm"
#include "code\modules\mob\living\simple_animal\parrot.dm"
@@ -1460,6 +1462,7 @@
#include "code\modules\random_map\random_map.dm"
#include "code\modules\reagents\Chemistry-Colours.dm"
#include "code\modules\reagents\Chemistry-Holder.dm"
#include "code\modules\reagents\Chemistry-Logging.dm"
#include "code\modules\reagents\Chemistry-Machinery.dm"
#include "code\modules\reagents\Chemistry-Metabolism.dm"
#include "code\modules\reagents\Chemistry-Readme.dm"
+3 -3
View File
@@ -241,7 +241,7 @@ mob/living/carbon/human/airflow_hit(atom/A)
zone/proc/movables()
. = list()
for(var/turf/T in contents)
for(var/atom/A in T)
if(istype(A, /obj/effect) || istype(A, /mob/aiEye))
for(var/atom/movable/A in T)
if(!A.simulated || A.anchored || istype(A, /obj/effect) || istype(A, /mob/aiEye))
continue
. += A
. += A
+1 -1
View File
@@ -295,7 +295,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
//if the reaction is progressing too slow then it isn't self-sustaining anymore and burns out
if(zone) //be less restrictive with canister and tank reactions
if((!liquid_fuel || used_fuel <= FIRE_LIQUD_MIN_BURNRATE) && (!gas_fuel || used_fuel <= FIRE_GAS_MIN_BURNRATE*group_multiplier))
if((!liquid_fuel || used_fuel <= FIRE_LIQUD_MIN_BURNRATE) && (!gas_fuel || used_fuel <= FIRE_GAS_MIN_BURNRATE*zone.contents.len))
return 0
+19 -30
View File
@@ -881,6 +881,8 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
// Movement based on lower left corner. Tiles that do not fit
// into the new area will not be moved.
// Does *not* affect gases etc; copied turfs will be changed via ChangeTurf, and the dir, icon, and icon_state copied. All other vars will remain default.
if(!A || !src) return 0
var/list/turfs_src = get_area_turfs(src.type)
@@ -934,7 +936,8 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
if(istype(B, /turf/space))
continue moving
var/turf/X = new T.type(B)
var/turf/X = B
X.ChangeTurf(T.type)
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
@@ -974,12 +977,6 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
copiedobjs += newobjs
copiedobjs += newmobs
for(var/V in T.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
X.vars[V] = T.vars[V]
// var/area/AR = X.loc
// if(AR.lighting_use_dynamic)
@@ -995,22 +992,9 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
var/list/doors = new/list()
if(toupdate.len)
for(var/turf/simulated/T1 in toupdate)
for(var/obj/machinery/door/D2 in T1)
doors += D2
/*if(T1.parent)
air_master.groups_to_rebuild += T1.parent
else
air_master.tiles_to_update += T1*/
for(var/obj/O in doors)
O:update_nearby_tiles(1)
air_master.mark_for_update(T1)
return copiedobjs
@@ -1299,24 +1283,29 @@ var/list/WALLITEMS = list(
colour += temp_col
return colour
var/mob/dview/dview_mob = new
//Version of view() which ignores darkness, because BYOND doesn't have it.
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
if(!center)
return
var/global/mob/dview/DV
if(!DV)
DV = new
dview_mob.loc = center
DV.loc = center
dview_mob.see_invisible = invis_flags
DV.see_in_dark = range
DV.see_invisible = invis_flags
. = view(range, DV)
DV.loc = null
. = view(range, dview_mob)
dview_mob.loc = null
/mob/dview
invisibility = 101
density = 0
anchored = 1
simulated = 0
see_in_dark = 1e6
/mob/dview/New()
// do nothing. we don't want to be in any mob lists; we're a dummy not a mob.
+8
View File
@@ -121,6 +121,8 @@ var/list/gamemode_cache = list()
var/organ_health_multiplier = 1
var/organ_regeneration_multiplier = 1
var/organs_decay
var/default_brain_health = 400
//Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt,
//so that it's similar to HALLOSS. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun.
@@ -708,6 +710,12 @@ var/list/gamemode_cache = list()
config.organ_regeneration_multiplier = value / 100
if("organ_damage_spillover_multiplier")
config.organ_damage_spillover_multiplier = value / 100
if("organs_can_decay")
config.organs_decay = 1
if("default_brain_health")
config.default_brain_health = text2num(value)
if(!config.default_brain_health || config.default_brain_health < 1)
config.default_brain_health = initial(config.default_brain_health)
if("bones_can_break")
config.bones_can_break = value
if("limbs_can_break")
+5
View File
@@ -50,6 +50,11 @@ datum/controller/game_controller/proc/setup_objects()
for(var/atom/movable/object in world)
object.initialize()
admin_notice("<span class='danger>Initializing areas</span>", R_DEBUG)
sleep(-1)
for(var/area/area in all_areas)
area.initialize()
admin_notice("<span class='danger'>Initializing pipe networks</span>", R_DEBUG)
sleep(-1)
for(var/obj/machinery/atmospherics/machine in machines)
+3 -3
View File
@@ -188,9 +188,9 @@ datum/controller/vote
if(mode)
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
return 0
if(current_votes[ckey])
choices[choices[current_votes[ckey]]]--
if(vote && 1<=vote && vote<=choices.len)
if(vote && vote >= 1 && vote <= choices.len)
if(current_votes[ckey])
choices[choices[current_votes[ckey]]]--
voted += usr.ckey
choices[choices[vote]]++ //check this
current_votes[ckey] = vote
-2
View File
@@ -198,9 +198,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
var/index = laws.Find(law)
if(index)
laws -= law
world << state.len
for(index, index < state.len, index++)
world << index
state[index] = state[index+1]
sorted_laws.Cut()
+156 -5
View File
@@ -138,9 +138,160 @@
proc/get_id_photo(var/mob/living/carbon/human/H)
H.regenerate_icons()
var/icon/preview_icon = icon(H.icon)
for(var/image/I in H.overlays_standing)
if(I && I.icon)
preview_icon.Blend(icon(I.icon, I.icon_state), ICON_OVERLAY)
var/icon/preview_icon = null
var/g = "m"
if (H.gender == FEMALE)
g = "f"
var/icon/icobase = H.species.icobase
preview_icon = new /icon(icobase, "torso_[g]")
var/icon/temp
temp = new /icon(icobase, "groin_[g]")
preview_icon.Blend(temp, ICON_OVERLAY)
temp = new /icon(icobase, "head_[g]")
preview_icon.Blend(temp, ICON_OVERLAY)
for(var/obj/item/organ/external/E in H.organs)
preview_icon.Blend(E.get_icon(), ICON_OVERLAY)
//Tail
if(H.species.tail)
temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[H.species.tail]_s")
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin tone
if(H.species.flags & HAS_SKIN_TONE)
if (H.s_tone >= 0)
preview_icon.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
else
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
// Skin color
if(H.species.flags & HAS_SKIN_TONE)
if(!H.species || H.species.flags & HAS_SKIN_COLOR)
preview_icon.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s")
if (H.species.flags & HAS_EYE_COLOR)
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style]
if(hair_style)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
hair_s.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD)
eyes_s.Blend(hair_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style]
if(facial_hair_style)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
facial_s.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
var/icon/clothes_s = null
switch(H.mind.assigned_role)
if("Head of Personnel")
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Bartender")
clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Gardener")
clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Chef")
clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Janitor")
clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Librarian")
clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Quartermaster")
clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Cargo Technician")
clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Shaft Miner")
clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Lawyer")
clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Chaplain")
clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Research Director")
clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if("Scientist")
clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if("Chemist")
clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
if("Chief Medical Officer")
clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
if("Medical Doctor")
clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if("Geneticist")
clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
if("Virologist")
clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
if("Captain")
clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Head of Security")
clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Warden")
clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Detective")
clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
if("Security Officer")
clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Chief Engineer")
clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Station Engineer")
clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Atmospheric Technician")
clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Roboticist")
clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
else
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
qdel(eyes_s)
qdel(clothes_s)
return preview_icon
+5 -3
View File
@@ -22,9 +22,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/New()
manifest += "<ul>"
for(var/atom/movable/path in contains)
if(!path) continue
manifest += "<li>[initial(path.name)]</li>"
for(var/path in contains)
if(!path || !ispath(path, /atom))
continue
var/atom/O = path
manifest += "<li>[initial(O.name)]</li>"
manifest += "</ul>"
/datum/supply_packs/specialops
+45 -10
View File
@@ -60,7 +60,8 @@
/datum/antagonist/proc/get_candidates(var/ghosts_only)
candidates = list() // Clear.
candidates = ticker.mode.get_players_for_role(role_type, id)
// Prune restricted jobs and status. Broke it up for readability.
// Prune restricted status. Broke it up for readability.
// Note that this is done before jobs are handed out.
for(var/datum/mind/player in candidates)
if(ghosts_only && !istype(player.current, /mob/dead))
candidates -= player
@@ -75,7 +76,9 @@
return candidates
/datum/antagonist/proc/attempt_random_spawn()
attempt_spawn(flags & (ANTAG_OVERRIDE_MOB|ANTAG_OVERRIDE_JOB))
build_candidate_list(flags & (ANTAG_OVERRIDE_MOB|ANTAG_OVERRIDE_JOB))
attempt_spawn()
finalize_spawn()
/datum/antagonist/proc/attempt_late_spawn(var/datum/mind/player)
if(!can_late_spawn())
@@ -88,27 +91,59 @@
add_antagonist(player,0,1,0,1,1)
return
/datum/antagonist/proc/attempt_spawn(var/ghosts_only)
/datum/antagonist/proc/build_candidate_list(var/ghosts_only)
// Get the raw list of potential players.
update_current_antag_max()
candidates = get_candidates(ghosts_only)
//Selects players that will be spawned in the antagonist role from the potential candidates
//Selected players are added to the pending_antagonists lists.
//Attempting to spawn an antag role with ANTAG_OVERRIDE_JOB should be done before jobs are assigned,
//so that they do not occupy regular job slots. All other antag roles should be spawned after jobs are
//assigned, so that job restrictions can be respected.
/datum/antagonist/proc/attempt_spawn(var/rebuild_candidates = 1)
// Update our boundaries.
if(!candidates.len)
return 0
//Grab candidates randomly until we have enough.
while(candidates.len)
while(candidates.len && pending_antagonists.len < cur_max)
var/datum/mind/player = pick(candidates)
pending_antagonists |= player
candidates -= player
draft_antagonist(player)
return 1
/datum/antagonist/proc/draft_antagonist(var/datum/mind/player)
//Check if the player can join in this antag role, or if the player has already been given an antag role.
if(!can_become_antag(player) || player.special_role)
return 0
pending_antagonists |= player
//Ensure that antags with ANTAG_OVERRIDE_JOB do not occupy job slots.
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = role_text
//Ensure that a player cannot be drafted for multiple antag roles, taking up slots for antag roles that they will not fill.
player.special_role = role_text
return 1
//Spawns all pending_antagonists. This is done separately from attempt_spawn in case the game mode setup fails.
/datum/antagonist/proc/finalize_spawn()
if(!pending_antagonists || !pending_antagonists.len)
if(!pending_antagonists)
return
for(var/datum/mind/player in pending_antagonists)
if(can_become_antag(player) && !player.special_role)
add_antagonist(player,0,0,1)
pending_antagonists.Cut()
pending_antagonists -= player
add_antagonist(player,0,0,1)
//Resets all pending_antagonists, clearing their special_role (and assigned_role if ANTAG_OVERRIDE_JOB is set)
/datum/antagonist/proc/reset()
for(var/datum/mind/player in pending_antagonists)
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = null
player.special_role = null
pending_antagonists.Cut()
+2
View File
@@ -9,6 +9,8 @@
return 0
current_antagonists |= player
//do this again, just in case
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = role_text
player.special_role = role_text
+7 -1
View File
@@ -42,7 +42,13 @@
return W
/datum/antagonist/proc/create_radio(var/freq, var/mob/living/carbon/human/player)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(player)
var/obj/item/device/radio/R
if(freq == SYND_FREQ)
R = new/obj/item/device/radio/headset/syndicate(player)
else
R = new/obj/item/device/radio/headset(player)
R.set_frequency(freq)
player.equip_to_slot_or_del(R, slot_l_ear)
return R
+2 -2
View File
@@ -901,7 +901,7 @@ area/space/atmosalert()
icon_state = "tcomsatcham"
/area/server
name = "\improper Messaging Server Room"
name = "\improper Research Server Room"
icon_state = "server"
//Crew
@@ -1793,7 +1793,7 @@ area/space/atmosalert()
ambience = list('sound/ambience/ambimalf.ogg')
/area/turret_protected/ai_server_room
name = "AI Server Room"
name = "Messaging Server Room"
icon_state = "ai_server"
/area/turret_protected/ai
+12 -19
View File
@@ -14,13 +14,17 @@
all_areas += src
if(!requires_power)
power_light = 0 //rastaf0
power_equip = 0 //rastaf0
power_environ = 0 //rastaf0
power_light = 0
power_equip = 0
power_environ = 0
..()
// spawn(15)
/area/proc/initialize()
if(!requires_power || !apc)
power_light = 0
power_equip = 0
power_environ = 0
power_change() // all machines set to current power level, also updates lighting icon
/area/proc/get_contents()
@@ -227,7 +231,7 @@ var/list/mob/living/forced_ambiance_list = new
var/area/oldarea = L.lastarea
if((oldarea.has_gravity == 0) && (newarea.has_gravity == 1) && (L.m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
thunk(L)
L.make_floating(0)
L.update_floating( L.Check_Dense_Object() )
L.lastarea = newarea
play_ambience(L)
@@ -260,21 +264,10 @@ var/list/mob/living/forced_ambiance_list = new
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
A.has_gravity = gravitystate
if(gravitystate)
for(var/mob/living/carbon/human/M in A)
for(var/mob/M in A)
if(has_gravity)
thunk(M)
for(var/mob/M1 in A)
M1.make_floating(0)
else
for(var/mob/M in A)
if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/))
var/mob/living/carbon/human/H = src
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) //magboots + dense_object = no floaty effect
H.make_floating(0)
else
H.make_floating(1)
else
M.make_floating(1)
M.update_floating( M.Check_Dense_Object() )
/area/proc/thunk(mob)
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.
-3
View File
@@ -66,9 +66,6 @@
/atom/proc/meteorhit(obj/meteor as obj)
return
/atom/proc/allow_drop()
return 1
/atom/proc/CheckExit()
return 1
-3
View File
@@ -64,9 +64,6 @@
component_parts += new /obj/item/stack/cable_coil(src)
RefreshParts()
/obj/machinery/dna_scannernew/allow_drop()
return 0
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
if (user.stat)
return
@@ -193,7 +193,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
src << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
return
if(!G.state == GRAB_KILL)
if(G.state != GRAB_KILL)
src << "<span class='warning'>We must have a tighter grip to absorb this creature.</span>"
return
+2 -2
View File
@@ -136,8 +136,8 @@
// Make it a wood-reinforced wooden table.
// There are cult materials available, but it'd make the table non-deconstructable with how holotables work.
// Could possibly use a new material var for holographic-ness?
material = name_to_material["wood"]
reinforced = name_to_material["wood"]
material = get_material_by_name("wood")
reinforced = get_material_by_name("wood")
update_desc()
update_connections(1)
update_icon()
+1
View File
@@ -592,6 +592,7 @@ var/list/sacrificed = list()
usr.whisper("[input]")
input = sanitize(input)
log_and_message_admins("used a communicate rune to say '[input]'")
for(var/datum/mind/H in cult.current_antagonists)
if (H.current)
H.current << "\red \b [input]"
+2 -2
View File
@@ -324,7 +324,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
//AI laws
for(var/mob/living/silicon/ai/M in living_mob_list)
if(M.stat != 2 && M.has_power)
if(M.stat != 2 && M.see_in_dark != 0)
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
@@ -468,4 +468,4 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
world << "Ion Storm Main Done"
*/
*/
+20 -10
View File
@@ -245,12 +245,8 @@ var/global/list/additional_antag_types = list()
if(!(antag_templates && antag_templates.len))
return 1
// Attempt to mark folks down as ready to go. Don't finalize until post setup.
var/datum/antagonist/main_antags = antag_templates[1]
var/list/candidates = main_antags.get_candidates()
if(candidates.len >= required_enemies)
for(var/datum/antagonist/antag in antag_templates)
antag.attempt_spawn()
if(main_antags.candidates.len >= required_enemies)
return 1
return 0
@@ -264,6 +260,14 @@ var/global/list/additional_antag_types = list()
var/datum/event_container/EMajor = event_manager.event_containers[EVENT_LEVEL_MAJOR]
EMajor.delay_modifier = event_delay_mod_major
/datum/game_mode/proc/pre_setup()
for(var/datum/antagonist/antag in antag_templates)
antag.build_candidate_list() //compile a list of all eligible candidates
//antag roles that replace jobs need to be assigned before the job controller hands out jobs.
if(antag.flags & ANTAG_OVERRIDE_JOB)
antag.attempt_spawn() //select antags to be spawned
///post_setup()
/datum/game_mode/proc/post_setup()
@@ -277,11 +281,13 @@ var/global/list/additional_antag_types = list()
spawn(rand(100,150))
announce_ert_disabled()
if(antag_templates && antag_templates.len)
for(var/datum/antagonist/antag in antag_templates)
antag.finalize_spawn()
if(antag.is_latejoin_template())
latejoin_templates |= antag
//Assign all antag types for this game mode. Any players spawned as antags earlier should have been removed from the pending list, so no need to worry about those.
for(var/datum/antagonist/antag in antag_templates)
if(!(antag.flags & ANTAG_OVERRIDE_JOB))
antag.attempt_spawn() //select antags to be spawned
antag.finalize_spawn() //actually spawn antags
if(antag.is_latejoin_template())
latejoin_templates |= antag
if(emergency_shuttle && auto_recall_shuttle)
emergency_shuttle.auto_recall = 1
@@ -292,6 +298,10 @@ var/global/list/additional_antag_types = list()
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
return 1
/datum/game_mode/proc/fail_setup()
for(var/datum/antagonist/antag in antag_templates)
antag.reset()
/datum/game_mode/proc/announce_ert_disabled()
if(!ert_disabled)
return
+4 -3
View File
@@ -91,11 +91,14 @@ var/global/datum/controller/gameticker/ticker
else
src.mode = config.pick_mode(master_mode)
src.mode.pre_setup()
job_master.DivideOccupations() // Apparently important for new antagonist system to register specific job antags properly.
if(!mode_started && !src.mode.can_start())
world << "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players needed. Reverting to pre-game lobby."
current_state = GAME_STATE_PREGAME
mode.fail_setup()
mode = null
job_master.ResetOccupations()
return 0
@@ -110,6 +113,7 @@ var/global/datum/controller/gameticker/ticker
else
src.mode.announce()
setup_economy()
current_state = GAME_STATE_PLAYING
create_characters() //Create player characters and transfer them
collect_minds()
@@ -118,9 +122,6 @@ var/global/datum/controller/gameticker/ticker
callHook("roundstart")
//here to initialize the random events nicely at round start
setup_economy()
shuttle_controller.setup_shuttle_docks()
spawn(0)//Forking here so we dont have to wait for this to finish
-9
View File
@@ -20,12 +20,3 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
if (skipjack && skipjack.returned_home)
return 1
return 0
/datum/game_mode/heist/cleanup()
//the skipjack and everything in it have left and aren't coming back, so get rid of them.
var/area/skipjack = locate(/area/shuttle/skipjack/station)
for (var/mob/living/M in skipjack.contents)
//maybe send the player a message that they've gone home/been kidnapped? Someone responsible for vox lore should write that.
qdel(M)
for (var/obj/O in skipjack.contents)
qdel(O) //no hiding in lockers or anything
-6
View File
@@ -50,8 +50,6 @@
/var/const/access_mining = 48
/var/const/access_mining_office = 49 //not in use
/var/const/access_mailsorting = 50
/var/const/access_mint = 51
/var/const/access_mint_vault = 52
/var/const/access_heads_vault = 53
/var/const/access_mining_station = 54
/var/const/access_xenobiology = 55
@@ -311,10 +309,6 @@
return "Mining Office"
if(access_mailsorting)
return "Cargo Office"
if(access_mint)
return "Mint"
if(access_mint_vault)
return "Mint Vault"
if(access_heads_vault)
return "Main Vault"
if(access_mining_station)
+1 -1
View File
@@ -10,7 +10,7 @@
selection_color = "#dddddd"
access = list() //See /datum/job/assistant/get_access()
minimal_access = list() //See /datum/job/assistant/get_access()
alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Security Cadet","Visitor")
alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Visitor")
/datum/job/assistant/equip(var/mob/living/carbon/human/H)
if(!H) return 0
+5 -5
View File
@@ -97,8 +97,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
equip(var/mob/living/carbon/human/H)
@@ -124,7 +124,7 @@
spawn_positions = 2
supervisors = "the quartermaster and the head of personnel"
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
@@ -149,8 +149,8 @@
spawn_positions = 3
supervisors = "the quartermaster and the head of personnel"
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
minimal_access = list(access_mining, access_mining_station, access_mailsorting)
alt_titles = list("Drill Technician","Prospector")
equip(var/mob/living/carbon/human/H)
-5
View File
@@ -177,11 +177,6 @@
return
return
allow_drop()
return 0
process()
if (stat & (NOPOWER|BROKEN))
return
-3
View File
@@ -14,9 +14,6 @@
idle_power_usage = 60
active_power_usage = 10000 //10 kW. It's a big all-body scanner.
/*/obj/machinery/bodyscanner/allow_drop()
return 0*/
/obj/machinery/bodyscanner/relaymove(mob/user as mob)
if (user.stat)
return
+14 -33
View File
@@ -69,6 +69,7 @@
var/datum/radio_frequency/radio_connection
var/list/TLV = list()
var/list/trace_gas = list("sleeping_agent", "volatile_fuel") //list of other gases that this air alarm is able to detect
var/danger_level = 0
var/pressure_dangerlevel = 0
@@ -240,23 +241,24 @@
/obj/machinery/alarm/proc/overall_danger_level(var/datum/gas_mixture/environment)
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
var/environment_pressure = environment.return_pressure()
//var/other_moles = 0.0
////for(var/datum/gas/G in environment.trace_gases)
// other_moles+=G.moles
var/other_moles = 0
for(var/g in trace_gas)
other_moles += environment.gas[g] //this is only going to be used in a partial pressure calc, so we don't need to worry about group_multiplier here.
pressure_dangerlevel = get_danger_level(environment_pressure, TLV["pressure"])
oxygen_dangerlevel = get_danger_level(environment.gas["oxygen"]*partial_pressure, TLV["oxygen"])
co2_dangerlevel = get_danger_level(environment.gas["carbon_dioxide"]*partial_pressure, TLV["carbon dioxide"])
phoron_dangerlevel = get_danger_level(environment.gas["phoron"]*partial_pressure, TLV["phoron"])
temperature_dangerlevel = get_danger_level(environment.temperature, TLV["temperature"])
//other_dangerlevel = get_danger_level(other_moles*partial_pressure, TLV["other"])
other_dangerlevel = get_danger_level(other_moles*partial_pressure, TLV["other"])
return max(
pressure_dangerlevel,
oxygen_dangerlevel,
co2_dangerlevel,
phoron_dangerlevel,
//other_dangerlevel,
other_dangerlevel,
temperature_dangerlevel
)
@@ -504,34 +506,13 @@
var/list/environment_data = new
data["has_environment"] = total
if(total)
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
var/list/current_settings = TLV["pressure"]
var/pressure = environment.return_pressure()
var/pressure_danger = get_danger_level(pressure, current_settings)
environment_data[++environment_data.len] = list("name" = "Pressure", "value" = pressure, "unit" = "kPa", "danger_level" = pressure_danger)
data["total_danger"] = pressure_danger
current_settings = TLV["oxygen"]
var/oxygen_danger = get_danger_level(environment.gas["oxygen"]*partial_pressure, current_settings)
environment_data[++environment_data.len] = list("name" = "Oxygen", "value" = environment.gas["oxygen"] / total * 100, "unit" = "%", "danger_level" = oxygen_danger)
data["total_danger"] = max(oxygen_danger, data["total_danger"])
current_settings = TLV["carbon dioxide"]
var/carbon_dioxide_danger = get_danger_level(environment.gas["carbon_dioxide"]*partial_pressure, current_settings)
environment_data[++environment_data.len] = list("name" = "Carbon dioxide", "value" = environment.gas["carbon_dioxide"] / total * 100, "unit" = "%", "danger_level" = carbon_dioxide_danger)
data["total_danger"] = max(carbon_dioxide_danger, data["total_danger"])
current_settings = TLV["phoron"]
var/phoron_danger = get_danger_level(environment.gas["phoron"]*partial_pressure, current_settings)
environment_data[++environment_data.len] = list("name" = "Toxins", "value" = environment.gas["phoron"] / total * 100, "unit" = "%", "danger_level" = phoron_danger)
data["total_danger"] = max(phoron_danger, data["total_danger"])
current_settings = TLV["temperature"]
var/temperature_danger = get_danger_level(environment.temperature, current_settings)
environment_data[++environment_data.len] = list("name" = "Temperature", "value" = environment.temperature, "unit" = "K ([round(environment.temperature - T0C, 0.1)]C)", "danger_level" = temperature_danger)
data["total_danger"] = max(temperature_danger, data["total_danger"])
environment_data[++environment_data.len] = list("name" = "Pressure", "value" = pressure, "unit" = "kPa", "danger_level" = pressure_dangerlevel)
environment_data[++environment_data.len] = list("name" = "Oxygen", "value" = environment.gas["oxygen"] / total * 100, "unit" = "%", "danger_level" = oxygen_dangerlevel)
environment_data[++environment_data.len] = list("name" = "Carbon dioxide", "value" = environment.gas["carbon_dioxide"] / total * 100, "unit" = "%", "danger_level" = co2_dangerlevel)
environment_data[++environment_data.len] = list("name" = "Toxins", "value" = environment.gas["phoron"] / total * 100, "unit" = "%", "danger_level" = phoron_dangerlevel)
environment_data[++environment_data.len] = list("name" = "Temperature", "value" = environment.temperature, "unit" = "K ([round(environment.temperature - T0C, 0.1)]C)", "danger_level" = temperature_dangerlevel)
data["total_danger"] = danger_level
data["environment"] = environment_data
data["atmos_alarm"] = alarm_area.atmosalm
data["fire_alarm"] = alarm_area.fire != null
@@ -919,7 +900,7 @@ FIRE ALARM
/obj/machinery/firealarm/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/firealarm/bullet_act(BLAH)
/obj/machinery/firealarm/bullet_act()
return src.alarm()
/obj/machinery/firealarm/emp_act(severity)
+1 -1
View File
@@ -290,7 +290,7 @@
/obj/machinery/autolathe/dismantle()
for(var/mat in stored_material)
var/material/M = name_to_material[mat]
var/material/M = get_material_by_name(mat)
if(!istype(M))
continue
var/obj/item/stack/material/S = new M.stack_type(get_turf(src))
+6 -6
View File
@@ -66,19 +66,19 @@
user << "<span class='info'>You inject the blood sample into the bioprinter.</span>"
return
// Meat for biomass.
else if(!prints_prosthetics && istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
if(!prints_prosthetics && istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
stored_matter += 50
user.drop_item()
user << "<span class='info'>\The [src] processes \the [W]. Levels of stored biomass now: [stored_matter]</span>"
qdel(W)
return
// Steel for matter.
else if(prints_prosthetics && istype(W, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = W
stored_matter += M.amount * 10
if(prints_prosthetics && istype(W, /obj/item/stack/material) && W.get_material_name() == DEFAULT_WALL_MATERIAL)
var/obj/item/stack/S = W
stored_matter += S.amount * 10
user.drop_item()
user << "<span class='info'>\The [src] processes \the [W]. Levels of stored matter now: [stored_matter]</span>"
qdel(W)
return
else
return..()
return..()
+1 -1
View File
@@ -59,7 +59,7 @@
..()
wires = new(src)
botcard = new(src)
botcard.access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
botcard.access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
cell = new(src)
cell.charge = 2000
cell.maxcharge = 2000
+3 -2
View File
@@ -88,8 +88,8 @@
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
A.amount = 5
if(istype(P, /obj/item/stack/material/glass/reinforced))
var/obj/item/stack/material/glass/reinforced/RG = P
if(istype(P, /obj/item/stack/material) && P.get_material_name() == "rglass")
var/obj/item/stack/RG = P
if (RG.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
return
@@ -201,6 +201,7 @@
transfer.control_disabled = 0
transfer.aiRadio.disabledAi = 0
transfer.loc = get_turf(src)
transfer.create_eyeobj()
transfer.cancel_camera()
user << "\blue <b>Transfer successful</b>: \black [transfer.name] ([rand(1000,9999)].exe) downloaded to host terminal. Local copy wiped."
transfer << "You have been uploaded to a stationary terminal. Remote device connection restored."
@@ -87,8 +87,8 @@
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
A.amount = 5
if(istype(P, /obj/item/stack/material/glass))
var/obj/item/stack/material/glass/G = P
if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass")
var/obj/item/stack/G = P
if (G.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
return
@@ -178,13 +178,14 @@
if(istype(P, /obj/item/weapon/crowbar)) // complicated check
remove_peripheral()
if(istype(P, /obj/item/stack/material/glass))
if(P:amount >= 2)
if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass")
var/obj/item/stack/S = P
if(S.amount >= 2)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if(P)
P:use(2)
user << "\blue You put in the glass panel."
if(S)
S.use(2)
user << "<span class='notice'>You put in the glass panel.</span>"
src.state = 4
src.icon_state = "4"
if(4)
-5
View File
@@ -60,11 +60,6 @@
return 1
/obj/machinery/atmospherics/unary/cryo_cell/allow_drop()
return 0
/obj/machinery/atmospherics/unary/cryo_cell/relaymove(mob/user as mob)
if(user.stat)
return
+7 -5
View File
@@ -79,12 +79,14 @@ for reference:
maxhealth = material.integrity
health = maxhealth
/obj/structure/barricade/get_material()
return material
/obj/structure/barricade/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/stack/material))
var/obj/item/stack/material/D = W
if(D.material.name != material.name)
user << "<span class='warning'>That is the wrong material needed to repair \the [src].</span>"
return
if (istype(W, /obj/item/stack))
var/obj/item/stack/D = W
if(D.get_material_name() != material.name)
return //hitting things with the wrong type of stack usually doesn't produce messages, and probably doesn't need to.
if (health < maxhealth)
if (D.get_amount() < 1)
user << "<span class='warning'>You need one sheet of [material.display_name] to repair \the [src].</span>"
+5
View File
@@ -48,6 +48,11 @@
return
..()
/obj/machinery/door/airlock/get_material()
if(mineral)
return get_material_by_name(mineral)
return get_material_by_name(DEFAULT_WALL_MATERIAL)
/obj/machinery/door/airlock/command
name = "Airlock"
icon = 'icons/obj/doors/Doorcom.dmi'
+4 -14
View File
@@ -96,12 +96,12 @@
else
usr << "<span class='notice'>[src]'s motors resist your effort.</span>"
return
if(istype(C, /obj/item/stack/material/plasteel))
var/amt = repair_price()
if(istype(C, /obj/item/stack/material) && C.get_material_name() == "plasteel")
var/amt = Ceiling((maxhealth - health)/150)
if(!amt)
usr << "<span class='notice'>\The [src] is already fully repaired.</span>"
return
var/obj/item/stack/material/plasteel/P = C
var/obj/item/stack/P = C
if(P.amount < amt)
usr << "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>"
return
@@ -135,16 +135,6 @@
return
force_close()
// Proc: repair_price()
// Parameters: None
// Description: Determines amount of sheets needed for full repair. (max)150HP per sheet, (max)10 emitter hits per sheet.
/obj/machinery/door/blast/proc/repair_price()
var/sheets_needed = 0
var/dam = maxhealth - health
while(dam > 0)
dam -= 150
sheets_needed++
return sheets_needed
// Proc: repair()
// Parameters: None
@@ -154,7 +144,7 @@
if(stat & BROKEN)
stat &= ~BROKEN
/obj/machinery/door/blast/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 1
return ..()
+9 -7
View File
@@ -203,10 +203,9 @@
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/detective_scanner))
return
if(src.operating > 0 || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
src.add_fingerprint(user)
if(istype(I, /obj/item/stack/material/steel))
if(istype(I, /obj/item/stack/material) && I.get_material_name() == src.get_material_name())
if(stat & BROKEN)
user << "<span class='notice'>It looks like \the [src] is pretty busted. It's going to need more than just patching up now.</span>"
return
@@ -221,20 +220,20 @@
var/amount_needed = (maxhealth - health) / DOOR_REPAIR_AMOUNT
amount_needed = (round(amount_needed) == amount_needed)? amount_needed : round(amount_needed) + 1 //Why does BYOND not have a ceiling proc?
var/obj/item/stack/material/steel/metalstack = I
var/obj/item/stack/stack = I
var/transfer
if (repairing)
transfer = metalstack.transfer_to(repairing, amount_needed - repairing.amount)
transfer = stack.transfer_to(repairing, amount_needed - repairing.amount)
if (!transfer)
user << "<span class='warning'>You must weld or remove \the [repairing] from \the [src] before you can add anything else.</span>"
else
repairing = metalstack.split(amount_needed)
repairing = stack.split(amount_needed)
if (repairing)
repairing.loc = src
transfer = repairing.amount
if (transfer)
user << "<span class='notice'>You fit [transfer] [metalstack.singular_name]\s to damaged and broken parts on \the [src].</span>"
user << "<span class='notice'>You fit [transfer] [stack.singular_name]\s to damaged and broken parts on \the [src].</span>"
return
@@ -274,6 +273,8 @@
take_damage(W.force)
return
if(src.operating > 0 || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
if(src.operating) return
if(src.density && (operable() && istype(I, /obj/item/weapon/card/emag)))
@@ -336,7 +337,8 @@
/obj/machinery/door/emp_act(severity)
if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
open()
spawn(0)
open()
..()
+2
View File
@@ -75,6 +75,8 @@
A.all_doors.Remove(src)
. = ..()
/obj/machinery/door/firedoor/get_material()
return get_material_by_name(DEFAULT_WALL_MATERIAL)
/obj/machinery/door/firedoor/examine(mob/user)
. = ..(user, 1)
+1 -1
View File
@@ -130,7 +130,7 @@
if (!(R.id in acceptable_reagents))
user << "\red Your [O] contains components unsuitable for cookery."
return 1
//G.reagents.trans_to(src,G.amount_per_transfer_from_this)
return
else if(istype(O,/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = O
user << "\red This is ridiculous. You can not fit \the [G.affecting] in this [src]."
+1 -1
View File
@@ -176,7 +176,7 @@ Class Procs:
qdel(src)
//sets the use_power var and then forces an area power update
/obj/machinery/proc/update_use_power(var/new_use_power, var/force_update = 0)
/obj/machinery/proc/update_use_power(var/new_use_power)
use_power = new_use_power
/obj/machinery/proc/auto_use_power()
+2 -2
View File
@@ -50,7 +50,7 @@
user.visible_message("<span class='notice'>[user] has [!a_dis?"de":""]activated auto-dismantling.</span>", "<span class='notice'>You [!a_dis?"de":""]activate auto-dismantling.</span>")
return
if(istype(W, /obj/item/stack/material/steel))
if(istype(W, /obj/item/stack/material) && W.get_material_name() == DEFAULT_WALL_MATERIAL)
var/result = load_metal(W)
if(isnull(result))
@@ -86,7 +86,7 @@
on=0
return
/obj/machinery/pipelayer/proc/load_metal(var/obj/item/stack/material/steel/MM)
/obj/machinery/pipelayer/proc/load_metal(var/obj/item/stack/MM)
if(istype(MM) && MM.get_amount())
var/cur_amount = metal
var/to_load = max(max_metal - round(cur_amount),0)
+16 -7
View File
@@ -397,15 +397,16 @@ var/list/turret_icons
emagged = 1
enabled=0
sleep(rand(60,600))
if(!enabled)
enabled=1
spawn(rand(60,600))
if(!enabled)
enabled=1
..()
/obj/machinery/porta_turret/ex_act(severity)
switch (severity)
if (1)
del(src)
qdel(src)
if (2)
if (prob(25))
@@ -624,6 +625,14 @@ var/list/turret_icons
// Emagged turrets again use twice as much power due to higher firing rates
use_power(reqpower * (2 * (emagged || lethal)) * (2 * emagged))
//Turrets aim for the center of mass by default.
//If the target is grabbing someone then the turret smartly aims for extremities
var/obj/item/weapon/grab/G = locate() in target
if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
A.def_zone = pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg")
else
A.def_zone = pick("chest", "groin")
//Shooting Code:
A.current = T
A.starting = T
@@ -696,8 +705,8 @@ var/list/turret_icons
return
if(1)
if(istype(I, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = I
if(istype(I, /obj/item/stack/material) && I.get_material_name() == DEFAULT_WALL_MATERIAL)
var/obj/item/stack/M = I
if(M.use(2))
user << "<span class='notice'>You add some metal armor to the interior frame.</span>"
build_step = 2
@@ -788,8 +797,8 @@ var/list/turret_icons
//attack_hand() removes the prox sensor
if(6)
if(istype(I, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = I
if(istype(I, /obj/item/stack/material) && I.get_material_name() == DEFAULT_WALL_MATERIAL)
var/obj/item/stack/M = I
if(M.use(2))
user << "<span class='notice'>You add some metal armor to the exterior frame.</span>"
build_step = 7
+103 -99
View File
@@ -1,22 +1,25 @@
/obj/machinery/recharge_station
name = "cyborg recharging station"
desc = "A heavy duty rapid charging system, designed to quickly recharge cyborg power reserves."
icon = 'icons/obj/objects.dmi'
icon_state = "borgcharger0"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 50
active_power_usage = 50
var/mob/occupant = null
var/obj/item/weapon/cell/cell = null
//var/max_internal_charge = 15000 // Two charged borgs in a row with default cell
//var/current_internal_charge = 15000 // Starts charged, to prevent power surges on round start
var/charging_cap_active = 1000 // Active Cap - When cyborg is inside
var/charging_cap_passive = 250 // Passive Cap - Recharging internal capacitor when no cyborg is inside
var/icon_update_tick = 0 // Used to update icon only once every 10 ticks
var/charge_rate = 250 // How much charge is restored per tick
var/weld_rate = 0 // How much brute damage is repaired per tick
var/wire_rate = 0 // How much burn damage is repaired per tick
var/icon_update_tick = 0 // Used to rebuild the overlay only once every 10 ticks
var/charging = 0
var/charging_power // W. Power rating used for charging the cyborg. 120 kW if un-upgraded
var/restore_power_active // W. Power drawn from APC when an occupant is charging. 40 kW if un-upgraded
var/restore_power_passive // W. Power drawn from APC when idle. 7 kW if un-upgraded
var/weld_rate = 0 // How much brute damage is repaired per tick
var/wire_rate = 0 // How much burn damage is repaired per tick
var/weld_power_use = 2300 // power used per point of brute damage repaired. 2.3 kW ~ about the same power usage of a handheld arc welder
var/wire_power_use = 500 // power used per point of burn damage repaired.
/obj/machinery/recharge_station/New()
..()
@@ -30,51 +33,76 @@
component_parts += new /obj/item/weapon/cell/high(src)
component_parts += new /obj/item/stack/cable_coil(src, 5)
build_icon()
RefreshParts()
update_icon()
RefreshParts()
/obj/machinery/recharge_station/proc/has_cell_power()
return cell && cell.percent() > 0
/obj/machinery/recharge_station/process()
if(stat & (BROKEN))
return
if((stat & (NOPOWER)) && (!cell || cell.percent() <= 0)) // No Power.
return
var/chargemode = 0
if(occupant)
process_occupant()
chargemode = 1
// Power Stuff
if(!cell) // Shouldn't be possible, but sanity check
return
if(stat & NOPOWER)
cell.use(50 * CELLRATE) // Internal Circuitry, 50W load. No power - Runs from internal cell
return // No external power = No charging
if((stat & NOPOWER) && !has_cell_power()) // No power and cell is dead.
if(icon_update_tick)
icon_update_tick = 0 //just rebuild the overlay once more only
update_icon()
return
// Calculating amount of power to draw
var/charge_diff = (chargemode ? charging_cap_active : charging_cap_passive) + 50 // 50W for circuitry
//First, draw from the internal power cell to recharge/repair/etc the occupant
if(occupant)
process_occupant()
charge_diff = cell.give(charge_diff)
//Then, if external power is available, recharge the internal cell
var/recharge_amount = 0
if(!(stat & NOPOWER))
// Calculating amount of power to draw
recharge_amount = (occupant ? restore_power_active : restore_power_passive) * CELLRATE
if(idle_power_usage != charge_diff) // Force update, but only when our power usage changed this tick.
idle_power_usage = charge_diff
update_use_power(1, 1)
recharge_amount = cell.give(recharge_amount)
use_power(recharge_amount / CELLRATE)
if(icon_update_tick >= 10)
update_icon()
icon_update_tick = 0
else
icon_update_tick++
if(occupant || recharge_amount)
update_icon()
//since the recharge station can still be on even with NOPOWER. Instead it draws from the internal cell.
/obj/machinery/recharge_station/auto_use_power()
if(!(stat & NOPOWER))
return ..()
if(!has_cell_power())
return 0
if(src.use_power == 1)
cell.use(idle_power_usage * CELLRATE)
else if(src.use_power >= 2)
cell.use(active_power_usage * CELLRATE)
return 1
//Processes the occupant, drawing from the internal power cell if needed.
/obj/machinery/recharge_station/proc/process_occupant()
if(istype(occupant, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = occupant
/obj/machinery/recharge_station/allow_drop()
return 0
if(R.module)
R.module.respawn_consumable(R, charging_power * CELLRATE / 250) //consumables are magical, apparently
if(R.cell && !R.cell.fully_charged())
var/diff = min(R.cell.maxcharge - R.cell.charge, charging_power * CELLRATE) // Capped by charging_power / tick
var/charge_used = cell.use(diff)
R.cell.give(charge_used)
//Lastly, attempt to repair the cyborg if enabled
if(weld_rate && R.getBruteLoss() && cell.checked_use(weld_power_use * weld_rate * CELLRATE))
R.adjustBruteLoss(-weld_rate)
if(wire_rate && R.getFireLoss() && cell.checked_use(wire_power_use * wire_rate * CELLRATE))
R.adjustFireLoss(-wire_rate)
/obj/machinery/recharge_station/examine(mob/user)
..(user)
@@ -92,9 +120,6 @@
return
/obj/machinery/recharge_station/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(occupant)
occupant.emp_act(severity)
go_out()
@@ -125,13 +150,20 @@
man_rating += P.rating
cell = locate(/obj/item/weapon/cell) in component_parts
charge_rate = 125 * cap_rating
charging_cap_passive = charge_rate
charging_power = 40000 + 40000 * cap_rating
restore_power_active = 10000 + 15000 * cap_rating
restore_power_passive = 5000 + 1000 * cap_rating
weld_rate = max(0, man_rating - 3)
wire_rate = max(0, man_rating - 5)
/obj/machinery/recharge_station/update_icon()
..()
desc = initial(desc)
desc += " Uses a dedicated internal power cell to deliver [charging_power]W when in use."
if(weld_rate)
desc += "<br>It is capable of repairing structural damage."
if(wire_rate)
desc += "<br>It is capable of repairing burn damage."
/obj/machinery/recharge_station/proc/build_overlays()
overlays.Cut()
switch(round(chargepercentage()))
if(1 to 20)
@@ -147,50 +179,33 @@
if(99 to 110)
overlays += image('icons/obj/objects.dmi', "statn_c100")
/obj/machinery/recharge_station/Bumped(var/mob/AM)
move_inside(AM)
/obj/machinery/recharge_station/update_icon()
..()
if(stat & BROKEN)
icon_state = "borgcharger0"
return
/obj/machinery/recharge_station/proc/build_icon()
if(NOPOWER|BROKEN)
if(occupant)
icon_state = "borgcharger1"
if(occupant)
if((stat & NOPOWER) && !has_cell_power())
icon_state = "borgcharger2"
else
icon_state = "borgcharger0"
icon_state = "borgcharger1"
else
icon_state = "borgcharger0"
/obj/machinery/recharge_station/proc/process_occupant()
if(occupant)
if(istype(occupant, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = occupant
if(R.module)
R.module.respawn_consumable(R, charge_rate / 250)
if(!R.cell)
return
if(!R.cell.fully_charged())
var/diff = min(R.cell.maxcharge - R.cell.charge, charge_rate) // Capped at charge_rate charge / tick
if (cell.charge >= diff)
cell.use(diff)
R.cell.give(diff)
if(weld_rate && R.getBruteLoss())
R.adjustBruteLoss(-1)
if(wire_rate && R.getFireLoss())
R.adjustFireLoss(-1)
else
update_use_power(1)
if(icon_update_tick == 0)
build_overlays()
/obj/machinery/recharge_station/Bumped(var/mob/AM)
move_inside(AM)
/obj/machinery/recharge_station/proc/go_out()
if(!(occupant))
return
//for(var/obj/O in src)
// O.loc = loc
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = loc
occupant.reset_view()
occupant = null
build_icon()
update_use_power(1)
update_icon()
return
/obj/machinery/recharge_station/verb/move_eject()
@@ -202,37 +217,26 @@
add_fingerprint(usr)
return
/obj/machinery/recharge_station/verb/move_inside(var/mob/user = usr)
/obj/machinery/recharge_station/verb/move_inside()
set category = "Object"
set src in oview(1)
if(!user)
return
if(!(istype(user, /mob/living/silicon/robot)))
user << "<span class='notice'>Only non-organics may enter the recharger!</span>"
return
var/mob/living/silicon/robot/R = user
if(R.stat == 2)
//Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
if(usr.stat == DEAD)
return
if(occupant)
R << "<span class='notice'>The cell is already occupied!</span>"
usr << "<span class='notice'>\The [src] is already occupied!</span>"
return
var/mob/living/silicon/robot/R = usr
if(!istype(R))
usr << "<span class='notice'>Only synthetics may enter the recharger!</span>"
return
if(!R.cell)
R << "<span class='notice'>Without a powercell, you can't be recharged.</span>"
//Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
usr << "<span class='notice'>Without a powercell, you can't be recharged.</span>"
return
R.stop_pulling()
if(R.client)
R.client.perspective = EYE_PERSPECTIVE
R.client.eye = src
R.loc = src
occupant = R
/*for(var/obj/O in src)
O.loc = loc*/
add_fingerprint(R)
build_icon()
update_use_power(1)
return
usr.reset_view(src)
usr.loc = src
occupant = usr
add_fingerprint(usr)
update_icon()
+2 -2
View File
@@ -12,8 +12,8 @@
active_power_usage = 10000
/obj/machinery/robotic_fabricator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = O
if (istype(O, /obj/item/stack/material) && O.get_material_name() == DEFAULT_WALL_MATERIAL)
var/obj/item/stack/M = O
if (src.metal_amount < 150000.0)
var/count = 0
src.overlays += "fab-load-metal"
+1 -1
View File
@@ -71,7 +71,7 @@
/obj/machinery/syndicate_beacon/proc/selfdestruct()
selfdestructing = 1
spawn() explosion(src.loc, rand(3,8), rand(1,3), 1, 10)
spawn() explosion(src.loc, 1, rand(1,3), rand(3,8), 10)
////////////////////////////////////////
//Singularity beacon
+25 -35
View File
@@ -40,8 +40,8 @@
id = "Hub"
network = "tcommsat"
autolinkers = list("hub", "relay", "c_relay", "s_relay", "m_relay", "r_relay", "science", "medical",
"supply", "service", "common", "command", "engineering", "security",
"receiverA", "receiverB", "broadcasterA", "broadcasterB")
"supply", "service", "common", "command", "engineering", "security", "unused",
"receiverA", "broadcasterA")
/obj/machinery/telecomms/hub/preset_cent
id = "CentComm Hub"
@@ -52,22 +52,11 @@
//Receivers
//--PRESET LEFT--//
/obj/machinery/telecomms/receiver/preset_left
/obj/machinery/telecomms/receiver/preset_right
id = "Receiver A"
network = "tcommsat"
autolinkers = list("receiverA") // link to relay
freq_listening = list(SCI_FREQ, MED_FREQ, SUP_FREQ, SRV_FREQ) // science, medical, supply, service
//--PRESET RIGHT--//
/obj/machinery/telecomms/receiver/preset_right
id = "Receiver B"
network = "tcommsat"
autolinkers = list("receiverB") // link to relay
freq_listening = list(COMM_FREQ, ENG_FREQ, SEC_FREQ) //command, engineering, security
freq_listening = list(SCI_FREQ, MED_FREQ, SUP_FREQ, SRV_FREQ, COMM_FREQ, ENG_FREQ, SEC_FREQ)
//Common and other radio frequencies for people to freely use
New()
@@ -95,7 +84,14 @@
id = "Bus 2"
network = "tcommsat"
freq_listening = list(SUP_FREQ, SRV_FREQ)
autolinkers = list("processor2", "supply", "service")
autolinkers = list("processor2", "supply", "service", "unused")
/obj/machinery/telecomms/bus/preset_two/New()
for(var/i = 1441, i < 1489, i += 2)
if(i == AI_FREQ || i == PUB_FREQ)
continue
freq_listening |= i
..()
/obj/machinery/telecomms/bus/preset_three
id = "Bus 3"
@@ -106,14 +102,9 @@
/obj/machinery/telecomms/bus/preset_four
id = "Bus 4"
network = "tcommsat"
freq_listening = list(ENG_FREQ)
freq_listening = list(ENG_FREQ, AI_FREQ, PUB_FREQ)
autolinkers = list("processor4", "engineering", "common")
/obj/machinery/telecomms/bus/preset_four/New()
for(var/i = 1441, i < 1489, i += 2)
freq_listening |= i
..()
/obj/machinery/telecomms/bus/preset_cent
id = "CentComm Bus"
network = "tcommsat"
@@ -169,7 +160,7 @@
id = "Supply Server"
freq_listening = list(SUP_FREQ)
autolinkers = list("supply")
/obj/machinery/telecomms/server/presets/service
id = "Service Server"
freq_listening = list(SRV_FREQ)
@@ -177,13 +168,19 @@
/obj/machinery/telecomms/server/presets/common
id = "Common Server"
freq_listening = list()
freq_listening = list(PUB_FREQ, AI_FREQ) // AI Private and Common
autolinkers = list("common")
//Common and other radio frequencies for people to freely use
// 1441 to 1489
/obj/machinery/telecomms/server/presets/common/New()
// "Unused" channels, AKA all others.
/obj/machinery/telecomms/server/presets/unused
id = "Unused Server"
freq_listening = list()
autolinkers = list("unused")
/obj/machinery/telecomms/server/presets/unused/New()
for(var/i = 1441, i < 1489, i += 2)
if(i == AI_FREQ || i == PUB_FREQ)
continue
freq_listening |= i
..()
@@ -213,18 +210,11 @@
//--PRESET LEFT--//
/obj/machinery/telecomms/broadcaster/preset_left
/obj/machinery/telecomms/broadcaster/preset_right
id = "Broadcaster A"
network = "tcommsat"
autolinkers = list("broadcasterA")
//--PRESET RIGHT--//
/obj/machinery/telecomms/broadcaster/preset_right
id = "Broadcaster B"
network = "tcommsat"
autolinkers = list("broadcasterB")
/obj/machinery/telecomms/broadcaster/preset_cent
id = "CentComm Broadcaster"
network = "tcommsat"
+4 -4
View File
@@ -213,9 +213,9 @@
enabled=0
updateTurrets()
sleep(rand(60,600))
if(!enabled)
enabled=1
updateTurrets()
spawn(rand(60,600))
if(!enabled)
enabled=1
updateTurrets()
..()
+9
View File
@@ -266,6 +266,15 @@
else
A = new /obj/item/projectile/energy/electrode( loc )
use_power(200)
//Turrets aim for the center of mass by default.
//If the target is grabbing someone then the turret smartly aims for extremities
var/obj/item/weapon/grab/G = locate() in target
if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
A.def_zone = pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg")
else
A.def_zone = pick("chest", "groin")
A.current = T
A.starting = T
A.yo = U.y - T.y
+2 -1
View File
@@ -45,6 +45,7 @@
if (!(XRAY in user.mutations))
user.mutations.Add(XRAY)
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
user.see_in_dark = 8
user.see_invisible = SEE_INVISIBLE_LEVEL_TWO
if (!(COLD_RESISTANCE in user.mutations))
@@ -66,4 +67,4 @@
show_objectives(user.mind)
user << "You have a very bad feeling about this."
return
return
@@ -23,12 +23,6 @@
Destroy()
qdel(pr_mech_sleeper)
..()
allow_drop()
return 0
destroy()
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
return ..()
-3
View File
@@ -1085,9 +1085,6 @@
var/door_locked = 1
salvageable = 0
/obj/item/mecha_parts/mecha_equipment/tool/passenger/allow_drop()
return 0
/obj/item/mecha_parts/mecha_equipment/tool/passenger/destroy()
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
@@ -9,7 +9,7 @@
/obj/effect/expl_particles/New()
..()
spawn (15)
src.loc = null
qdel(src)
return
/obj/effect/expl_particles/Move()
@@ -49,7 +49,7 @@
/obj/effect/explosion/New()
..()
spawn (10)
src.loc = null
qdel(src)
return
/datum/effect/system/explosion
+13
View File
@@ -1,3 +1,9 @@
// Uncomment this define to check for possible lengthy processing of emp_act()s.
// If emp_act() takes more than defined deciseconds (1/10 seconds) an admin message and log is created.
// I do not recommend having this uncommented on main server, it probably causes a bit more lag, espicially with larger EMPs.
// #define EMPDEBUG 10
proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
if(!epicenter) return
@@ -24,6 +30,9 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
M << 'sound/effects/EMPulse.ogg'
for(var/atom/T in range(light_range, epicenter))
#ifdef EMPDEBUG
var/time = world.timeofday
#endif
var/distance = get_dist(epicenter, T)
if(distance < 0)
distance = 0
@@ -36,4 +45,8 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
T.emp_act(2)
else if(distance <= light_range)
T.emp_act(2)
#ifdef EMPDEBUG
if((world.timeofday - time) >= EMPDEBUG)
log_and_message_admins("EMPDEBUG: [T.name] - [T.type] - took [world.timeofday - time]ds to process emp_act()!")
#endif
return 1
@@ -110,6 +110,7 @@
ai.loc = src
ai.cancel_camera()
ai.destroy_eyeobj(src)
ai.control_disabled = 1
ai.aiRestorePowerRoutine = 0
carded_ai = ai
@@ -71,8 +71,8 @@
Emag()
return
if(istype(W, /obj/item/stack/material/glass))
var/obj/item/stack/material/glass/G = W
if(istype(W, /obj/item/stack/material) && W.get_material_name() == "glass")
var/obj/item/stack/G = W
if(uses >= max_uses)
user << "<span class='warning'>[src.name] is full."
return
@@ -156,6 +156,9 @@
else
channels[chan_name] |= FREQ_LISTENING
if(href_list["nowindow"]) // here for pAIs, maybe others will want it, idk
return
interact(usr)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
+2 -2
View File
@@ -125,8 +125,8 @@
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/stack/material/steel) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/stack/material/steel/M = W
if(istype(W, /obj/item/stack/material) && W.get_material_name() == DEFAULT_WALL_MATERIAL && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/stack/material/M = W
if (M.use(1))
var/obj/item/weapon/secbot_assembly/ed209_assembly/B = new /obj/item/weapon/secbot_assembly/ed209_assembly
B.loc = get_turf(src)
+1 -1
View File
@@ -146,7 +146,7 @@
return
return -1 // the bullet/projectile goes through the target! Ie, you missed
return PROJECTILE_CONTINUE // the bullet/projectile goes through the target!
// Small memory holder entity for transparent bullet holes
@@ -22,8 +22,8 @@
user.drop_from_inventory(src)
qdel(src)
if(istype(O,/obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = O
if(istype(O,/obj/item/stack/material) && O.get_material_name() == DEFAULT_WALL_MATERIAL)
var/obj/item/stack/M = O
if (M.use(1))
use(1)
new/obj/item/stack/tile/light(get_turf(user))
@@ -40,7 +40,7 @@ AI MODULES
if (comp.current.stat == 2 || comp.current.control_disabled == 1)
usr << "Upload failed. No signal is being detected from the AI."
else if (!comp.current.has_power)
else if (comp.current.see_in_dark == 0)
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
else
src.transmitInstructions(comp.current, usr)
@@ -34,6 +34,9 @@
if(!isnull(matter[material_type]))
matter[material_type] *= force_divisor // May require a new var instead.
/obj/item/weapon/material/get_material()
return material
/obj/item/weapon/material/proc/update_force()
if(edge || sharp)
force = material.get_edge_damage()
@@ -87,4 +87,4 @@
..(loc, "steel")
/obj/item/weapon/material/shard/phoron/New(loc)
..(loc, "phoron glass")
..(loc, "phglass")
@@ -119,10 +119,10 @@
//verbs += /obj/item/weapon/storage/bag/sheetsnatcher/quick_empty
can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W,/obj/item/stack/material) || istype(W,/obj/item/stack/material/sandstone) || istype(W,/obj/item/stack/material/wood))
if(!istype(W,/obj/item/stack/material))
if(!stop_messages)
usr << "The snatcher does not accept [W]."
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
return 0
var/current = 0
for(var/obj/item/stack/material/S in contents)
current += S.amount
@@ -335,7 +335,6 @@
..()
if(isrobot(user))
user << "\blue You're a robot. No."
return //Robots can't interact with storage items.
if(!can_be_inserted(W))
+6 -2
View File
@@ -211,8 +211,12 @@
/obj/item/weapon/weldingtool/process()
if(welding && prob(5) && !remove_fuel(1))
setWelding(0)
if(welding)
if(prob(5))
remove_fuel(1)
if(get_fuel() == 0)
setWelding(0)
//I'm not sure what this does. I assume it has to do with starting fires...
//...but it doesnt check to see if the welder is on or not.
@@ -236,20 +236,20 @@
electronics = null
else if(istype(W, /obj/item/stack/material) && !glass)
var/obj/item/stack/material/S = W
var/obj/item/stack/S = W
var/material_name = S.get_material_name()
if (S)
if (S.get_amount() >= 1)
if(istype(S, /obj/item/stack/material/glass/reinforced))
if(material_name == "rglass")
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(1))
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
glass = 1
else if(istype(S, /obj/item/stack/material) && S.default_type)
var/M = S.default_type
else if(material_name)
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
if(M in list("mhydrogen","osmium","tritium","platinum","iron"))
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
user << "You cannot make an airlock out of that material."
return
if(S.get_amount() >= 2)
@@ -257,8 +257,8 @@
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(2))
user << "<span class='notice'>You installed [M] plating into the airlock assembly.</span>"
glass = "[M]"
user << "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>"
glass = material_name
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
+4 -4
View File
@@ -25,7 +25,7 @@
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
if(Proj.original != src && !prob(cover))
return -1 //pass through
return PROJECTILE_CONTINUE //pass through
//Tasers and the like should not damage girders.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
@@ -108,11 +108,11 @@
else if(istype(W, /obj/item/stack/material))
var/obj/item/stack/material/S = W
var/obj/item/stack/S = W
if(S.get_amount() < 2)
return ..()
var/material/M = name_to_material[S.default_type]
var/material/M = S.get_material()
if(!istype(M))
return ..()
@@ -183,7 +183,7 @@
user << "There is not enough material here to reinforce the girder."
return
var/material/M = name_to_material[S.default_type]
var/material/M = S.get_material()
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return
+1 -1
View File
@@ -94,7 +94,7 @@
passthrough = 1
if(passthrough)
. = -1
. = PROJECTILE_CONTINUE
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
src.health -= damage*0.2
+49 -45
View File
@@ -83,22 +83,23 @@
/obj/structure/janitorialcart/attack_hand(mob/user)
user.set_machine(src)
var/dat
if(mybag)
dat += "<a href='?src=\ref[src];garbage=1'>[mybag.name]</a><br>"
if(mymop)
dat += "<a href='?src=\ref[src];mop=1'>[mymop.name]</a><br>"
if(myspray)
dat += "<a href='?src=\ref[src];spray=1'>[myspray.name]</a><br>"
if(myreplacer)
dat += "<a href='?src=\ref[src];replacer=1'>[myreplacer.name]</a><br>"
if(signs)
dat += "<a href='?src=\ref[src];sign=1'>[signs] sign\s</a><br>"
var/datum/browser/popup = new(user, "janicart", name, 240, 160)
popup.set_content(dat)
popup.open()
ui_interact(user)
return
/obj/structure/janitorialcart/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data["name"] = capitalize(name)
data["bag"] = mybag ? capitalize(mybag.name) : null
data["mop"] = mymop ? capitalize(mymop.name) : null
data["spray"] = myspray ? capitalize(myspray.name) : null
data["replacer"] = myreplacer ? capitalize(myreplacer.name) : null
data["signs"] = signs ? "[signs] sign\s" : null
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "janitorcart.tmpl", "Janitorial cart", 240, 160)
ui.set_initial_data(data)
ui.open()
/obj/structure/janitorialcart/Topic(href, href_list)
if(!in_range(src, usr))
@@ -106,36 +107,39 @@
if(!isliving(usr))
return
var/mob/living/user = usr
if(href_list["garbage"])
if(mybag)
user.put_in_hands(mybag)
user << "<span class='notice'>You take [mybag] from [src].</span>"
mybag = null
if(href_list["mop"])
if(mymop)
user.put_in_hands(mymop)
user << "<span class='notice'>You take [mymop] from [src].</span>"
mymop = null
if(href_list["spray"])
if(myspray)
user.put_in_hands(myspray)
user << "<span class='notice'>You take [myspray] from [src].</span>"
myspray = null
if(href_list["replacer"])
if(myreplacer)
user.put_in_hands(myreplacer)
user << "<span class='notice'>You take [myreplacer] from [src].</span>"
myreplacer = null
if(href_list["sign"])
if(signs)
var/obj/item/weapon/caution/Sign = locate() in src
if(Sign)
user.put_in_hands(Sign)
user << "<span class='notice'>You take \a [Sign] from [src].</span>"
signs--
else
warning("[src] signs ([signs]) didn't match contents")
signs = 0
if(href_list["take"])
switch(href_list["take"])
if("garbage")
if(mybag)
user.put_in_hands(mybag)
user << "<span class='notice'>You take [mybag] from [src].</span>"
mybag = null
if("mop")
if(mymop)
user.put_in_hands(mymop)
user << "<span class='notice'>You take [mymop] from [src].</span>"
mymop = null
if("spray")
if(myspray)
user.put_in_hands(myspray)
user << "<span class='notice'>You take [myspray] from [src].</span>"
myspray = null
if("replacer")
if(myreplacer)
user.put_in_hands(myreplacer)
user << "<span class='notice'>You take [myreplacer] from [src].</span>"
myreplacer = null
if("sign")
if(signs)
var/obj/item/weapon/caution/Sign = locate() in src
if(Sign)
user.put_in_hands(Sign)
user << "<span class='notice'>You take \a [Sign] from [src].</span>"
signs--
else
warning("[src] signs ([signs]) didn't match contents")
signs = 0
update_icon()
updateUsrDialog()
+23 -17
View File
@@ -40,21 +40,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
@@ -67,7 +67,7 @@
if (src.connected)
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.loc = src
A.forceMove(src)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
qdel(src.connected)
src.connected = null
@@ -81,7 +81,7 @@
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "morguet"
src.connected.set_dir(src.dir)
else
@@ -117,7 +117,7 @@
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "morguet"
else
qdel(src.connected)
@@ -149,7 +149,7 @@
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.loc = src.connected
A.forceMove(src.connected)
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
@@ -166,7 +166,7 @@
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
O.forceMove(src.loc)
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
@@ -210,21 +210,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
@@ -246,7 +246,7 @@
if ((src.connected) && (src.locked == 0))
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.loc = src
A.forceMove(src)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
//src.connected = null
qdel(src.connected)
@@ -260,7 +260,7 @@
src.connected.connected = src
src.icon_state = "crema0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "cremat"
else
//src.connected = null
@@ -294,7 +294,7 @@
src.connected.connected = src
src.icon_state = "crema0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "cremat"
else
qdel(src.connected)
@@ -366,11 +366,17 @@
anchored = 1
throwpass = 1
/obj/structure/c_tray/Destroy()
if(connected && connected.connected == src)
connected.connected = null
connected = null
return ..()
/obj/structure/c_tray/attack_hand(mob/user as mob)
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.loc = src.connected
A.forceMove(src.connected)
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
@@ -387,7 +393,7 @@
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
O.forceMove(src.loc)
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
@@ -406,7 +412,7 @@
/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
if(..())
return
if(src.allowed(usr))
if(src.allowed(user))
for (var/obj/structure/crematorium/C in world)
if (C.id == id)
if (!C.cremating)
@@ -44,6 +44,9 @@
update_nearby_tiles()
..()
/obj/structure/simple_door/get_material()
return material
/obj/structure/simple_door/Bumped(atom/user)
..()
if(!state)
@@ -33,6 +33,9 @@
padding_material = get_material_by_name(new_padding_material)
update_icon()
/obj/structure/bed/get_material()
return material
// Reuse the cache/code from stools, todo maybe unify.
/obj/structure/bed/update_icon()
// Prep icon.
+6 -10
View File
@@ -195,16 +195,12 @@ var/list/mechtoys = list(
find_slip = 0
continue
// Sell phoron
if(istype(A, /obj/item/stack/material/phoron))
var/obj/item/stack/material/phoron/P = A
phoron_count += P.get_amount()
// Sell platinum
if(istype(A, /obj/item/stack/material/platinum))
var/obj/item/stack/material/platinum/P = A
plat_count += P.get_amount()
// Sell phoron and platinum
if(istype(A, /obj/item/stack))
var/obj/item/stack/P
switch(P.get_material_name())
if("phoron") phoron_count += P.get_amount()
if("platinum") plat_count += P.get_amount()
qdel(MA)
if(phoron_count)
+18 -10
View File
@@ -8,7 +8,7 @@
else
construction_stage = null
if(!material)
material = name_to_material[DEFAULT_WALL_MATERIAL]
material = get_material_by_name(DEFAULT_WALL_MATERIAL)
if(material)
explosion_resistance = material.explosion_resistance
if(reinf_material && reinf_material.explosion_resistance > explosion_resistance)
@@ -44,6 +44,7 @@
return
overlays.Cut()
damage_overlay = 0
if(!wall_cache["[new_state]-[material.icon_colour]"])
var/image/I = image(icon='icons/turf/wall_masks.dmi',icon_state="[new_state]")
@@ -74,7 +75,6 @@
check_relatives(1)
/turf/simulated/wall/proc/update_icon()
if(!material)
return
@@ -86,15 +86,23 @@
else
set_wall_state("[material.icon_base]fwall_open")
var/dmg_amt = material.integrity
if(reinf_material)
dmg_amt += reinf_material.integrity
var/overlay = round(damage / dmg_amt * damage_overlays.len) + 1
if(overlay > damage_overlays.len)
overlay = damage_overlays.len
if(density)
if(damage == 0)
if(damage_overlay != 0)
overlays -= damage_overlays[damage_overlay]
damage_overlay = 0
else if(density)
var/integrity = material.integrity
if(reinf_material)
integrity += reinf_material.integrity
var/overlay = round(damage / integrity * damage_overlays.len) + 1
if(overlay > damage_overlays.len)
overlay = damage_overlays.len
if(damage_overlay && overlay == damage_overlay) //No need to update.
return
if(damage_overlay) overlays -= damage_overlays[damage_overlay]
overlays += damage_overlays[overlay]
damage_overlay = overlay
return
@@ -131,4 +139,4 @@
/turf/simulated/wall/proc/can_join_with(var/turf/simulated/wall/W)
if(material && W.material && material.icon_base == W.material.icon_base)
return 1
return 0
return 0
+4 -5
View File
@@ -12,8 +12,8 @@ var/list/global/wall_cache = list()
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
var/damage = 0
var/damage_overlay
var/global/damage_overlays[8]
var/damage_overlay = 0
var/global/damage_overlays[16]
var/active
var/can_open = 0
var/material/material
@@ -28,7 +28,7 @@ var/list/global/wall_cache = list()
materialtype = DEFAULT_WALL_MATERIAL
material = get_material_by_name(materialtype)
if(!isnull(rmaterialtype))
reinf_material = name_to_material[rmaterialtype]
reinf_material = get_material_by_name(rmaterialtype)
update_material()
processing_turfs |= src
@@ -38,7 +38,6 @@ var/list/global/wall_cache = list()
dismantle_wall(null,null,1)
..()
/turf/simulated/wall/process()
// Calling parent will kill processing
if(!radiate())
@@ -170,7 +169,7 @@ var/list/global/wall_cache = list()
O.loc = src
clear_plants()
material = name_to_material["placeholder"]
material = get_material_by_name("placeholder")
reinf_material = null
check_relatives()
+1 -1
View File
@@ -23,7 +23,7 @@
/proc/ToRban_update()
spawn(0)
log_misc("Downloading updated ToR data...")
var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses")
var/http[] = world.Export("https://check.torproject.org/exit-addresses")
var/list/rawlist = file2list(http["CONTENT"])
if(rawlist.len)
+1 -1
View File
@@ -1097,7 +1097,7 @@ proc/admin_notice(var/message, var/rights)
else
new chosen(usr.loc)
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
log_and_message_admins("spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+4 -1
View File
@@ -83,10 +83,13 @@ var/list/admin_verbs_admin = list(
/client/proc/allow_character_respawn, /* Allows a ghost to respawn */
/client/proc/event_manager_panel,
/client/proc/empty_ai_core_toggle_latejoin,
/client/proc/empty_ai_core_toggle_latejoin,
/client/proc/aooc,
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
/client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */
/client/proc/change_security_level
/client/proc/change_security_level,
/client/proc/view_chemical_reaction_logs,
/client/proc/makePAI
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
+141 -141
View File
@@ -1,147 +1,147 @@
//This stuff was originally intended to be integrated into the ban-system I was working on
//but it's safe to say that'll never be finished. So I've merged it into the current player panel.
//enjoy ~Carn
/*
#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
datum/admins/proc/notes_show(var/ckey)
usr << browse("<head><title>Player Notes</title></head><body>[notes_gethtml(ckey)]</body>","window=player_notes;size=700x400")
datum/admins/proc/notes_gethtml(var/ckey)
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile) return "<font color='red'>Error: Cannot access [NOTESFILE]</font>"
if(ckey)
. = "<b>Notes for <a href='?src=\ref[src];notes=show'>[ckey]</a>:</b> <a href='?src=\ref[src];notes=add;ckey=[ckey]'>\[+\]</a> <a href='?src=\ref[src];notes=remove;ckey=[ckey]'>\[-\]</a><br>"
notesfile.cd = "/[ckey]"
var/index = 1
while( !notesfile.eof )
var/note
notesfile >> note
. += "[note] <a href='?src=\ref[src];notes=remove;ckey=[ckey];from=[index]'>\[-\]</a><br>"
index++
else
. = "<b>All Notes:</b> <a href='?src=\ref[src];notes=add'>\[+\]</a> <a href='?src=\ref[src];notes=remove'>\[-\]</a><br>"
notesfile.cd = "/"
for(var/dir in notesfile.dir)
. += "<a href='?src=\ref[src];notes=show;ckey=[dir]'>[dir]</a><br>"
return
//handles removing entries from the buffer, or removing the entire directory if no start_index is given
/proc/notes_remove(var/ckey, var/start_index, var/end_index)
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile) return
if(!ckey)
notesfile.cd = "/"
ckey = ckey(input(usr,"Who would you like to remove notes for?","Enter a ckey",null) as null|anything in notesfile.dir)
if(!ckey) return
if(start_index)
notesfile.cd = "/[ckey]"
var/list/noteslist = list()
if(!end_index) end_index = start_index
var/index = 0
while( !notesfile.eof )
index++
var/temp
notesfile >> temp
if( (start_index <= index) && (index <= end_index) )
continue
noteslist += temp
notesfile.eof = -2 //Move to the start of the buffer and then erase.
for( var/note in noteslist )
notesfile << note
else
notesfile.cd = "/"
if(alert(usr,"Are you sure you want to remove all their notes?","Confirmation","No","Yes - Remove all notes") == "Yes - Remove all notes")
notesfile.dir.Remove(ckey)
return
#undef NOTESFILE
*/
//Hijacking this file for BS12 playernotes functions. I like this ^ one systemm alright, but converting sounds too bothersome~ Chinsky.
//This stuff was originally intended to be integrated into the ban-system I was working on
//but it's safe to say that'll never be finished. So I've merged it into the current player panel.
//enjoy ~Carn
/*
#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
datum/admins/proc/notes_show(var/ckey)
usr << browse("<head><title>Player Notes</title></head><body>[notes_gethtml(ckey)]</body>","window=player_notes;size=700x400")
datum/admins/proc/notes_gethtml(var/ckey)
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile) return "<font color='red'>Error: Cannot access [NOTESFILE]</font>"
if(ckey)
. = "<b>Notes for <a href='?src=\ref[src];notes=show'>[ckey]</a>:</b> <a href='?src=\ref[src];notes=add;ckey=[ckey]'>\[+\]</a> <a href='?src=\ref[src];notes=remove;ckey=[ckey]'>\[-\]</a><br>"
notesfile.cd = "/[ckey]"
var/index = 1
while( !notesfile.eof )
var/note
notesfile >> note
. += "[note] <a href='?src=\ref[src];notes=remove;ckey=[ckey];from=[index]'>\[-\]</a><br>"
index++
else
. = "<b>All Notes:</b> <a href='?src=\ref[src];notes=add'>\[+\]</a> <a href='?src=\ref[src];notes=remove'>\[-\]</a><br>"
notesfile.cd = "/"
for(var/dir in notesfile.dir)
. += "<a href='?src=\ref[src];notes=show;ckey=[dir]'>[dir]</a><br>"
return
//handles removing entries from the buffer, or removing the entire directory if no start_index is given
/proc/notes_remove(var/ckey, var/start_index, var/end_index)
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile) return
if(!ckey)
notesfile.cd = "/"
ckey = ckey(input(usr,"Who would you like to remove notes for?","Enter a ckey",null) as null|anything in notesfile.dir)
if(!ckey) return
if(start_index)
notesfile.cd = "/[ckey]"
var/list/noteslist = list()
if(!end_index) end_index = start_index
var/index = 0
while( !notesfile.eof )
index++
var/temp
notesfile >> temp
if( (start_index <= index) && (index <= end_index) )
continue
noteslist += temp
notesfile.eof = -2 //Move to the start of the buffer and then erase.
for( var/note in noteslist )
notesfile << note
else
notesfile.cd = "/"
if(alert(usr,"Are you sure you want to remove all their notes?","Confirmation","No","Yes - Remove all notes") == "Yes - Remove all notes")
notesfile.dir.Remove(ckey)
return
#undef NOTESFILE
*/
//Hijacking this file for BS12 playernotes functions. I like this ^ one systemm alright, but converting sounds too bothersome~ Chinsky.
/proc/notes_add(var/key, var/note, var/mob/user)
if (!key || !note)
return
//Loading list of notes for this key
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
var/list/infos
info >> infos
if(!infos) infos = list()
//Overly complex timestamp creation
var/modifyer = "th"
switch(time2text(world.timeofday, "DD"))
if("01","21","31")
modifyer = "st"
if("02","22",)
modifyer = "nd"
if("03","23")
modifyer = "rd"
var/day_string = "[time2text(world.timeofday, "DD")][modifyer]"
if(copytext(day_string,1,2) == "0")
day_string = copytext(day_string,2)
var/full_date = time2text(world.timeofday, "DDD, Month DD of YYYY")
var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
var/datum/player_info/P = new
if (!key || !note)
return
//Loading list of notes for this key
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
var/list/infos
info >> infos
if(!infos) infos = list()
//Overly complex timestamp creation
var/modifyer = "th"
switch(time2text(world.timeofday, "DD"))
if("01","21","31")
modifyer = "st"
if("02","22",)
modifyer = "nd"
if("03","23")
modifyer = "rd"
var/day_string = "[time2text(world.timeofday, "DD")][modifyer]"
if(copytext(day_string,1,2) == "0")
day_string = copytext(day_string,2)
var/full_date = time2text(world.timeofday, "DDD, Month DD of YYYY")
var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
var/datum/player_info/P = new
if (user)
P.author = user.key
P.rank = user.client.holder.rank
else
P.author = "Adminbot"
P.rank = "Friendly Robot"
P.content = note
P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]"
infos += P
info << infos
else
P.author = "Adminbot"
P.rank = "Friendly Robot"
P.content = note
P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]"
infos += P
info << infos
message_admins("\blue [key_name_admin(user)] has edited [key]'s notes.")
log_admin("[key_name(user)] has edited [key]'s notes.")
qdel(info)
//Updating list of keys with notes on them
var/savefile/note_list = new("data/player_notes.sav")
var/list/note_keys
note_list >> note_keys
if(!note_keys) note_keys = list()
if(!note_keys.Find(key)) note_keys += key
note_list << note_keys
qdel(note_list)
/proc/notes_del(var/key, var/index)
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
var/list/infos
info >> infos
if(!infos || infos.len < index) return
var/datum/player_info/item = infos[index]
infos.Remove(item)
info << infos
message_admins("\blue [key_name_admin(usr)] deleted one of [key]'s notes.")
log_admin("[key_name(usr)] deleted one of [key]'s notes.")
qdel(info)
/proc/show_player_info_irc(var/key as text)
var/dat = " Info on [key]%0D%0A"
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
var/list/infos
info >> infos
if(!infos)
dat = "No information found on the given key."
else
for(var/datum/player_info/I in infos)
dat += "[I.content]%0D%0Aby [I.author] ([I.rank]) on [I.timestamp]%0D%0A%0D%0A"
return dat
qdel(info)
//Updating list of keys with notes on them
var/savefile/note_list = new("data/player_notes.sav")
var/list/note_keys
note_list >> note_keys
if(!note_keys) note_keys = list()
if(!note_keys.Find(key)) note_keys += key
note_list << note_keys
qdel(note_list)
/proc/notes_del(var/key, var/index)
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
var/list/infos
info >> infos
if(!infos || infos.len < index) return
var/datum/player_info/item = infos[index]
infos.Remove(item)
info << infos
message_admins("\blue [key_name_admin(usr)] deleted one of [key]'s notes.")
log_admin("[key_name(usr)] deleted one of [key]'s notes.")
qdel(info)
/proc/show_player_info_irc(var/key as text)
var/dat = " Info on [key]\n"
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
var/list/infos
info >> infos
if(!infos)
dat = "No information found on the given key."
else
for(var/datum/player_info/I in infos)
dat += "[I.content]\nby [I.author] ([I.rank]) on [I.timestamp]\n\n"
return list2params(list(dat))
+1 -1
View File
@@ -358,7 +358,7 @@
dat += "<td>NA</td>"
dat += {"<td>[(M.client ? "[M.client]" : "No client")]</td>
dat += {"<td>[M.key ? (M.client ? M.key : "[M.key] (DC)") : "No key"]</td>
<td align=center><A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>X</A></td>
<td align=center><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>
"}
+1 -12
View File
@@ -1651,18 +1651,7 @@
var/mob/M = O
M.real_name = obj_name
if (number == 1)
log_admin("[key_name(usr)] created a [english_list(paths)]")
for(var/path in paths)
if(ispath(path, /mob))
message_admins("[key_name_admin(usr)] created a [english_list(paths)]", 1)
break
else
log_admin("[key_name(usr)] created [number]ea [english_list(paths)]")
for(var/path in paths)
if(ispath(path, /mob))
message_admins("[key_name_admin(usr)] created [number]ea [english_list(paths)]", 1)
break
log_and_message_admins("created [number] [english_list(paths)]")
return
else if(href_list["secretsfun"])
+19
View File
@@ -42,6 +42,12 @@
icon = 'icons/misc/buildmode.dmi'
var/obj/effect/bmode/buildholder/master = null
/obj/effect/bmode/Destroy()
if(master && master.cl)
master.cl.screen -= src
master = null
return ..()
/obj/effect/bmode/builddir
icon_state = "build"
screen_loc = "NORTH,WEST"
@@ -117,6 +123,19 @@
var/obj/effect/bmode/buildquit/buildquit = null
var/atom/movable/throw_atom = null
/obj/effect/bmode/buildholder/Destroy()
qdel(builddir)
builddir = null
qdel(buildhelp)
buildhelp = null
qdel(buildmode)
buildmode = null
qdel(buildquit)
buildquit = null
throw_atom = null
cl = null
return ..()
/obj/effect/bmode/buildmode
icon_state = "buildmode1"
screen_loc = "NORTH,WEST+2"
+22 -4
View File
@@ -64,6 +64,28 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
if(!procname) return
if(targetselected)
if(!target)
usr << "<span class='danger'>Your target no longer exists.</span>"
return
if(!hascall(target,procname))
usr << "<font color='red'>Error: callproc(): target has no such call [procname].</font>"
return
else
if(copytext(procname, 1, 7) == "/proc/")
// nothing
else if(copytext(procname, 1, 6) == "proc/")
procname = "/[procname]"
else if(copytext(procname, 1, 2) == "/")
procname = "/proc[procname]"
else
procname = "/proc/[procname]"
// Procs have the strange property that text2path will return non-null, but ispath() will return false.
var/path = text2path(procname)
if(!path || ispath(path))
usr << "<span class='danger'>Invalid proc [procname]</span>"
return
var/argnum = input("Number of arguments","Number:",0) as num|null
if(!argnum && (argnum!=0)) return
@@ -117,13 +139,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!target)
usr << "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>"
return
if(!hascall(target,procname))
usr << "<font color='red'>Error: callproc(): target has no such call [procname].</font>"
return
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
else
//this currently has no hascall protection. wasn't able to get it working.
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
+1 -1
View File
@@ -468,7 +468,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
for(var/mob/living/silicon/ai/M in mob_list)
if (M.stat == 2)
usr << "Upload failed. No signal is being detected from the AI."
else if (!M.has_power)
else if (M.see_in_dark == 0)
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
else
M.add_ion_law(input)
+1 -1
View File
@@ -52,4 +52,4 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
usr << "Looks like someone beat you to it."
return
team.attempt_spawn(1)
team.attempt_random_spawn()
+20 -9
View File
@@ -85,7 +85,6 @@ datum/preferences
var/religion = "None" //Religious association.
//Mob preview
var/mob/living/carbon/human/dummy //the mannequin
var/icon/preview_icon = null
var/icon/preview_icon_front = null
var/icon/preview_icon_side = null
@@ -1645,18 +1644,30 @@ datum/preferences
character.gen_record = gen_record
character.exploit_record = exploit_record
character.change_gender(gender)
character.gender = gender
character.age = age
character.b_type = b_type
character.change_eye_color(r_eyes,g_eyes,b_eyes)
character.change_hair_color(r_hair,g_hair,b_hair)
character.change_facial_hair_color(r_facial,g_facial,b_facial)
character.change_skin_color(r_skin,g_skin,b_skin)
character.change_skin_tone(s_tone)
character.r_eyes = r_eyes
character.g_eyes = g_eyes
character.b_eyes = b_eyes
character.change_hair(h_style)
character.change_facial_hair(f_style)
character.r_hair = r_hair
character.g_hair = g_hair
character.b_hair = b_hair
character.r_facial = r_facial
character.g_facial = g_facial
character.b_facial = b_facial
character.r_skin = r_skin
character.g_skin = g_skin
character.b_skin = b_skin
character.s_tone = s_tone
character.h_style = h_style
character.f_style = f_style
character.home_system = home_system
character.citizenship = citizenship
+31 -11
View File
@@ -176,7 +176,7 @@ BLIND // can't see anything
slot_flags = SLOT_EYES
var/vision_flags = 0
var/darkness_view = 0//Base human is 2
var/invisa_view = 0
var/see_invisible = -1
sprite_sheets = list("Vox" = 'icons/mob/species/vox/eyes.dmi')
/obj/item/clothing/glasses/update_clothing_icon()
@@ -383,23 +383,42 @@ BLIND // can't see anything
var/displays_id = 1
var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
//convenience var for defining the icon state for the overlay used when the clothing is worn.
//Also used by rolling/unrolling.
var/worn_state = null
/obj/item/clothing/under/New()
if(worn_state)
if(!item_state_slots)
if(!item_state_slots)
item_state_slots = list()
item_state_slots[slot_w_uniform_str] = worn_state
else
worn_state = icon_state
//autodetect rollability
if(rolled_down < 0)
if((worn_state + "_d_s") in icon_states('icons/mob/uniform.dmi'))
/obj/item/clothing/under/proc/update_rolldown_status()
var/mob/living/carbon/human/H
if(istype(src.loc, /mob/living/carbon/human))
H = src.loc
var/icon/under_icon
if(icon_override)
under_icon = icon_override
else if(H && sprite_sheets && sprite_sheets[H.species.name])
under_icon = sprite_sheets[H.species.name]
else if(item_icons && item_icons[slot_w_uniform_str])
under_icon = item_icons[slot_w_uniform_str]
else
under_icon = INV_W_UNIFORM_DEF_ICON
// The _s is because the icon update procs append it.
if(("[worn_state]_d_s") in icon_states(under_icon))
if(rolled_down != 1)
rolled_down = 0
else
rolled_down = -1
if(H) update_clothing_icon()
/obj/item/clothing/under/update_clothing_icon()
if (ismob(src.loc))
@@ -459,10 +478,10 @@ BLIND // can't see anything
if (( usr.restrained() ) || ( usr.stat ))
return
if (!usr.unEquip(src))
return
switch(over_object.name)
if("r_hand")
usr.put_in_r_hand(src)
@@ -542,10 +561,11 @@ BLIND // can't see anything
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(rolled_down < 0)
update_rolldown_status()
if(rolled_down == -1)
usr << "<span class='notice'>You cannot roll down [src]!</span>"
return
rolled_down = !rolled_down
if(rolled_down)
body_parts_covered &= LOWER_TORSO|LEGS|FEET
+1 -2
View File
@@ -7,7 +7,6 @@
//slot_flags = SLOT_EYES
//var/vision_flags = 0
//var/darkness_view = 0//Base human is 2
//var/invisa_view = 0
var/prescription = 0
var/toggleable = 0
var/off_state = "degoggles"
@@ -75,6 +74,7 @@
origin_tech = "magnets=2"
darkness_view = 7
toggleable = 1
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
icon_action_button = "action_nvg"
off_state = "denight"
@@ -224,7 +224,6 @@
toggleable = 1
icon_action_button = "action_thermal"
vision_flags = SEE_MOBS
invisa_view = 2
emp_act(severity)
if(istype(src.loc, /mob/living/carbon/human))
+1 -1
View File
@@ -33,7 +33,7 @@
icon_state = "jensenshades"
item_state = "jensenshades"
vision_flags = SEE_MOBS
invisa_view = 2
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
/obj/item/clothing/glasses/hud/security/process_hud(var/mob/M)
process_sec_hud(M, 1)
+2
View File
@@ -46,6 +46,8 @@
/obj/item/clothing/mask/gas/swat/vox
name = "\improper alien mask"
desc = "Clearly not designed for a human face."
body_parts_covered = 0 //Hack to allow vox to eat while wearing this mask.
species_restricted = list("Vox")
/obj/item/clothing/mask/gas/syndicate
name = "tactical mask"
+16 -10
View File
@@ -178,23 +178,29 @@ var/global/list/breach_burn_descriptors = list(
//Handles repairs (and also upgrades).
/obj/item/clothing/suit/space/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack/material/plastic) || istype(W,/obj/item/stack/material/steel))
if(istype(W,/obj/item/stack/material))
var/repair_power = 0
switch(W.get_material_name())
if(DEFAULT_WALL_MATERIAL)
repair_power = 2
if("plastic")
repair_power = 1
if(!repair_power)
return
if(istype(src.loc,/mob/living))
user << "\red How do you intend to patch a hardsuit while someone is wearing it?"
user << "<span class='warning'>How do you intend to patch a hardsuit while someone is wearing it?</span>"
return
if(!damage || !burn_damage)
user << "There is no surface damage on \the [src] to repair."
return
var/obj/item/stack/material/P = W
if(P.get_amount() < 3)
P.use(P.get_amount())
repair_breaches(BURN, ( istype(P,/obj/item/stack/material/plastic) ? P.get_amount() : (P.get_amount()*2) ), user)
else
P.use(3)
repair_breaches(BURN, ( istype(P,/obj/item/stack/material/plastic) ? 3 : 5), user)
var/obj/item/stack/P = W
var/use_amt = min(P.get_amount(), 3)
if(use_amt && P.use(use_amt))
repair_breaches(BURN, use_amt * repair_power, user)
return
else if(istype(W, /obj/item/weapon/weldingtool))
@@ -260,7 +260,6 @@
return 0
/stat_rig_module/Click()
..()
if(CanUse())
var/list/href_list = list(
"interact_module" = module.holder.installed_modules.Find(module),
@@ -269,6 +268,9 @@
AddHref(href_list)
module.holder.Topic(usr, href_list)
/stat_rig_module/DblClick()
return Click()
/stat_rig_module/activate/New(var/obj/item/rig_module/module)
..()
name = module.activate_string
+11 -16
View File
@@ -71,6 +71,7 @@
var/offline_slowdown = 3 // If the suit is deployed and unpowered, it sets slowdown to this.
var/vision_restriction
var/offline_vision_restriction = 1 // 0 - none, 1 - welder vision, 2 - blind. Maybe move this to helmets.
var/airtight = 1 //If set, will adjust AIRTIGHT and STOPPRESSUREDAMAGE flags on components. Otherwise it should leave them untouched.
var/emp_protection = 0
@@ -178,8 +179,9 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)]"
piece.flags &= ~STOPPRESSUREDAMAGE
piece.flags &= ~AIRTIGHT
if(airtight)
piece.flags &= ~STOPPRESSUREDAMAGE
piece.flags &= ~AIRTIGHT
update_icon(1)
/obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant)
@@ -247,11 +249,6 @@
M << "<font color='blue'>\The [piece] hisses [!seal_target ? "closed" : "open"].</font>"
M.update_inv_head()
if(helmet)
if(!seal_target)
if(flags & AIRTIGHT)
helmet.flags |= AIRTIGHT
else
helmet.flags &= ~AIRTIGHT
helmet.update_light(wearer)
//sealed pieces become airtight, protecting against diseases
@@ -273,13 +270,8 @@
if(!piece) continue
piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]"
canremove = !seal_target
if(helmet)
if(canremove)
if(flags & AIRTIGHT)
helmet.flags |= AIRTIGHT
else
if(flags & AIRTIGHT)
helmet.flags &= ~AIRTIGHT
if(airtight)
update_component_sealed()
update_icon(1)
return 0
@@ -290,15 +282,18 @@
if(canremove)
for(var/obj/item/rig_module/module in installed_modules)
module.deactivate()
if(airtight)
update_component_sealed()
update_icon(1)
/obj/item/weapon/rig/proc/update_component_sealed()
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
if(canremove)
piece.flags &= ~STOPPRESSUREDAMAGE
piece.flags &= ~AIRTIGHT
else
piece.flags |= STOPPRESSUREDAMAGE
piece.flags |= AIRTIGHT
update_icon(1)
/obj/item/weapon/rig/process()
@@ -7,7 +7,7 @@
return
// Pass repair items on to the chestpiece.
if(chest && (istype(W,/obj/item/stack/material/plastic) || istype(W,/obj/item/stack/material/steel) || istype(W, /obj/item/weapon/weldingtool)))
if(chest && (istype(W,/obj/item/stack/material) || istype(W, /obj/item/weapon/weldingtool)))
return chest.attackby(W,user)
// Lock or unlock the access panel.
@@ -24,6 +24,7 @@
/obj/item/clothing/shoes/magboots/rig
name = "boots"
body_parts_covered = FEET
cold_protection = FEET
heat_protection = FEET
species_restricted = null
@@ -69,3 +70,38 @@
return 1
return 0
//Rig pieces for non-spacesuit based rigs
/obj/item/clothing/head/lightrig
name = "mask"
body_parts_covered = HEAD|FACE|EYES
heat_protection = HEAD|FACE|EYES
cold_protection = HEAD|FACE|EYES
flags = THICKMATERIAL|AIRTIGHT
/obj/item/clothing/suit/lightrig
name = "suit"
allowed = list(/obj/item/device/flashlight)
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEJUMPSUIT
flags = THICKMATERIAL
/obj/item/clothing/shoes/lightrig
name = "boots"
body_parts_covered = FEET
cold_protection = FEET
heat_protection = FEET
species_restricted = null
gender = PLURAL
/obj/item/clothing/gloves/lightrig
name = "gloves"
flags = THICKMATERIAL
body_parts_covered = HANDS
heat_protection = HANDS
cold_protection = HANDS
species_restricted = null
gender = PLURAL
@@ -33,22 +33,43 @@
/obj/item/weapon/rig/light/hacker
name = "cybersuit control module"
suit_type = "cyber"
desc = "An advanced powered armour suit with many cyberwarfare enhancements."
desc = "An advanced powered armour suit with many cyberwarfare enhancements. Comes with built-in insulated gloves for safely tampering with electronics."
icon_state = "hacker_rig"
req_access = list(access_syndicate)
helm_type = /obj/item/clothing/head/helmet/space/rig/mask
airtight = 0
seal_delay = 5 //not being vaccum-proof has an upside I guess
helm_type = /obj/item/clothing/head/lightrig/hacker
chest_type = /obj/item/clothing/suit/lightrig/hacker
glove_type = /obj/item/clothing/gloves/lightrig/hacker
boot_type = /obj/item/clothing/shoes/lightrig/hacker
initial_modules = list(
/obj/item/rig_module/ai_container,
/obj/item/rig_module/power_sink,
/obj/item/rig_module/datajack
/obj/item/rig_module/datajack,
/obj/item/rig_module/electrowarfare_suite,
/obj/item/rig_module/voice,
/obj/item/rig_module/vision,
)
/obj/item/clothing/head/helmet/space/rig/mask
name = "mask"
flags = THICKMATERIAL
//The cybersuit is not space-proof. It does however, have good siemens_coefficient values
/obj/item/clothing/head/lightrig/hacker
name = "HUD"
siemens_coefficient = 0.4
flags = 0
/obj/item/clothing/suit/lightrig/hacker
siemens_coefficient = 0.4
/obj/item/clothing/shoes/lightrig/hacker
siemens_coefficient = 0.4
flags = NOSLIP //All the other rigs have magboots anyways, hopefully gives the hacker suit something more going for it.
/obj/item/clothing/gloves/lightrig/hacker
siemens_coefficient = 0
/obj/item/weapon/rig/light/ninja
name = "ominous suit control module"
@@ -92,7 +113,7 @@
name = "stealth suit control module"
suit_type = "stealth"
desc = "A highly advanced and expensive suit designed for covert operations."
icon_state = "ninja_rig"
icon_state = "stealth_rig"
req_access = list(access_syndicate)

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