Fix Conflicts and Sync with Upstream

Fixes conflict in icons/obj/gun.dmi by importing sprites added by #172
This commit is contained in:
DZD
2015-01-16 17:07:22 -05:00
50 changed files with 14252 additions and 13887 deletions
+11
View File
@@ -445,3 +445,14 @@ proc/isInSight(var/atom/A, var/atom/B)
var/g = mixOneColor(weights, greens)
var/b = mixOneColor(weights, blues)
return rgb(r,g,b)
/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon)
var/area/our_area = get_area_master(the_area)
for(var/C in living_mob_list)
if(!istype(C, check_type))
continue
if(C == must_be_alone)
continue
if(our_area == get_area_master(C))
return 0
return 1
@@ -1,344 +1,344 @@
/*
HOW IT WORKS
The radio_controller is a global object maintaining all radio transmissions, think about it as about "ether".
Note that walkie-talkie, intercoms and headsets handle transmission using nonstandard way.
procs:
add_object(obj/device as obj, var/new_frequency as num, var/filter as text|null = null)
Adds listening object.
parameters:
device - device receiving signals, must have proc receive_signal (see description below).
one device may listen several frequencies, but not same frequency twice.
new_frequency - see possibly frequencies below;
filter - thing for optimization. Optional, but recommended.
All filters should be consolidated in this file, see defines later.
Device without listening filter will receive all signals (on specified frequency).
Device with filter will receive any signals sent without filter.
Device with filter will not receive any signals sent with different filter.
returns:
Reference to frequency object.
remove_object (obj/device, old_frequency)
Obliviously, after calling this proc, device will not receive any signals on old_frequency.
Other frequencies will left unaffected.
return_frequency(var/frequency as num)
returns:
Reference to frequency object. Use it if you need to send and do not need to listen.
radio_frequency is a global object maintaining list of devices that listening specific frequency.
procs:
post_signal(obj/source as obj|null, datum/signal/signal, var/filter as text|null = null, var/range as num|null = null)
Sends signal to all devices that wants such signal.
parameters:
source - object, emitted signal. Usually, devices will not receive their own signals.
signal - see description below.
filter - described above.
range - radius of regular byond's square circle on that z-level. null means everywhere, on all z-levels.
obj/proc/receive_signal(datum/signal/signal, var/receive_method as num, var/receive_param)
Handler from received signals. By default does nothing. Define your own for your object.
Avoid of sending signals directly from this proc, use spawn(-1). Do not use sleep() here please.
parameters:
signal - see description below. Extract all needed data from the signal before doing sleep(), spawn() or return!
receive_method - may be TRANSMISSION_WIRE or TRANSMISSION_RADIO.
TRANSMISSION_WIRE is currently unused.
receive_param - for TRANSMISSION_RADIO here comes frequency.
datum/signal
vars:
source
an object that emitted signal. Used for debug and bearing.
data
list with transmitting data. Usual use pattern:
data["msg"] = "hello world"
encryption
Some number symbolizing "encryption key".
Note that game actually do not use any cryptography here.
If receiving object don't know right key, it must ignore encrypted signal in its receive_signal.
*/
/* the radio controller is a confusing piece of shit and didnt work
so i made radios not use the radio controller.
*/
var/list/all_radios = list()
/proc/add_radio(var/obj/item/radio, freq)
if(!freq || !radio)
return
if(!all_radios["[freq]"])
all_radios["[freq]"] = list(radio)
return freq
all_radios["[freq]"] |= radio
return freq
/proc/remove_radio(var/obj/item/radio, freq)
if(!freq || !radio)
return
if(!all_radios["[freq]"])
return
all_radios["[freq]"] -= radio
/proc/remove_radio_all(var/obj/item/radio)
for(var/freq in all_radios)
all_radios["[freq]"] -= radio
/*
Frequency range: 1200 to 1600
Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency, even during mapmaking)
Radio:
1459 - standard radio chat
1351 - Science
1353 - Command
1355 - Medical
1357 - Engineering
1359 - Security
1441 - death squad
1443 - Confession Intercom
1347 - Cargo techs
1349 - Service
Devices:
1451 - tracking implant
1457 - RSD default
On the map:
1311 for prison shuttle console (in fact, it is not used)
1435 for status displays
1437 for atmospherics/fire alerts
1439 for engine components
1439 for air pumps, air scrubbers, atmo control
1441 for atmospherics - supply tanks
1443 for atmospherics - distribution loop/mixed air tank
1445 for bot nav beacons
1447 for mulebot, secbot and ed209 control
1449 for airlock controls, electropack, magnets
1451 for toxin lab access
1453 for engineering access
1455 for AI access
*/
var/list/radiochannels = list(
"Common" = 1459,
"Science" = 1351,
"Command" = 1353,
"Medical" = 1355,
"Engineering" = 1357,
"Security" = 1359,
"Response Team" = 1443,
"Deathsquad" = 1441,
"Syndicate" = 1213,
"Supply" = 1347,
"Service" = 1349,
"AI Private" = 1447
)
//depenging helpers
var/list/DEPT_FREQS = list(1351, 1355, 1357, 1359, 1213, 1443, 1441, 1347, 1349)
// central command channels, i.e deathsquid & response teams
var/list/CENT_FREQS = list(1441, 1443)
var/const/COMM_FREQ = 1353 //command, colored gold in chat window
var/const/SYND_FREQ = 1213
// department channels
var/const/SEC_FREQ = 1359
var/const/ENG_FREQ = 1357
var/const/SCI_FREQ = 1351
var/const/MED_FREQ = 1355
var/const/SUP_FREQ = 1347
var/const/SRV_FREQ = 1349
// other channels
var/const/AIPRIV_FREQ = 1447
#define TRANSMISSION_WIRE 0
#define TRANSMISSION_RADIO 1
/* filters */
var/const/RADIO_TO_AIRALARM = "1"
var/const/RADIO_FROM_AIRALARM = "2"
var/const/RADIO_CHAT = "3"
var/const/RADIO_ATMOSIA = "4"
var/const/RADIO_NAVBEACONS = "5"
var/const/RADIO_AIRLOCK = "6"
var/const/RADIO_SECBOT = "7"
var/const/RADIO_MULEBOT = "8"
var/const/RADIO_MAGNETS = "9"
var/const/RADIO_CLEANBOT = "10"
var/const/RADIO_FLOORBOT = "11"
var/const/RADIO_MEDBOT = "12"
var/global/datum/controller/radio/radio_controller
/hook/startup/proc/createRadioController()
radio_controller = new /datum/controller/radio()
return 1
datum/controller/radio
var/list/datum/radio_frequency/frequencies = list()
proc/add_object(obj/device as obj, var/new_frequency as num, var/filter = null as text|null)
var/f_text = num2text(new_frequency)
var/datum/radio_frequency/frequency = frequencies[f_text]
if(!frequency)
frequency = new
frequency.frequency = new_frequency
frequencies[f_text] = frequency
frequency.add_listener(device, filter)
return frequency
proc/remove_object(obj/device, old_frequency)
var/f_text = num2text(old_frequency)
var/datum/radio_frequency/frequency = frequencies[f_text]
if(frequency)
frequency.remove_listener(device)
if(frequency.devices.len == 0)
del(frequency)
frequencies -= f_text
return 1
proc/return_frequency(var/new_frequency as num)
var/f_text = num2text(new_frequency)
var/datum/radio_frequency/frequency = frequencies[f_text]
if(!frequency)
frequency = new
frequency.frequency = new_frequency
frequencies[f_text] = frequency
return frequency
datum/radio_frequency
var/frequency as num
var/list/list/obj/devices = list()
proc
post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
//log_admin("DEBUG \[[world.timeofday]\]: post_signal {source=\"[source]\", [signal.debug_print()], filter=[filter]}")
// var/N_f=0
// var/N_nf=0
// var/Nt=0
var/turf/start_point
if(range)
start_point = get_turf(source)
if(!start_point)
del(signal)
return 0
if (filter) //here goes some copypasta. It is for optimisation. -rastaf0
for(var/obj/device in devices[filter])
if(device == source)
continue
if(range)
var/turf/end_point = get_turf(device)
if(!end_point)
continue
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
continue
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
for(var/obj/device in devices["_default"])
if(device == source)
continue
if(range)
var/turf/end_point = get_turf(device)
if(!end_point)
continue
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
continue
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
// N_f++
else
for (var/next_filter in devices)
// var/list/obj/DDD = devices[next_filter]
// Nt+=DDD.len
for(var/obj/device in devices[next_filter])
if(device == source)
continue
if(range)
var/turf/end_point = get_turf(device)
if(!end_point)
continue
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
continue
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
// N_nf++
// log_admin("DEBUG: post_signal(source=[source] ([source.x], [source.y], [source.z]),filter=[filter]) frequency=[frequency], N_f=[N_f], N_nf=[N_nf]")
// del(signal)
add_listener(obj/device as obj, var/filter as text|null)
if (!filter)
filter = "_default"
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
var/list/obj/devices_line = devices[filter]
if (!devices_line)
devices_line = new
devices[filter] = devices_line
devices_line+=device
// var/list/obj/devices_line___ = devices[filter_str]
// var/l = devices_line___.len
//log_admin("DEBUG: devices_line.len=[devices_line.len]")
//log_admin("DEBUG: devices(filter_str).len=[l]")
remove_listener(obj/device)
for (var/devices_filter in devices)
var/list/devices_line = devices[devices_filter]
devices_line-=device
while (null in devices_line)
devices_line -= null
if (devices_line.len==0)
devices -= devices_filter
del(devices_line)
obj/proc
receive_signal(datum/signal/signal, receive_method, receive_param)
return null
datum/signal
var/obj/source
var/transmission_method = 0
//0 = wire
//1 = radio transmission
//2 = subspace transmission
var/data = list()
var/encryption
var/frequency = 0
proc/copy_from(datum/signal/model)
source = model.source
transmission_method = model.transmission_method
data = model.data
encryption = model.encryption
frequency = model.frequency
proc/debug_print()
if (source)
. = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
else
. = "signal = {source = '[source]' ()\n"
for (var/i in data)
. += "data\[\"[i]\"\] = \"[data[i]]\"\n"
if(islist(data[i]))
var/list/L = data[i]
for(var/t in L)
. += "data\[\"[i]\"\] list has: [t]"
/*
HOW IT WORKS
The radio_controller is a global object maintaining all radio transmissions, think about it as about "ether".
Note that walkie-talkie, intercoms and headsets handle transmission using nonstandard way.
procs:
add_object(obj/device as obj, var/new_frequency as num, var/filter as text|null = null)
Adds listening object.
parameters:
device - device receiving signals, must have proc receive_signal (see description below).
one device may listen several frequencies, but not same frequency twice.
new_frequency - see possibly frequencies below;
filter - thing for optimization. Optional, but recommended.
All filters should be consolidated in this file, see defines later.
Device without listening filter will receive all signals (on specified frequency).
Device with filter will receive any signals sent without filter.
Device with filter will not receive any signals sent with different filter.
returns:
Reference to frequency object.
remove_object (obj/device, old_frequency)
Obliviously, after calling this proc, device will not receive any signals on old_frequency.
Other frequencies will left unaffected.
return_frequency(var/frequency as num)
returns:
Reference to frequency object. Use it if you need to send and do not need to listen.
radio_frequency is a global object maintaining list of devices that listening specific frequency.
procs:
post_signal(obj/source as obj|null, datum/signal/signal, var/filter as text|null = null, var/range as num|null = null)
Sends signal to all devices that wants such signal.
parameters:
source - object, emitted signal. Usually, devices will not receive their own signals.
signal - see description below.
filter - described above.
range - radius of regular byond's square circle on that z-level. null means everywhere, on all z-levels.
obj/proc/receive_signal(datum/signal/signal, var/receive_method as num, var/receive_param)
Handler from received signals. By default does nothing. Define your own for your object.
Avoid of sending signals directly from this proc, use spawn(-1). Do not use sleep() here please.
parameters:
signal - see description below. Extract all needed data from the signal before doing sleep(), spawn() or return!
receive_method - may be TRANSMISSION_WIRE or TRANSMISSION_RADIO.
TRANSMISSION_WIRE is currently unused.
receive_param - for TRANSMISSION_RADIO here comes frequency.
datum/signal
vars:
source
an object that emitted signal. Used for debug and bearing.
data
list with transmitting data. Usual use pattern:
data["msg"] = "hello world"
encryption
Some number symbolizing "encryption key".
Note that game actually do not use any cryptography here.
If receiving object don't know right key, it must ignore encrypted signal in its receive_signal.
*/
/* the radio controller is a confusing piece of shit and didnt work
so i made radios not use the radio controller.
*/
var/list/all_radios = list()
/proc/add_radio(var/obj/item/radio, freq)
if(!freq || !radio)
return
if(!all_radios["[freq]"])
all_radios["[freq]"] = list(radio)
return freq
all_radios["[freq]"] |= radio
return freq
/proc/remove_radio(var/obj/item/radio, freq)
if(!freq || !radio)
return
if(!all_radios["[freq]"])
return
all_radios["[freq]"] -= radio
/proc/remove_radio_all(var/obj/item/radio)
for(var/freq in all_radios)
all_radios["[freq]"] -= radio
/*
Frequency range: 1200 to 1600
Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency, even during mapmaking)
Radio:
1459 - standard radio chat
1351 - Science
1353 - Command
1355 - Medical
1357 - Engineering
1359 - Security
1441 - death squad
1443 - Confession Intercom
1347 - Cargo techs
1349 - Service
Devices:
1451 - tracking implant
1457 - RSD default
On the map:
1311 for prison shuttle console (in fact, it is not used)
1435 for status displays
1437 for atmospherics/fire alerts
1439 for engine components
1439 for air pumps, air scrubbers, atmo control
1441 for atmospherics - supply tanks
1443 for atmospherics - distribution loop/mixed air tank
1445 for bot nav beacons
1447 for mulebot, secbot and ed209 control
1449 for airlock controls, electropack, magnets
1451 for toxin lab access
1453 for engineering access
1455 for AI access
*/
var/list/radiochannels = list(
"Common" = 1459,
"Science" = 1351,
"Command" = 1353,
"Medical" = 1355,
"Engineering" = 1357,
"Security" = 1359,
"Response Team" = 1443,
"Deathsquad" = 1441,
"Syndicate" = 1213,
"Supply" = 1347,
"Service" = 1349,
"AI Private" = 1447
)
//depenging helpers
var/list/DEPT_FREQS = list(1351, 1355, 1357, 1359, 1213, 1443, 1441, 1347, 1349)
// central command channels, i.e deathsquid & response teams
var/list/CENT_FREQS = list(1441, 1443)
var/const/COMM_FREQ = 1353 //command, colored gold in chat window
var/const/SYND_FREQ = 1213
// department channels
var/const/SEC_FREQ = 1359
var/const/ENG_FREQ = 1357
var/const/SCI_FREQ = 1351
var/const/MED_FREQ = 1355
var/const/SUP_FREQ = 1347
var/const/SRV_FREQ = 1349
// other channels
var/const/AIPRIV_FREQ = 1447
#define TRANSMISSION_WIRE 0
#define TRANSMISSION_RADIO 1
/* filters */
var/const/RADIO_TO_AIRALARM = "1"
var/const/RADIO_FROM_AIRALARM = "2"
var/const/RADIO_CHAT = "3"
var/const/RADIO_ATMOSIA = "4"
var/const/RADIO_NAVBEACONS = "5"
var/const/RADIO_AIRLOCK = "6"
var/const/RADIO_SECBOT = "7"
var/const/RADIO_MULEBOT = "8"
var/const/RADIO_MAGNETS = "9"
var/const/RADIO_CLEANBOT = "10"
var/const/RADIO_FLOORBOT = "11"
var/const/RADIO_MEDBOT = "12"
var/global/datum/controller/radio/radio_controller
/hook/startup/proc/createRadioController()
radio_controller = new /datum/controller/radio()
return 1
datum/controller/radio
var/list/datum/radio_frequency/frequencies = list()
proc/add_object(obj/device as obj, var/new_frequency as num, var/filter = null as text|null)
var/f_text = num2text(new_frequency)
var/datum/radio_frequency/frequency = frequencies[f_text]
if(!frequency)
frequency = new
frequency.frequency = new_frequency
frequencies[f_text] = frequency
frequency.add_listener(device, filter)
return frequency
proc/remove_object(obj/device, old_frequency)
var/f_text = num2text(old_frequency)
var/datum/radio_frequency/frequency = frequencies[f_text]
if(frequency)
frequency.remove_listener(device)
if(frequency.devices.len == 0)
del(frequency)
frequencies -= f_text
return 1
proc/return_frequency(var/new_frequency as num)
var/f_text = num2text(new_frequency)
var/datum/radio_frequency/frequency = frequencies[f_text]
if(!frequency)
frequency = new
frequency.frequency = new_frequency
frequencies[f_text] = frequency
return frequency
datum/radio_frequency
var/frequency as num
var/list/list/obj/devices = list()
proc
post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
//log_admin("DEBUG \[[world.timeofday]\]: post_signal {source=\"[source]\", [signal.debug_print()], filter=[filter]}")
// var/N_f=0
// var/N_nf=0
// var/Nt=0
var/turf/start_point
if(range)
start_point = get_turf(source)
if(!start_point)
del(signal)
return 0
if (filter) //here goes some copypasta. It is for optimisation. -rastaf0
for(var/obj/device in devices[filter])
if(device == source)
continue
if(range)
var/turf/end_point = get_turf(device)
if(!end_point)
continue
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
continue
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
for(var/obj/device in devices["_default"])
if(device == source)
continue
if(range)
var/turf/end_point = get_turf(device)
if(!end_point)
continue
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
continue
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
// N_f++
else
for (var/next_filter in devices)
// var/list/obj/DDD = devices[next_filter]
// Nt+=DDD.len
for(var/obj/device in devices[next_filter])
if(device == source)
continue
if(range)
var/turf/end_point = get_turf(device)
if(!end_point)
continue
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
continue
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
// N_nf++
// log_admin("DEBUG: post_signal(source=[source] ([source.x], [source.y], [source.z]),filter=[filter]) frequency=[frequency], N_f=[N_f], N_nf=[N_nf]")
// del(signal)
add_listener(obj/device as obj, var/filter as text|null)
if (!filter)
filter = "_default"
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
var/list/obj/devices_line = devices[filter]
if (!devices_line)
devices_line = new
devices[filter] = devices_line
devices_line+=device
// var/list/obj/devices_line___ = devices[filter_str]
// var/l = devices_line___.len
//log_admin("DEBUG: devices_line.len=[devices_line.len]")
//log_admin("DEBUG: devices(filter_str).len=[l]")
remove_listener(obj/device)
for (var/devices_filter in devices)
var/list/devices_line = devices[devices_filter]
devices_line-=device
while (null in devices_line)
devices_line -= null
if (devices_line.len==0)
devices -= devices_filter
del(devices_line)
obj/proc
receive_signal(datum/signal/signal, receive_method, receive_param)
return null
datum/signal
var/obj/source
var/transmission_method = 0
//0 = wire
//1 = radio transmission
//2 = subspace transmission
var/data = list()
var/encryption
var/frequency = 0
proc/copy_from(datum/signal/model)
source = model.source
transmission_method = model.transmission_method
data = model.data
encryption = model.encryption
frequency = model.frequency
proc/debug_print()
if (source)
. = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
else
. = "signal = {source = '[source]' ()\n"
for (var/i in data)
. += "data\[\"[i]\"\] = \"[data[i]]\"\n"
if(islist(data[i]))
var/list/L = data[i]
for(var/t in L)
. += "data\[\"[i]\"\] list has: [t]"
+1 -3
View File
@@ -73,6 +73,7 @@ datum/controller/game_controller/proc/setup()
if(!garbage)
garbage = new /datum/controller/garbage_collector()
color_windows_init()
setup_objects()
setupgenetics()
setupfactions()
@@ -82,9 +83,6 @@ datum/controller/game_controller/proc/setup()
for(var/i=0, i<max_secret_rooms, i++)
make_mining_asteroid_secret()
color_windows_init()
spawn(0)
if(ticker)
ticker.pregame()
+9
View File
@@ -752,6 +752,15 @@ var/list/ghostteleportlocs = list()
/area/prison/cell_block/C
name = "\improper Prison Cell Block C"
icon_state = "brig"
//Labor camp
/area/mine/laborcamp
name = "Labor Camp"
icon_state = "brig"
/area/mine/laborcamp/security
name = "Labor Camp Security"
icon_state = "security"
//STATION13
-1
View File
@@ -13,7 +13,6 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.see_invisible = SEE_INVISIBLE_OBSERVER
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible(H) //BS12 EDIT
H.equip_or_collect(B, slot_l_hand)
H.equip_or_collect(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
+5 -4
View File
@@ -202,9 +202,10 @@ update_flag
return
/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj)
if(Proj.damage)
src.health -= round(Proj.damage / 2)
healthcheck()
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
if(Proj.damage)
src.health -= round(Proj.damage / 2)
healthcheck()
..()
/obj/machinery/portable_atmospherics/canister/meteorhit(var/obj/O as obj)
@@ -252,7 +253,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/canister/attack_alien(mob/living/carbon/alien/humanoid/user)
return
+1
View File
@@ -20,6 +20,7 @@
networks["Mining Outpost"] = list(access_qm,access_hop,access_hos,access_captain)
networks["Research"] = list(access_rd,access_hos,access_captain)
networks["Prison"] = list(access_hos,access_captain)
networks["Labor"] = list(access_hos,access_captain)
networks["Interrogation"] = list(access_hos,access_captain)
networks["Atmosphere Alarms"] = list(access_ce,access_hos,access_captain)
networks["Fire Alarms"] = list(access_ce,access_hos,access_captain)
+2 -2
View File
@@ -63,10 +63,10 @@
/obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj)
if(prob(Proj.damage))
set_broken()
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
set_broken()
..()
/obj/machinery/computer/blob_act()
if (prob(75))
for(var/x in verbs)
+2 -1
View File
@@ -38,8 +38,9 @@
var/p = inserted_id:points
var/g = inserted_id:goal
dat += text("<A href='?src=\ref[src];id=1'>[inserted_id]</A><br>")
dat += text("Collectd Points: [p]. <A href='?src=\ref[src];id=2'>Reset.</A><br>")
dat += text("Collected points: [p]. <A href='?src=\ref[src];id=2'>Reset.</A><br>")
dat += text("Card goal: [g]. <A href='?src=\ref[src];id=3'>Set </A><br>")
dat += text("Space Law recommends sentences of 100 points per minute they would normally serve in the brig.<BR>")
else
dat += text("<A href='?src=\ref[src];id=0'>Insert Prisoner ID.</A><br>")
dat += "<HR>Chemical Implants<BR>"
+48 -25
View File
@@ -48,6 +48,35 @@ var/datum/feed_network/news_network = new /datum/feed_network //The global n
var/list/obj/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence.
/obj/item/newscaster_frame
name = "newscaster frame"
desc = "Used to build newscasters, just secure to the wall."
icon_state = "newscaster"
item_state = "syringe_kit"
m_amt = 14000
g_amt = 8000
/obj/item/newscaster_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "<span class='alert'>Newscaster cannot be placed on this spot.</span>"
return
if (A.requires_power == 0 || A.name == "Space")
usr << "<span class='alert'>Newscaster cannot be placed in this area.</span>"
return
for(var/obj/machinery/newscaster/T in loc)
usr << "<span class='alert'>There is another newscaster here.</span>"
return
var/obj/machinery/newscaster/N = new(loc)
N.pixel_y -= (loc.y - on_wall.y) * 32
N.pixel_x -= (loc.x - on_wall.x) * 32
qdel(src)
/obj/machinery/newscaster
name = "newscaster"
@@ -699,40 +728,34 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>Now [anchored ? "un" : ""]securing [name]</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 60))
new /obj/item/newscaster_frame(loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
qdel(src)
return
/* if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda) ) //Name verification for channels or messages
if(src.screen == 4 || src.screen == 5)
if( istype(I, /obj/item/device/pda) )
var/obj/item/device/pda/P = I
if(P.id)
src.scanned_user = "[P.id.registered_name] ([P.id.assignment])"
src.screen=2
else
var/obj/item/weapon/card/id/T = I
src.scanned_user = text("[T.registered_name] ([T.assignment])")
src.screen=2*/ //Obsolete after autorecognition
if (src.isbroken)
if (isbroken)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
for (var/mob/O in hearers(5, src.loc))
O.show_message("<EM>[user.name]</EM> further abuses the shattered [src.name].")
visible_message("<span class='danger'>[user.name] further abuses the shattered [src.name].</span>", null, 5 )
else
if(istype(I, /obj/item/weapon) )
var/obj/item/weapon/W = I
if(W.damtype == STAMINA)
return
if(W.force <15)
for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] hits the [src.name] with the [W.name] with no visible effect." )
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
visible_message("<span class='danger'>[user.name] hits the [src.name] with the [W.name] with no visible effect.</span>", null , 5 )
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
else
src.hitstaken++
if(src.hitstaken==3)
for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] smashes the [src.name]!" )
src.isbroken=1
hitstaken++
if(hitstaken==3)
visible_message("<span class='danger'>[user.name] smashes the [src.name]!</span>", null, 5 )
isbroken=1
playsound(src.loc, 'sound/effects/Glassbr3.ogg', 100, 1)
else
for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] forcefully slams the [src.name] with the [I.name]!" )
visible_message("<span class='danger'>[user.name] forcefully slams the [src.name] with the [I.name]!</span>", null, 5 )
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
else
user << "<FONT COLOR='blue'>This does nothing.</FONT>"
+4 -1
View File
@@ -369,8 +369,11 @@ Status: []<BR>"},
sleep(60)
attacked = 0
src.health -= Proj.damage
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
..()
if(prob(45) && Proj.damage > 0) src.spark_system.start()
if (src.health <= 0)
src.die() // the death process :(
+7 -6
View File
@@ -275,12 +275,13 @@
popping = 0
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
src.health -= Proj.damage
..()
if(prob(45) && Proj.damage > 0) src.spark_system.start()
del (Proj)
if (src.health <= 0)
src.die()
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
src.health -= Proj.damage
..()
if(prob(45) && Proj.damage > 0) src.spark_system.start()
del(Proj)
if (src.health <= 0)
src.die()
return
/obj/machinery/turret/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
+5 -3
View File
@@ -260,7 +260,7 @@
if(do_after(melee_cooldown))
melee_can_hit = 1
return
/obj/mecha/proc/mech_toxin_damage(mob/living/target)
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
if(target.reagents)
@@ -554,8 +554,10 @@
return
if(istype(Proj, /obj/item/projectile/beam/pulse))
ignore_threshold = 1
src.take_damage(Proj.damage,Proj.flag)
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
src.take_damage(Proj.damage,Proj.flag)
src.visible_message("<span class='danger'>[src.name] is hit by [Proj].</span>")
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold)
Proj.on_hit(src)
return
+37
View File
@@ -19,6 +19,43 @@
return
*/
/obj/mecha/working/ripley/Destroy()
while(src.damage_absorption.["brute"] < 0.6)
new /obj/item/asteroid/goliath_hide(src.loc)
src.damage_absorption.["brute"] = src.damage_absorption.["brute"] + 0.1 //If a goliath-plated ripley gets killed, all the plates drop
for(var/atom/movable/A in src.cargo)
A.loc = loc
step_rand(A)
cargo.Cut()
..()
/obj/mecha/working/ripley/go_out()
..()
if (src.damage_absorption.["brute"] < 0.6 && src.damage_absorption.["brute"] > 0.3)
src.overlays = null
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-open")
else if (src.damage_absorption.["brute"] == 0.3)
src.overlays = null
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full-open")
/obj/mecha/working/ripley/moved_inside(var/mob/living/carbon/human/H as mob)
..()
if (src.damage_absorption.["brute"] < 0.6 && src.damage_absorption.["brute"] > 0.3)
src.overlays = null
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g")
else if (src.damage_absorption.["brute"] == 0.3)
src.overlays = null
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full")
/obj/mecha/working/ripley/mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
..()
if (src.damage_absorption.["brute"] < 0.6 && src.damage_absorption.["brute"] > 0.3)
src.overlays = null
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g")
else if (src.damage_absorption.["brute"] == 0.3)
src.overlays = null
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full")
/obj/mecha/working/ripley/firefighter
desc = "Standart APLU chassis was refitted with additional thermal protection and cistern."
name = "APLU \"Firefighter\""
@@ -155,13 +155,13 @@
qdel(src)
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
if(health <= 0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
del(src)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
if(health <= 0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
del(src)
return
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
@@ -273,7 +273,7 @@
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(src == user.loc)
user << "<span class='notice'>You can not [welded?"unweld":"weld"] the locker from inside.</span>"
user << "<span class='notice'>You can not [welded?"unweld":"weld"] the locker from inside.</span>"
return
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
+5 -5
View File
@@ -69,16 +69,16 @@
/obj/structure/displaycase/captains_laser
name = "captain's display case"
desc = "A display case for the captain's antique laser gun. It taunts you to kick it."
desc = "A display case for the captain's antique laser gun. It taunts you to kick it."
/obj/structure/displaycase/captains_laser/New()
req_access = list(access_captain)
occupant = new /obj/item/weapon/gun/energy/laser/captain(src)
locked = 1
update_icon()
/obj/structure/proc/getPrint(mob/user as mob)
return md5(user:dna:uni_identity)
return md5(user:dna:uni_identity)
/obj/structure/displaycase/examine()
..()
@@ -112,12 +112,12 @@
/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
..()
src.healthcheck()
return
/obj/structure/displaycase/blob_act()
if (prob(75))
getFromPool(/obj/item/weapon/shard, loc)
+6 -9
View File
@@ -128,16 +128,13 @@
return !density
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
//Tasers and the like should not damage grilles.
if(Proj.damage_type == STAMINA)
if(!Proj)
return
src.health -= Proj.damage*0.2
healthcheck()
return 0
..()
if((Proj.damage_type != STAMINA)) //Grilles can't be exhausted to death
src.health -= Proj.damage*0.3
healthcheck()
return
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(iswirecutter(W))
+3 -5
View File
@@ -58,11 +58,9 @@ var/global/wcColored
// var/icon/silicateIcon = null // the silicated icon
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
//Tasers and the like should not damage windows.
if(Proj.damage_type == STAMINA)
return
health -= Proj.damage
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
update_nearby_icons()
..()
if(health <= 0)
var/pdiff=performWallPressureCheck(src.loc)
+5
View File
@@ -451,6 +451,11 @@
AH.try_build(src)
return
else if(istype(W,/obj/item/newscaster_frame))
var/obj/item/newscaster_frame/AH = W
AH.try_build(src)
return 1
else if(istype(W,/obj/item/alarm_frame))
var/obj/item/alarm_frame/AH = W
AH.try_build(src)
@@ -286,6 +286,11 @@
else if( istype(W,/obj/item/apc_frame) )
var/obj/item/apc_frame/AH = W
AH.try_build(src)
else if(istype(W,/obj/item/newscaster_frame))
var/obj/item/newscaster_frame/AH = W
AH.try_build(src)
return 1
else if( istype(W,/obj/item/alarm_frame) )
var/obj/item/alarm_frame/AH = W
+10
View File
@@ -1976,6 +1976,16 @@
feedback_add_details("admin_secrets_fun_used","FLUX")
message_admins("[key_name_admin(usr)] has triggered an energetic flux")
new /datum/event/anomaly/anomaly_flux()
if("goblob")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BLOB")
message_admins("[key_name_admin(usr)] has triggered a blob.")
new /datum/game_mode/blob()
if("aliens")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ALIEN")
message_admins("[key_name_admin(usr)] has triggered an alien infestation.")
new /datum/event/alien_infestation()
if("power")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","P")
+1
View File
@@ -134,6 +134,7 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/count_objects_all
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
src.verbs += /client/proc/startSinglo
src.verbs += /client/proc/ticklag
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs += /client/proc/kaboom
// src.verbs += /client/proc/splash
+40 -3
View File
@@ -6,8 +6,15 @@
/datum/event/blob/announce()
command_alert("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
command_alert("Confirmed outbreak of level 7 biohazard aboard [station_name()]. Nanotrasen has issued a directive 7-10. The station is to be considered quarantined.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs while minimizing collateral damage."
aiPlayer.set_zeroth_law(law)
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
aiPlayer << "Laws Updated: [law]"
/datum/event/blob/start()
var/turf/T = pick(blobstart)
@@ -18,10 +25,40 @@
for(var/i = 1; i < rand(3, 6), i++)
Blob.process()
/datum/event/blob/tick()
if(!Blob)
kill()
return
if(IsMultiple(activeFor, 3))
Blob.process()
Blob.process()
var/blobs = 0
for(var/obj/effect/blob/core/core in world)
blobs++
if(blobs >= 3)
announce_nuke()
/datum/event/blob/proc/announce_nuke()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code && bomb.z == 1)
nukecode = bomb.r_code
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [nukecode] ", "Biohazard Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
V.locked = 0
V.update_icon()
spawn(10)
world << sound('sound/effects/siren.ogg')
/datum/event/blob/kill()
command_alert("The level 7 biohazard aboard [station_name()] has been killed. Directive 7-10 has been lifted, and the station is no longer quarantined.", "Biohazard Update")
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
var/law = ""
aiPlayer.set_zeroth_law(law)
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
aiPlayer << "Laws Updated: [law]"
..()
+1 -1
View File
@@ -114,7 +114,7 @@ var/list/karma_spenders = list()
var/choice = input("Give [M.name] good karma?", "Karma") in list("Good", "Cancel")
if(!choice || choice == "Cancel")
return
if(choice == "Good")
if(choice == "Good" && !(src.client.karma_spent))
M.client.karma += 1
usr << "[choice] karma spent on [M.name]."
src.client.karma_spent = 1
@@ -1,2 +1,2 @@
/turf/simulated/mineral/random/labormineral
mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25/*, "Adamantine" =5, "Cave" = 1 */) //Don't suffocate the prisoners with caves
mineralSpawnChanceList = list("Uranium" = 1, "Iron" = 100, "Diamond" = 1, "Gold" = 1, "Silver" = 1, "Plasma" = 1/*, "Adamantine" =5, "Cave" = 1 */) //Don't suffocate the prisoners with caves
+111 -52
View File
@@ -1,20 +1,25 @@
/**********************Prisoners' Console**************************/
/obj/machinery/mineral/labor_claim_console
name = "Point Claim Console"
name = "point claim console"
desc = "A stacking console with an electromagnetic writer, used to track ore mined by prisoners."
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "console"
desc = "A stacking console with an electromagnetic writer, used to track ore mined by prisoners."
density = 1
density = 0
anchored = 1
var/obj/machinery/mineral/stacking_machine/laborstacker/machine = null
var/machinedir = SOUTH
var/obj/item/weapon/card/id/prisoner/inserted_id
var/obj/machinery/door/airlock/release_door
var/door_tag = "prisonshuttle"
var/obj/item/device/radio/Radio //needed to send messages to sec radio
var/use_release_door = 0
/obj/machinery/mineral/labor_claim_console/New()
..()
Radio = new/obj/item/device/radio(src)
Radio.listening = 0
spawn(7)
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
var/t
@@ -22,80 +27,101 @@
t = d.id_tag
if(t == src.door_tag)
src.release_door = d
if (machine && release_door)
if (machine && (release_door || !use_release_door))
machine.console = src
else
del(src)
qdel(src)
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
if(emagged) return 1 //Shuttle is emagged, let any ol' person through
return (istype(inserted_id) && inserted_id.points >= inserted_id.goal) //Otherwise, only let them out if the prisoner's reached his quota.
/obj/machinery/mineral/labor_claim_console/attack_hand(user as mob)
var/dat
dat += text("<b>Point Claim Console</b><br><br>")
if(emagged)
if(emagged) //Shit's broken
dat += text("<b>QU&#t0A In%aL*D</b><br>")
dat += text("<A href='?src=\ref[src];choice=3'>Proceed to Station.</A><br>")
dat += text("<A href='?src=\ref[src];choice=4'>Open release door.</A><br>")
if(istype(inserted_id))
var/p = inserted_id.points
var/g = inserted_id.goal
dat += text("[p] / [g] collected. <A href='?src=\ref[src];choice=1'>Eject ID.</A><br>")
dat += text("Unclaimed Collection Points: [machine.points]. <A href='?src=\ref[src];choice=2'>Claim points.</A><br>")
if(p >= g)
dat += text("<b>Quota met.</b><br>")
dat += text("<A href='?src=\ref[src];choice=3'>Proceed to Station.</A><br>")
dat += text("<A href='?src=\ref[src];choice=4'>Open release door.</A><br>")
else
dat += text("No ID inserted. <A href='?src=\ref[src];choice=0'>Insert ID.</A><br>")
else if(istype(inserted_id)) //There's an ID in there.
dat += text("ID: [inserted_id.registered_name] <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>")
dat += text("Points Collected:[inserted_id.points]<br>")
dat += text("Point Quota: [inserted_id.goal] - Reach your quota to earn your release<br>")
dat += text("Unclaimed Collection Points: [machine.points]. <A href='?src=\ref[src];choice=claim'>Claim points.</A><br>")
else //No ID in sight. Complain about it.
dat += text("No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>")
if(check_auth())
dat += text("<A href='?src=\ref[src];choice=station'>Proceed to station.</A><br>")
if(use_release_door)
dat += text("<A href='?src=\ref[src];choice=release'>Open release door.</A><br>")
if(machine)
dat += text("<HR><b>Mineral Value List:</b><BR>[machine.get_ore_values()]")
user << browse("[dat]", "window=console_stacking_machine")
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/card/emag))
emagged = 1
user << "<span class='warning'>PZZTTPFFFT</span>"
return
else if(istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id))
return attack_hand(user)
else if(istype(I, /obj/item/weapon/card/emag))
return emag(user)
..()
/obj/machinery/mineral/labor_claim_console/proc/emag(mob/user as mob)
if(!emagged)
emagged = 1
user << "<span class='warning'>PZZTTPFFFT</span>"
/obj/machinery/mineral/labor_claim_console/Topic(href, href_list)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles["Labor"]
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["choice"])
switch(href_list["choice"])
if("0")
var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
I.loc = src
inserted_id = I
else usr << "\red No valid ID."
if("1")
inserted_id.loc = get_step(src,get_turf(usr))
if(istype(inserted_id)) //Sanity check against href spoofs
if(href_list["choice"] == "eject")
inserted_id.loc = loc
inserted_id.verb_pickup()
inserted_id = null
if("2")
if(href_list["choice"] == "claim")
inserted_id.points += machine.points
machine.points = 0
usr << "Points transferred."
if("3")
if(labor_shuttle_location == 1)
if (!labor_shuttle_moving)
usr << "\blue Shuttle recieved message and will be sent shortly."
move_labor_shuttle()
else
usr << "\blue Shuttle is already moving."
src << "Points transferred."
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
I.loc = src
inserted_id = I
else usr << "<span class='warning'>Invalid ID.</span>"
if(check_auth()) //Sanity check against hef spoofs
if(href_list["choice"] == "station")
if(!alone_in_area(get_area(src), usr))
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
else
usr << "\blue Shuttle is already on-station."
if("4")
if(release_door.density)
release_door.open()
if(shuttle.location == 1)
if (shuttle.moving_status == SHUTTLE_IDLE)
Radio.set_frequency(SEC_FREQ)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", SEC_FREQ)
usr << "<span class='notice'>Shuttle received message and will be sent shortly.</span>"
shuttle.launch()
else
usr << "\blue Shuttle is already moving."
else
usr << "\blue Shuttle is already on-station."
src.updateUsrDialog()
if(href_list["choice"] == "release")
if(alone_in_area(get_area(loc), usr))
if(shuttle.location == 1)
if(release_door && release_door.density)
release_door.open()
else
usr << "<span class='warning'>Prisoners can only be released while docked with the station.</span>"
else
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
src.updateUsrDialog()
return
@@ -103,9 +129,16 @@
/obj/machinery/mineral/stacking_machine/laborstacker
var/points = 0 //The unclaimed value of ore stacked. Value for each ore loosely relative to its rarity. Iron = 1; Diamond = 25.
var/list/ore_values = list(("iron" = 1), ("diamond" = 25), ("solid plasma" = 2), ("gold" = 5), ("silver" = 5), ("bananium" = 9999), ("uranium" = 5), ("glass" = 1), ("reinforced glass" = 2), ("plasteel" = 3))
var/points = 0 //The unclaimed value of ore stacked. Value for each ore loosely relative to its rarity.
var/list/ore_values = list(("glass" = 1), ("metal" = 2), ("solid plasma" = 20), ("plasteel" = 23), ("reinforced glass" = 4), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("diamond" = 25), ("bananium" = 50))
/obj/machinery/mineral/stacking_machine/laborstacker/proc/get_ore_values()
var/dat = "<table border='0' width='200'>"
for(var/ore in ore_values)
var/value = ore_values[ore]
dat += "<tr><td>[capitalize(ore)]</td><td>[value]</td></tr>"
dat += "</table>"
return dat
/obj/machinery/mineral/stacking_machine/laborstacker/process()
if (src.output && src.input)
@@ -120,4 +153,30 @@
else
S.loc = output.loc
else
O.loc = output.loc
O.loc = output.loc
/**********************Point Lookup Console**************************/
/obj/machinery/mineral/labor_points_checker
name = "points checking console"
desc = "A console used by prisoners to check the progress on their quotas. Simply swipe a prisoner ID."
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "console"
density = 0
anchored = 1
/obj/machinery/mineral/labor_points_checker/attack_hand(mob/user)
user.examine(src)
/obj/machinery/mineral/labor_points_checker/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id/prisoner))
var/obj/item/weapon/card/id/prisoner/prisoner_id = I
user << "<span class='notice'><B>ID: [prisoner_id.registered_name]</B></span>"
user << "<span class='notice'>Points Collected:[prisoner_id.points]</span>"
user << "<span class='notice'>Point Quota: [prisoner_id.goal]</span>"
user << "<span class='notice'>Collect points by bringing smelted minerals to the Labor Shuttle stacking machine. Reach your quota to earn your release.</span>"
else
user << "<span class='warning'>Error: Invalid ID</span>"
return
..()
@@ -53,13 +53,13 @@
/mob/living/carbon/alien/humanoid/movement_delay()
var/tally = 0
if (istype(src, /mob/living/carbon/alien/humanoid/queen))
tally += 5
tally += 4
if (istype(src, /mob/living/carbon/alien/humanoid/drone))
tally += 1
tally += 0
if (istype(src, /mob/living/carbon/alien/humanoid/sentinel))
tally += 1
tally += 0
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
tally = -1 // hunters go supersuperfast
tally = -2 // hunters go supersuperfast
return (tally + move_delay_add + config.alien_delay)
/mob/living/carbon/alien/humanoid/Process_Spacemove(var/check_drift = 0)
@@ -11,6 +11,7 @@
status_flags = GODMODE // You can't damage it.
mouse_opacity = 0
see_in_dark = 7
invisibility = INVISIBILITY_MAXIMUM
/mob/aiEye/New()
..()
@@ -123,8 +123,8 @@
src.modules += new /obj/item/device/healthanalyzer(src)
src.modules += new /obj/item/device/reagent_scanner/adv(src)
src.modules += new /obj/item/roller_holder(src)
src.modules += new /obj/item/stack/medical/ointment(src)
src.modules += new /obj/item/stack/medical/bruise_pack(src)
src.modules += new /obj/item/stack/medical/advanced/ointment(src)
src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src)
src.modules += new /obj/item/stack/medical/splint(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
@@ -179,7 +179,8 @@
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
var/reflectchance = 80 - round(P.damage/3)
if(prob(reflectchance))
adjustBruteLoss(P.damage * 0.5)
if((P.damage_type == BRUTE || P.damage_type == BURN))
adjustBruteLoss(P.damage * 0.5)
visible_message("<span class='danger'>The [P.name] gets reflected by [src]'s shell!</span>", \
"<span class='userdanger'>The [P.name] gets reflected by [src]'s shell!</span>")
@@ -11,7 +11,7 @@
var/projectiletype
var/projectilesound
var/casingtype
var/move_to_delay = 2 //delay for the automated movement.
var/move_to_delay = 3 //delay for the automated movement.
var/list/friends = list()
var/vision_range = 9 //How big of an area to search for targets in, a vision of 9 attempts to find targets as soon as they walk into screen view
@@ -32,8 +32,8 @@
/mob/living/simple_animal/hostile/asteroid/bullet_act(var/obj/item/projectile/P)//Reduces damage from most projectiles to curb off-screen kills
if(!stat)
Aggro()
if(P.damage < 30)
P.damage = (P.damage / 2)
if(P.damage < 30 && P.damage_type != BRUTE)
P.damage = (P.damage / 3)
visible_message("<span class='danger'>The [P] has a reduced effect on [src]!</span>")
..()
@@ -42,7 +42,7 @@
var/obj/item/T = AM
if(!stat)
Aggro()
if(T.throwforce <= 15)
if(T.throwforce <= 20)
visible_message("<span class='notice'>The [T.name] [src.throw_message] [src.name]!</span>")
return
..()
@@ -76,6 +76,8 @@
ranged_cooldown_cap = 4
aggro_vision_range = 9
idle_vision_range = 2
turns_per_move = 5
var/droppeddiamond = 0 // Safety check to prevent diamond duplication bug
/obj/item/projectile/temp/basilisk
name = "freezing blast"
@@ -108,10 +110,12 @@
adjustBruteLoss(110)
/mob/living/simple_animal/hostile/asteroid/basilisk/Die()
var/counter
for(counter=0, counter<2, counter++)
var/obj/item/weapon/ore/diamond/D = new /obj/item/weapon/ore/diamond(src.loc)
D.layer = 4.1
if(!droppeddiamond)
var/counter
for(counter=0, counter<2, counter++)
var/obj/item/weapon/ore/diamond/D = new /obj/item/weapon/ore/diamond(src.loc)
D.layer = 4.1
droppeddiamond = 1
..()
/mob/living/simple_animal/hostile/asteroid/goldgrub
@@ -123,13 +127,13 @@
icon_aggro = "Goldgrub_alert"
icon_dead = "Goldgrub_dead"
icon_gib = "syndicate_gib"
vision_range = 3
vision_range = 2
aggro_vision_range = 9
idle_vision_range = 3
move_to_delay = 3
idle_vision_range = 2
move_to_delay = 5
friendly = "harmlessly rolls into"
maxHealth = 60
health = 60
maxHealth = 45
health = 45
harm_intent_damage = 5
melee_damage_lower = 0
melee_damage_upper = 0
@@ -208,6 +212,10 @@
Reward()
..()
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustBruteLoss(var/damage)
idle_vision_range = 9
..()
/mob/living/simple_animal/hostile/asteroid/hivelord
name = "hivelord"
desc = "A truly alien creature, it is a mass of unknown organic material, constantly fluctuating. When attacking, pieces of it split off and attack in tandem with the original."
@@ -293,7 +301,7 @@
icon_dead = "Hivelordbrood"
icon_gib = "syndicate_gib"
mouse_opacity = 2
move_to_delay = 0
move_to_delay = 1
friendly = "buzzes near"
vision_range = 10
speed = 3
@@ -328,9 +336,10 @@
mouse_opacity = 2
move_to_delay = 40
ranged = 1
ranged_cooldown = 2 //By default, start the Goliath with his cooldown off so that people can run away quickly on first sight
ranged_cooldown_cap = 8
friendly = "wails at"
vision_range = 5
vision_range = 4
speed = 3
maxHealth = 300
health = 300
@@ -341,18 +350,50 @@
throw_message = "does nothing to the rocky hide of the"
aggro_vision_range = 9
idle_vision_range = 5
anchored = 1 //Stays anchored until death as to be unpullable
var/pre_attack = 0
/mob/living/simple_animal/hostile/asteroid/goliath/Life()
..()
handle_preattack()
/mob/living/simple_animal/hostile/asteroid/goliath/proc/handle_preattack()
if(ranged_cooldown <= 2 && !pre_attack)
pre_attack++
if(!pre_attack || stat || stance == HOSTILE_STANCE_IDLE)
return
icon_state = "Goliath_preattack"
/mob/living/simple_animal/hostile/asteroid/goliath/revive()
anchored = 1
..()
/mob/living/simple_animal/hostile/asteroid/goliath/Die()
anchored = 0
..()
/mob/living/simple_animal/hostile/asteroid/goliath/OpenFire()
visible_message("<span class='warning'>The [src.name] digs its tentacles under [target.name]!</span>")
var/tturf = get_turf(target)
new /obj/effect/goliath_tentacle/original(tturf)
ranged_cooldown = ranged_cooldown_cap
if(get_dist(src, target) <= 7)//Screen range check, so you can't get tentacle'd offscreen
visible_message("<span class='warning'>The [src.name] digs its tentacles under [target.name]!</span>")
new /obj/effect/goliath_tentacle/original(tturf)
ranged_cooldown = ranged_cooldown_cap
icon_state = icon_aggro
pre_attack = 0
return
/mob/living/simple_animal/hostile/asteroid/goliath/adjustBruteLoss(var/damage)
ranged_cooldown--
handle_preattack()
..()
/mob/living/simple_animal/hostile/asteroid/goliath/Aggro()
vision_range = aggro_vision_range
handle_preattack()
if(icon_state != icon_aggro)
icon_state = icon_aggro
return
/obj/effect/goliath_tentacle/
name = "Goliath tentacle"
icon = 'icons/mob/animal.dmi'
@@ -369,6 +410,9 @@
/obj/effect/goliath_tentacle/original
/obj/effect/goliath_tentacle/original/New()
for(var/obj/effect/goliath_tentacle/original/O in loc)//No more GG NO RE from 2+ goliaths simultaneously tentacling you
if(O != src)
qdel(src)
var/list/directions = cardinal.Copy()
var/counter
for(counter = 1, counter <= 3, counter++)
@@ -378,6 +422,7 @@
new /obj/effect/goliath_tentacle(T)
..()
/obj/effect/goliath_tentacle/proc/Trip()
for(var/mob/living/M in src.loc)
M.Weaken(5)
@@ -400,6 +445,7 @@
desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna."
icon = 'icons/obj/items.dmi'
icon_state = "goliath_hide"
flags = NOBLUDGEON
w_class = 3
layer = 4
@@ -408,10 +454,31 @@
if(istype(target, /obj/item/clothing/suit/space/rig/mining) || istype(target, /obj/item/clothing/head/helmet/space/rig/mining))
var/obj/item/clothing/C = target
var/current_armor = C.armor
if(current_armor.["melee"] < 90)
current_armor.["melee"] = min(current_armor.["melee"] + 10, 90)
if(current_armor.["melee"] < 80)
current_armor.["melee"] = min(current_armor.["melee"] + 10, 80)
user << "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>"
del(src)
else
user << "<span class='info'>You can't improve [C] any further.</span>"
return
return
if(istype(target, /obj/mecha/working/ripley))
var/obj/mecha/D = target
var/list/damage_absorption = D.damage_absorption
if(damage_absorption.["brute"] > 0.3)
damage_absorption.["brute"] = max(damage_absorption.["brute"] - 0.1, 0.3)
user << "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>"
qdel(src)
if(D.icon_state == "ripley-open")
D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open")
D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates."
else
user << "<span class='info'>You can't add armour onto the mech while someone is inside!</span>"
if(damage_absorption.["brute"] == 0.3)
if(D.icon_state == "ripley-open")
D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open")
D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter."
else
user << "<span class='info'>You can't add armour onto the mech while someone is inside!</span>"
else
user << "<span class='info'>You can't improve [D] any further.</span>"
return
@@ -75,7 +75,8 @@
/mob/living/simple_animal/hostile/syndicate/melee/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
if(prob(65))
src.health -= Proj.damage
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
src.health -= Proj.damage
else
visible_message("\red <B>[src] blocks [Proj] with its shield!</B>")
return 0
@@ -56,7 +56,7 @@
var/friendly = "nuzzles" //If the mob does no damage with it's attack
var/environment_smash = 0 //Set to 1 to allow breaking of crates,lockers,racks,tables; 2 for walls; 3 for Rwalls
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
var/speed = 1 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
var/can_hide = 0
//Hot simple_animal baby making vars
@@ -251,8 +251,11 @@
adjustBruteLoss(damage)
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
adjustBruteLoss(Proj.damage)
if(!Proj)
return
if((Proj.damage_type != STAMINA))
adjustBruteLoss(Proj.damage)
Proj.on_hit(src, 0)
return 0
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
+3 -3
View File
@@ -245,14 +245,14 @@
if("run")
if(mob.drowsyness > 0)
move_delay += 6
move_delay += config.run_speed
move_delay += 1+config.run_speed
if("walk")
move_delay += config.walk_speed
move_delay += 1+config.walk_speed
move_delay += mob.movement_delay()
if(config.Tickcomp)
move_delay -= 1.3
var/tickcomp = (1 / (world.tick_lag)) * 1.3
var/tickcomp = ((1/(world.tick_lag))*1.3)
move_delay = move_delay + tickcomp
if(istype(mob.buckled, /obj/vehicle) || istype(mob.buckled, /obj/structure/stool/bed/chair/cart))
@@ -222,19 +222,33 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/weapon/gun/energy/kinetic_accelerator
name = "proto-kinetic accelerator"
desc = "According to Nanotrasen accounting, this is mining equipment. It's been modified to the legal limit on power output, and often serves as a miner's first defense against hostile alien life; it's not very powerful unless used in a low pressure environment."
icon_state = "freezegun"
item_state = "shotgun"
desc = "According to Nanotrasen accounting, this is mining equipment. It's been modified for extreme power output to crush rocks, but often serves as a miner's first defense against hostile alien life; it's not very powerful unless used in a low pressure environment."
icon_state = "kineticgun"
item_state = "kineticgun"
icon_override = 'icons/mob/in-hand/guns.dmi'
projectile_type = "/obj/item/projectile/kinetic"
cell_type = "/obj/item/weapon/cell/crap"
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
charge_cost = 5000
cell_type = "/obj/item/weapon/cell/crap"
var/overheat = 0
var/recent_reload = 1
/obj/item/weapon/gun/energy/kinetic_accelerator/Fire()
overheat = 1
spawn(20)
overheat = 0
recent_reload = 0
..()
/obj/item/weapon/gun/energy/kinetic_accelerator/attack_self(var/mob/living/user/L)
if(overheat || recent_reload)
return
power_supply.give(5000)
playsound(src.loc, 'sound/weapons/shotgunpump.ogg', 60, 1)
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
recent_reload = 1
update_icon()
return
/obj/item/weapon/gun/energy/disabler
name = "disabler"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
+4 -28
View File
@@ -187,38 +187,15 @@ obj/item/projectile/kinetic/New()
range--
if(range <= 0)
new /obj/item/effect/kinetic_blast(src.loc)
delete()
del(src)
/obj/item/projectile/kinetic/on_hit(var/atom/target)
/obj/item/projectile/kinetic/on_hit(atom/target)
var/turf/target_turf= get_turf(target)
if(istype(target_turf, /turf/simulated/mineral))
var/turf/simulated/mineral/M = target_turf
M.GetDrilled()
new /obj/item/effect/kinetic_blast(target_turf)
..(target,blocked)
/obj/item/projectile/kinetic/Bump(atom/A as mob|obj|turf|area)
if(!loc) return
if(A == firer)
loc = A.loc
return
if(src)//Do not add to this if() statement, otherwise the meteor won't delete them
if(A)
var/turf/target_turf = get_turf(A)
//testing("Bumped [A.type], on [target_turf.type].")
if(istype(target_turf, /turf/unsimulated/mineral))
var/turf/simulated/mineral/M = target_turf
M.GetDrilled()
// Now we bump as a bullet, if the atom is a non-turf.
if(!isturf(A))
..(A)
qdel(src) // Comment this out if you want to shoot through the asteroid, ERASER-style.
return 1
else
qdel(src)
return 0
..()
/obj/item/effect/kinetic_blast
name = "kinetic explosion"
@@ -228,5 +205,4 @@ obj/item/projectile/kinetic/New()
/obj/item/effect/kinetic_blast/New()
spawn(4)
del(src)
del(src)
@@ -233,6 +233,14 @@
materials = list("$metal" = MINERAL_MATERIAL_AMOUNT)
build_path = /obj/item/stack/sheet/metal
category = list("initial","Construction")
/datum/design/newscaster_frame
name = "Newscaster Frame"
id = "newscaster_frame"
build_type = AUTOLATHE
materials = list("$metal" = 14000, "$glass" = 8000)
build_path = /obj/item/newscaster_frame
category = list("initial", "Construction")
/datum/design/rcd_ammo
name = "Compressed Matter Cardridge"
@@ -168,7 +168,7 @@
category = list("Exosuit Modules")
// Space pod
//datum/design/spacepod_main
/datum/design/spacepod_main
name = "Exosuit Board (Space Pod Mainboard)"
desc = "Allows for the construction of a Space Pod mainboard."
id = "spacepod_main"
+1 -1
View File
@@ -167,7 +167,7 @@ var/MAX_EXPLOSION_RANGE = 14
#define FLOWFRAC 0.99 // fraction of gas transfered per process
#define SHOES_SLOWDOWN 0 // How much shoes slow you down by default. Negative values speed you up
#define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up
//ITEM INVENTORY SLOT BITMASKS