Merge branch 'master' of github.com:tgstation/-tg-station into assemblyfun

Conflicts:
	code/game/objects/items/weapons/grenades/chem_grenade.dm
	html/changelog.html
This commit is contained in:
Pete Goodfellow
2013-06-15 18:58:11 +01:00
144 changed files with 2276 additions and 1629 deletions

View File

@@ -169,23 +169,23 @@
pump_direction = 1
if("set_input_pressure" in signal.data)
input_pressure_min = between(
0,
input_pressure_min = Clamp(
text2num(signal.data["set_input_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("set_output_pressure" in signal.data)
output_pressure_max = between(
0,
output_pressure_max = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("set_external_pressure" in signal.data)
external_pressure_bound = between(
0,
external_pressure_bound = Clamp(
text2num(signal.data["set_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)

View File

@@ -113,9 +113,9 @@ obj/machinery/atmospherics/binary/passive_gate
on = !on
if("set_output_pressure" in signal.data)
target_pressure = between(
0,
target_pressure = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)

View File

@@ -128,9 +128,9 @@ obj/machinery/atmospherics/binary/pump
on = !on
if("set_output_pressure" in signal.data)
target_pressure = between(
0,
target_pressure = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)

View File

@@ -126,9 +126,9 @@ obj/machinery/atmospherics/binary/volume_pump
on = !on
if("set_transfer_rate" in signal.data)
transfer_rate = between(
0,
transfer_rate = Clamp(
text2num(signal.data["set_transfer_rate"]),
0,
air1.volume
)

View File

@@ -16,7 +16,7 @@ obj/machinery/atmospherics/trinary/filter
/*
Filter types:
-1: Nothing
0: Carbon Molecules: Plasma Toxin, Oxygen Agent B
0: Plasma: Plasma Toxin, Oxygen Agent B
1: Oxygen: Oxygen ONLY
2: Nitrogen: Nitrogen ONLY
3: Carbon Dioxide: Carbon Dioxide ONLY
@@ -85,7 +85,7 @@ Filter types:
filtered_out.temperature = removed.temperature
switch(filter_type)
if(0) //removing hydrocarbons
if(0) //removing plasma
filtered_out.toxins = removed.toxins
removed.toxins = 0
@@ -172,7 +172,7 @@ obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob) // -- TLE
var/current_filter_type
switch(filter_type)
if(0)
current_filter_type = "Carbon Molecules"
current_filter_type = "Plasma"
if(1)
current_filter_type = "Oxygen"
if(2)
@@ -190,7 +190,7 @@ obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob) // -- TLE
<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Filtering: </b>[current_filter_type]<br><HR>
<h4>Set Filter Type:</h4>
<A href='?src=\ref[src];filterset=0'>Carbon Molecules</A><BR>
<A href='?src=\ref[src];filterset=0'>Plasma</A><BR>
<A href='?src=\ref[src];filterset=1'>Oxygen</A><BR>
<A href='?src=\ref[src];filterset=2'>Nitrogen</A><BR>
<A href='?src=\ref[src];filterset=3'>Carbon Dioxide</A><BR>

View File

@@ -63,8 +63,13 @@ obj/machinery/atmospherics/trinary/mixer
var/air2_moles = air2.total_moles()
if((air1_moles < transfer_moles1) || (air2_moles < transfer_moles2))
if(!transfer_moles1 || !transfer_moles2) return
var/ratio = min(air1_moles/transfer_moles1, air2_moles/transfer_moles2)
var/ratio = 0
if (( transfer_moles1 > 0 ) && (transfer_moles2 >0 ))
ratio = min(air1_moles/transfer_moles1, air2_moles/transfer_moles2)
if (( transfer_moles2 == 0 ) && ( transfer_moles1 > 0 ))
ratio = air1_moles/transfer_moles1
if (( transfer_moles1 == 0 ) && ( transfer_moles2 > 0 ))
ratio = air2_moles/transfer_moles2
transfer_moles1 *= ratio
transfer_moles2 *= ratio

View File

@@ -124,7 +124,7 @@
if("set_volume_rate" in signal.data)
var/number = text2num(signal.data["set_volume_rate"])
volume_rate = between(0, number, air_contents.volume)
volume_rate = Clamp(number, 0, air_contents.volume)
if("status" in signal.data)
spawn(2)

View File

@@ -214,30 +214,30 @@
pump_direction = text2num(signal.data["direction"])
if("set_internal_pressure" in signal.data)
internal_pressure_bound = between(
0,
internal_pressure_bound = Clamp(
text2num(signal.data["set_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("set_external_pressure" in signal.data)
external_pressure_bound = between(
0,
external_pressure_bound = Clamp(
text2num(signal.data["set_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("adjust_internal_pressure" in signal.data)
internal_pressure_bound = between(
0,
internal_pressure_bound = Clamp(
internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("adjust_external_pressure" in signal.data)
external_pressure_bound = between(
0,
external_pressure_bound = Clamp(
external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)

View File

@@ -262,16 +262,14 @@ turf/simulated
//See what kind of border it is
if(istype(T,/turf/space))
if(parent.space_borders)
parent.space_borders -= src
parent.space_borders += src
parent.space_borders |= src
else
parent.space_borders = list(src)
length_space_border++
else
if(parent.borders)
parent.borders -= src
parent.borders += src
parent.borders |= src
else
parent.borders = list(src)

View File

@@ -456,4 +456,14 @@ var/list/be_special_flags = list(
#define DNA_HAIR_STYLE_BLOCK 7
#define DNA_STRUC_ENZYMES_BLOCKS 14
#define DNA_UNIQUE_ENZYMES_LEN 32
#define DNA_UNIQUE_ENZYMES_LEN 32
//Transformation proc stuff
#define TR_KEEPITEMS 1
#define TR_KEEPVIRUS 2
#define TR_KEEPDAMAGE 4
#define TR_HASHNAME 8 // hashing names (e.g. monkey(e34f)) (only in monkeyize)
#define TR_KEEPIMPLANTS 16
#define TR_KEEPSE 32 // changelings shouldn't edit the DNA's SE when turning into a monkey
#define TR_DEFAULTMSG 64
#define TR_KEEPSRC 128

View File

@@ -9,6 +9,7 @@ var/global/list/player_list = list() //List of all mobs **with clients attach
var/global/list/mob_list = list() //List of all mobs, including clientless
var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
var/global/list/joined_player_list = list() //List of all clients that have joined the game at round-start or as a latejoin.
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
@@ -73,4 +74,4 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel")
for(var/path in typesof(prototype))
if(path == prototype) continue
L += new path()
return L
return L

View File

@@ -31,29 +31,28 @@
return "[output][and_text][input[index]]"
//Returns list element or null. Should prevent "index out of bounds" error.
proc/listgetindex(var/list/list,index)
if(istype(list) && list.len)
proc/listgetindex(list/L, index)
if(istype(L))
if(isnum(index))
if(InRange(index,1,list.len))
return list[index]
else if(index in list)
return list[index]
if(IsInRange(index,1,L.len))
return L[index]
else if(index in L)
return L[index]
return
proc/islist(list/list)
if(istype(list))
proc/islist(list/L)
if(istype(L))
return 1
return 0
//Return either pick(list) or null if list is not of type /list or is empty
proc/safepick(list/list)
if(!islist(list) || !list.len)
return
return pick(list)
proc/safepick(list/L)
if(istype(L) && L.len)
return pick(L)
//Checks if the list is empty
proc/isemptylist(list/list)
if(!list.len)
proc/isemptylist(list/L)
if(!L.len)
return 1
return 0
@@ -291,6 +290,27 @@ proc/listclearnulls(list/list)
return (result + L.Copy(Li, 0))
return (result + R.Copy(Ri, 0))
//Mergesort: any value in a list, preserves key=value structure
/proc/sortAssoc(var/list/L)
if(L.len < 2)
return L
var/middle = L.len / 2 + 1 // Copy is first,second-1
return mergeAssoc(sortAssoc(L.Copy(0,middle)), sortAssoc(L.Copy(middle))) //second parameter null = to end of list
/proc/mergeAssoc(var/list/L, var/list/R)
var/Li=1
var/Ri=1
var/list/result = new()
while(Li <= L.len && Ri <= R.len)
if(sorttext(L[Li], R[Ri]) < 1)
result += R&R[Ri++]
else
result += L&L[Li++]
if(Li <= L.len)
return (result + L.Copy(Li, 0))
return (result + R.Copy(Ri, 0))
//Converts a bitfield to a list of numbers (or words if a wordlist is provided)
/proc/bitfield2list(bitfield = 0, list/wordlist)

View File

@@ -3,6 +3,8 @@
var/const/E = 2.71828183
var/const/Sqrt2 = 1.41421356
/proc/sign(x)
return x!=0?x/abs(x):0
/proc/Atan2(x, y)
if(!x && !y) return 0
@@ -110,7 +112,7 @@ var/const/Sqrt2 = 1.41421356
var/t = round((val - min) / d)
return val - (t * d)
//polar variant of a gaussian distributed PRNG
//converts a uniform distributed random number into a normal distributed one
//since this method produces two random numbers, one is saved for subsequent calls
//(making the cost negligble for every second call)
//This will return +/- decimals, situated about mean with standard deviation stddev

View File

@@ -30,12 +30,6 @@
/proc/dd_range(var/low, var/high, var/num)
return max(low,min(high,num))
//Returns whether or not A is the middle most value
/proc/InRange(var/A, var/lower, var/upper)
if(A < lower) return 0
if(A > upper) return 0
return 1
/proc/Get_Angle(atom/movable/start,atom/movable/end)//For beams.
if(!start || !end) return 0
@@ -183,9 +177,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
return 1
return 0
/proc/sign(x)
return x!=0?x/abs(x):0
/proc/getline(atom/M,atom/N)//Ultra-Fast Bresenham Line-Drawing Algorithm
var/px=M.x //starting x
var/py=M.y
@@ -462,14 +453,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/M = E/(SPEED_OF_LIGHT_SQ)
return M
//Forces a variable to be posative
/proc/modulus(var/M)
if(M >= 0)
return M
if(M < 0)
return -M
/proc/key_name(var/whom, var/include_link = null, var/include_name = 1)
var/mob/M
var/client/C
@@ -528,15 +511,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/key_name_admin(var/whom, var/include_name = 1)
return key_name(whom, 1, include_name)
//Will return the location of the turf an atom is ultimatly sitting on
/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
//in case they're in a closet or sleeper or something
var/atom/loc = M.loc
while(loc && !istype(loc, /turf/))
loc = loc.loc
return loc
// Returns the atom sitting on the turf.
// For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
/proc/get_atom_on_turf(var/atom/movable/M)
@@ -594,27 +568,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/y = min(world.maxy, max(1, A.y + dy))
return locate(x,y,A.z)
//Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value.
/proc/between(var/low, var/middle, var/high)
return max(min(middle, high), low)
proc/arctan(x)
var/y=arcsin(x/sqrt(1+x*x))
return y
//returns random gauss number
proc/GaussRand(var/sigma)
var/x,y,rsq
do
x=2*rand()-1
y=2*rand()-1
rsq=x*x+y*y
while(rsq>1 || !rsq)
return sigma*y*sqrt(-2*log(rsq)/rsq)
//returns random gauss number, rounded to 'roundto'
proc/GaussRandRound(var/sigma,var/roundto)
return round(GaussRand(sigma),roundto)
proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
//This proc throws up either an icon or an animation for a specified amount of time.
@@ -749,10 +706,9 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
//Returns: all the areas in the world
/proc/return_areas()
var/list/area/areas = list()
. = list()
for(var/area/A in world)
areas += A
return areas
. += A
//Returns: all the areas in the world, sorted.
/proc/return_sorted_areas()
@@ -1149,14 +1105,6 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
. = orange(distance,center)
return
proc/get_mob_with_client_list()
var/list/mobs = list()
for(var/mob/M in world)
if (M.client)
mobs += M
return mobs
/proc/parse_zone(zone)
if(zone == "r_hand") return "right hand"
else if (zone == "l_hand") return "left hand"
@@ -1169,12 +1117,11 @@ proc/get_mob_with_client_list()
else return zone
/proc/get_turf(turf/location)
while(location)
if(isturf(location))
return location
location = location.loc
return null
/proc/get_turf(atom/movable/AM)
if(istype(AM))
return locate(/turf) in AM.locs
else if(isturf(AM))
return AM
/proc/get(atom/loc, type)
while(loc)
@@ -1183,10 +1130,6 @@ proc/get_mob_with_client_list()
loc = loc.loc
return null
/proc/get_turf_or_move(turf/location)
return get_turf(location)
//Quick type checks for some tools
var/global/list/common_tools = list(
/obj/item/weapon/cable_coil,
@@ -1202,46 +1145,6 @@ var/global/list/common_tools = list(
return 1
return 0
/proc/iswrench(O)
if(istype(O, /obj/item/weapon/wrench))
return 1
return 0
/proc/iswelder(O)
if(istype(O, /obj/item/weapon/weldingtool))
return 1
return 0
/proc/iscoil(O)
if(istype(O, /obj/item/weapon/cable_coil))
return 1
return 0
/proc/iswirecutter(O)
if(istype(O, /obj/item/weapon/wirecutters))
return 1
return 0
/proc/isscrewdriver(O)
if(istype(O, /obj/item/weapon/screwdriver))
return 1
return 0
/proc/ismultitool(O)
if(istype(O, /obj/item/device/multitool))
return 1
return 0
/proc/iscrowbar(O)
if(istype(O, /obj/item/weapon/crowbar))
return 1
return 0
/proc/iswire(O)
if(istype(O, /obj/item/weapon/cable_coil))
return 1
return 0
proc/is_hot(obj/item/W as obj)
switch(W.type)
if(/obj/item/weapon/weldingtool)

View File

@@ -76,9 +76,14 @@
var/allow_random_events = 0 // enables random events mid-round when set to 1
var/allow_ai = 1 // allow ai job
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/traitor_scaling_coeff = 6 //how much does the amount of players get divided by to determine traitors
var/changeling_scaling_coeff = 10 //how much does the amount of players get divided by to determine changelings
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/allow_latejoin_antagonists = 0 // If late-joining players can be traitor/changeling
var/continuous_round_rev = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/continuous_round_wiz = 0
var/continuous_round_malf = 0
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted."
@@ -314,12 +319,18 @@
config.jobs_have_maint_access |= EVERYONE_HAS_MAINT_ACCESS
if("gateway_delay")
config.gateway_delay = text2num(value)
if("continuous_rounds")
config.continous_rounds = 1
if("continuous_round_rev")
config.continuous_round_rev = 1
if("continuous_round_wiz")
config.continuous_round_wiz = 1
if("continuous_round_malf")
config.continuous_round_malf = 1
if("ghost_interaction")
config.ghost_interaction = 1
if("traitor_scaling")
config.traitor_scaling = 1
if("traitor_scaling_coeff")
config.traitor_scaling_coeff = text2num(value)
if("changeling_scaling_coeff")
config.changeling_scaling_coeff = text2num(value)
if("probability")
var/prob_pos = findtext(value, " ")
var/prob_name = null
@@ -337,6 +348,8 @@
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
if("allow_latejoin_antagonists")
config.allow_latejoin_antagonists = 1
if("allow_random_events")
config.allow_random_events = 1
if("jobs_have_minimal_access")

View File

@@ -649,6 +649,20 @@ client
if("left") A.dir = turn(A.dir, 45)
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["makehuman"])
if(!check_rights(0)) return
var/mob/living/carbon/monkey/Mo = locate(href_list["makehuman"])
if(!istype(Mo))
usr << "This can only be done to instances of type /mob/living/carbon/monkey"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!Mo)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("humanone"=href_list["makehuman"]))
else if(href_list["makemonkey"])
if(!check_rights(0)) return

View File

@@ -26,7 +26,7 @@ Bonus
/datum/symptom/damage_converter/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
@@ -35,7 +35,7 @@ Bonus
/datum/symptom/damage_converter/proc/Convert(var/mob/living/M)
if(M.getFireLoss() < M.getMaxHealth() || M.getBruteLoss() < M.getMaxHealth())
if(M.getFireLoss() > 0 || M.getBruteLoss() > 0)
var/get_damage = rand(1, 2)
M.adjustFireLoss(-get_damage)
M.adjustBruteLoss(-get_damage)

View File

@@ -175,7 +175,7 @@ var/datum/global_hud/global_hud = new()
var/list/other
var/list/obj/screen/hotkeybuttons
var/list/obj/screen/item_action/item_action_list //Used for the item action ui buttons.
var/list/obj/screen/item_action/item_action_list //Used for the item action ui buttons.
datum/hud/New(mob/owner)
@@ -191,7 +191,7 @@ datum/hud/New(mob/owner)
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
if(H.handcuffed)
H.handcuffed.screen_loc = null //no handcuffs in my UI!
H.handcuffed.screen_loc = null //no handcuffs in my UI!
if(inventory_shown && hud_shown)
if(H.shoes) H.shoes.screen_loc = ui_shoes
if(H.gloves) H.gloves.screen_loc = ui_gloves

View File

@@ -765,7 +765,7 @@ datum/mind
return
switch(href_list["monkey"])
if("healthy")
if (usr.client.holder.rights & R_ADMIN)
if (check_rights(R_ADMIN))
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
if (istype(H))
@@ -780,7 +780,7 @@ datum/mind
D.cure(0)
sleep(0) //because deleting of virus is done through spawn(0)
if("infected")
if (usr.client.holder.rights & R_ADMIN)
if (check_rights(R_ADMIN, 0))
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
if (istype(H))
@@ -793,21 +793,18 @@ datum/mind
else if (istype(M))
current.contract_disease(new /datum/disease/jungle_fever,1,0)
if("human")
var/mob/living/carbon/monkey/M = current
if (istype(M))
for(var/datum/disease/D in M.viruses)
if (istype(D,/datum/disease/jungle_fever))
D.cure(0)
sleep(0) //because deleting of virus is doing throught spawn(0)
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]")
var/obj/item/weapon/dnainjector/m2h/m2h = new
var/obj/item/weapon/implant/mobfinder = new(M) //hack because humanizing deletes mind --rastaf0
src = null
m2h.inject(M)
src = mobfinder.loc:mind
del(mobfinder)
current.radiation -= 50
if (check_rights(R_ADMIN, 0))
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
if (istype(M))
for(var/datum/disease/D in M.viruses)
if (istype(D,/datum/disease/jungle_fever))
D.cure(0)
sleep(0) //because deleting of virus is doing throught spawn(0)
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]")
H = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG)
src = H.mind
else if (href_list["silicon"])
switch(href_list["silicon"])

View File

@@ -43,9 +43,11 @@
name = "Food crate"
contains = list(/obj/item/weapon/reagent_containers/food/drinks/flour,
/obj/item/weapon/reagent_containers/food/drinks/milk,
/obj/item/weapon/reagent_containers/food/drinks/milk,
/obj/item/weapon/reagent_containers/food/drinks/soymilk,
/obj/item/weapon/storage/fancy/egg_box,
/obj/item/weapon/reagent_containers/food/condiment/enzyme,
/obj/item/weapon/reagent_containers/food/condiment/sugar,
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana)
@@ -530,7 +532,10 @@
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/storage/box/teargas)
/obj/item/weapon/storage/box/teargas,
/obj/item/device/flash,
/obj/item/device/flash,
/obj/item/device/flash)
cost = 30
containertype = /obj/structure/closet/crate/secure/weapon
containername = "weapons crate"

View File

@@ -115,6 +115,10 @@ var/list/uplink_items = list()
item = /obj/item/weapon/storage/box/emps
cost = 3
/datum/uplink_item/dangerous/syndicate_minibomb
name = "Syndicate Minibomb"
item = /obj/item/weapon/grenade/syndieminibomb
cost = 3
// STEALTHY WEAPONS
@@ -167,6 +171,10 @@ var/list/uplink_items = list()
item = /obj/item/device/chameleon
cost = 4
/datum/uplink_item/stealthy_tools/camera_bug
name = "Camera Bug"
item = /obj/item/device/camera_bug
cost = 2
// DEVICE AND TOOLS
@@ -218,6 +226,11 @@ var/list/uplink_items = list()
item = /obj/item/device/sbeacondrop
cost = 7
/datum/uplink_item/device_tools/syndicate_bomb
name = "Syndicate Bomb (DANGER!)"
item = /obj/item/weapon/syndicatebomb
cost = 5
/datum/uplink_item/device_tools/teleporter
name = "Teleporter Circuit Board"
item = /obj/item/weapon/circuitboard/teleporter

View File

@@ -0,0 +1,74 @@
/datum/wires/syndicatebomb
random = 1
holder_type = /obj/item/weapon/syndicatebomb
wire_count = 5
var/const/WIRE_BOOM = 1 // Explodes if pulsed or cut while active, defuses a bomb that isn't active on cut
var/const/WIRE_UNBOLT = 2 // Unbolts the bomb if cut, hint on pulsed
var/const/WIRE_DELAY = 4 // Raises the timer on pulse, does nothing on cut
var/const/WIRE_PROCEED = 8 // Lowers the timer, explodes if cut while the bomb is active
var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if pulsed while already active, will stop a timer a bomb on cut
/datum/wires/syndicatebomb/UpdatePulsed(var/index)
var/obj/item/weapon/syndicatebomb/P = holder
switch(index)
if(WIRE_BOOM)
if (P.active)
P.loc.visible_message("\red \icon[holder] An alarm sounds! It's go-")
P.timer = 0
if(WIRE_UNBOLT)
P.loc.visible_message("\blue \icon[holder] The bolts spin in place for a moment.")
if(WIRE_DELAY)
playsound(P.loc, 'sound/machines/chime.ogg', 30, 1)
P.loc.visible_message("\blue \icon[holder] The bomb chirps.")
P.timer += 10
if(WIRE_PROCEED)
playsound(P.loc, 'sound/machines/buzz-sigh.ogg', 30, 1)
P.loc.visible_message("\red \icon[holder] The bomb buzzes ominously!")
if (P.timer >= 61) //Long fuse bombs can suddenly become more dangerous if you tinker with them
P.timer = 60
if (P.timer >= 21)
P.timer -= 10
else if (P.timer >= 11) //both to prevent negative timers and to have a little mercy
P.timer = 10
if(WIRE_ACTIVATE)
if(!P.active && !P.defused)
playsound(P.loc, 'sound/machines/click.ogg', 30, 1)
P.loc.visible_message("\red \icon[holder] You hear the bomb start ticking!")
P.active = 1
if(!P.open_panel) //Needs to exist in case the wire is pulsed with a signaler while the panel is closed
P.icon_state = "syndicate-bomb-active"
else
P.icon_state = "syndicate-bomb-active-wires"
processing_objects.Add(P)
else
P.loc.visible_message("\blue \icon[holder] The bomb seems to hesitate for a moment.")
P.timer += 5
/datum/wires/syndicatebomb/UpdateCut(var/index, var/mended)
var/obj/item/weapon/syndicatebomb/P = holder
switch(index)
if(WIRE_EXPLODE)
if(!mended)
if(P.active)
P.loc.visible_message("\red \icon[holder] An alarm sounds! It's go-")
P.timer = 0
else
P.defused = 1
if(mended)
P.defused = 0 //cutting and mending all the wires of an inactive bomb will thus cure any sabotage
if(WIRE_UNBOLT)
if (!mended && P.anchored)
playsound(P.loc, 'sound/effects/stealthoff.ogg', 30, 1)
P.loc.visible_message("\blue \icon[holder] The bolts lift out of the ground!")
P.anchored = 0
if(WIRE_PROCEED)
if(!mended && P.active)
P.loc.visible_message("\red \icon[holder] An alarm sounds! It's go-")
P.timer = 0
if(WIRE_ACTIVATE)
if (!mended && P.active)
P.loc.visible_message("\blue \icon[holder] The timer stops! The bomb has been defused!")
P.icon_state = "syndicate-bomb-inactive-wires" //no cutting possible with the panel closed
P.active = 0
P.defused = 1

View File

@@ -105,14 +105,14 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
var/obj/item/I = L.get_active_hand()
holder.add_hiddenprint(L)
if(href_list["cut"]) // Toggles the cut/mend status
if(iswirecutter(I))
if(istype(I, /obj/item/weapon/wirecutters))
var/colour = href_list["cut"]
CutWireColour(colour)
else
L << "<span class='error'>You need wirecutters!</span>"
else if(href_list["pulse"])
if(ismultitool(I))
if(istype(I, /obj/item/device/multitool))
var/colour = href_list["pulse"]
PulseColour(colour)
else

View File

@@ -398,42 +398,6 @@
icon_state = "power_mod"
desc = "Charging circuits for power cells."
/obj/item/device/camera_bug
name = "camera bug"
icon = 'icons/obj/device.dmi'
icon_state = "flash"
w_class = 1.0
item_state = "electronic"
throw_speed = 4
throw_range = 20
/obj/item/weapon/camera_bug/attack_self(mob/usr as mob)
var/list/cameras = new/list()
for (var/obj/machinery/camera/C in cameranet.cameras)
if (C.bugged && C.status)
cameras.Add(C)
if (length(cameras) == 0)
usr << "\red No bugged functioning cameras found."
return
var/list/friendly_cameras = new/list()
for (var/obj/machinery/camera/C in cameras)
friendly_cameras.Add(C.c_tag)
var/target = input("Select the camera to observe", null) as null|anything in friendly_cameras
if (!target)
return
for (var/obj/machinery/camera/C in cameras)
if (C.c_tag == target)
target = C
break
if (usr.stat == 2) return
usr.client.eye = target
/obj/item/weapon/syntiflesh
name = "syntiflesh"
desc = "Meat that appears...strange..."

View File

@@ -76,6 +76,15 @@ proc/AStar(turf/start_turf, turf/dest_turf, adjacent_proc, distance_proc, maxnod
var/list/path = list() //return value
//check to see if we can run a faster proc
if(maxnodes == 1 || max_length == 1)
return pathfind_adjacent(start_turf, dest_turf, adjacent_proc, id)
var/dist = get_dist(start_turf, dest_turf)
if(dist == 1)
return pathfind_adjacent(start_turf, dest_turf, adjacent_proc, id)
else if(dist == 2)
return pathfind_directmove(start_turf, dest_turf, adjacent_proc, max_length, id, exclude)
//sanity check to avoid a huge waste of CPU time on impossible tasks
for(var/obj/O in dest_turf)
if(O.density && (!istype(O, /obj/machinery/door) || !(O.flags & ON_BORDER))) //something is blocking the destination
@@ -138,3 +147,67 @@ proc/AStar(turf/start_turf, turf/dest_turf, adjacent_proc, distance_proc, maxnod
//world << "Didn't find a path within [evaluations] evaluations and [lpct] loops."
return path //FAILURE
//This return should only be reached if the path is too long, and the while loop gives up.
//Use this proc to check if a turf 1 tile away is reachable
//There are a few things that appear to use AStar just to check if something is within reach
//Untested
proc/pathfind_adjacent(turf/start_turf, turf/dest_turf, adjacent_proc, id)
var/adjacent = call(start_turf,adjacent_proc)(id)
if(dest_turf in adjacent)
return list(dest_turf)
return list()
//Pathfind directly towards the target, with obstacle avoidance best described as "dodging"
//This is a relatively crude algorithm, but it should work well for very short distances (1-2), or across areas with minimal obstacles
//It has a high bias in certain directions, and has a high chance to fail if there is a concurrent series of obstacles
//Untested
proc/pathfind_directmove(turf/start_turf, turf/dest_turf, adjacent_proc, max_length, id=null, var/turf/exclude=null)
var/list/path = list()
var/turf/current_turf = start_turf
var/turf/priority_candidate
for(var/current_iteration = 0, current_iteration < max_length, current_iteration++)
if(current_turf == dest_turf)
return path
//populate candidates list from current location
var/target_dir = get_dir(current_turf, dest_turf)
var/list/adjacent = call(current_turf,adjacent_proc)(id)
var/list/candidates = list()
//check straight forward and diagonally forward only
for(var/try_dir in alldirs)
if(try_dir&target_dir)
//grab the turf, and check that it's reachable
var/turf/try_turf = get_step(current_turf, try_dir)
//A further optimisation could be made here by ripping out the guts to adjacent_proc and only running it's checks on check_turf
if(try_turf in adjacent)
candidates += try_turf
if(try_dir == target_dir)
priority_candidate = try_turf
if(exclude && priority_candidate == exclude)
priority_candidate = null
//the priority candidate turf moves us directly towards the destination
if(priority_candidate)
current_turf = priority_candidate
priority_candidate = null
else
//this should have at most 2 turfs in it
while(candidates.len)
current_turf = candidates[1]
if(current_turf == exclude)
exclude = null
candidates.Remove(exclude)
else
break
if(current_turf)
path += current_turf
else
break
//we failed, so return an empty list
return list()

View File

@@ -298,136 +298,25 @@
//////////////////////////////////////////////////////////// Monkey Block
if(blocks[RACEBLOCK])
if(istype(M, /mob/living/carbon/human)) // human > monkey
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (H.contents-implants))
if(W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
del(animation)
var/mob/living/carbon/monkey/O = new(src)
if(M)
if(M.dna)
O.dna = M.dna
M.dna = null
if(M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
for(var/obj/T in (M.contents-implants))
del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
var/mob/living/carbon/monkey/O = M.monkeyize(TR_KEEPITEMS | TR_HASHNAME | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPVIRUS)
O.take_overall_damage(40, 0)
O.adjustToxLoss(20)
if(connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = "harm"
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return 1
else
if(istype(M, /mob/living/carbon/monkey)) // monkey > human,
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
del(animation)
var/mob/living/carbon/human/O = new( src )
O.gender = (deconstruct_block(getblock(M.dna.uni_identity, DNA_GENDER_BLOCK), 2)-1) ? FEMALE : MALE
if(M)
if(M.dna)
O.dna = M.dna
M.dna = null
if(M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
O.viruses = M.viruses.Copy()
M.viruses.Cut()
for(var/datum/disease/D in O.viruses)
D.affected_mob = O
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the human
var/mob/living/carbon/human/O = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPVIRUS)
O.take_overall_damage(40, 0)
O.adjustToxLoss(20)
if(connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = random_name(O.gender)
updateappearance(O)
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return 1
//////////////////////////////////////////////////////////// Monkey Block
if(M)
@@ -441,151 +330,126 @@
name = "\improper DNA Scanner"
desc = "It scans DNA structures."
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "scanner_0"
icon_state = "scanner"
density = 1
var/locked = 0.0
var/locked = 0
var/open = 0
var/mob/occupant = null
anchored = 1.0
anchored = 1
use_power = 1
idle_power_usage = 50
active_power_usage = 300
/obj/machinery/dna_scannernew/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonescanner(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts = newlist(
/obj/item/weapon/circuitboard/clonescanner,
/obj/item/weapon/stock_parts/scanning_module,
/obj/item/weapon/stock_parts/manipulator,
/obj/item/weapon/stock_parts/micro_laser,
/obj/item/weapon/stock_parts/console_screen,
/obj/item/weapon/cable_coil,
/obj/item/weapon/cable_coil
)
RefreshParts()
/obj/machinery/dna_scannernew/allow_drop()
return 0
/obj/machinery/dna_scannernew/proc/toggle_open()
if(open) return close()
else return open()
/obj/machinery/dna_scannernew/proc/close()
if(open)
open = 0
density = 1
for(var/mob/living/carbon/C in loc)
if(C.buckled) continue
if(C.client)
C.client.perspective = EYE_PERSPECTIVE
C.client.eye = src
occupant = C
C.loc = src
C.stop_pulling()
break
icon_state = initial(icon_state) + (occupant ? "_occupied" : "")
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
if(occupant)
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, SOUTH)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, EAST)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
if(!occupant.key && occupant.mind)
for(var/mob/dead/observer/ghost in player_list)
if(ghost.mind == occupant.mind)
if(ghost.can_reenter_corpse)
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
break
return 1
/obj/machinery/dna_scannernew/proc/open()
if(!open)
if(locked)
usr << "<span class='notice'>The bolts are locked down, securing the door shut.</span>"
return
var/turf/T = get_turf(src)
if(T)
open = 1
density = 0
T.contents += contents
if(occupant)
if(occupant.client)
occupant.client.eye = occupant
occupant.client.perspective = MOB_PERSPECTIVE
occupant = null
icon_state = "[initial(icon_state)]_open"
return 1
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
if(user.stat)
return
go_out()
return
/obj/machinery/dna_scannernew/verb/eject()
set src in oview(1)
set category = "Object"
set name = "Eject DNA Scanner"
if(usr.stat != 0)
return
go_out()
for(var/obj/O in src)
if((!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!istype(O,/obj/item/weapon/cable_coil)))
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components)
if(!occupant)
for(var/mob/M in src)//Failsafe so you can get mobs out
M.loc = get_turf(src)
add_fingerprint(usr)
return
/obj/machinery/dna_scannernew/verb/move_inside()
set src in oview(1)
set category = "Object"
set name = "Enter DNA Scanner"
if(usr.stat != 0)
return
if(!ishuman(usr) && !ismonkey(usr)) //Make sure they're a mob that has dna
usr << "<span class='notice'>Try as you might, you can not climb up into the scanner.</span>"
return
if(occupant)
usr << "<span class='notice'>The scanner is already occupied!</span>"
return
if(locked)
usr << "<span class='notice'>The bolts are locked.</span>"
return
if(usr.abiotic())
usr << "<span class='notice'>Subject cannot have abiotic items on.</span>"
return
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
occupant = usr
icon_state = "scanner_1"
add_fingerprint(usr)
open()
return
/obj/machinery/dna_scannernew/attackby(obj/item/weapon/grab/G, mob/user)
if(!istype(G, /obj/item/weapon/grab) || !ismob(G.affecting))
return
if(occupant)
user << "<span class='notice'>The scanner is already occupied!</span>"
return
if(locked)
user << "<span class='notice'>The scanner is locked.</span>"
return
if(G.affecting.abiotic())
user << "<span class='notice'>Subject cannot have abiotic items on.</span>"
if(!open)
user << "<span class='notice'>Open the scanner first.</span>"
return
var/mob/M = G.affecting
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
occupant = M
M.loc = loc
user.stop_pulling()
icon_state = "scanner_1"
del(G)
/obj/machinery/dna_scannernew/attack_hand(mob/user)
if(..()) return
toggle_open()
add_fingerprint(user)
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, SOUTH)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, EAST)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
if(!M.client && M.mind)
for(var/mob/dead/observer/ghost in player_list)
if(ghost.mind == M.mind)
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
break
del(G)
return
/obj/machinery/dna_scannernew/proc/go_out()
if(!occupant || locked)
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = loc
occupant = null
icon_state = "scanner_0"
return
/obj/machinery/dna_scannernew/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in src)
A.loc = loc
ex_act(severity)
A.ex_act(severity)
del(src)
return
if(2.0)
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in src)
A.loc = loc
ex_act(severity)
A.ex_act(severity)
del(src)
return
if(3.0)
if(prob(25))
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in src)
A.loc = loc
ex_act(severity)
A.ex_act(severity)
del(src)
return
else
@@ -594,7 +458,7 @@
/obj/machinery/dna_scannernew/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in contents)
A.loc = loc
del(src)
@@ -771,8 +635,8 @@
status += "Emitter Array Pulse Duration: [radduration] <i>Accuracy: ([chance_to_hit])</i></div>"
var/buttons = "<a href='?src=\ref[src];'>Scan</a> "
if(connected) buttons += "<a href='?src=\ref[src];task=togglelock;'>Toggle Bolts</a> "
else buttons += "<span class='linkOff'>Toggle Bolts</span> "
if(connected) buttons += "<a href='?src=\ref[src];task=togglelock;'>Toggle Bolts</a> <a href='?src=\ref[src];task=toggleopen;'>[connected.open ? "Close" : "Open"] Scanner</a> "
else buttons += "<span class='linkOff'>Toggle Bolts</span> <span class='linkOff'>Open Scanner</span> "
if(viable_occupant) buttons += "<a href='?src=\ref[src];task=rejuv'>Inject Rejuvenators</a> "
else buttons += "<span class='linkOff'>Inject Rejuvenators</span> "
if(diskette) buttons += "<a href='?src=\ref[src];task=ejectdisk'>Eject Disk</a> "
@@ -915,6 +779,8 @@
switch(href_list["task"])
if("togglelock")
if(connected) connected.locked = !connected.locked
if("toggleopen")
if(connected) connected.toggle_open()
if("setduration")
if(!num)
num = round(input(usr, "Choose pulse duration:", "Input an Integer", null) as num|null)

View File

@@ -37,7 +37,6 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/const/changeling_amount = 4 //hard limit on changelings if scaling is turned off
var/const/changeling_scaling_coeff = 10 //how much does the amount of players get divided by to determine changelings
/datum/game_mode/changeling/announce()
world << "<B>The current game mode is - Changeling!</B>"
@@ -52,8 +51,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
var/num_changelings = 1
if(config.traitor_scaling)
num_changelings = max(1, round((num_players())/(changeling_scaling_coeff)))
if(config.changeling_scaling_coeff)
num_changelings = max(1, round((num_players())/(config.changeling_scaling_coeff)))
else
num_changelings = max(1, min(num_players(), changeling_amount))
@@ -75,6 +74,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
/datum/game_mode/changeling/post_setup()
for(var/datum/mind/changeling in changelings)
log_game("[changeling.key] (ckey) has been selected as a changeling")
changeling.current.make_changeling()
changeling.special_role = "Changeling"
forge_changeling_objectives(changeling)
@@ -85,6 +85,15 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
..()
return
/datum/game_mode/changeling/make_antag_chance(var/mob/living/carbon/human/character) //Assigns changeling to latejoiners
if(changelings.len >= round(joined_player_list.len / config.changeling_scaling_coeff) + 1) //Caps number of latejoin antagonists
return
if (prob(100/config.changeling_scaling_coeff))
if(character.client.prefs.be_special & BE_CHANGELING)
if(!jobban_isbanned(character.client, "changeling") && !jobban_isbanned(character.client, "Syndicate"))
if(!(character.job in ticker.mode.restricted_jobs))
character.mind.make_Changling()
..()
/datum/game_mode/proc/forge_changeling_objectives(var/datum/mind/changeling)
//OBJECTIVES - Always absorb 5 genomes, plus random traitor objectives.

View File

@@ -3,7 +3,7 @@
if(!mind) return
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
if(!iscarbon(src)) return
verbs += /datum/changeling/proc/EvolutionMenu
var/lesser_form = !ishuman(src)
@@ -66,7 +66,7 @@
/mob/living/carbon/proc/changeling_absorb_dna()
set category = "Changeling"
set name = "Absorb DNA"
var/datum/changeling/changeling = changeling_power(0,0,100)
if(!changeling) return
@@ -205,61 +205,24 @@
changeling.geneticdamage = 30
src << "<span class='warning'>Our genes cry out!</span>"
//TODO replace with monkeyize proc
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in src)
implants += W
monkeyizing = 1
canmove = 0
icon = null
overlays.Cut()
invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
del(animation)
var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey(src)
O.dna = dna
dna = null
for(var/obj/item/W in src)
drop_from_inventory(W)
for(var/obj/T in src)
del(T)
O.loc = loc
O.name = "monkey ([copytext(md5(real_name), 2, 6)])"
O.setToxLoss(getToxLoss())
O.adjustBruteLoss(getBruteLoss())
O.setOxyLoss(getOxyLoss())
O.adjustFireLoss(getFireLoss())
O.stat = stat
O.a_intent = "harm"
for(var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
mind.transfer_to(O)
var/mob/living/carbon/monkey/O = monkeyize(TR_KEEPITEMS | TR_HASHNAME | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPSE | TR_KEEPSRC)
O.make_changeling(1)
O.verbs += /mob/living/carbon/proc/changeling_lesser_transform
feedback_add_details("changeling_powers","LF")
. = 1
del(src)
return 1
return
//Transform into a human
/mob/living/carbon/proc/changeling_lesser_transform()
set category = "Changeling"
set name = "Transform (1)"
var/datum/changeling/changeling = changeling_power(1,1,0)
if(!changeling) return
var/list/names = list()
@@ -278,67 +241,20 @@
visible_message("<span class='warning'>[src] transforms!</span>")
dna = chosen_dna
var/list/implants = list()
for (var/obj/item/weapon/implant/I in src) //Still preserving implants
implants += I
var/mob/living/carbon/human/O = humanize((TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPSRC),chosen_dna.real_name)
monkeyizing = 1
canmove = 0
icon = null
overlays.Cut()
invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
del(animation)
for(var/obj/item/W in src)
u_equip(W)
if (client)
client.screen -= W
if (W)
W.loc = loc
W.dropped(src)
W.layer = initial(W.layer)
var/mob/living/carbon/human/O = new /mob/living/carbon/human( src )
O.gender = (deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 2)-1) ? FEMALE : MALE
O.dna = dna
dna = null
O.real_name = chosen_dna.real_name
for(var/obj/T in src)
del(T)
O.loc = loc
updateappearance(O)
domutcheck(O, null)
O.setToxLoss(getToxLoss())
O.adjustBruteLoss(getBruteLoss())
O.setOxyLoss(getOxyLoss())
O.adjustFireLoss(getFireLoss())
O.stat = stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
mind.transfer_to(O)
O.make_changeling()
feedback_add_details("changeling_powers","LFT")
. = 1
del(src)
return 1
return
//Fake our own death and fully heal. You will appear to be dead but regenerate fully after a short delay.
/mob/living/carbon/proc/changeling_fakedeath()
set category = "Changeling"
set name = "Regenerative Stasis (20)"
var/datum/changeling/changeling = changeling_power(20,1,100,DEAD)
if(!changeling) return

View File

@@ -8,7 +8,6 @@
recommended_enemies = 3
var/const/changeling_amount = 1 //hard limit on changelings if scaling is turned off
var/const/changeling_scaling_coeff = 25 //how much does the amount of players get divided by to determine changelings
/datum/game_mode/traitor/changeling/announce()
world << "<B>The current game mode is - Traitor+Changeling!</B>"
@@ -23,8 +22,8 @@
var/num_changelings = 1
if(config.traitor_scaling)
num_changelings = max(1, round((num_players())/(changeling_scaling_coeff)))
if(config.changeling_scaling_coeff)
num_changelings = max(1, round((num_players())/(config.changeling_scaling_coeff*2)))
else
num_changelings = max(1, min(num_players(), changeling_amount))
@@ -51,4 +50,14 @@
forge_changeling_objectives(changeling)
greet_changeling(changeling)
..()
return
return
/datum/game_mode/traitor/changeling/make_antag_chance(var/mob/living/carbon/human/character) //Assigns changeling to latejoiners
if(changelings.len >= round(joined_player_list.len / (config.changeling_scaling_coeff*2)) + 1) //Caps number of latejoin antagonists
return
if (prob(100/(config.changeling_scaling_coeff*2)))
if(character.client.prefs.be_special & BE_CHANGELING)
if(!jobban_isbanned(character.client, "changeling") && !jobban_isbanned(character.client, "Syndicate"))
if(!(character.job in ticker.mode.restricted_jobs))
character.mind.make_Changling()
..()

View File

@@ -74,6 +74,7 @@
var/datum/mind/cultist = pick(cultists_possible)
cultists_possible -= cultist
cult += cultist
log_game("[cultist.key] (ckey) has been selected as a cultist")
return (cult.len>0)

View File

@@ -70,6 +70,10 @@
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
return 1
///make_antag_chance()
///Handles late-join antag assignments
/datum/game_mode/proc/make_antag_chance(var/mob/living/carbon/human/character)
return
///process()
///Called by the gameticker
@@ -302,7 +306,6 @@
if(P.client && P.ready)
. ++
///////////////////////////////////
//Keeps track of all living heads//
///////////////////////////////////

View File

@@ -236,12 +236,15 @@ var/global/datum/controller/gameticker/ticker
proc/create_characters()
for(var/mob/new_player/player in player_list)
if(player.ready && player.mind)
joined_player_list += player.ckey
if(player.mind.assigned_role=="AI")
player.close_spawn_windows()
player.AIize()
else
player.create_character()
del(player)
else
player.new_player_panel()
proc/collect_minds()

View File

@@ -31,6 +31,7 @@
for(var/mob/new_player/player in player_list)
if(player.mind && player.mind.assigned_role == "AI")
malf_ai+=player.mind
log_game("[malf_ai.key] (ckey) has been selected as a malf AI")
if(malf_ai.len)
return 1
return 0
@@ -133,7 +134,7 @@
if (station_captured && !to_nuke_or_not_to_nuke)
return 1
if (is_malf_ai_dead())
if(config.continous_rounds)
if(config.continuous_round_malf)
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 0
malf_mode_declared = 0

View File

@@ -54,6 +54,7 @@
for(var/datum/mind/synd_mind in syndicates)
synd_mind.assigned_role = "MODE" //So they aren't chosen for other jobs.
synd_mind.special_role = "Syndicate"//So they actually have a special role/N
log_game("[synd_mind.key] (ckey) has been selected as a nuclear operative")
return 1

View File

@@ -63,6 +63,7 @@
var/datum/mind/lenin = pick(possible_headrevs)
possible_headrevs -= lenin
head_revolutionaries += lenin
log_game("[lenin.key] (ckey) has been selected as a head rev")
if((head_revolutionaries.len==0)||(!head_check))
return 0
@@ -167,7 +168,7 @@
//Checks if the round is over//
///////////////////////////////
/datum/game_mode/revolution/check_finished()
if(config.continous_rounds)
if(config.continuous_round_rev)
if(finished != 0)
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 0

View File

@@ -19,7 +19,6 @@
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/traitors_possible = 4 //hard limit on traitors if scaling is turned off
var/const/traitor_scaling_coeff = 5.0 //how much does the amount of players get divided by to determine traitors
/datum/game_mode/traitor/announce()
@@ -40,8 +39,8 @@
var/num_traitors = 1
if(config.traitor_scaling)
num_traitors = max(1, round((num_players())/(traitor_scaling_coeff)))
if(config.traitor_scaling_coeff)
num_traitors = max(1, round((num_players())/(config.traitor_scaling_coeff)))
else
num_traitors = max(1, min(num_players(), traitors_possible))
@@ -56,8 +55,10 @@
var/datum/mind/traitor = pick(possible_traitors)
traitors += traitor
traitor.special_role = "traitor"
log_game("[traitor.key] (ckey) has been selected as a traitor")
possible_traitors.Remove(traitor)
if(!traitors.len)
return 0
return 1
@@ -75,6 +76,15 @@
..()
return 1
/datum/game_mode/traitor/make_antag_chance(var/mob/living/carbon/human/character) //Assigns traitor to latejoiners
if(traitors.len >= round(joined_player_list.len / config.traitor_scaling_coeff) + 1) //Caps number of latejoin antagonists
return
if (prob(100/config.traitor_scaling_coeff))
if(character.client.prefs.be_special & BE_TRAITOR)
if(!jobban_isbanned(character.client, "traitor") && !jobban_isbanned(character.client, "Syndicate"))
if(!(character.job in ticker.mode.restricted_jobs))
character.mind.make_Tratior()
..()
/datum/game_mode/proc/forge_traitor_objectives(var/datum/mind/traitor)
if(istype(traitor.current, /mob/living/silicon))
@@ -273,4 +283,4 @@
else
traitor_mob << "Unfortunately, the Syndicate did not provide you with a code response."
traitor_mob << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe."
//End code phrase.
//End code phrase.

View File

@@ -49,6 +49,7 @@
/datum/game_mode/wizard/post_setup()
for(var/datum/mind/wizard in wizards)
log_game("[wizard.key] (ckey) has been selected as a Wizard")
forge_wizard_objectives(wizard)
//learn_basic_spells(wizard.current)
equip_wizard(wizard.current)
@@ -182,7 +183,7 @@
/datum/game_mode/wizard/check_finished()
if(config.continous_rounds)
if(config.continuous_round_wiz)
return ..()
var/wizards_alive = 0

View File

@@ -177,13 +177,11 @@
switch(job)
if("VIP Guest")
return list(access_cent_general)
if("Prisoner")
return
if("Custodian")
return list(access_cent_general, access_cent_living, access_cent_storage)
if("Thunderdome Overseer")
return list(access_cent_general, access_cent_thunder)
if("Intel Officer")
if("CentCom Official")
return list(access_cent_general, access_cent_living)
if("Medical Officer")
return list(access_cent_general, access_cent_living, access_cent_medical)
@@ -191,9 +189,11 @@
return list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)
if("Research Officer")
return list(access_cent_general, access_cent_specops, access_cent_medical, access_cent_teleporter, access_cent_storage)
if("BlackOps Commander")
if("Special Ops Officer")
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_living, access_cent_storage, access_cent_creed)
if("Supreme Commander")
if("Admiral")
return get_all_centcom_access()
if("CentCom Commander")
return get_all_centcom_access()
/proc/get_all_accesses()
@@ -259,7 +259,7 @@
if(access_cargo)
return "Cargo Bay"
if(access_cargo_bot)
return "Cargo Bot Delivery"
return "Delivery Chutes"
if(access_security)
return "Security"
if(access_brig)
@@ -281,7 +281,7 @@
if(access_chemistry)
return "Chemistry Lab"
if(access_rd)
return "Research Director"
return "RD Office"
if(access_bar)
return "Bar"
if(access_janitor)
@@ -321,7 +321,7 @@
if(access_armory)
return "Armory"
if(access_construction)
return "Construction Areas"
return "Construction"
if(access_kitchen)
return "Kitchen"
if(access_hydroponics)
@@ -335,7 +335,7 @@
if(access_virology)
return "Virology"
if(access_cmo)
return "Chief Medical Officer"
return "CMO Office"
if(access_qm)
return "Quartermaster"
if(access_clown)
@@ -367,15 +367,15 @@
if(access_xenobiology)
return "Xenobiology Lab"
if(access_hop)
return "Head of Personnel"
return "HoP Office"
if(access_hos)
return "Head of Security"
return "HoS Office"
if(access_ce)
return "Chief Engineer"
return "CE Office"
if(access_RC_announce)
return "RC Announcements"
if(access_keycard_auth)
return "Keycode Auth. Device"
return "Keycode Auth."
if(access_tcomsat)
return "Telecommunications"
if(access_gateway)
@@ -410,10 +410,13 @@
"Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist",
"Research Director", "Scientist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer")
/proc/get_all_centcom_jobs()
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
proc/get_all_job_icons() //For all existing HUD icons
return get_all_jobs() + list("Prisoner")
/obj/proc/GetJobName()
/proc/get_all_centcom_jobs()
return list("VIP Guest","Custodian","Thunderdome Overseer","CentCom Official","Medical Officer","Death Commando","Research Officer","Special Ops Officer","Admiral","CentCom Commander")
/obj/proc/GetJobName() //Used in secHUD icon generation
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
return
@@ -425,8 +428,8 @@
if(istype(src, /obj/item/weapon/card/id))
jobName = src:assignment
if(jobName in get_all_jobs()) //Check station jobs
if(jobName in get_all_job_icons()) //Check if the job has a hud icon
return jobName
if(jobName == "Prisoner") //Check for Prisoner
return "Prisoner"
if(jobName in get_all_centcom_jobs()) //Return with the NT logo if it is a Centcom job
return "Centcom"
return "Unknown" //Return unknown if none of the above apply

View File

@@ -1090,7 +1090,7 @@ Code shamelessly copied from apc_frame
if (!(ndir in cardinal))
return
var/turf/loc = get_turf_loc(usr)
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Air Alarm cannot be placed on this spot."
@@ -1452,7 +1452,7 @@ Code shamelessly copied from apc_frame
if (!(ndir in cardinal))
return
var/turf/loc = get_turf_loc(usr)
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Fire Alarm cannot be placed on this spot."

View File

@@ -255,7 +255,7 @@ Rate: [volume_rate] L/sec<BR>"}
if(href_list["adj_pressure"])
var/change = text2num(href_list["adj_pressure"])
pressure_setting = between(0, pressure_setting + change, 50*ONE_ATMOSPHERE)
pressure_setting = Clamp(pressure_setting + change, 0, 50*ONE_ATMOSPHERE)
spawn(1)
src.updateDialog()
return

View File

@@ -88,35 +88,35 @@
usr << t
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe_meter(src.loc)
del(src)
return
..()
/obj/machinery/meter/Click()
/obj/machinery/meter/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/meter/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/meter/attack_hand(var/mob/user as mob)
if(stat & (NOPOWER|BROKEN))
return 1
var/t = null
if (get_dist(usr, src) <= 3 || istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead))
t += status()
else
usr << "\blue <B>You are too far away.</B>"
var/t = null
usr << status()
return 1
usr << t
return 1
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe_meter(src.loc)
del(src)
// TURF METER - REPORTS A TILE'S AIR CONTENTS
/obj/machinery/meter/turf/New()
@@ -129,5 +129,3 @@
if (!target)
src.target = loc
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
return

View File

@@ -16,7 +16,7 @@
anchored = 1.0
var/panel_open = 0 // 0 = Closed / 1 = Open
var/invuln = null
var/bugged = 0
var/obj/item/device/camera_bug/bug = null
var/obj/item/weapon/camera_assembly/assembly = null
//OTHER
@@ -44,6 +44,11 @@
*/
..()
/obj/machinery/camera/Del()
if(istype(bug))
bug.bugged_cameras -= src.c_tag
..()
/obj/machinery/camera/emp_act(severity)
if(!isEmpProof())
if(prob(100/severity))
@@ -62,12 +67,10 @@
if(can_use())
cameranet.addCamera(src)
for(var/mob/O in mob_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
if (S.current == src)
O.unset_machine()
O.reset_view(null)
O << "The screen bursts into static."
if (O.client && O.client.eye == src)
O.unset_machine()
O.reset_view(null)
O << "The screen bursts into static."
..()
@@ -103,7 +106,7 @@
/obj/machinery/camera/attackby(W as obj, mob/living/user as mob)
// DECONSTRUCTION
if(isscrewdriver(W))
if(istype(W, /obj/item/weapon/screwdriver))
//user << "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>"
//if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown
panel_open = !panel_open
@@ -111,10 +114,10 @@
"<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
else if((iswirecutter(W) || ismultitool(W)) && panel_open)
else if((istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool)) && panel_open)
wires.Interact(user)
else if(iswelder(W) && wires.CanDeconstruct())
else if(istype(W, /obj/item/weapon/weldingtool) && wires.CanDeconstruct())
if(weld(W, user))
if(assembly)
assembly.loc = src.loc
@@ -138,28 +141,28 @@
P = W
itemname = P.name
info = P.notehtml
U << "You hold \a [itemname] up to the camera ..."
U << "You hold \the [itemname] up to the camera ..."
for(var/mob/O in player_list)
if(istype(O, /mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = O
if(U.name == "Unknown") AI << "<b>[U]</b> holds <a href='?_src_=usr;show_paper=1;'>\a [itemname]</a> up to one of your cameras ..."
else AI << "<b><a href='byond://?src=\ref[O];track2=\ref[O];track=\ref[U]'>[U]</a></b> holds <a href='?_src_=usr;show_paper=1;'>\a [itemname]</a> up to one of your cameras ..."
AI.last_paper_seen = "<HTML><HEAD><TITLE>[itemname]</TITLE></HEAD><BODY><TT>[info]</TT></BODY></HTML>"
else if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
if (S.current == src)
O << "[U] holds \a [itemname] up to one of the cameras ..."
O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
else if (istype(W, /obj/item/weapon/camera_bug))
else if (O.client && O.client.eye == src)
O << "[U] holds \a [itemname] up to one of the cameras ..."
O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
else if (istype(W, /obj/item/device/camera_bug))
if (!src.can_use())
user << "\blue Camera non-functional"
return
if (src.bugged)
if(istype(src.bug))
user << "\blue Camera bug removed."
src.bugged = 0
src.bug.bugged_cameras -= src.c_tag
src.bug = null
else
user << "\blue Camera bugged."
src.bugged = 1
src.bug = W
src.bug.bugged_cameras[src.c_tag] = src
else if(istype(W, /obj/item/weapon/melee/energy/blade))//Putting it here last since it's a special case. I wonder if there is a better way to do these than type casting.
deactivate(user,2)//Here so that you can disconnect anyone viewing the camera, regardless if it's on or off.
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
@@ -198,12 +201,10 @@
//Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they can't use it anyway?
for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
if (S.current == src)
O.unset_machine()
O.reset_view(null)
O << "The screen bursts into static."
if (O.client && O.client.eye == src)
O.unset_machine()
O.reset_view(null)
O << "The screen bursts into static."
/obj/machinery/camera/proc/triggerCameraAlarm()
alarm_on = 1

View File

@@ -28,7 +28,7 @@
if(0)
// State 0
if(iswrench(W) && isturf(src.loc))
if(istype(W, /obj/item/weapon/wrench) && isturf(src.loc))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You wrench the assembly into place."
anchored = 1
@@ -39,14 +39,14 @@
if(1)
// State 1
if(iswelder(W))
if(istype(W, /obj/item/weapon/weldingtool))
if(weld(W, user))
user << "You weld the assembly securely into place."
anchored = 1
state = 2
return
else if(iswrench(W))
else if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You unattach the assembly from it's place."
anchored = 0
@@ -56,14 +56,14 @@
if(2)
// State 2
if(iscoil(W))
if(istype(W, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/C = W
if(C.use(2))
user << "You add wires to the assembly."
state = 3
return
else if(iswelder(W))
else if(istype(W, /obj/item/weapon/weldingtool))
if(weld(W, user))
user << "You unweld the assembly from it's place."
@@ -74,7 +74,7 @@
if(3)
// State 3
if(isscrewdriver(W))
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
@@ -108,7 +108,7 @@
break
return
else if(iswirecutter(W))
else if(istype(W, /obj/item/weapon/wirecutters))
new/obj/item/weapon/cable_coil(get_turf(src), 2)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
@@ -125,7 +125,7 @@
return
// Taking out upgrades
else if(iscrowbar(W) && upgrades.len)
else if(istype(W, /obj/item/weapon/crowbar) && upgrades.len)
var/obj/U = locate(/obj) in upgrades
if(U)
user << "You unattach an upgrade from the assembly."

View File

@@ -42,7 +42,7 @@
if ((M.stat != 2) || (!M.client))
continue
//They need a brain!
if (!getbrain(M))
if (ishuman(M) && !getbrain(M))
continue
if (M.ckey == find_key)

View File

@@ -66,7 +66,7 @@
if (I && istype(I))
if(src.check_access(I))
authenticated = 1
if(20 in I.access)
if((20 in I.access) || src.emagged)
authenticated = 2
if("logout")
authenticated = 0
@@ -264,8 +264,10 @@
src.updateUsrDialog()
/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/card/emag/))
if((istype(I,/obj/item/weapon/card/emag/)) && (!src.emagged))
src.emagged = 1
if(authenticated == 1)
authenticated = 2
user << "You scramble the communication routing circuits!"
..()

View File

@@ -57,7 +57,7 @@
message = rebootmsg
else
user << "<span class='notice'>A no server error appears on the screen.</span>"
if(isscrewdriver(O) && emag)
if(istype(O, /obj/item/weapon/screwdriver) && emag)
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
user << "<span class='warning'>It is too hot to mess with!</span>"
return

View File

@@ -47,7 +47,7 @@
var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in
if(M.z == 1 && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf_loc(M)
var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc
dat += "ID: [T.id] | Location: [loc_display]<BR>"
dat += "<A href='?src=\ref[src];warn=\ref[T]'>(<font class='bad'><i>Message Holder</i></font>)</A> |<BR>"

View File

@@ -5,9 +5,9 @@
desc = "A wall-mounted flashbulb device."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "mflash1"
var/obj/item/device/flash/bulb = null
var/id = null
var/range = 2 //this is roughly the size of brig cell
var/disable = 0
var/last_flash = 0 //Don't want it getting spammed like regular flashes
var/strength = 10 //How weakened targets are when flashed.
var/base_state = "mflash"
@@ -16,36 +16,48 @@
/obj/machinery/flasher/portable //Portable version of the flasher. Only flashes when anchored
name = "portable flasher"
desc = "A portable flashing device. Wrench to activate and deactivate. Cannot detect slow movements."
icon_state = "pflash1"
icon_state = "pflash1-p"
strength = 8
anchored = 0
base_state = "pflash"
density = 1
/*
/obj/machinery/flasher/New()
sleep(4) //<--- What the fuck are you doing? D=
src.sd_SetLuminosity(2)
*/
if(isnull(bulb))
bulb = new /obj/item/device/flash(src)
/obj/machinery/flasher/power_change()
if ( powered() )
if ( powered() && bulb && anchored)
stat &= ~NOPOWER
icon_state = "[base_state]1"
// src.sd_SetLuminosity(2)
if(bulb.broken)
icon_state = "[base_state]1-p"
else
icon_state = "[base_state]1"
else
stat |= ~NOPOWER
icon_state = "[base_state]1-p"
// src.sd_SetLuminosity(0)
//Don't want to render prison breaks impossible
/obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wirecutters))
add_fingerprint(user)
src.disable = !src.disable
if (src.disable)
user.visible_message("\red [user] has disconnected the [src]'s flashbulb!", "\red You disconnect the [src]'s flashbulb!")
if (!src.disable)
user.visible_message("\red [user] has connected the [src]'s flashbulb!", "\red You connect the [src]'s flashbulb!")
if (bulb)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] has disconnected [src]'s flashbulb!</span>", "<span class='notice'>You disconnect [src]'s flashbulb!</span>")
bulb.loc = src.loc
bulb = null
src.power_change()
if (istype(W, /obj/item/device/flash))
add_fingerprint(user)
if (isnull(bulb))
user.visible_message("<span class='notice'>[user] installs [W] into [src].</span>", "<span class='notice'>You install [W] into [src].</span>")
user.drop_item()
W.loc = src
bulb = W
src.power_change()
else
user << "<span class='notice'>A flashbulb is already installed in [src].</span>"
//Let the AI trigger them directly.
/obj/machinery/flasher/attack_ai()
@@ -55,10 +67,10 @@
return
/obj/machinery/flasher/proc/flash()
if (!(powered()))
if (!(powered()) || (isnull(bulb)))
return
if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150))
if ((bulb.broken) || (src.last_flash && world.time < src.last_flash + 150))
return
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
@@ -94,10 +106,13 @@
return
if(prob(75/severity))
flash()
bulb.broken = 1
bulb.icon_state = "flashburnt"
src.power_change()
..(severity)
/obj/machinery/flasher/portable/HasProximity(atom/movable/AM as mob|obj)
if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150))
if (src.last_flash && world.time < src.last_flash + 150)
return
if(istype(AM, /mob/living/carbon))
@@ -105,18 +120,30 @@
if ((M.m_intent != "walk") && (src.anchored))
src.flash()
/obj/machinery/flasher/portable/flash()
..()
if(prob(4)) //Small chance to burn out on use
bulb.broken = 1
bulb.icon_state = "flashburnt"
src.power_change()
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
add_fingerprint(user)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
src.anchored = !src.anchored
if (!src.anchored)
user.show_message(text("\red [src] can now be moved."))
src.overlays.Cut()
src.power_change()
else if (src.anchored)
user.show_message(text("\red [src] is now secured."))
src.overlays += "[base_state]-s"
src.power_change()
else
..()
/obj/machinery/flasher_button/attack_ai(mob/user as mob)
return src.attack_hand(user)

View File

@@ -30,18 +30,6 @@
input = /obj/item/weapon/reagent_containers/food/snacks/meat
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
meat2
input = /obj/item/weapon/syntiflesh
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
/*
monkeymeat
input = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
humanmeat
input = /obj/item/weapon/reagent_containers/food/snacks/meat/human
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
*/
potato
input = /obj/item/weapon/reagent_containers/food/snacks/grown/potato
output = /obj/item/weapon/reagent_containers/food/snacks/fries

View File

@@ -215,7 +215,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/datum/gas_mixture/environment = loc.return_air()
switch(environment.temperature)
if(T0C to (T20C + 20))
integrity = between(0, integrity, 100)
integrity = Clamp(integrity, 0, 100)
if((T20C + 20) to (T0C + 70))
integrity = max(0, integrity - 1)
if(delay)

View File

@@ -555,7 +555,7 @@
if(src)
src.process()
if(href_list["scan_range"])
src.scan_range = between(1,src.scan_range+text2num(href_list["scan_range"]),8)
src.scan_range = Clamp(src.scan_range+text2num(href_list["scan_range"]), 1, 8)
if(href_list["scan_for"])
if(href_list["scan_for"] in scan_for)
scan_for[href_list["scan_for"]] = !scan_for[href_list["scan_for"]]
@@ -626,20 +626,23 @@
var/target_y = targloc.y
var/target_z = targloc.z
targloc = null
spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
if(!src) break
var/turf/curloc = get_turf(src)
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
if (!targloc || !curloc)
continue
if (targloc == curloc)
continue
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
var/obj/item/projectile/A = new /obj/item/projectile(curloc)
src.projectiles--
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
A.process()
sleep(2)
spawn(-1)
for(var/i=1 to min(projectiles, projectiles_per_shot))
if(!src) break
var/turf/curloc = get_turf(src)
var/dx = round(gaussian(0,deviation),1)
var/dy = round(gaussian(0,deviation),1)
targloc = locate(target_x+dx, target_y+dy, target_z)
if (!targloc || !curloc)
continue
if (targloc == curloc)
continue
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
var/obj/item/projectile/A = new /obj/item/projectile(curloc)
src.projectiles--
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
A.process()
sleep(2)
return

View File

@@ -203,7 +203,9 @@
var/target_z = targloc.z
targloc = null
for(var/i=1 to min(projectiles, projectiles_per_shot))
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
var/dx = round(gaussian(0,deviation),1)
var/dy = round(gaussian(0,deviation),1)
targloc = locate(target_x+dx, target_y+dy, target_z)
if(!targloc || targloc == curloc)
break
playsound(chassis, fire_sound, 80, 1)
@@ -242,7 +244,9 @@
spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
if(!chassis) break
var/turf/curloc = get_turf(chassis)
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
var/dx = round(gaussian(0,deviation),1)
var/dy = round(gaussian(0,deviation),1)
targloc = locate(target_x+dx, target_y+dy, target_z)
if (!targloc || !curloc)
continue
if (targloc == curloc)

View File

@@ -642,7 +642,7 @@
var/index = filter.getNum("index")
var/new_index = index + filter.getNum("queue_move")
if(isnum(index) && isnum(new_index))
if(InRange(new_index,1,queue.len))
if(IsInRange(new_index,1,queue.len))
queue.Swap(index,new_index)
return update_queue_on_page()
if(href_list["clear_queue"])

View File

@@ -19,7 +19,7 @@
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf_loc(usr)
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red APC cannot be placed on this spot."

View File

@@ -74,7 +74,7 @@ move an amendment</a> to the drawing.</p>
/obj/item/blueprints/proc/get_area()
var/turf/T = get_turf_loc(usr)
var/turf/T = get_turf(usr)
var/area/A = T.loc
A = A.master
return A
@@ -101,7 +101,7 @@ move an amendment</a> to the drawing.</p>
/obj/item/blueprints/proc/create_area()
//world << "DEBUG: create_area"
var/res = detect_room(get_turf_loc(usr))
var/res = detect_room(get_turf(usr))
if(!istype(res,/list))
switch(res)
if(ROOM_ERR_SPACE)

View File

@@ -392,7 +392,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (3)
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
var/turf/T = get_turf_or_move(user.loc)
var/turf/T = get_turf(user.loc)
if (isnull(T))
dat += "Unable to obtain a reading.<br>"
else
@@ -655,7 +655,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("1") // Configure pAI device
pai.attack_self(U)
if("2") // Eject pAI device
var/turf/T = get_turf_or_move(src.loc)
var/turf/T = get_turf(src.loc)
if(T)
pai.loc = T

View File

@@ -0,0 +1,353 @@
#define VANILLA_BUG 0
#define UNIVERSAL_BUG 1
#define NETWORK_BUG 2
#define SABOTAGE_BUG 3
#define ADVANCED_BUG 4
#define ADMIN_BUG 5
#define BUGMODE_LIST 0
#define BUGMODE_MONITOR 1
#define BUGMODE_TRACK 2
/obj/item/device/camera_bug
name = "camera bug"
desc = "For illicit snooping through the camera network."
icon = 'icons/obj/device.dmi'
icon_state = "mindflash2"
w_class = 1.0
item_state = "electronic"
throw_speed = 4
throw_range = 20
var/obj/machinery/camera/current = null
var/obj/item/expansion = null
var/bugtype = VANILLA_BUG
var/last_net_update = 0
var/last_bugtype = VANILLA_BUG
var/list/bugged_cameras = list()
var/skip_bugcheck = 0
var/track_mode = BUGMODE_LIST
var/last_tracked = 0
var/refresh_interval = 50
var/tracked_name = null
var/atom/tracking = null
var/last_found = null
var/last_seen = null
/obj/item/device/camera_bug/New()
..()
processing_objects += src
/obj/item/device/camera_bug/interact(var/mob/user = usr)
var/datum/browser/popup = new(user, "camerabug","Camera Bug",nref=src)
popup.set_content(menu(get_cameras()))
popup.open()
/obj/item/device/camera_bug/attack_self(mob/user as mob)
user.set_machine(src)
interact(user)
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
if (user.stat || loc != user || !user.canmove || user.blinded || !current)
user.reset_view(null)
user.unset_machine()
return null
var/turf/T = get_turf(user.loc)
if(T.z != current.z || (!skip_bugcheck && current.bug != src) || !current.can_use())
user << "\red [src] has lost the signal."
current = null
user.reset_view(null)
user.unset_machine()
return null
return 1
/obj/item/device/camera_bug/proc/get_cameras()
if(bugtype != last_bugtype || ( (bugtype in list(UNIVERSAL_BUG,NETWORK_BUG,ADMIN_BUG)) && world.time > (last_net_update + 100)))
bugged_cameras = list()
last_bugtype = bugtype
for(var/obj/machinery/camera/camera in cameranet.cameras)
if(camera.stat || !camera.can_use())
continue
switch(bugtype)
if(VANILLA_BUG,SABOTAGE_BUG,ADVANCED_BUG)
if(camera.bug == src)
bugged_cameras[camera.c_tag] = camera
if(UNIVERSAL_BUG)
if(camera.bug)
bugged_cameras[camera.c_tag] = camera
if(NETWORK_BUG,ADMIN_BUG)
if(length(list("SS13","MINE")&camera.network))
bugged_cameras[camera.c_tag] = camera
bugged_cameras = sortAssoc(bugged_cameras)
return bugged_cameras
/obj/item/device/camera_bug/proc/menu(var/list/cameras)
if(!cameras || !cameras.len)
return "No bugged cameras found."
var/html
switch(track_mode)
if(BUGMODE_LIST)
html = "<h3>Select a camera:</h3> <a href='?src=\ref[src];view'>\[Cancel camera view\]</a><hr><table>"
for(var/entry in cameras)
var/obj/machinery/camera/C = cameras[entry]
var/functions = ""
switch(bugtype)
if(SABOTAGE_BUG)
functions = " - <a href='?src=\ref[src];emp=\ref[C]'>\[Disable\]</a>"
if(ADVANCED_BUG)
functions = " - <a href='?src=\ref[src];monitor=\ref[C]'>\[Monitor\]</a>"
if(ADMIN_BUG)
if(C.bug == src)
functions = " - <a href='?src=\ref[src];monitor=\ref[C]'>\[Monitor\]</a> <a href='?src=\ref[src];emp=\ref[C]'>\[Disable\]</a>"
else
functions = " - <a href='?src=\ref[src];monitor=\ref[C]'>\[Monitor\]</a>"
html += "<tr><td><a href='?src=\ref[src];view=\ref[C]'>[entry]</a></td><td>[functions]</td></tr>"
if(BUGMODE_MONITOR)
if(current)
html = "Analyzing Camera '[current.c_tag]' <a href='?\ref[src];mode=0'>\[Select Camera\]</a><br>"
html += camera_report()
else
track_mode = BUGMODE_LIST
return .(cameras)
if(BUGMODE_TRACK)
if(tracking)
html = "Tracking '[tracked_name]' <a href='?\ref[src];mode=0'>\[Cancel Tracking\]</a> <a href='?src=\ref[src];view'>\[Cancel camera view\]</a><br>"
if(last_found)
var/time_diff = round((world.time - last_seen) / 150)
var/obj/machinery/camera/C = bugged_cameras[last_found]
var/outstring
if(C)
outstring = "<a href='?\ref[src];view=\ref[C]'>[last_found]</a>"
else
outstring = last_found
if(!time_diff)
html += "Last seen near [outstring] (now)<br>"
else
// 15 second intervals ~ 1/4 minute
var/m = round(time_diff/4)
var/s = (time_diff - 4*m) * 15
if(!s) s = "00"
html += "Last seen near [outstring] ([m]:[s] minute\s ago)<br>"
else
html += "Not yet seen."
else
track_mode = BUGMODE_LIST
return .(cameras)
return html
/obj/item/device/camera_bug/proc/camera_report()
// this should only be called if current exists
var/dat = ""
if(current && current.can_use())
var/list/seen = current.can_see()
var/list/names = list()
for(var/obj/machinery/singularity/S in seen) // god help you if you see more than one
if(S.name in names)
names[S.name]++
dat += "[S.name] ([names[S.name]])"
else
names[S.name] = 1
dat += "[S.name]"
var/stage = round(S.current_size / 2)+1
dat += " (Stage [stage])"
dat += " <a href='?\ref[src];track=\ref[S]'>\[Track\]</a><br>"
for(var/obj/mecha/M in seen)
if(M.name in names)
names[M.name]++
dat += "[M.name] ([names[M.name]])"
else
names[M.name] = 1
dat += "[M.name]"
dat += " <a href='?\ref[src];track=\ref[M]'>\[Track\]</a><br>"
for(var/mob/living/M in seen)
if(M.name in names)
names[M.name]++
dat += "[M.name] ([names[M.name]])"
else
names[M.name] = 1
dat += "[M.name]"
if(M.buckled && !M.lying)
dat += " (Sitting)"
if(M.lying)
dat += " (Laying down)"
dat += " <a href='?\ref[src];track=\ref[M]'>\[Track\]</a><br>"
if(length(dat) == 0)
dat += "No motion detected."
return dat
else
return "Camera Offline<br>"
/obj/item/device/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
usr.reset_view(null)
usr << browse(null, "window=camerabug")
return
usr.set_machine(src)
if("mode" in href_list)
track_mode = text2num(href_list["mode"])
if("monitor" in href_list)
var/obj/machinery/camera/C = locate(href_list["monitor"])
if(C)
track_mode = BUGMODE_MONITOR
current = C
usr.reset_view(null)
interact()
if("track" in href_list)
var/atom/A = locate(href_list["track"])
if(A)
tracking = A
tracked_name = A.name
last_found = current.c_tag
last_seen = world.time
track_mode = BUGMODE_TRACK
if("emp" in href_list)
var/obj/machinery/camera/C = locate(href_list["emp"])
if(istype(C) && C.bug == src)
C.emp_act(1)
C.bug = null
bugged_cameras -= C.c_tag
interact()
return
if("close" in href_list)
usr.reset_view(null)
usr.unset_machine()
current = null
return // I do not <- I do not remember what I was going to write in this comment -Sayu, sometime later
if("view" in href_list)
var/obj/machinery/camera/C = locate(href_list["view"])
if(istype(C))
if(!C.can_use())
usr << "\red Something's wrong with that camera. You can't get a feed."
return
var/turf/T = get_turf(loc)
if(!T || C.z != T.z)
usr << "\red You can't get a signal."
return
current = C
spawn(6)
if(src.check_eye(usr))
usr.reset_view(C)
interact()
else
usr.unset_machine()
usr.reset_view(null)
usr << browse(null, "window=camerabug")
return
else
usr.unset_machine()
usr.reset_view(null)
interact()
/obj/item/device/camera_bug/process()
if(track_mode == BUGMODE_LIST || (world.time < (last_tracked + refresh_interval)))
return
last_tracked = world.time
if(track_mode == BUGMODE_TRACK ) // search for user
// Note that it will be tricked if your name appears to change.
// This is not optimal but it is better than tracking you relentlessly despite everything.
if(!tracking)
src.updateSelfDialog()
return
if(tracking.name != tracked_name) // Hiding their identity, tricksy
var/mob/M = tracking
if(istype(M))
if(!(tracked_name == "Unknown" && findtext(tracking.name,"Unknown"))) // we saw then disguised before
if(!(tracked_name == M.real_name && findtext(tracking.name,M.real_name))) // or they're still ID'd
src.updateSelfDialog()//But if it's neither of those cases
return // you won't find em on the cameras
else
src.updateSelfDialog()
return
var/list/tracking_cams = list()
var/list/b_cams = get_cameras()
for(var/entry in b_cams)
tracking_cams += b_cams[entry]
var/list/target_region = view(tracking)
for(var/obj/machinery/camera/C in (target_region & tracking_cams))
if(!can_see(C,tracking)) // target may have xray, that doesn't make them visible to cameras
continue
if(C.can_use())
last_found = C.c_tag
last_seen = world.time
break
src.updateSelfDialog()
/obj/item/device/camera_bug/attackby(var/obj/item/W as obj,var/mob/living/user as mob)
if(istype(W,/obj/item/weapon/screwdriver) && expansion)
expansion.loc = get_turf(loc)
user << "You unscrew [expansion]."
user.put_in_inactive_hand(expansion)
expansion = null
bugtype = VANILLA_BUG
skip_bugcheck = 0
track_mode = BUGMODE_LIST
tracking = null
return
if(expansion || !W)
return ..(W,user)
// I am not sure that this list is or should be final
// really I do not know what to do here.
var/static/list/expandables = list(
/obj/item/weapon/research = ADMIN_BUG, // could have been anything spawn-only
// these are all so hackish I am sorry
/obj/item/device/analyzer = UNIVERSAL_BUG,
/obj/item/weapon/stock_parts/subspace/analyzer = UNIVERSAL_BUG,
/obj/item/device/assembly/igniter = SABOTAGE_BUG,
/obj/item/device/assembly/infra = SABOTAGE_BUG, // ir blaster to disable camera
/obj/item/weapon/stock_parts/subspace/amplifier = SABOTAGE_BUG,
/obj/item/device/radio = NETWORK_BUG,
/obj/item/device/assembly/signaler = NETWORK_BUG,
/obj/item/weapon/stock_parts/subspace/transmitter = NETWORK_BUG,
/obj/item/device/detective_scanner = ADVANCED_BUG,
/obj/item/device/paicard = ADVANCED_BUG,
/obj/item/weapon/stock_parts/scanning_module = ADVANCED_BUG
)
for(var/entry in expandables)
if(istype(W,entry))
bugtype = expandables[entry]
user.drop_item()
W.loc = src
expansion = W
user << "You add [W] to [src]."
get_cameras() // the tracking code will want to know the new camera list
if(bugtype in list(UNIVERSAL_BUG,NETWORK_BUG,ADMIN_BUG))
skip_bugcheck = 1
return
#undef VANILLA_BUG
#undef UNIVERSAL_BUG
#undef NETWORK_BUG
#undef SABOTAGE_BUG
#undef ADVANCED_BUG
#undef ADMIN_BUG
#undef BUGMODE_LIST
#undef BUGMODE_MONITOR
#undef BUGMODE_TRACK

View File

@@ -126,7 +126,7 @@
if(9) src.overlays += "pai-what"
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
var/turf/T = get_turf(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2)

View File

@@ -28,102 +28,90 @@
/obj/item/device/encryptionkey/headset_sec
name = "Security Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the security channel, use :s."
icon_state = "sec_cypherkey"
channels = list("Security" = 1)
/obj/item/device/encryptionkey/headset_eng
name = "Engineering Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the engineering channel, use :e."
icon_state = "eng_cypherkey"
channels = list("Engineering" = 1)
/obj/item/device/encryptionkey/headset_rob
name = "Robotics Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the engineering channel, use :e. For research, use :n."
icon_state = "rob_cypherkey"
channels = list("Engineering" = 1, "Science" = 1)
channels = list("Science" = 1, "Engineering" = 1)
/obj/item/device/encryptionkey/headset_med
name = "Medical Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the medical channel, use :m."
icon_state = "med_cypherkey"
channels = list("Medical" = 1)
/obj/item/device/encryptionkey/headset_sci
name = "Science Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the science channel, use :n."
icon_state = "sci_cypherkey"
channels = list("Science" = 1)
/obj/item/device/encryptionkey/headset_medsci
name = "Medical Research Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the medical channel, use :m. For science, use :n."
icon_state = "medsci_cypherkey"
channels = list("Medical" = 1, "Science" = 1)
channels = list("Science" = 1, "Medical" = 1)
/obj/item/device/encryptionkey/headset_com
name = "Command Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the command channel, use :c."
icon_state = "com_cypherkey"
channels = list("Command" = 1)
/obj/item/device/encryptionkey/heads/captain
name = "Captain's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0)
/obj/item/device/encryptionkey/heads/rd
name = "Research Director's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the science channel, use :n. For command, use :c."
icon_state = "rd_cypherkey"
channels = list("Science" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/hos
name = "Head of Security's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the security channel, use :s. For command, use :c."
icon_state = "hos_cypherkey"
channels = list("Security" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/ce
name = "Chief Engineer's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the engineering channel, use :e. For command, use :c."
icon_state = "ce_cypherkey"
channels = list("Engineering" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/cmo
name = "Chief Medical Officer's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the medical channel, use :m. For command, use :c."
icon_state = "cmo_cypherkey"
channels = list("Medical" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/hop
name = "Head of Personnel's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. Channels are as follows: :u - supply, :v - service, :c - command."
icon_state = "hop_cypherkey"
channels = list("Supply" = 1, "Command" = 1, "Service" = 1, "Security" = 0)
/*
/obj/item/device/encryptionkey/headset_mine
name = "Mining Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
icon_state = "mine_cypherkey"
channels = list("Mining" = 1)
channels = list("Supply" = 1, "Service" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/qm
name = "Quartermaster's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
icon_state = "qm_cypherkey"
channels = list("Cargo" = 1, "Mining" = 1)
*/
/obj/item/device/encryptionkey/headset_cargo
name = "Supply Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the supply channel, use :u."
icon_state = "cargo_cypherkey"
channels = list("Supply" = 1)
/obj/item/device/encryptionkey/headset_service
name = "Service Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the service channel, use :v."
icon_state = "srv_cypherkey"
channels = list("Service" = 1)

View File

@@ -20,6 +20,11 @@
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
/obj/item/device/radio/headset/talk_into(mob/living/M as mob, message, channel)
if (!listening)
return
..()
/obj/item/device/radio/headset/receive_range(freq, level)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
@@ -130,25 +135,11 @@
/obj/item/device/radio/headset/heads/hop
name = "head of personnel's headset"
desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :v - service, :c - command, :s - security"
desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :v - service, :c - command."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hop
/*
/obj/item/device/radio/headset/headset_mine
name = "mining radio headset"
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
icon_state = "mine_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_mine
/obj/item/device/radio/headset/heads/qm
name = "quartermaster's headset"
desc = "The headset of the man who control your toiletpaper supply. To access the cargo channel, use :q. For mining, use :d."
icon_state = "cargo_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/qm
*/
/obj/item/device/radio/headset/headset_cargo
name = "supply radio headset"
desc = "A headset used by the QM and his slaves. To access the supply channel, use :u."
@@ -163,6 +154,13 @@
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_service
/obj/item/device/radio/headset/headset_cent
name = "centcom headset"
desc = "A headset used by the upper echelons of Nanotrasen. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
icon_state = "cent_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)

View File

@@ -60,7 +60,7 @@
on = 0
else
var/area/A = src.loc.loc
if(!A || !isarea(A) || !A.master)
if(!A || !isarea(A) || !A.master || emped)
on = 0
else
on = A.master.powered(EQUIP) // set "on" to the power status

View File

@@ -24,6 +24,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/maxf = 1499
var/emped = 0 // since radios don't use machinery stat binary flags they get a seperate variable
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BELT
@@ -83,11 +84,14 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/dat = ""
if(!istype(src, /obj/item/device/radio/headset)) //Headsets dont get a mic button
dat += "<b>Microphone:</b> [broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR>"
dat += {"
if(!istype(src, /obj/item/device/radio/headset))
dat += {"
<b>Microphone:</b> [broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR>
<b>Speaker:</b> [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>
"}
else //Headsets dont get a mic button, speaker controls both
dat += "<b>Power:</b> [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>"
dat += {"
<b>Frequency:</b>
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A>
@@ -116,8 +120,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/proc/text_sec_channel(var/chan_name, var/chan_stat)
var/list = !!(chan_stat&FREQ_LISTENING)!=0
return {"
<B>[chan_name]</B><br>
Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
<B>[chan_name]</B>: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
"}
/obj/item/device/radio/Topic(href, href_list)
@@ -223,6 +226,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
//world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
channel = channels[1]
connection = secure_radio_connections[channel]
if (!channels[channel]) // if the channel is turned off, don't broadcast
return
else
connection = radio_connection
channel = null
@@ -662,10 +667,20 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
else return
/obj/item/device/radio/emp_act(severity)
if (emped == 1) //
return
if (listening && ismob(loc)) // if the radio is turned on and on someone's person they notice
loc << "<span class='warning'>\The [src] overloads.</span>"
broadcasting = 0
listening = 0
for (var/ch_name in channels)
channels[ch_name] = 0
on = 0
spawn(200)
emped = 0
if (!istype(src, /obj/item/device/radio/intercom)) // intercoms will turn back on on their own
on = 1
emped = 1
..()
///////////////////////////////

View File

@@ -61,7 +61,7 @@
user.put_in_hands(src)
user << "You take the target out of the stake."
else
src.loc = get_turf_loc(user)
src.loc = get_turf(user)
user << "You take the target out of the stake."
stake.pinned_target = null

View File

@@ -1,3 +1,5 @@
//In this file: Plastic explosives (C4) and Syndicate Bombs
/obj/item/weapon/plastique
name = "plastic explosives"
desc = "Used to put holes in specific areas without too much extra hole."
@@ -36,10 +38,10 @@
return .
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
if(isscrewdriver(I))
if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
else if(iswirecutter(I) || ismultitool(I) || istype(I, /obj/item/device/assembly/signaler ))
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
wires.Interact(user)
else
..()
@@ -97,4 +99,113 @@
del(src)
/obj/item/weapon/plastique/attack(mob/M as mob, mob/user as mob, def_zone)
return
return
/obj/item/weapon/syndicatebomb
icon = 'icons/obj/assemblies.dmi'
name = "Syndicate Bomb"
icon_state = "syndicate-bomb-inactive"
item_state = "bomb"
desc = "A large and menacing device capable of terrible destruction"
origin_tech = "materials=3;magnets=4;syndicate=4"
w_class = 4.0
unacidable = 1
var/datum/wires/syndicatebomb/wires = null
var/timer = 60
var/open_panel = 0 //are the wires exposed?
var/active = 0 //is the bomb counting down?
var/defused = 0 //is the bomb capable of exploding?
/obj/item/weapon/syndicatebomb/process()
if(active && !defused && (timer > 0)) //Tick Tock
timer--
if(active && !defused && (timer <= 0)) //Boom
active = 0
timer = 60
processing_objects.Remove(src)
explosion(src.loc,2,5,11)
del(src)
return
if(!active || defused) //Counter terrorists win
processing_objects.Remove(src)
return
/obj/item/weapon/syndicatebomb/New()
wires = new(src)
..()
/obj/item/weapon/syndicatebomb/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/wrench))
if(!anchored)
if(!isturf(src.loc) || istype(src.loc, /turf/space))
user << "<span class='notice'>The bomb must be placed on solid ground to attach it</span>"
else
user << "<span class='notice'>You firmly wrench the bomb to the floor</span>"
playsound(loc, 'sound/items/ratchet.ogg', 50, 1)
anchored = 1
if(active)
user << "<span class='notice'>The bolts lock in place</span>"
else
if(!active)
user << "<span class='notice'>You wrench the bomb from the floor</span>"
playsound(loc, 'sound/items/ratchet.ogg', 50, 1)
anchored = 0
else
user << "<span class='warning'>The bolts are locked down!</span>"
else if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
if(!active)
icon_state = "syndicate-bomb-inactive[open_panel ? "-wires" : ""]"
else
icon_state = "syndicate-bomb-active[open_panel ? "-wires" : ""]"
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
if(open_panel)
wires.Interact(user)
else
..()
/obj/item/weapon/syndicatebomb/attack_hand(var/mob/user)
if(anchored)
if(open_panel)
wires.Interact(user)
else if(!active)
settings()
else
user << "<span class='notice'>The bomb is bolted to the floor, you'll have to unbolt it first!</span>"
else
..()
/obj/item/weapon/syndicatebomb/attack_self(mob/user as mob)
if(open_panel)
wires.Interact(user)
else if(!active)
settings()
else
user << "<span class='notice'>The bomb is counting down, the settings can't be changed now!</span>"
/obj/item/weapon/syndicatebomb/proc/settings(var/mob/user)
var/newtime = input(usr, "Please set the timer.", "Timer", "[timer]") as num
newtime = Clamp(newtime, 30, 60000)
if(in_range(src, usr) && isliving(usr)) //No running off and setting bombs from across the station
timer = newtime
src.loc.visible_message("\blue \icon[src] timer set for [timer] seconds.")
if(alert(usr,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, usr) && isliving(usr))
if(defused || active)
if(defused)
src.loc.visible_message("\blue \icon[src] Device error: User intervention required")
return
else
src.loc.visible_message("\red \icon[src] [timer] seconds until detonation, please clear the area.")
playsound(loc, 'sound/machines/click.ogg', 30, 1)
icon_state = "syndicate-bomb-active"
active = 1
add_fingerprint(user)
message_admins("[usr] has primed a [name] for detonation")
log_game("[usr] primed a [name] for detonation")
processing_objects.Add(src) //Ticking down

View File

@@ -70,7 +70,7 @@
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
if(iswrench(W) && !status)//Taking this apart
if(istype(W, /obj/item/weapon/wrench) && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.loc = T
@@ -85,7 +85,7 @@
del(src)
return
if(isscrewdriver(W) && igniter && !lit)
if(istype(W, /obj/item/weapon/screwdriver) && igniter && !lit)
status = !status
user << "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>"
update_icon()

View File

@@ -29,6 +29,8 @@
/obj/item/weapon/grenade/chem_grenade/attack_self(mob/user)
if(stage == READY && !active)
message_admins("[user] has primed a [name] for detonation")
log_game("[user] primed a [name] for detonation")
if(nadeassembly)
nadeassembly.attack_self(user)
else if(clown_check(user))

View File

@@ -60,6 +60,8 @@
active = 1
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
message_admins("[user] has primed a [name] for detonation")
log_game("[user] primed a [name] for detonation")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
@@ -79,7 +81,7 @@
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(istype(W, /obj/item/weapon/screwdriver))
switch(det_time)
if ("1")
det_time = 10

View File

@@ -0,0 +1,13 @@
/obj/item/weapon/grenade/syndieminibomb
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
name = "syndicate minibomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "syndicate"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4;syndicate=4"
prime()
explosion(src.loc,1,2,4)
del(src)
return

View File

@@ -24,6 +24,10 @@
/obj/item/weapon/implant/proc/get_data()
return "No information available"
/obj/item/weapon/implant/dropped(mob/user as mob)
. = 1
del src
return .
/obj/item/weapon/implant/tracking
name = "tracking"

View File

@@ -12,6 +12,9 @@
// -----------------------------
/obj/item/weapon/storage/secure
name = "secstorage"
w_class = 3.0
max_w_class = 2
max_combined_w_class = 14
var/icon_locking = "secureb"
var/icon_sparking = "securespark"
var/icon_opened = "secure0"
@@ -19,124 +22,106 @@
var/code = ""
var/l_code = null
var/l_set = 0
var/l_setshort = 0
var/l_hacking = 0
var/emagged = 0
var/open = 0
w_class = 3.0
max_w_class = 2
max_combined_w_class = 14
var/open_panel = 0
var/datum/wires/secstorage/wires
examine()
set src in oview(1)
..()
usr << text("The service panel is [src.open ? "open" : "closed"].")
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
user << "You slice through the lock on [src]."
else
user << "You short out the lock on [src]."
return
/obj/item/weapon/storage/secure/New()
wires = new(src)
..()
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20))
src.open =! src.open
user.show_message(text("\blue You [] the service panel.", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
user.show_message(text("\red Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
if (do_after(usr, 100))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
user.show_message(text("\red Internal memory reset. Please give it a few seconds to reinitialize."), 1)
sleep(80)
src.l_setshort = 0
src.l_hacking = 0
else
user.show_message(text("\red Unable to reset internal memory."), 1)
src.l_hacking = 0
else src.l_hacking = 0
return
//At this point you have exhausted all the special things to do when locked
// ... but it's still locked.
/obj/item/weapon/storage/secure/examine()
set src in oview(1)
..()
usr << "The service panel is [open_panel ? "open" : "closed"]."
/obj/item/weapon/storage/secure/attackby(obj/item/I, mob/user)
if(locked)
if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
user << "<span class='notice'>You [open_panel ? "open" : "close"] the service panel.</span>"
if(open_panel)
wires.Interact(user)
return
// -> storage/attackby() what with handle insertion, etc
..()
if(open_panel)
if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler))
wires.Interact(user)
MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
return
..()
attack_self(mob/user as mob)
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if (src.emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if (src.l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", src.code)
if (!src.locked)
message = "*****"
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
user << browse(dat, "window=caselock;size=300x280")
Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
return
if (href_list["type"])
if (href_list["type"] == "E")
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
src.l_code = src.code
src.l_set = 1
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
src.locked = 0
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_opened)
src.code = null
else
src.code = "ERROR"
else
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
src.locked = 1
src.overlays = null
src.code = null
src.close(usr)
else
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
src.code = "ERROR"
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
return
//it's still locked, chump
return
//-> storage/attackby() what with handle insertion, etc
..()
/obj/item/weapon/storage/secure/attack_self(mob/user)
user.set_machine(src)
var/dat = {"<tt>
<b>[src]</b>
<br><br><br>
Lock Status: [locked ? "LOCKED" : "UNLOCKED"]"}
var/message = "Code"
if(l_set == 0)
dat += "<br><p><b>4-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>"
message = "[code]"
if(!locked)
message = "****"
dat += {"<hr><br>>[message]<br><br>
<a href='?src=\ref[src];type=1'>1</a>-
<a href='?src=\ref[src];type=2'>2</a>-
<a href='?src=\ref[src];type=3'>3</a><br><br>
<a href='?src=\ref[src];type=4'>4</a>-
<a href='?src=\ref[src];type=5'>5</a>-
<a href='?src=\ref[src];type=6'>6</a><br><br>
<a href='?src=\ref[src];type=7'>7</a>-
<a href='?src=\ref[src];type=8'>8</a>-
<a href='?src=\ref[src];type=9'>9</a><br><br>
<a href='?src=\ref[src];type=R'>R</a>-
<a href='?src=\ref[src];type=0'>0</a>-
<a href='?src=\ref[src];type=E'>E</a><br><br>
</TT>"}
user << browse(dat, "window=caselock;size=300x280")
/obj/item/weapon/storage/secure/Topic(href, href_list)
..()
if((usr.stat || usr.restrained()) || get_dist(src, usr) > 1)
return
if(href_list["type"])
if(href_list["type"] == "E")
if(l_set == 0 && length(code) == 4 && code != "ERROR")
l_code = code
l_set = 1
else if(code == l_code && l_set == 1)
locked = 0
overlays = null
overlays += image('icons/obj/storage.dmi', icon_opened)
code = null
else
code = "ERROR"
else
if(href_list["type"] == "R")
locked = 1
overlays = null
code = null
close(usr)
else
code += "[href_list["type"]]"
if(length(code) > 4)
code = "ERROR"
add_fingerprint(usr)
for(var/mob/M in viewers(1, loc))
if(M.client && M.machine == src)
attack_self(M)
// -----------------------------
// Secure Briefcase
// -----------------------------
@@ -160,46 +145,46 @@
new /obj/item/weapon/pen(src)
attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
if((loc == user) && (locked == 1))
usr << "\red [src] is locked and cannot be opened!"
else if ((src.loc == user) && (!src.locked))
playsound(src.loc, "rustle", 50, 1, -5)
if (user.s_active)
else if((loc == user) && (!locked))
playsound(loc, "rustle", 50, 1, -5)
if(user.s_active)
user.s_active.close(user) //Close and re-open
src.show_to(user)
show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
if(M.s_active == src)
close(M)
orient2hud(user)
add_fingerprint(user)
return
//I consider this worthless but it isn't my code so whatever. Remove or uncomment.
/*attack(mob/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
if((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(2)
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)])</font>")
var/t = user:zone_sel.selecting
if (t == "head")
if(t == "head")
if(ishuman(M))
var/mob/living/carbon/human/H = M
if (H.stat < 2 && H.health < 50 && prob(90))
if(H.stat < 2 && H.health < 50 && prob(90))
// ******* Check
if (istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))
if(istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))
H << "\red The helmet protects you from being hit hard in the head!"
return
var/time = rand(2, 6)
if (prob(75))
if(prob(75))
H.Paralyse(time)
else
H.Stun(time)

View File

@@ -16,8 +16,8 @@
return
if("screwed")
new /obj/effect/spawner/newbomb/timer/syndicate(src)
new /obj/effect/spawner/newbomb/timer/syndicate(src)
new /obj/item/weapon/syndicatebomb(src)
new /obj/item/weapon/grenade/syndieminibomb(src)
new /obj/item/device/powersink(src)
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)

View File

@@ -32,9 +32,9 @@
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
if(bcell)
bcell.use(chrgdeductamt)
if(bcell.charge < chrgdeductamt)
if(bcell.use(chrgdeductamt))
return 1
else
status = 0
update_icon()
return 0

View File

@@ -38,7 +38,7 @@
O.loc = T
T.update_icon()
animate()
else if(iswrench(W))
else if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
else if(istype(W, /obj/item/weapon/grab))

View File

@@ -99,12 +99,16 @@
return 0
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(iswirecutter(W))
if(istype(W, /obj/item/weapon/wirecutters))
if(!shock(user, 100))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
new /obj/item/stack/rods(loc)
if(destroyed)
new /obj/item/stack/rods(loc)
else
new /obj/item/stack/rods(loc)
new /obj/item/stack/rods(loc)
del(src)
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
else if((istype(W, /obj/item/weapon/screwdriver)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
anchored = !anchored

View File

@@ -524,7 +524,7 @@
del(src)
/obj/structure/table/attack_hand(mob/user)
/obj/structure/rack/attack_hand(mob/user)
if(HULK in user.mutations)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))

View File

@@ -46,7 +46,7 @@
user.put_in_hands(pinned_target)
user << "You take the target out of the stake."
else
pinned_target.loc = get_turf_loc(user)
pinned_target.loc = get_turf(user)
user << "You take the target out of the stake."
pinned_target = null

View File

@@ -612,7 +612,7 @@ var/datum/controller/supply_shuttle/supply_shuttle = new()
var/timeout = world.time + 600
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
if(world.time > timeout) return
if(!reason) return
// if(!reason) return
var/idname = "*None Provided*"
var/idrank = "*None Provided*"

View File

@@ -69,7 +69,6 @@ var/secret_force_mode = "secret" // if this is anything but "secret", the secret
var/host = null
var/ooc_allowed = 1
var/dooc_allowed = 1
var/traitor_scaling = 1
var/dna_ident = 1
var/abandon_allowed = 1
var/enter_allowed = 1

View File

@@ -78,6 +78,12 @@ var/global/floorIsLava = 0
body += "<b>Transformation:</b>"
body += "<br>"
//Human
if(ishuman(M))
body += "<B>Human</B> | "
else
body += "<A href='?_src_=holder;humanone=\ref[M]'>Humanize</A> | "
//Monkey
if(ismonkey(M))
body += "<B>Monkeyized</B> | "
@@ -548,7 +554,7 @@ var/global/floorIsLava = 0
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/*
/datum/admins/proc/toggletraitorscaling()
set category = "Server"
set desc="Toggle traitor scaling"
@@ -557,7 +563,7 @@ var/global/floorIsLava = 0
log_admin("[key_name(usr)] toggled Traitor Scaling to [traitor_scaling].")
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [traitor_scaling ? "on" : "off"].", 1)
feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
*/
/datum/admins/proc/startnow()
set category = "Server"
set desc="Start the round RIGHT NOW"

View File

@@ -425,7 +425,7 @@
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
var/turf/mob_loc = get_turf_loc(M)
var/turf/mob_loc = get_turf(M)
dat += "<td>[mob_loc.loc]</td></tr>"
else
dat += "<tr><td><i>Head not found!</i></td></tr>"

View File

@@ -1012,6 +1012,18 @@
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]", 1)
H.monkeyize()
else if(href_list["humanone"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/monkey/Mo = locate(href_list["humanone"])
if(!istype(Mo))
usr << "This can only be used on instances of type /mob/living/carbon/monkey"
return
log_admin("[key_name(usr)] attempting to humanize [key_name(Mo)]")
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(Mo)]", 1)
Mo.humanize()
else if(href_list["corgione"])
if(!check_rights(R_SPAWN)) return
@@ -2076,9 +2088,8 @@
if("manifest")
var/dat = "<B>Showing Crew Manifest.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.ckey)
dat += text("<tr><td>[]</td><td>[]</td></tr>", H.name, H.get_assignment())
for(var/datum/data/record/t in data_core.general)
dat += text("<tr><td>[]</td><td>[]</td></tr>", t.fields["name"], t.fields["rank"])
dat += "</table>"
usr << browse(dat, "window=manifest;size=440x410")
if("DNA")

View File

@@ -858,7 +858,7 @@ var/global/list/g_fancy_list_of_safe_types = null
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()//They get full station access.
W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)//Let's add their alloted CentCom access.
W.access += get_centcom_access("Death Commando")//Let's add their alloted CentCom access.
W.assignment = "Death Commando"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -870,7 +870,7 @@ var/global/list/g_fancy_list_of_safe_types = null
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_com(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/pen(M), slot_l_store)
@@ -887,8 +887,7 @@ var/global/list/g_fancy_list_of_safe_types = null
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card (CentCom Official)"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
W.access = get_centcom_access("CentCom Official")
W.assignment = "CentCom Official"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -898,7 +897,7 @@ var/global/list/g_fancy_list_of_safe_types = null
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/bulletproof(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cent(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/centhat(M), slot_head)
@@ -910,7 +909,7 @@ var/global/list/g_fancy_list_of_safe_types = null
W.name = "[M.real_name]'s ID Card (CentCom Commander)"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.access += get_centcom_access("CentCom Commander")
W.assignment = "CentCom Commander"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -920,7 +919,7 @@ var/global/list/g_fancy_list_of_safe_types = null
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat/officer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cent(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
@@ -932,7 +931,7 @@ var/global/list/g_fancy_list_of_safe_types = null
W.name = "[M.real_name]'s ID Card (Special Ops Officer)"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.access += get_centcom_access("Special Ops Officer")
W.assignment = "Special Ops Officer"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -976,7 +975,7 @@ var/global/list/g_fancy_list_of_safe_types = null
M.equip_to_slot_or_del(new /obj/item/clothing/head/hgpiratecap(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cent(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
@@ -986,7 +985,7 @@ var/global/list/g_fancy_list_of_safe_types = null
W.name = "[M.real_name]'s ID Card (Admiral)"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.access += get_centcom_access("Admiral")
W.assignment = "Admiral"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -1053,7 +1052,7 @@ var/global/list/g_fancy_list_of_safe_types = null
set name = "Debug Mob Lists"
set desc = "For when you just gotta know"
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
if("Players")
usr << dd_list2text(player_list,",")
if("Admins")
@@ -1066,3 +1065,5 @@ var/global/list/g_fancy_list_of_safe_types = null
usr << dd_list2text(dead_mob_list,",")
if("Clients")
usr << dd_list2text(clients,",")
if("Joined Clients")
usr << dd_list2text(joined_player_list,",")

View File

@@ -17,12 +17,13 @@ client/proc/one_click_antag()
<a href='?src=\ref[src];makeAntag=4'>Make Cult</a><br>
<a href='?src=\ref[src];makeAntag=5'>Make Malf AI</a><br>
<a href='?src=\ref[src];makeAntag=6'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
"}
/* These dont work just yet
Ninja, aliens and deathsquad I have not looked into yet
Nuke team is getting a null mob returned from makebody() (runtime error: null.mind. Line 272)
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=8'>Make Space Ninja (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=9'>Make Aliens (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=10'>Make Deathsquad (Syndicate) (Requires Ghosts)</a><br>
@@ -216,6 +217,7 @@ client/proc/one_click_antag()
/datum/admins/proc/makeNukeTeam()
var/list/mob/dead/observer/candidates = list()
var/list/mob/dead/observer/chosen = list()
var/mob/dead/observer/theghost = null
var/time_passed = world.time
@@ -245,18 +247,20 @@ client/proc/one_click_antag()
candidates.Remove(j)
continue
theghost = candidates
theghost = j
candidates.Remove(theghost)
var/mob/living/carbon/human/new_character=makeBody(theghost)
chosen += theghost
agentcount++
break
//Making sure we have atleast 3 Nuke agents, because less than that is kinda bad
if(agentcount < 3)
return 0
else
for(var/mob/c in chosen)
var/mob/living/carbon/human/new_character=makeBody(c)
new_character.mind.make_Nuke()
agentcount++
if(agentcount < 1)
return 0
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
var/obj/effect/landmark/nuke_spawn = locate("landmark*Syndicate-Uplink")
var/obj/effect/landmark/closet_spawn = locate("landmark*Nuclear-Closet")
var/nuke_code = "[rand(10000, 99999)]"
@@ -396,4 +400,4 @@ client/proc/one_click_antag()
ready_dna(new_character)
new_character.key = G_found.key
return new_character
return new_character

View File

@@ -22,7 +22,7 @@
log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
playsound(get_turf_loc(src.mob), S, 50, 0, 0)
playsound(get_turf(src.mob), S, 50, 0, 0)
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -91,7 +91,7 @@
return
if(!M)
M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list()
M = input("Direct narrate to who?", "Active Players") as null|anything in player_list
if(!M)
return

View File

@@ -110,7 +110,7 @@
if((!A.secured) && (!secured))
attach_assembly(A,user)
return
if(isscrewdriver(W))
if(istype(W, /obj/item/weapon/screwdriver))
if(toggle_secure())
user << "\blue \The [src] is ready!"
else

View File

@@ -111,7 +111,7 @@
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(istype(W, /obj/item/weapon/screwdriver))
if(!a_left || !a_right)
user << "\red BUG:Assembly part missing, please report this!"
return

View File

@@ -26,6 +26,9 @@
var/darkness_view = 0//Base human is 2
var/invisa_view = 0
var/emagged = 0
var/flash_protect = 0 //Mal: What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS
var/tint = 0 //Mal: Sets the item's level of visual impairment tint, normally set to the same as flash_protect
// but seperated to allow items to protect but not impair vision, like space helmets
/*
SEE_SELF // can see self, no matter what
@@ -60,7 +63,8 @@ BLIND // can't see anything
icon = 'icons/obj/clothing/hats.dmi'
body_parts_covered = HEAD
slot_flags = SLOT_HEAD
var/flash_protect = 0
var/tint = 0
//Mask
/obj/item/clothing/mask
@@ -68,6 +72,8 @@ BLIND // can't see anything
icon = 'icons/obj/clothing/masks.dmi'
body_parts_covered = HEAD
slot_flags = SLOT_MASK
var/flash_protect = 0
var/tint = 0
//Shoes
/obj/item/clothing/shoes
@@ -110,6 +116,7 @@ BLIND // can't see anything
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
heat_protection = HEAD
max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT
flash_protect = 2
/obj/item/clothing/suit/space
name = "space suit"

View File

@@ -65,6 +65,8 @@
icon_state = "sun"
item_state = "sunglasses"
darkness_view = -1
flash_protect = 1
tint = 1
/obj/item/clothing/glasses/welding
name = "welding goggles"
@@ -73,6 +75,8 @@
item_state = "welding-g"
action_button_name = "Toggle Welding Goggles"
var/up = 0
flash_protect = 2
tint = 2
/obj/item/clothing/glasses/welding/attack_self()
toggle()
@@ -90,12 +94,16 @@
flags_inv |= HIDEEYES
icon_state = initial(icon_state)
usr << "You flip the [src] down to protect your eyes."
flash_protect = 2
tint = 2
else
src.up = !src.up
src.flags &= ~HEADCOVERSEYES
flags_inv &= ~HIDEEYES
icon_state = "[initial(icon_state)]up"
usr << "You push the [src] up out of your face."
flash_protect = 0
tint = 0
usr.update_inv_glasses(0)
@@ -104,7 +112,9 @@
desc = "Covers the eyes, preventing sight."
icon_state = "blindfold"
item_state = "blindfold"
vision_flags = BLIND
// vision_flags = BLIND //handled in life.dm/handle_regular_hud_updates()
flash_protect = 2
tint = 3 // to make them blind
/obj/item/clothing/glasses/sunglasses/big
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Larger than average enhanced shielding blocks many flashes."
@@ -146,6 +156,7 @@
origin_tech = "magnets=3"
vision_flags = SEE_MOBS
invisa_view = 2
flash_protect = -1
emp_act(severity)
if(istype(src.loc, /mob/living/carbon/human))

View File

@@ -116,11 +116,11 @@
C.images += holder
else
perpname = perp.name
holder.icon_state = "hudunknown"
holder.icon_state = "hudno_id"
C.images += holder
else
perpname = perp.name
holder.icon_state = "hudunknown"
holder.icon_state = "hudno_id"
C.images += holder
for(var/datum/data/record/E in data_core.general)

View File

@@ -20,6 +20,8 @@
m_amt = 3000
g_amt = 1000
var/up = 0
flash_protect = 2
tint = 2
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
action_button_name = "Toggle Welding Helmet"
@@ -40,12 +42,16 @@
flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = initial(icon_state)
usr << "You flip the [src] down to protect your eyes."
flash_protect = 2
tint = 2
else
src.up = !src.up
src.flags &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = "[initial(icon_state)]up"
usr << "You push the [src] up out of your face."
flash_protect = 0
tint = 0
usr.update_inv_head(0) //so our mob-overlays update

View File

@@ -57,7 +57,7 @@
// Calculate previous position for transition
var/turf/FROM = T // the turf of origin we're travelling FROM
var/turf/TO = get_turf_loc(chosen) // the turf of origin we're travelling TO
var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
playsound(TO, 'sound/effects/phasein.ogg', 100, 1)

View File

@@ -1640,7 +1640,7 @@ ________________________________________________________________________________
dat += "</ul>"
if(1)
dat += "<h4><img src=sos_5.png> Atmospheric Scan:</h4>"//Headers don't need breaks. They are automatically placed.
var/turf/T = get_turf_or_move(U.loc)
var/turf/T = get_turf(U.loc)
if (isnull(T))
dat += "Unable to obtain a reading."
else

View File

@@ -9,14 +9,6 @@
/obj/item/device/assembly/signaler
)
result = /obj/item/weapon/reagent_containers/food/snacks/telebacon
I said no!
/datum/recipe/syntitelebacon
items = list(
/obj/item/weapon/syntiflesh,
/obj/item/device/assembly/signaler
)
result = /obj/item/weapon/reagent_containers/food/snacks/telebacon
*/
/datum/recipe/friedegg
@@ -92,15 +84,6 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/human/burger
/*
/datum/recipe/monkeyburger
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey
)
result = /obj/item/weapon/reagent_containers/food/snacks/monkeyburger
*/
/datum/recipe/plainburger
reagents = list("flour" = 5)
items = list(
@@ -108,13 +91,6 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/monkeyburger
/datum/recipe/syntiburger
reagents = list("flour" = 5)
items = list(
/obj/item/weapon/syntiflesh
)
result = /obj/item/weapon/reagent_containers/food/snacks/monkeyburger
/datum/recipe/brainburger
reagents = list("flour" = 5)
items = list(
@@ -182,13 +158,6 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/waffles
/*
/datum/recipe/faggot
monkeymeat_amount = 1
humanmeat_amount = 1
creates = "/obj/item/weapon/reagent_containers/food/snacks/faggot"
*/
/datum/recipe/donkpocket
reagents = list("flour" = 5)
items = list(
@@ -230,26 +199,6 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread
/datum/recipe/syntibread
reagents = list("flour" = 15)
items = list(
/obj/item/weapon/syntiflesh,
/obj/item/weapon/syntiflesh,
/obj/item/weapon/syntiflesh,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread
/*
/datum/recipe/meatbreadhuman
flour_amount = 3
humanmeat_amount = 3
cheese_amount = 3
creates = "/obj/item/weapon/reagent_containers/food/snacks/meatbread"
*/
/datum/recipe/xenomeatbread
reagents = list("flour" = 15)
items = list(
@@ -288,6 +237,23 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/muffin
/datum/recipe/berrymuffin
reagents = list("milk" = 5, "flour" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/grown/berries
)
result = /obj/item/weapon/reagent_containers/food/snacks/muffin/berry
/datum/recipe/booberrymuffin
reagents = list("milk" = 5, "flour" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/grown/berries,
/obj/item/weapon/ectoplasm
)
result = /obj/item/weapon/reagent_containers/food/snacks/muffin/booberry
/datum/recipe/eggplantparm
items = list(
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
@@ -317,7 +283,8 @@ I said no!
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot //TODO: more carrots
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot,
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake
@@ -375,15 +342,7 @@ I said no!
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries,
)
result = /obj/item/weapon/reagent_containers/food/snacks/cherrypie
/*
/datum/recipe/berrypie
reagents = list("berryjuice" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
)
result = /obj/item/weapon/reagent_containers/food/snacks/berrypie
*/
/datum/recipe/berryclafoutis
reagents = list("flour" = 10)
items = list(
@@ -421,14 +380,6 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/monkeykabob
/datum/recipe/syntikabob
items = list(
/obj/item/stack/rods,
/obj/item/weapon/syntiflesh,
/obj/item/weapon/syntiflesh,
)
result = /obj/item/weapon/reagent_containers/food/snacks/monkeykabob
/datum/recipe/tofukabob
items = list(
/obj/item/stack/rods,
@@ -463,6 +414,13 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/cheesyfries
/datum/recipe/carpmeat
reagents = list("carpotoxin" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/tofu
)
result = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/imitation
/datum/recipe/cubancarp
reagents = list("flour" = 5)
items = list(
@@ -506,13 +464,6 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/meatsteak
/datum/recipe/syntisteak
reagents = list("sodiumchloride" = 1, "blackpepper" = 1)
items = list(
/obj/item/weapon/syntiflesh
)
result = /obj/item/weapon/reagent_containers/food/snacks/meatsteak
/datum/recipe/pizzamargherita
reagents = list("flour" = 10)
items = list(
@@ -535,17 +486,6 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza
/datum/recipe/syntipizza
reagents = list("flour" = 10)
items = list(
/obj/item/weapon/syntiflesh,
/obj/item/weapon/syntiflesh,
/obj/item/weapon/syntiflesh,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza
/datum/recipe/mushroompizza
reagents = list("flour" = 10)
items = list(
@@ -700,7 +640,7 @@ I said no!
result = /obj/item/weapon/reagent_containers/food/snacks/monkeysdelight
/datum/recipe/baguette
reagents = list("sodiumchloride" = 1, "blackpepper" = 1, "flour" = 15)
reagents = list("sodiumchloride" = 1, "blackpepper" = 1, "flour" = 10)
result = /obj/item/weapon/reagent_containers/food/snacks/baguette
/datum/recipe/fishandchips

View File

@@ -765,27 +765,29 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/item/seeds/replicapod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers))
if(ckey == null)
user << "You inject the contents of the syringe into the seeds."
user << "You inject the contents of the syringe into the seeds."
for(var/datum/reagent/blood/bloodSample in W:reagents.reagent_list)
var/mob/living/carbon/human/source = bloodSample.data["donor"] //hacky, since it gets the CURRENT condition of the mob, not how it was when the blood sample was taken
if(!istype(source))
continue
//ui = bloodSample.data["blood_dna"] doesn't work for whatever reason
ui = source.dna.uni_identity
se = source.dna.struc_enzymes
if(source.ckey)
ckey = source.ckey
else if(source.mind)
ckey = ckey(source.mind.key)
realName = source.real_name
gender = source.gender
for(var/datum/reagent/blood/bloodSample in W:reagents.reagent_list)
var/mob/living/carbon/human/source = bloodSample.data["donor"] //hacky, since it gets the CURRENT condition of the mob, not how it was when the blood sample was taken
if(!istype(source))
continue
//ui = bloodSample.data["blood_dna"] doesn't work for whatever reason
ui = source.dna.uni_identity
se = source.dna.struc_enzymes
if(source.ckey)
ckey = source.ckey
else if(source.mind)
ckey = ckey(source.mind.key)
realName = source.real_name
gender = source.gender
if(!isnull(source.mind))
mind = source.mind
if(!isnull(source.mind))
mind = source.mind
W:reagents.clear_reagents()
W:reagents.clear_reagents()
else
user << "There is already a genetic sample in these seeds."
else
return ..()

View File

@@ -146,7 +146,7 @@
if(href_list["choose"])
chosen = href_list["choose"]
if(href_list["chooseAmt"])
coinsToProduce = between(0, coinsToProduce + text2num(href_list["chooseAmt"]), 1000)
coinsToProduce = Clamp(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
if(href_list["makeCoins"])
var/temp_coins = coinsToProduce
if (src.output)

View File

@@ -0,0 +1,2 @@
/mob/living/carbon/alien/hitby(atom/movable/AM)
..(AM, 1)

View File

@@ -106,7 +106,7 @@
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = 'icons/mob/screen_alien.dmi'
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.name = "throw/catch"
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.pullin = new /obj/screen()

View File

@@ -204,6 +204,9 @@
/mob/living/carbon/proc/eyecheck()
return 0
/mob/living/carbon/proc/tintcheck()
return 0
// ++++ROCKDTBEN++++ MOB PROCS //END
/mob/living/carbon/proc/handle_ventcrawl() // -- TLE -- Merged by Carn
@@ -304,37 +307,40 @@
update_icons() //apply the now updated overlays to the mob
//Throwing stuff
//Throwing stuff
/mob/living/carbon/proc/toggle_throw_mode()
var/obj/item/W = get_active_hand()
if( !W )//Not holding anything
if( client && (TK in mutations) )
var/obj/item/I = get_active_hand()
if(!I)//Not holding anything
if(client && (TK in mutations))
var/obj/item/tk_grab/O = new(src)
put_in_active_hand(O)
O.host = src
return
return
if( istype(W,/obj/item/tk_grab) )
if(istype(I, /obj/item/tk_grab))
if(hand) del(l_hand)
else del(r_hand)
return
if (src.in_throw_mode)
if(in_throw_mode)
throw_mode_off()
else
throw_mode_on()
/mob/living/carbon/proc/throw_mode_off()
src.in_throw_mode = 0
src.throw_icon.icon_state = "act_throw_off"
in_throw_mode = 0
throw_icon.icon_state = "act_throw_off"
/mob/living/carbon/proc/throw_mode_on()
src.in_throw_mode = 1
src.throw_icon.icon_state = "act_throw_on"
in_throw_mode = 1
throw_icon.icon_state = "act_throw_on"
/mob/living/carbon/proc/throw_item(atom/target)
src.throw_mode_off()
throw_mode_off()
if(usr.stat || !target)
return
if(target.type == /obj/screen) return
@@ -343,7 +349,7 @@
if(!item) return
if (istype(item, /obj/item/weapon/grab))
if(istype(item, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = item
item = G.throw() //throw the person instead of the grab
del(G) //We delete the grab, as it needs to stay around until it's returned.
@@ -370,7 +376,7 @@
item:dropped(src) // let it know it's been dropped
//actually throw it!
if (item)
if(item)
item.layer = initial(item.layer)
src.visible_message("\red [src] has thrown [item].")
@@ -391,6 +397,7 @@
item.throw_at(target, item.throw_range, item.throw_speed)
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
bodytemperature = max(bodytemperature, BODYTEMP_HEAT_DAMAGE_LIMIT+10)

View File

@@ -0,0 +1,12 @@
/mob/living/carbon/hitby(atom/movable/AM, skip)
if(!skip) //ugly, but easy
if(in_throw_mode && !get_active_hand()) //empty active hand and we're in throw mode
if(canmove && !restrained())
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(isturf(I.loc))
put_in_active_hand(I)
visible_message("<span class='warning'>[src] catches [I]!</span>")
throw_mode_off()
return
..()

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