mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 21:52:42 +00:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into xenohydro
This commit is contained in:
@@ -629,9 +629,11 @@
|
|||||||
#include "code\game\objects\items\weapons\circuitboards\computer\research.dm"
|
#include "code\game\objects\items\weapons\circuitboards\computer\research.dm"
|
||||||
#include "code\game\objects\items\weapons\circuitboards\computer\supply.dm"
|
#include "code\game\objects\items\weapons\circuitboards\computer\supply.dm"
|
||||||
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
|
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
|
||||||
|
#include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm"
|
||||||
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
|
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
|
||||||
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
|
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
|
||||||
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
|
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
|
||||||
|
#include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.dm"
|
||||||
#include "code\game\objects\items\weapons\circuitboards\machinery\research.dm"
|
#include "code\game\objects\items\weapons\circuitboards\machinery\research.dm"
|
||||||
#include "code\game\objects\items\weapons\circuitboards\machinery\shieldgen.dm"
|
#include "code\game\objects\items\weapons\circuitboards\machinery\shieldgen.dm"
|
||||||
#include "code\game\objects\items\weapons\circuitboards\machinery\telecomms.dm"
|
#include "code\game\objects\items\weapons\circuitboards\machinery\telecomms.dm"
|
||||||
@@ -786,6 +788,7 @@
|
|||||||
#include "code\modules\admin\verbs\debug.dm"
|
#include "code\modules\admin\verbs\debug.dm"
|
||||||
#include "code\modules\admin\verbs\diagnostics.dm"
|
#include "code\modules\admin\verbs\diagnostics.dm"
|
||||||
#include "code\modules\admin\verbs\getlogs.dm"
|
#include "code\modules\admin\verbs\getlogs.dm"
|
||||||
|
#include "code\modules\admin\verbs\icarus.dm"
|
||||||
#include "code\modules\admin\verbs\mapping.dm"
|
#include "code\modules\admin\verbs\mapping.dm"
|
||||||
#include "code\modules\admin\verbs\massmodvar.dm"
|
#include "code\modules\admin\verbs\massmodvar.dm"
|
||||||
#include "code\modules\admin\verbs\modifyvariables.dm"
|
#include "code\modules\admin\verbs\modifyvariables.dm"
|
||||||
@@ -895,7 +898,10 @@
|
|||||||
#include "code\modules\clothing\under\miscellaneous.dm"
|
#include "code\modules\clothing\under\miscellaneous.dm"
|
||||||
#include "code\modules\clothing\under\shorts.dm"
|
#include "code\modules\clothing\under\shorts.dm"
|
||||||
#include "code\modules\clothing\under\syndicate.dm"
|
#include "code\modules\clothing\under\syndicate.dm"
|
||||||
#include "code\modules\clothing\under\ties.dm"
|
#include "code\modules\clothing\under\accessories\accessory.dm"
|
||||||
|
#include "code\modules\clothing\under\accessories\armband.dm"
|
||||||
|
#include "code\modules\clothing\under\accessories\holster.dm"
|
||||||
|
#include "code\modules\clothing\under\accessories\storage.dm"
|
||||||
#include "code\modules\clothing\under\jobs\civilian.dm"
|
#include "code\modules\clothing\under\jobs\civilian.dm"
|
||||||
#include "code\modules\clothing\under\jobs\engineering.dm"
|
#include "code\modules\clothing\under\jobs\engineering.dm"
|
||||||
#include "code\modules\clothing\under\jobs\medsci.dm"
|
#include "code\modules\clothing\under\jobs\medsci.dm"
|
||||||
@@ -1107,6 +1113,7 @@
|
|||||||
#include "code\modules\mob\living\carbon\metroid\emote.dm"
|
#include "code\modules\mob\living\carbon\metroid\emote.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\examine.dm"
|
#include "code\modules\mob\living\carbon\metroid\examine.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\hud.dm"
|
#include "code\modules\mob\living\carbon\metroid\hud.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\metroid\items.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\life.dm"
|
#include "code\modules\mob\living\carbon\metroid\life.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\login.dm"
|
#include "code\modules\mob\living\carbon\metroid\login.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\metroid.dm"
|
#include "code\modules\mob\living\carbon\metroid\metroid.dm"
|
||||||
@@ -1153,6 +1160,7 @@
|
|||||||
#include "code\modules\mob\living\silicon\pai\recruit.dm"
|
#include "code\modules\mob\living\silicon\pai\recruit.dm"
|
||||||
#include "code\modules\mob\living\silicon\pai\say.dm"
|
#include "code\modules\mob\living\silicon\pai\say.dm"
|
||||||
#include "code\modules\mob\living\silicon\pai\software.dm"
|
#include "code\modules\mob\living\silicon\pai\software.dm"
|
||||||
|
#include "code\modules\mob\living\silicon\pai\software_modules.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\analyzer.dm"
|
#include "code\modules\mob\living\silicon\robot\analyzer.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\component.dm"
|
#include "code\modules\mob\living\silicon\robot\component.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\death.dm"
|
#include "code\modules\mob\living\silicon\robot\death.dm"
|
||||||
|
|||||||
@@ -7,52 +7,47 @@
|
|||||||
icon = 'icons/obj/Cryogenic2.dmi'
|
icon = 'icons/obj/Cryogenic2.dmi'
|
||||||
icon_state = "freezer_0"
|
icon_state = "freezer_0"
|
||||||
density = 1
|
density = 1
|
||||||
|
anchored = 1
|
||||||
anchored = 1.0
|
|
||||||
|
|
||||||
var/heatsink_temperature = T20C //the constant temperature resevoir into which the freezer pumps heat. Probably the hull of the station or something.
|
|
||||||
var/internal_volume = 600 //L
|
|
||||||
|
|
||||||
use_power = 0
|
use_power = 0
|
||||||
idle_power_usage = 5 //5 Watts for thermostat related circuitry
|
idle_power_usage = 5 // 5 Watts for thermostat related circuitry
|
||||||
|
|
||||||
var/max_power_rating = 20000 //power rating when the usage is turned up to 100
|
var/heatsink_temperature = T20C // The constant temperature reservoir into which the freezer pumps heat. Probably the hull of the station or something.
|
||||||
|
var/internal_volume = 600 // L
|
||||||
|
|
||||||
|
var/max_power_rating = 20000 // Power rating when the usage is turned up to 100
|
||||||
var/power_setting = 100
|
var/power_setting = 100
|
||||||
|
|
||||||
var/set_temperature = T20C //thermostat
|
var/set_temperature = T20C // Thermostat
|
||||||
var/cooling = 0
|
var/cooling = 0
|
||||||
var/opened = 0 //for deconstruction
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/New()
|
/obj/machinery/atmospherics/unary/freezer/New()
|
||||||
..()
|
..()
|
||||||
air_contents.volume = internal_volume
|
|
||||||
initialize_directions = dir
|
initialize_directions = dir
|
||||||
|
|
||||||
component_parts = list()
|
component_parts = list()
|
||||||
component_parts += new /obj/item/weapon/circuitboard/unary_atmos/cooler(src)
|
component_parts += new /obj/item/weapon/circuitboard/unary_atmos/cooler(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
component_parts += new /obj/item/stack/cable_coil(src, 2)
|
||||||
power_rating = max_power_rating * (power_setting/100)
|
RefreshParts()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/initialize()
|
/obj/machinery/atmospherics/unary/freezer/initialize()
|
||||||
if(node) return
|
if(node)
|
||||||
|
return
|
||||||
|
|
||||||
var/node_connect = dir
|
var/node_connect = dir
|
||||||
|
|
||||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
for(var/obj/machinery/atmospherics/target in get_step(src, node_connect))
|
||||||
if(target.initialize_directions & get_dir(target,src))
|
if(target.initialize_directions & get_dir(target, src))
|
||||||
node = target
|
node = target
|
||||||
break
|
break
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/update_icon()
|
/obj/machinery/atmospherics/unary/freezer/update_icon()
|
||||||
if(src.node)
|
if(node)
|
||||||
if(src.use_power && cooling)
|
if(use_power && cooling)
|
||||||
icon_state = "freezer_1"
|
icon_state = "freezer_1"
|
||||||
else
|
else
|
||||||
icon_state = "freezer"
|
icon_state = "freezer"
|
||||||
@@ -61,10 +56,10 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob)
|
/obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob)
|
||||||
src.ui_interact(user)
|
ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob)
|
/obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob)
|
||||||
src.ui_interact(user)
|
ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
/obj/machinery/atmospherics/unary/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||||
// this is the data which will be sent to the ui
|
// this is the data which will be sent to the ui
|
||||||
@@ -78,15 +73,15 @@
|
|||||||
data["powerSetting"] = power_setting
|
data["powerSetting"] = power_setting
|
||||||
|
|
||||||
var/temp_class = "good"
|
var/temp_class = "good"
|
||||||
if (air_contents.temperature > (T0C - 20))
|
if(air_contents.temperature > (T0C - 20))
|
||||||
temp_class = "bad"
|
temp_class = "bad"
|
||||||
else if (air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
|
else if(air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
|
||||||
temp_class = "average"
|
temp_class = "average"
|
||||||
data["gasTemperatureClass"] = temp_class
|
data["gasTemperatureClass"] = temp_class
|
||||||
|
|
||||||
// update the ui if it exists, returns null if no ui is passed/found
|
// update the ui if it exists, returns null if no ui is passed/found
|
||||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||||
if (!ui)
|
if(!ui)
|
||||||
// the ui does not exist, so we'll create a new() one
|
// the ui does not exist, so we'll create a new() one
|
||||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||||
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 440, 300)
|
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 440, 300)
|
||||||
@@ -98,30 +93,31 @@
|
|||||||
ui.set_auto_update(1)
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/Topic(href, href_list)
|
/obj/machinery/atmospherics/unary/freezer/Topic(href, href_list)
|
||||||
if (href_list["toggleStatus"])
|
if(href_list["toggleStatus"])
|
||||||
src.use_power = !src.use_power
|
use_power = !use_power
|
||||||
update_icon()
|
update_icon()
|
||||||
if(href_list["temp"])
|
if(href_list["temp"])
|
||||||
var/amount = text2num(href_list["temp"])
|
var/amount = text2num(href_list["temp"])
|
||||||
if(amount > 0)
|
if(amount > 0)
|
||||||
src.set_temperature = min(src.set_temperature+amount, 1000)
|
set_temperature = min(set_temperature + amount, 1000)
|
||||||
else
|
else
|
||||||
src.set_temperature = max(src.set_temperature+amount, 0)
|
set_temperature = max(set_temperature + amount, 0)
|
||||||
if(href_list["setPower"]) //setting power to 0 is redundant anyways
|
if(href_list["setPower"]) //setting power to 0 is redundant anyways
|
||||||
var/new_setting = between(0, text2num(href_list["setPower"]), 100)
|
var/new_setting = between(0, text2num(href_list["setPower"]), 100)
|
||||||
set_power_level(new_setting)
|
set_power_level(new_setting)
|
||||||
|
|
||||||
src.add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/process()
|
/obj/machinery/atmospherics/unary/freezer/process()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
if(stat & (NOPOWER|BROKEN) || !use_power)
|
if(stat & (NOPOWER|BROKEN) || !use_power)
|
||||||
cooling = 0
|
cooling = 0
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
if (network && air_contents.temperature > set_temperature)
|
if(network && air_contents.temperature > set_temperature)
|
||||||
cooling = 1
|
cooling = 1
|
||||||
|
|
||||||
var/heat_transfer = max( -air_contents.get_thermal_energy_change(set_temperature - 5), 0 )
|
var/heat_transfer = max( -air_contents.get_thermal_energy_change(set_temperature - 5), 0 )
|
||||||
@@ -132,7 +128,7 @@
|
|||||||
heat_transfer = min(heat_transfer, cop * power_rating) //limit heat transfer by available power
|
heat_transfer = min(heat_transfer, cop * power_rating) //limit heat transfer by available power
|
||||||
|
|
||||||
var/removed = -air_contents.add_thermal_energy(-heat_transfer) //remove the heat
|
var/removed = -air_contents.add_thermal_energy(-heat_transfer) //remove the heat
|
||||||
if (debug)
|
if(debug)
|
||||||
visible_message("[src]: Removing [removed] W.")
|
visible_message("[src]: Removing [removed] W.")
|
||||||
|
|
||||||
use_power(power_rating)
|
use_power(power_rating)
|
||||||
@@ -147,49 +143,37 @@
|
|||||||
/obj/machinery/atmospherics/unary/freezer/RefreshParts()
|
/obj/machinery/atmospherics/unary/freezer/RefreshParts()
|
||||||
..()
|
..()
|
||||||
var/cap_rating = 0
|
var/cap_rating = 0
|
||||||
var/cap_count = 0
|
|
||||||
var/manip_rating = 0
|
var/manip_rating = 0
|
||||||
var/manip_count = 0
|
|
||||||
var/bin_rating = 0
|
var/bin_rating = 0
|
||||||
var/bin_count = 0
|
|
||||||
|
|
||||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||||
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||||
cap_rating += P.rating
|
cap_rating += P.rating
|
||||||
cap_count++
|
|
||||||
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
|
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
|
||||||
manip_rating += P.rating
|
manip_rating += P.rating
|
||||||
manip_count++
|
|
||||||
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
||||||
bin_rating += P.rating
|
bin_rating += P.rating
|
||||||
bin_count++
|
|
||||||
cap_rating /= cap_count
|
|
||||||
bin_rating /= bin_count
|
|
||||||
manip_rating /= manip_count
|
|
||||||
|
|
||||||
power_rating = initial(power_rating)*cap_rating //more powerful
|
power_rating = initial(power_rating) * cap_rating / 2 //more powerful
|
||||||
heatsink_temperature = initial(heatsink_temperature)/((manip_rating+bin_rating)/2) //more efficient
|
heatsink_temperature = initial(heatsink_temperature) / ((manip_rating + bin_rating) / 2) //more efficient
|
||||||
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200*bin_rating
|
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
|
||||||
set_power_level(power_setting)
|
set_power_level(power_setting)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/proc/set_power_level(var/new_power_setting)
|
/obj/machinery/atmospherics/unary/freezer/proc/set_power_level(var/new_power_setting)
|
||||||
power_setting = new_power_setting
|
power_setting = new_power_setting
|
||||||
power_rating = max_power_rating * (power_setting/100)
|
power_rating = max_power_rating * (power_setting/100)
|
||||||
|
|
||||||
//dismantling code. copied from autolathe
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/atmospherics/unary/freezer/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
if(istype(O, /obj/item/weapon/screwdriver))
|
if(default_deconstruction_screwdriver(user, O))
|
||||||
opened = !opened
|
|
||||||
user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
|
|
||||||
return
|
return
|
||||||
|
if(default_deconstruction_crowbar(user, O))
|
||||||
if (opened && istype(O, /obj/item/weapon/crowbar))
|
return
|
||||||
dismantle()
|
if(default_part_replacement(user, O))
|
||||||
return
|
return
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
|
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
if (opened)
|
if(panel_open)
|
||||||
user << "The maintenance hatch is open."
|
user << "The maintenance hatch is open."
|
||||||
|
|||||||
@@ -7,25 +7,21 @@
|
|||||||
icon = 'icons/obj/Cryogenic2.dmi'
|
icon = 'icons/obj/Cryogenic2.dmi'
|
||||||
icon_state = "heater_0"
|
icon_state = "heater_0"
|
||||||
density = 1
|
density = 1
|
||||||
|
anchored = 1
|
||||||
anchored = 1.0
|
|
||||||
|
|
||||||
var/set_temperature = T20C //thermostat
|
|
||||||
var/max_temperature = T20C + 680
|
|
||||||
var/internal_volume = 600 //L
|
|
||||||
|
|
||||||
use_power = 0
|
use_power = 0
|
||||||
idle_power_usage = 5 //5 Watts for thermostat related circuitry
|
idle_power_usage = 5 //5 Watts for thermostat related circuitry
|
||||||
|
|
||||||
|
var/max_temperature = T20C + 680
|
||||||
|
var/internal_volume = 600 //L
|
||||||
|
|
||||||
var/max_power_rating = 20000 //power rating when the usage is turned up to 100
|
var/max_power_rating = 20000 //power rating when the usage is turned up to 100
|
||||||
var/power_setting = 100
|
var/power_setting = 100
|
||||||
|
|
||||||
|
var/set_temperature = T20C //thermostat
|
||||||
var/heating = 0 //mainly for icon updates
|
var/heating = 0 //mainly for icon updates
|
||||||
var/opened = 0 //for deconstruction
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/New()
|
/obj/machinery/atmospherics/unary/heater/New()
|
||||||
..()
|
..()
|
||||||
air_contents.volume = internal_volume
|
|
||||||
initialize_directions = dir
|
initialize_directions = dir
|
||||||
|
|
||||||
component_parts = list()
|
component_parts = list()
|
||||||
@@ -33,16 +29,18 @@
|
|||||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
component_parts += new /obj/item/stack/cable_coil(src, 5)
|
||||||
|
|
||||||
power_rating = max_power_rating * (power_setting/100)
|
RefreshParts()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/initialize()
|
/obj/machinery/atmospherics/unary/heater/initialize()
|
||||||
if(node) return
|
if(node)
|
||||||
|
return
|
||||||
|
|
||||||
var/node_connect = dir
|
var/node_connect = dir
|
||||||
|
|
||||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
for(var/obj/machinery/atmospherics/target in get_step(src, node_connect))
|
||||||
if(target.initialize_directions & get_dir(target,src))
|
if(target.initialize_directions & get_dir(target, src))
|
||||||
node = target
|
node = target
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -50,8 +48,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/update_icon()
|
/obj/machinery/atmospherics/unary/heater/update_icon()
|
||||||
if(src.node)
|
if(node)
|
||||||
if(src.use_power && src.heating)
|
if(use_power && heating)
|
||||||
icon_state = "heater_1"
|
icon_state = "heater_1"
|
||||||
else
|
else
|
||||||
icon_state = "heater"
|
icon_state = "heater"
|
||||||
@@ -68,7 +66,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
if (network && air_contents.total_moles && air_contents.temperature < set_temperature)
|
if(network && air_contents.total_moles && air_contents.temperature < set_temperature)
|
||||||
air_contents.add_thermal_energy(power_rating * HEATER_PERF_MULT)
|
air_contents.add_thermal_energy(power_rating * HEATER_PERF_MULT)
|
||||||
use_power(power_rating)
|
use_power(power_rating)
|
||||||
|
|
||||||
@@ -80,10 +78,10 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob)
|
/obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob)
|
||||||
src.ui_interact(user)
|
ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
|
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
|
||||||
src.ui_interact(user)
|
ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||||
// this is the data which will be sent to the ui
|
// this is the data which will be sent to the ui
|
||||||
@@ -97,13 +95,13 @@
|
|||||||
data["powerSetting"] = power_setting
|
data["powerSetting"] = power_setting
|
||||||
|
|
||||||
var/temp_class = "normal"
|
var/temp_class = "normal"
|
||||||
if (air_contents.temperature > (T20C+40))
|
if(air_contents.temperature > (T20C+40))
|
||||||
temp_class = "bad"
|
temp_class = "bad"
|
||||||
data["gasTemperatureClass"] = temp_class
|
data["gasTemperatureClass"] = temp_class
|
||||||
|
|
||||||
// update the ui if it exists, returns null if no ui is passed/found
|
// update the ui if it exists, returns null if no ui is passed/found
|
||||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||||
if (!ui)
|
if(!ui)
|
||||||
// the ui does not exist, so we'll create a new() one
|
// the ui does not exist, so we'll create a new() one
|
||||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||||
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 440, 300)
|
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 440, 300)
|
||||||
@@ -115,63 +113,54 @@
|
|||||||
ui.set_auto_update(1)
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/Topic(href, href_list)
|
/obj/machinery/atmospherics/unary/heater/Topic(href, href_list)
|
||||||
if (href_list["toggleStatus"])
|
if(href_list["toggleStatus"])
|
||||||
src.use_power = !src.use_power
|
use_power = !use_power
|
||||||
update_icon()
|
update_icon()
|
||||||
if(href_list["temp"])
|
if(href_list["temp"])
|
||||||
var/amount = text2num(href_list["temp"])
|
var/amount = text2num(href_list["temp"])
|
||||||
if(amount > 0)
|
if(amount > 0)
|
||||||
src.set_temperature = min(src.set_temperature+amount, max_temperature)
|
set_temperature = min(set_temperature + amount, max_temperature)
|
||||||
else
|
else
|
||||||
src.set_temperature = max(src.set_temperature+amount, 0)
|
set_temperature = max(set_temperature + amount, 0)
|
||||||
if(href_list["setPower"]) //setting power to 0 is redundant anyways
|
if(href_list["setPower"]) //setting power to 0 is redundant anyways
|
||||||
var/new_setting = between(0, text2num(href_list["setPower"]), 100)
|
var/new_setting = between(0, text2num(href_list["setPower"]), 100)
|
||||||
set_power_level(new_setting)
|
set_power_level(new_setting)
|
||||||
|
|
||||||
src.add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//upgrading parts
|
//upgrading parts
|
||||||
/obj/machinery/atmospherics/unary/heater/RefreshParts()
|
/obj/machinery/atmospherics/unary/heater/RefreshParts()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
var/cap_rating = 0
|
var/cap_rating = 0
|
||||||
var/cap_count = 0
|
|
||||||
var/bin_rating = 0
|
var/bin_rating = 0
|
||||||
var/bin_count = 0
|
|
||||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||||
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||||
cap_rating += P.rating
|
cap_rating += P.rating
|
||||||
cap_count++
|
|
||||||
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
||||||
bin_rating += P.rating
|
bin_rating += P.rating
|
||||||
bin_count++
|
|
||||||
cap_rating /= cap_count
|
|
||||||
bin_rating /= bin_count
|
|
||||||
|
|
||||||
max_power_rating = initial(max_power_rating)*cap_rating
|
max_power_rating = initial(max_power_rating) * cap_rating / 2
|
||||||
max_temperature = max(initial(max_temperature) - T20C, 0)*((bin_rating*2 + cap_rating)/3) + T20C
|
max_temperature = max(initial(max_temperature) - T20C, 0) * ((bin_rating * 4 + cap_rating) / 5) + T20C
|
||||||
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200*bin_rating
|
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
|
||||||
set_power_level(power_setting)
|
set_power_level(power_setting)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting)
|
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting)
|
||||||
power_setting = new_power_setting
|
power_setting = new_power_setting
|
||||||
power_rating = max_power_rating * (power_setting/100)
|
power_rating = max_power_rating * (power_setting/100)
|
||||||
|
|
||||||
//dismantling code. copied from autolathe
|
|
||||||
/obj/machinery/atmospherics/unary/heater/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/atmospherics/unary/heater/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
if(istype(O, /obj/item/weapon/screwdriver))
|
if(default_deconstruction_screwdriver(user, O))
|
||||||
opened = !opened
|
|
||||||
user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
|
|
||||||
return
|
return
|
||||||
|
if(default_deconstruction_crowbar(user, O))
|
||||||
if (opened && istype(O, /obj/item/weapon/crowbar))
|
return
|
||||||
dismantle()
|
if(default_part_replacement(user, O))
|
||||||
return
|
return
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
|
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
if (opened)
|
if(panel_open)
|
||||||
user << "The maintenance hatch is open."
|
user << "The maintenance hatch is open."
|
||||||
|
|||||||
@@ -241,6 +241,8 @@ datum/hud/New(mob/owner)
|
|||||||
brain_hud(ui_style)
|
brain_hud(ui_style)
|
||||||
else if(isalien(mymob))
|
else if(isalien(mymob))
|
||||||
larva_hud()
|
larva_hud()
|
||||||
|
else if(isslime(mymob))
|
||||||
|
slime_hud()
|
||||||
else if(isAI(mymob))
|
else if(isAI(mymob))
|
||||||
ai_hud()
|
ai_hud()
|
||||||
else if(isrobot(mymob))
|
else if(isrobot(mymob))
|
||||||
|
|||||||
@@ -33,3 +33,71 @@
|
|||||||
mymob.client.screen = null
|
mymob.client.screen = null
|
||||||
|
|
||||||
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
|
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
|
||||||
|
|
||||||
|
/datum/hud/proc/slime_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
|
||||||
|
|
||||||
|
src.adding = list()
|
||||||
|
|
||||||
|
var/obj/screen/using
|
||||||
|
|
||||||
|
using = new /obj/screen()
|
||||||
|
using.name = "act_intent"
|
||||||
|
using.set_dir(SOUTHWEST)
|
||||||
|
using.icon = ui_style
|
||||||
|
using.icon_state = "intent_"+mymob.a_intent
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 20
|
||||||
|
src.adding += using
|
||||||
|
action_intent = using
|
||||||
|
|
||||||
|
//intent small hud objects
|
||||||
|
var/icon/ico
|
||||||
|
|
||||||
|
ico = new(ui_style, "black")
|
||||||
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
|
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||||
|
using = new /obj/screen( src )
|
||||||
|
using.name = "help"
|
||||||
|
using.icon = ico
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
help_intent = using
|
||||||
|
|
||||||
|
ico = new(ui_style, "black")
|
||||||
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||||
|
using = new /obj/screen( src )
|
||||||
|
using.name = "disarm"
|
||||||
|
using.icon = ico
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
disarm_intent = using
|
||||||
|
|
||||||
|
ico = new(ui_style, "black")
|
||||||
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||||
|
using = new /obj/screen( src )
|
||||||
|
using.name = "grab"
|
||||||
|
using.icon = ico
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
grab_intent = using
|
||||||
|
|
||||||
|
ico = new(ui_style, "black")
|
||||||
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
|
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||||
|
using = new /obj/screen( src )
|
||||||
|
using.name = "harm"
|
||||||
|
using.icon = ico
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
hurt_intent = using
|
||||||
|
|
||||||
|
mymob.client.screen = null
|
||||||
|
mymob.client.screen += src.adding
|
||||||
|
|
||||||
|
return
|
||||||
@@ -120,45 +120,61 @@
|
|||||||
|
|
||||||
// Eating
|
// Eating
|
||||||
if(Victim)
|
if(Victim)
|
||||||
|
if (Victim == A)
|
||||||
|
Feedstop()
|
||||||
return
|
return
|
||||||
|
|
||||||
// Basic attack.
|
|
||||||
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
|
|
||||||
|
|
||||||
// Handle mob shocks.
|
|
||||||
var/mob/living/M = A
|
var/mob/living/M = A
|
||||||
if(istype(M) && powerlevel > 0 && !istype(A,/mob/living/carbon/slime))
|
if (istype(M))
|
||||||
|
|
||||||
if(ishuman(M))
|
switch(src.a_intent)
|
||||||
var/mob/living/carbon/human/H = M
|
if ("help") // We just poke the other
|
||||||
if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5))
|
M.visible_message("<span class='notice'>[src] gently pokes [M]!</span>", "<span class='notice'>[src] gently pokes you!</span>")
|
||||||
return
|
if ("disarm") // We stun the target, with the intention to feed
|
||||||
|
var/stunprob = 1
|
||||||
|
var/power = max(0, min(10, (powerlevel + rand(0, 3))))
|
||||||
|
if (powerlevel > 0 && !istype(A, /mob/living/carbon/slime))
|
||||||
|
if(ishuman(M))
|
||||||
|
var/mob/living/carbon/human/H = M
|
||||||
|
if(H.species.flags & IS_SYNTHETIC)
|
||||||
|
return
|
||||||
|
stunprob *= H.species.siemens_coefficient
|
||||||
|
|
||||||
var/power = max(0,min(10,(powerlevel+rand(0,3))))
|
|
||||||
|
|
||||||
var/stunprob = 10
|
switch(power * 10)
|
||||||
switch(power*10)
|
if(0) stunprob *= 10
|
||||||
if(1 to 2) stunprob = 20
|
if(1 to 2) stunprob *= 20
|
||||||
if(3 to 4) stunprob = 30
|
if(3 to 4) stunprob *= 30
|
||||||
if(5 to 6) stunprob = 40
|
if(5 to 6) stunprob *= 40
|
||||||
if(7 to 8) stunprob = 60
|
if(7 to 8) stunprob *= 60
|
||||||
if(9) stunprob = 70
|
if(9) stunprob *= 70
|
||||||
if(10) stunprob = 95
|
if(10) stunprob *= 95
|
||||||
|
|
||||||
if(prob(stunprob))
|
if(prob(stunprob))
|
||||||
powerlevel = max(0,powerlevel-3)
|
powerlevel = max(0, powerlevel-3)
|
||||||
src.visible_message("\red <B>The [name] has shocked [M]!</B>")
|
M.visible_message("<span class='danger'>[src] has shocked [M]!</span>", "<span class='danger'>[src] has shocked you!</span>")
|
||||||
M.Weaken(power)
|
M.Weaken(power)
|
||||||
M.Stun(power)
|
M.Stun(power)
|
||||||
if (M.stuttering < power) M.stuttering = power
|
M.stuttering = max(M.stuttering, power)
|
||||||
|
|
||||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||||
s.set_up(5, 1, M)
|
s.set_up(5, 1, M)
|
||||||
s.start()
|
s.start()
|
||||||
|
|
||||||
if(prob(stunprob) && powerlevel >= 8)
|
if(prob(stunprob) && powerlevel >= 8)
|
||||||
M.adjustFireLoss(powerlevel * rand(6,10))
|
M.adjustFireLoss(powerlevel * rand(6,10))
|
||||||
M.updatehealth()
|
else if(prob(40))
|
||||||
|
M.visible_message("<span class='danger'>[src] has pounced at [M]!</span>", "<span class='danger'>[src] has pounced at you!</span>")
|
||||||
|
M.Weaken(power)
|
||||||
|
else
|
||||||
|
M.visible_message("<span class='danger'>[src] has tried to pounce at [M]!</span>", "<span class='danger'>[src] has tried to pounce at you!</span>")
|
||||||
|
M.updatehealth()
|
||||||
|
if ("grab") // We feed
|
||||||
|
Wrap(M)
|
||||||
|
if ("hurt") // Attacking
|
||||||
|
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
|
||||||
|
else
|
||||||
|
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped") // Basic attack.
|
||||||
/*
|
/*
|
||||||
New Players:
|
New Players:
|
||||||
Have no reason to click on anything at all.
|
Have no reason to click on anything at all.
|
||||||
|
|||||||
@@ -732,9 +732,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/obj/item/weapon/shield/riot,
|
/obj/item/weapon/shield/riot,
|
||||||
/obj/item/weapon/shield/riot,
|
/obj/item/weapon/shield/riot,
|
||||||
/obj/item/weapon/shield/riot,
|
/obj/item/weapon/shield/riot,
|
||||||
/obj/item/weapon/storage/box/flashbangs,
|
|
||||||
/obj/item/weapon/storage/box/flashbangs,
|
|
||||||
/obj/item/weapon/storage/box/flashbangs,
|
|
||||||
/obj/item/weapon/handcuffs,
|
/obj/item/weapon/handcuffs,
|
||||||
/obj/item/weapon/handcuffs,
|
/obj/item/weapon/handcuffs,
|
||||||
/obj/item/weapon/handcuffs,
|
/obj/item/weapon/handcuffs,
|
||||||
@@ -743,13 +740,26 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/obj/item/clothing/head/helmet/riot,
|
/obj/item/clothing/head/helmet/riot,
|
||||||
/obj/item/clothing/suit/armor/riot,
|
/obj/item/clothing/suit/armor/riot,
|
||||||
/obj/item/clothing/head/helmet/riot,
|
/obj/item/clothing/head/helmet/riot,
|
||||||
/obj/item/clothing/suit/armor/riot)
|
/obj/item/clothing/suit/armor/riot,
|
||||||
|
/obj/item/weapon/storage/box/flashbangs,
|
||||||
|
/obj/item/weapon/storage/box/beanbags,
|
||||||
|
/obj/item/weapon/storage/box/handcuffs)
|
||||||
cost = 60
|
cost = 60
|
||||||
containertype = /obj/structure/closet/crate/secure
|
containertype = /obj/structure/closet/crate/secure
|
||||||
containername = "Riot gear crate"
|
containername = "Riot gear crate"
|
||||||
access = access_armory
|
access = access_armory
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
|
/datum/supply_packs/energyweapons
|
||||||
|
name = "Energy weapons crate"
|
||||||
|
contains = list(/obj/item/weapon/gun/energy/laser,
|
||||||
|
/obj/item/weapon/gun/energy/laser,
|
||||||
|
/obj/item/weapon/gun/energy/gun)
|
||||||
|
cost = 50
|
||||||
|
containertype = /obj/structure/closet/crate/secure
|
||||||
|
containername = "energy weapons crate"
|
||||||
|
access = access_armory
|
||||||
|
group = "Security"
|
||||||
|
|
||||||
/datum/supply_packs/ballistic
|
/datum/supply_packs/ballistic
|
||||||
name = "Ballistic gear crate"
|
name = "Ballistic gear crate"
|
||||||
@@ -776,13 +786,14 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
/datum/supply_packs/shotgunammo
|
/datum/supply_packs/shotgunammo
|
||||||
name = "Shotgun shells"
|
name = "Ballistic ammunition crate"
|
||||||
contains = list(/obj/item/weapon/storage/box/shotgunammo,
|
contains = list(/obj/item/weapon/storage/box/shotgunammo,
|
||||||
/obj/item/weapon/storage/box/shotgunammo,
|
/obj/item/weapon/storage/box/shotgunammo,
|
||||||
/obj/item/weapon/storage/box/shotgunammo)
|
/obj/item/weapon/storage/box/shotgunshells,
|
||||||
|
/obj/item/weapon/storage/box/shotgunshells)
|
||||||
cost = 60
|
cost = 60
|
||||||
containertype = /obj/structure/closet/crate/secure
|
containertype = /obj/structure/closet/crate/secure
|
||||||
containername = "Shotgun shells"
|
containername = "ballistic ammunition crate"
|
||||||
access = access_armory
|
access = access_armory
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
@@ -888,10 +899,9 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/obj/item/weapon/reagent_containers/glass/paint/green,
|
/obj/item/weapon/reagent_containers/glass/paint/green,
|
||||||
/obj/item/weapon/reagent_containers/glass/paint/blue,
|
/obj/item/weapon/reagent_containers/glass/paint/blue,
|
||||||
/obj/item/weapon/reagent_containers/glass/paint/yellow,
|
/obj/item/weapon/reagent_containers/glass/paint/yellow,
|
||||||
/obj/item/weapon/reagent_containers/glass/paint/violet,
|
/obj/item/weapon/reagent_containers/glass/paint/purple,
|
||||||
/obj/item/weapon/reagent_containers/glass/paint/black,
|
/obj/item/weapon/reagent_containers/glass/paint/black,
|
||||||
/obj/item/weapon/reagent_containers/glass/paint/white,
|
/obj/item/weapon/reagent_containers/glass/paint/white,
|
||||||
/obj/item/weapon/reagent_containers/glass/paint/remover,
|
|
||||||
/obj/item/weapon/contraband/poster,
|
/obj/item/weapon/contraband/poster,
|
||||||
/obj/item/weapon/wrapping_paper,
|
/obj/item/weapon/wrapping_paper,
|
||||||
/obj/item/weapon/wrapping_paper,
|
/obj/item/weapon/wrapping_paper,
|
||||||
@@ -1385,10 +1395,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/datum/supply_packs/randomised/webbing
|
/datum/supply_packs/randomised/webbing
|
||||||
name = "Webbing crate"
|
name = "Webbing crate"
|
||||||
num_contained = 1
|
num_contained = 1
|
||||||
contains = list(/obj/item/clothing/tie/holster,
|
contains = list(/obj/item/clothing/accessory/holster,
|
||||||
/obj/item/clothing/tie/storage/brown_vest,
|
/obj/item/clothing/accessory/storage/brown_vest,
|
||||||
/obj/item/clothing/tie/storage/webbing,
|
/obj/item/clothing/accessory/storage/webbing,
|
||||||
/obj/item/clothing/tie/storage)
|
/obj/item/clothing/accessory/storage)
|
||||||
cost = 15
|
cost = 15
|
||||||
containertype = /obj/structure/closet/crate
|
containertype = /obj/structure/closet/crate
|
||||||
containername = "Webbing crate"
|
containername = "Webbing crate"
|
||||||
|
|||||||
@@ -384,6 +384,22 @@
|
|||||||
|
|
||||||
///////////////////////////////////////Stock Parts /////////////////////////////////
|
///////////////////////////////////////Stock Parts /////////////////////////////////
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/part_replacer
|
||||||
|
name = "rapid part exchange device"
|
||||||
|
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
|
||||||
|
icon_state = "RPED"
|
||||||
|
item_state = "RPED"
|
||||||
|
w_class = 5
|
||||||
|
can_hold = list("/obj/item/weapon/stock_parts")
|
||||||
|
storage_slots = 50
|
||||||
|
use_to_pickup = 1
|
||||||
|
allow_quick_gather = 1
|
||||||
|
allow_quick_empty = 1
|
||||||
|
collection_mode = 1
|
||||||
|
display_contents_with_number = 1
|
||||||
|
max_w_class = 3
|
||||||
|
max_combined_w_class = 100
|
||||||
|
|
||||||
/obj/item/weapon/stock_parts
|
/obj/item/weapon/stock_parts
|
||||||
name = "stock part"
|
name = "stock part"
|
||||||
desc = "What?"
|
desc = "What?"
|
||||||
|
|||||||
@@ -409,6 +409,7 @@ its easier to just keep the beam vertical.
|
|||||||
|
|
||||||
|
|
||||||
/atom/proc/clean_blood()
|
/atom/proc/clean_blood()
|
||||||
|
src.color = initial(src.color) //paint
|
||||||
src.germ_level = 0
|
src.germ_level = 0
|
||||||
if(istype(blood_DNA, /list))
|
if(istype(blood_DNA, /list))
|
||||||
del(blood_DNA)
|
del(blood_DNA)
|
||||||
|
|||||||
@@ -85,6 +85,9 @@
|
|||||||
density = 1
|
density = 1
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
var/hits = 1
|
var/hits = 1
|
||||||
|
var/detonation_chance = 15
|
||||||
|
var/power = 4
|
||||||
|
var/power_step = 1
|
||||||
var/dest
|
var/dest
|
||||||
pass_flags = PASSTABLE
|
pass_flags = PASSTABLE
|
||||||
|
|
||||||
@@ -92,6 +95,7 @@
|
|||||||
name = "small meteor"
|
name = "small meteor"
|
||||||
icon_state = "smallf"
|
icon_state = "smallf"
|
||||||
pass_flags = PASSTABLE | PASSGRILLE
|
pass_flags = PASSTABLE | PASSGRILLE
|
||||||
|
power = 2
|
||||||
|
|
||||||
/obj/effect/meteor/Bump(atom/A)
|
/obj/effect/meteor/Bump(atom/A)
|
||||||
spawn(0)
|
spawn(0)
|
||||||
@@ -105,8 +109,8 @@
|
|||||||
//Changing emitter and generator ex_act would result in them being bomb and C4 proof.
|
//Changing emitter and generator ex_act would result in them being bomb and C4 proof.
|
||||||
if(!istype(A,/obj/machinery/power/emitter) && \
|
if(!istype(A,/obj/machinery/power/emitter) && \
|
||||||
!istype(A,/obj/machinery/field_generator) && \
|
!istype(A,/obj/machinery/field_generator) && \
|
||||||
prob(15))
|
prob(detonation_chance))
|
||||||
explosion(src.loc, 4, 5, 6, 7, 0)
|
explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -120,6 +124,7 @@
|
|||||||
/obj/effect/meteor/big
|
/obj/effect/meteor/big
|
||||||
name = "big meteor"
|
name = "big meteor"
|
||||||
hits = 5
|
hits = 5
|
||||||
|
power = 1
|
||||||
|
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
return
|
return
|
||||||
@@ -143,8 +148,8 @@
|
|||||||
explosion(src.loc, 0, 1, 2, 3, 0)
|
explosion(src.loc, 0, 1, 2, 3, 0)
|
||||||
|
|
||||||
if (--src.hits <= 0)
|
if (--src.hits <= 0)
|
||||||
if(prob(15) && !istype(A, /obj/structure/grille))
|
if(prob(detonation_chance) && !istype(A, /obj/structure/grille))
|
||||||
explosion(src.loc, 1, 2, 3, 4, 0)
|
explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
|||||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||||
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
|
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
|
||||||
if(H.age>49)
|
if(H.age>49)
|
||||||
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
|
U.accessories += new /obj/item/clothing/accessory/medal/gold/captain(U)
|
||||||
H.equip_to_slot_or_del(U, slot_w_uniform)
|
H.equip_to_slot_or_del(U, slot_w_uniform)
|
||||||
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
|
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
|
||||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
|
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
|
||||||
|
|||||||
@@ -196,3 +196,44 @@
|
|||||||
else
|
else
|
||||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
|
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/job/Paramedic
|
||||||
|
title = "Paramedic"
|
||||||
|
flag = PARAMEDIC
|
||||||
|
department_flag = MEDSCI
|
||||||
|
faction = "Station"
|
||||||
|
total_positions = 2
|
||||||
|
spawn_positions = 2
|
||||||
|
supervisors = "the chief medical officer"
|
||||||
|
selection_color = "#ffeef0"
|
||||||
|
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist)
|
||||||
|
minimal_access = list(access_medical, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks)
|
||||||
|
alt_titles = list("Emergency Medical Technician")
|
||||||
|
|
||||||
|
equip(var/mob/living/carbon/human/H)
|
||||||
|
if(!H) return 0
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
|
||||||
|
switch(H.backbag)
|
||||||
|
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
|
||||||
|
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
|
||||||
|
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||||
|
if (H.mind.role_alt_title)
|
||||||
|
switch(H.mind.role_alt_title)
|
||||||
|
if("Emergency Medical Technician")
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/fluff/short(H), slot_w_uniform)
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
|
||||||
|
if("Paramedic")
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
|
||||||
|
else
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store)
|
||||||
|
if(H.backbag == 1)
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
|
||||||
|
else
|
||||||
|
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
|
||||||
|
return 1
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ var/const/VIROLOGIST =(1<<6)
|
|||||||
var/const/PSYCHIATRIST =(1<<7)
|
var/const/PSYCHIATRIST =(1<<7)
|
||||||
var/const/ROBOTICIST =(1<<8)
|
var/const/ROBOTICIST =(1<<8)
|
||||||
var/const/XENOBIOLOGIST =(1<<9)
|
var/const/XENOBIOLOGIST =(1<<9)
|
||||||
|
var/const/PARAMEDIC =(1<<10)
|
||||||
|
|
||||||
|
|
||||||
var/const/CIVILIAN =(1<<2)
|
var/const/CIVILIAN =(1<<2)
|
||||||
|
|||||||
@@ -224,6 +224,9 @@ update_flag
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
|
return
|
||||||
|
|
||||||
if(Proj.damage)
|
if(Proj.damage)
|
||||||
src.health -= round(Proj.damage / 2)
|
src.health -= round(Proj.damage / 2)
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|||||||
@@ -13,14 +13,30 @@
|
|||||||
var/list/storage_capacity = list("metal" = 0, "glass" = 0)
|
var/list/storage_capacity = list("metal" = 0, "glass" = 0)
|
||||||
var/show_category = "All"
|
var/show_category = "All"
|
||||||
|
|
||||||
var/panel_open = 0
|
|
||||||
var/hacked = 0
|
var/hacked = 0
|
||||||
var/disabled = 0
|
var/disabled = 0
|
||||||
var/shocked = 0
|
var/shocked = 0
|
||||||
var/busy = 0
|
var/busy = 0
|
||||||
|
|
||||||
|
var/mat_efficiency = 1
|
||||||
|
var/build_time = 50
|
||||||
|
|
||||||
var/datum/wires/autolathe/wires = null
|
var/datum/wires/autolathe/wires = null
|
||||||
|
|
||||||
|
/obj/machinery/autolathe/New()
|
||||||
|
|
||||||
|
..()
|
||||||
|
wires = new(src)
|
||||||
|
//Create parts for lathe.
|
||||||
|
component_parts = list()
|
||||||
|
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||||
|
RefreshParts()
|
||||||
|
|
||||||
/obj/machinery/autolathe/proc/update_recipe_list()
|
/obj/machinery/autolathe/proc/update_recipe_list()
|
||||||
if(!machine_recipes)
|
if(!machine_recipes)
|
||||||
machine_recipes = autolathe_recipes
|
machine_recipes = autolathe_recipes
|
||||||
@@ -33,8 +49,8 @@
|
|||||||
user << "<span class='danger'>\The [src] is disabled!</span>"
|
user << "<span class='danger'>\The [src] is disabled!</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if (shocked)
|
if(shocked)
|
||||||
shock(user,50)
|
shock(user, 50)
|
||||||
|
|
||||||
var/dat = "<center><h1>Autolathe Control Panel</h1><hr/>"
|
var/dat = "<center><h1>Autolathe Control Panel</h1><hr/>"
|
||||||
|
|
||||||
@@ -65,16 +81,16 @@
|
|||||||
else
|
else
|
||||||
//Make sure it's buildable and list requires resources.
|
//Make sure it's buildable and list requires resources.
|
||||||
for(var/material in R.resources)
|
for(var/material in R.resources)
|
||||||
var/sheets = round(stored_material[material]/R.resources[material])
|
var/sheets = round(stored_material[material]/round(R.resources[material]*mat_efficiency))
|
||||||
if(isnull(max_sheets) || max_sheets > sheets)
|
if(isnull(max_sheets) || max_sheets > sheets)
|
||||||
max_sheets = sheets
|
max_sheets = sheets
|
||||||
if(!isnull(stored_material[material]) && stored_material[material] < R.resources[material])
|
if(!isnull(stored_material[material]) && stored_material[material] < round(R.resources[material]*mat_efficiency))
|
||||||
can_make = 0
|
can_make = 0
|
||||||
if(!comma)
|
if(!comma)
|
||||||
comma = 1
|
comma = 1
|
||||||
else
|
else
|
||||||
material_string += ", "
|
material_string += ", "
|
||||||
material_string += "[R.resources[material]] [material]"
|
material_string += "[round(R.resources[material] * mat_efficiency)] [material]"
|
||||||
material_string += ".<br></td>"
|
material_string += ".<br></td>"
|
||||||
//Build list of multipliers for sheets.
|
//Build list of multipliers for sheets.
|
||||||
if(R.is_stack)
|
if(R.is_stack)
|
||||||
@@ -99,31 +115,27 @@
|
|||||||
|
|
||||||
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
|
|
||||||
if (stat)
|
if(busy)
|
||||||
return
|
|
||||||
|
|
||||||
if (busy)
|
|
||||||
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
|
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(O, /obj/item/weapon/screwdriver))
|
if(default_deconstruction_screwdriver(user, O))
|
||||||
panel_open = !panel_open
|
|
||||||
icon_state = (panel_open ? "autolathe_t": "autolathe")
|
|
||||||
user << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]."
|
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
return
|
||||||
|
if(default_deconstruction_crowbar(user, O))
|
||||||
|
return
|
||||||
|
if(default_part_replacement(user, O))
|
||||||
|
return
|
||||||
|
|
||||||
if (panel_open)
|
if(stat)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(panel_open)
|
||||||
//Don't eat multitools or wirecutters used on an open lathe.
|
//Don't eat multitools or wirecutters used on an open lathe.
|
||||||
if(istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
|
if(istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
|
||||||
attack_hand(user)
|
attack_hand(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
//Dismantle the frame.
|
|
||||||
if(istype(O, /obj/item/weapon/crowbar))
|
|
||||||
dismantle()
|
|
||||||
return
|
|
||||||
|
|
||||||
if(O.loc != user && !(istype(O,/obj/item/stack)))
|
if(O.loc != user && !(istype(O,/obj/item/stack)))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -170,11 +182,11 @@
|
|||||||
else
|
else
|
||||||
user << "You fill \the [src] with \the [eating]."
|
user << "You fill \the [src] with \the [eating]."
|
||||||
|
|
||||||
flick("autolathe_o",src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
|
flick("autolathe_o", src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
|
||||||
|
|
||||||
if(istype(eating,/obj/item/stack))
|
if(istype(eating,/obj/item/stack))
|
||||||
var/obj/item/stack/stack = eating
|
var/obj/item/stack/stack = eating
|
||||||
stack.use(max(1,round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
|
stack.use(max(1, round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
|
||||||
else
|
else
|
||||||
user.drop_item(O)
|
user.drop_item(O)
|
||||||
del(O)
|
del(O)
|
||||||
@@ -227,18 +239,18 @@
|
|||||||
//Check if we still have the materials.
|
//Check if we still have the materials.
|
||||||
for(var/material in making.resources)
|
for(var/material in making.resources)
|
||||||
if(!isnull(stored_material[material]))
|
if(!isnull(stored_material[material]))
|
||||||
if(stored_material[material] < (making.resources[material]*multiplier))
|
if(stored_material[material] < round(making.resources[material] * mat_efficiency) * multiplier)
|
||||||
return
|
return
|
||||||
|
|
||||||
//Consume materials.
|
//Consume materials.
|
||||||
for(var/material in making.resources)
|
for(var/material in making.resources)
|
||||||
if(!isnull(stored_material[material]))
|
if(!isnull(stored_material[material]))
|
||||||
stored_material[material] = max(0,stored_material[material]-(making.resources[material]*multiplier))
|
stored_material[material] = max(0, stored_material[material] - round(making.resources[material] * mat_efficiency) * multiplier)
|
||||||
|
|
||||||
//Fancy autolathe animation.
|
//Fancy autolathe animation.
|
||||||
flick("autolathe_n",src)
|
flick("autolathe_n", src)
|
||||||
|
|
||||||
sleep(50)
|
sleep(build_time)
|
||||||
|
|
||||||
busy = 0
|
busy = 0
|
||||||
|
|
||||||
@@ -247,39 +259,31 @@
|
|||||||
|
|
||||||
//Create the desired item.
|
//Create the desired item.
|
||||||
var/obj/item/I = new making.path(get_step(loc, get_dir(src,usr)))
|
var/obj/item/I = new making.path(get_step(loc, get_dir(src,usr)))
|
||||||
if(multiplier>1 && istype(I,/obj/item/stack))
|
if(multiplier > 1 && istype(I, /obj/item/stack))
|
||||||
var/obj/item/stack/S = I
|
var/obj/item/stack/S = I
|
||||||
S.amount = multiplier
|
S.amount = multiplier
|
||||||
|
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
|
|
||||||
|
/obj/machinery/autolathe/update_icon()
|
||||||
/obj/machinery/autolathe/New()
|
icon_state = (panel_open ? "autolathe_t" : "autolathe")
|
||||||
|
|
||||||
..()
|
|
||||||
wires = new(src)
|
|
||||||
//Create parts for lathe.
|
|
||||||
component_parts = list()
|
|
||||||
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
|
||||||
RefreshParts()
|
|
||||||
|
|
||||||
//Updates overall lathe storage size.
|
//Updates overall lathe storage size.
|
||||||
/obj/machinery/autolathe/RefreshParts()
|
/obj/machinery/autolathe/RefreshParts()
|
||||||
..()
|
..()
|
||||||
var/tot_rating = 0
|
var/mb_rating = 0
|
||||||
|
var/man_rating = 0
|
||||||
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
|
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
|
||||||
tot_rating += MB.rating
|
mb_rating += MB.rating
|
||||||
|
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||||
|
man_rating += M.rating
|
||||||
|
|
||||||
storage_capacity["metal"] = tot_rating * 25000
|
storage_capacity["metal"] = mb_rating * 25000
|
||||||
storage_capacity["glass"] = tot_rating * 12500
|
storage_capacity["glass"] = mb_rating * 12500
|
||||||
|
build_time = 50 / man_rating
|
||||||
|
mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3
|
||||||
|
|
||||||
/obj/machinery/autolathe/dismantle()
|
/obj/machinery/autolathe/dismantle()
|
||||||
..()
|
|
||||||
var/list/sheets = list("metal" = /obj/item/stack/sheet/metal, "glass" = /obj/item/stack/sheet/glass)
|
var/list/sheets = list("metal" = /obj/item/stack/sheet/metal, "glass" = /obj/item/stack/sheet/glass)
|
||||||
|
|
||||||
for(var/mat in stored_material)
|
for(var/mat in stored_material)
|
||||||
@@ -288,3 +292,4 @@
|
|||||||
if(stored_material[mat] > S.perunit)
|
if(stored_material[mat] > S.perunit)
|
||||||
S.amount = round(stored_material[mat] / S.perunit)
|
S.amount = round(stored_material[mat] / S.perunit)
|
||||||
S.loc = loc
|
S.loc = loc
|
||||||
|
..()
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
if(I.matter && !recipe.resources) //This can be overidden in the datums.
|
if(I.matter && !recipe.resources) //This can be overidden in the datums.
|
||||||
recipe.resources = list()
|
recipe.resources = list()
|
||||||
for(var/material in I.matter)
|
for(var/material in I.matter)
|
||||||
recipe.resources[material] = round(I.matter[material]*1.25) // More expensive to produce than they are to recycle.
|
recipe.resources[material] = I.matter[material]*1.25 // More expensive to produce than they are to recycle.
|
||||||
del(I)
|
del(I)
|
||||||
|
|
||||||
/datum/autolathe/recipe
|
/datum/autolathe/recipe
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
category = "Medical"
|
category = "Medical"
|
||||||
|
|
||||||
/datum/autolathe/recipe/shotgun_blanks
|
/datum/autolathe/recipe/shotgun_blanks
|
||||||
name = "ammunition (shotgun, blanks)"
|
name = "ammunition (shotgun, blank)"
|
||||||
path = /obj/item/ammo_casing/shotgun/blank
|
path = /obj/item/ammo_casing/shotgun/blank
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
@@ -211,11 +211,21 @@
|
|||||||
path = /obj/item/ammo_casing/shotgun/beanbag
|
path = /obj/item/ammo_casing/shotgun/beanbag
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/shotgun_flash
|
||||||
|
name = "ammunition (shotgun, flash)"
|
||||||
|
path = /obj/item/ammo_casing/shotgun/flash
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/magazine_rubber
|
/datum/autolathe/recipe/magazine_rubber
|
||||||
name = "ammunition (rubber)"
|
name = "ammunition (rubber)"
|
||||||
path = /obj/item/ammo_magazine/c45r
|
path = /obj/item/ammo_magazine/c45r
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/magazine_flash
|
||||||
|
name = "ammunition (flash)"
|
||||||
|
path = /obj/item/ammo_magazine/c45f
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/consolescreen
|
/datum/autolathe/recipe/consolescreen
|
||||||
name = "console screen"
|
name = "console screen"
|
||||||
path = /obj/item/weapon/stock_parts/console_screen
|
path = /obj/item/weapon/stock_parts/console_screen
|
||||||
@@ -285,14 +295,14 @@
|
|||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/shotgun
|
/datum/autolathe/recipe/shotgun
|
||||||
name = "ammunition (shell, shotgun)"
|
name = "ammunition (slug, shotgun)"
|
||||||
path = /obj/item/ammo_casing/shotgun
|
path = /obj/item/ammo_casing/shotgun
|
||||||
hidden = 1
|
hidden = 1
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/shotgun_dart
|
/datum/autolathe/recipe/shotgun_pellet
|
||||||
name = "ammunition (dart, shotgun)"
|
name = "ammunition (shell, shotgun)"
|
||||||
path = /obj/item/ammo_casing/shotgun/dart
|
path = /obj/item/ammo_casing/shotgun/pellet
|
||||||
hidden = 1
|
hidden = 1
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
|||||||
@@ -11,66 +11,80 @@
|
|||||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||||
var/points = 0
|
var/points = 0
|
||||||
var/menustat = "menu"
|
var/menustat = "menu"
|
||||||
|
var/build_eff = 1
|
||||||
|
var/eat_eff = 1
|
||||||
|
|
||||||
New()
|
/obj/machinery/biogenerator/New()
|
||||||
..()
|
..()
|
||||||
var/datum/reagents/R = new/datum/reagents(1000)
|
var/datum/reagents/R = new/datum/reagents(1000)
|
||||||
reagents = R
|
reagents = R
|
||||||
R.my_atom = src
|
R.my_atom = src
|
||||||
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
|
||||||
|
|
||||||
on_reagent_change() //When the reagents change, change the icon as well.
|
component_parts = list()
|
||||||
update_icon()
|
component_parts += new /obj/item/weapon/circuitboard/biogenerator(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
|
||||||
|
RefreshParts()
|
||||||
|
|
||||||
|
/obj/machinery/biogenerator/on_reagent_change() //When the reagents change, change the icon as well.
|
||||||
update_icon()
|
update_icon()
|
||||||
if(!src.beaker)
|
|
||||||
icon_state = "biogen-empty"
|
/obj/machinery/biogenerator/update_icon()
|
||||||
else if(!src.processing)
|
if(!beaker)
|
||||||
icon_state = "biogen-stand"
|
icon_state = "biogen-empty"
|
||||||
else
|
else if(!processing)
|
||||||
icon_state = "biogen-work"
|
icon_state = "biogen-stand"
|
||||||
return
|
else
|
||||||
|
icon_state = "biogen-work"
|
||||||
|
return
|
||||||
|
|
||||||
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
|
if(default_deconstruction_screwdriver(user, O))
|
||||||
|
return
|
||||||
|
if(default_deconstruction_crowbar(user, O))
|
||||||
|
return
|
||||||
|
if(default_part_replacement(user, O))
|
||||||
|
return
|
||||||
if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||||
if(beaker)
|
if(beaker)
|
||||||
user << "\red The biogenerator is already loaded."
|
user << "<span class='notice'>]The [src] is already loaded.</span>"
|
||||||
else
|
else
|
||||||
user.before_take_item(O)
|
user.before_take_item(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
beaker = O
|
beaker = O
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
else if(processing)
|
else if(processing)
|
||||||
user << "\red The biogenerator is currently processing."
|
user << "<span class='notice'>\The [src] is currently processing.</span>"
|
||||||
else if(istype(O, /obj/item/weapon/storage/bag/plants))
|
else if(istype(O, /obj/item/weapon/storage/bag/plants))
|
||||||
var/i = 0
|
var/i = 0
|
||||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||||
i++
|
i++
|
||||||
if(i >= 10)
|
if(i >= 10)
|
||||||
user << "\red The biogenerator is already full! Activate it."
|
user << "<span class='notice'>\The [src] is already full! Activate it.</span>"
|
||||||
else
|
else
|
||||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||||
G.loc = src
|
G.loc = src
|
||||||
i++
|
i++
|
||||||
if(i >= 10)
|
if(i >= 10)
|
||||||
user << "\blue You fill the biogenerator to its capacity."
|
user << "<span class='notice'>You fill \the [src] to its capacity.</span>"
|
||||||
break
|
break
|
||||||
if(i<10)
|
if(i < 10)
|
||||||
user << "\blue You empty the plant bag into the biogenerator."
|
user << "<span class='notice'>You empty \the [O] into \the [src].</span>"
|
||||||
|
|
||||||
|
|
||||||
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||||
user << "\red You cannot put this in [src.name]"
|
user << "<span class='notice'>You cannot put this in \the [src].</span>"
|
||||||
else
|
else
|
||||||
var/i = 0
|
var/i = 0
|
||||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||||
i++
|
i++
|
||||||
if(i >= 10)
|
if(i >= 10)
|
||||||
user << "\red The biogenerator is full! Activate it."
|
user << "<span class='notice'>\The [src] is full! Activate it.</span>"
|
||||||
else
|
else
|
||||||
user.before_take_item(O)
|
user.before_take_item(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
user << "\blue You put [O.name] in [src.name]"
|
user << "<span class='notice'>You put \the [O] in \the [src]</span>"
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -89,18 +103,18 @@
|
|||||||
dat += "<A href='?src=\ref[src];action=activate'>Activate Biogenerator!</A><BR>"
|
dat += "<A href='?src=\ref[src];action=activate'>Activate Biogenerator!</A><BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=detach'>Detach Container</A><BR><BR>"
|
dat += "<A href='?src=\ref[src];action=detach'>Detach Container</A><BR><BR>"
|
||||||
dat += "Food<BR>"
|
dat += "Food<BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>(20)</FONT><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>([round(20/build_eff)])</FONT><BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>(50)</FONT><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>([round(50/build_eff)])</FONT><BR>"
|
||||||
dat += "Nutrient<BR>"
|
dat += "Nutrient<BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>(10)</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>([round(10/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>(20)</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>([round(20/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>(25)</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>([round(25/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
|
||||||
dat += "Leather<BR>"
|
dat += "Leather<BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>(100)</FONT><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>([round(100/build_eff)])</FONT><BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>(250)</FONT><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>([round(250/build_eff)])</FONT><BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=300'>Utility belt</A> <FONT COLOR=blue>(300)</FONT><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=300'>Utility belt</A> <FONT COLOR=blue>([round(300/build_eff)])</FONT><BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=satchel;cost=400'>Leather Satchel</A> <FONT COLOR=blue>(400)</FONT><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=satchel;cost=400'>Leather Satchel</A> <FONT COLOR=blue>([round(400/build_eff)])</FONT><BR>"
|
||||||
dat += "<A href='?src=\ref[src];action=create;item=cashbag;cost=400'>Cash Bag</A> <FONT COLOR=blue>(400)</FONT><BR>"
|
dat += "<A href='?src=\ref[src];action=create;item=cashbag;cost=400'>Cash Bag</A> <FONT COLOR=blue>([round(400/build_eff)])</FONT><BR>"
|
||||||
//dat += "Other<BR>"
|
//dat += "Other<BR>"
|
||||||
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
|
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
|
||||||
else
|
else
|
||||||
@@ -122,34 +136,35 @@
|
|||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
/obj/machinery/biogenerator/proc/activate()
|
/obj/machinery/biogenerator/proc/activate()
|
||||||
if (usr.stat != 0)
|
if (usr.stat)
|
||||||
return
|
return
|
||||||
if (src.stat != 0) //NOPOWER etc
|
if (stat) //NOPOWER etc
|
||||||
return
|
return
|
||||||
if(src.processing)
|
if(processing)
|
||||||
usr << "\red The biogenerator is in the process of working."
|
usr << "<span class='notice'>The biogenerator is in the process of working.</span>"
|
||||||
return
|
return
|
||||||
var/S = 0
|
var/S = 0
|
||||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
|
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
|
||||||
S += 5
|
S += 5
|
||||||
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
|
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
|
||||||
points += 1
|
points += 1
|
||||||
else points += I.reagents.get_reagent_amount("nutriment")*10
|
else points += I.reagents.get_reagent_amount("nutriment") * 10 * eat_eff
|
||||||
del(I)
|
del(I)
|
||||||
if(S)
|
if(S)
|
||||||
processing = 1
|
processing = 1
|
||||||
update_icon()
|
update_icon()
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
|
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
|
||||||
use_power(S*30)
|
use_power(S * 30)
|
||||||
sleep(S+15)
|
sleep((S + 15) / eat_eff)
|
||||||
processing = 0
|
processing = 0
|
||||||
update_icon()
|
update_icon()
|
||||||
else
|
else
|
||||||
menustat = "void"
|
menustat = "void"
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/biogenerator/proc/create_product(var/item,var/cost)
|
/obj/machinery/biogenerator/proc/create_product(var/item, var/cost)
|
||||||
|
cost = round(cost/build_eff)
|
||||||
if(cost > points)
|
if(cost > points)
|
||||||
menustat = "nopoints"
|
menustat = "nopoints"
|
||||||
return 0
|
return 0
|
||||||
@@ -160,45 +175,45 @@
|
|||||||
sleep(30)
|
sleep(30)
|
||||||
switch(item)
|
switch(item)
|
||||||
if("milk")
|
if("milk")
|
||||||
beaker.reagents.add_reagent("milk",10)
|
beaker.reagents.add_reagent("milk", 10)
|
||||||
if("meat")
|
if("meat")
|
||||||
new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc)
|
new/obj/item/weapon/reagent_containers/food/snacks/meat(loc)
|
||||||
if("ez")
|
if("ez")
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
|
||||||
if("l4z")
|
if("l4z")
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
|
||||||
if("rh")
|
if("rh")
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
|
||||||
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
|
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
|
||||||
if("l4z5")
|
if("l4z5")
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
|
||||||
if("rh5")
|
if("rh5")
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
|
||||||
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
|
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
|
||||||
if("wallet")
|
if("wallet")
|
||||||
new/obj/item/weapon/storage/wallet(src.loc)
|
new/obj/item/weapon/storage/wallet(loc)
|
||||||
if("gloves")
|
if("gloves")
|
||||||
new/obj/item/clothing/gloves/botanic_leather(src.loc)
|
new/obj/item/clothing/gloves/botanic_leather(loc)
|
||||||
if("tbelt")
|
if("tbelt")
|
||||||
new/obj/item/weapon/storage/belt/utility(src.loc)
|
new/obj/item/weapon/storage/belt/utility(loc)
|
||||||
if("satchel")
|
if("satchel")
|
||||||
new/obj/item/weapon/storage/backpack/satchel(src.loc)
|
new/obj/item/weapon/storage/backpack/satchel(loc)
|
||||||
if("cashbag")
|
if("cashbag")
|
||||||
new/obj/item/weapon/storage/bag/cash(src.loc)
|
new/obj/item/weapon/storage/bag/cash(loc)
|
||||||
if("monkey")
|
if("monkey")
|
||||||
new/mob/living/carbon/monkey(src.loc)
|
new/mob/living/carbon/monkey(loc)
|
||||||
processing = 0
|
processing = 0
|
||||||
menustat = "complete"
|
menustat = "complete"
|
||||||
update_icon()
|
update_icon()
|
||||||
@@ -220,7 +235,21 @@
|
|||||||
beaker = null
|
beaker = null
|
||||||
update_icon()
|
update_icon()
|
||||||
if("create")
|
if("create")
|
||||||
create_product(href_list["item"],text2num(href_list["cost"]))
|
create_product(href_list["item"], text2num(href_list["cost"]))
|
||||||
if("menu")
|
if("menu")
|
||||||
menustat = "menu"
|
menustat = "menu"
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
|
|
||||||
|
/obj/machinery/biogenerator/RefreshParts()
|
||||||
|
..()
|
||||||
|
var/man_rating = 0
|
||||||
|
var/bin_rating = 0
|
||||||
|
|
||||||
|
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||||
|
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
||||||
|
bin_rating += P.rating
|
||||||
|
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
|
||||||
|
man_rating += P.rating
|
||||||
|
|
||||||
|
build_eff = man_rating
|
||||||
|
eat_eff = bin_rating
|
||||||
|
|||||||
@@ -81,6 +81,8 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
|
return
|
||||||
health -= Proj.damage
|
health -= Proj.damage
|
||||||
..()
|
..()
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
var/c_tag_order = 999
|
var/c_tag_order = 999
|
||||||
var/status = 1
|
var/status = 1
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
var/panel_open = 0 // 0 = Closed / 1 = Open
|
|
||||||
var/invuln = null
|
var/invuln = null
|
||||||
var/bugged = 0
|
var/bugged = 0
|
||||||
var/obj/item/weapon/camera_assembly/assembly = null
|
var/obj/item/weapon/camera_assembly/assembly = null
|
||||||
@@ -57,7 +56,7 @@
|
|||||||
/obj/machinery/camera/Del()
|
/obj/machinery/camera/Del()
|
||||||
if(!alarm_on)
|
if(!alarm_on)
|
||||||
triggerCameraAlarm()
|
triggerCameraAlarm()
|
||||||
|
|
||||||
cancelCameraAlarm()
|
cancelCameraAlarm()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -70,7 +69,7 @@
|
|||||||
kick_viewers()
|
kick_viewers()
|
||||||
triggerCameraAlarm()
|
triggerCameraAlarm()
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
spawn(900)
|
spawn(900)
|
||||||
stat &= ~EMPED
|
stat &= ~EMPED
|
||||||
cancelCameraAlarm()
|
cancelCameraAlarm()
|
||||||
@@ -85,11 +84,11 @@
|
|||||||
/obj/machinery/camera/ex_act(severity)
|
/obj/machinery/camera/ex_act(severity)
|
||||||
if(src.invuln)
|
if(src.invuln)
|
||||||
return
|
return
|
||||||
|
|
||||||
//camera dies if an explosion touches it!
|
//camera dies if an explosion touches it!
|
||||||
if(severity <= 2 || prob(50))
|
if(severity <= 2 || prob(50))
|
||||||
destroy()
|
destroy()
|
||||||
|
|
||||||
..() //and give it the regular chance of being deleted outright
|
..() //and give it the regular chance of being deleted outright
|
||||||
|
|
||||||
|
|
||||||
@@ -174,7 +173,7 @@
|
|||||||
if (S.current == src)
|
if (S.current == src)
|
||||||
O << "[U] holds \a [itemname] up to one of the cameras ..."
|
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))
|
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 (istype(W, /obj/item/weapon/camera_bug))
|
||||||
if (!src.can_use())
|
if (!src.can_use())
|
||||||
user << "\blue Camera non-functional"
|
user << "\blue Camera non-functional"
|
||||||
@@ -185,7 +184,7 @@
|
|||||||
else
|
else
|
||||||
user << "\blue Camera bugged."
|
user << "\blue Camera bugged."
|
||||||
src.bugged = 1
|
src.bugged = 1
|
||||||
|
|
||||||
else if(W.damtype == BRUTE || W.damtype == BURN) //bashing cameras
|
else if(W.damtype == BRUTE || W.damtype == BURN) //bashing cameras
|
||||||
if (W.force >= src.toughness)
|
if (W.force >= src.toughness)
|
||||||
visible_message("<span class='warning'><b>[src] has been [pick(W.attack_verb)] with [W] by [user]!</b></span>")
|
visible_message("<span class='warning'><b>[src] has been [pick(W.attack_verb)] with [W] by [user]!</b></span>")
|
||||||
@@ -194,7 +193,7 @@
|
|||||||
if (I.hitsound)
|
if (I.hitsound)
|
||||||
playsound(loc, I.hitsound, 50, 1, -1)
|
playsound(loc, I.hitsound, 50, 1, -1)
|
||||||
take_damage(W.force)
|
take_damage(W.force)
|
||||||
|
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -221,14 +220,14 @@
|
|||||||
if (force >= toughness && (force > toughness*4 || prob(25)))
|
if (force >= toughness && (force > toughness*4 || prob(25)))
|
||||||
destroy()
|
destroy()
|
||||||
|
|
||||||
//Used when someone breaks a camera
|
//Used when someone breaks a camera
|
||||||
/obj/machinery/camera/proc/destroy()
|
/obj/machinery/camera/proc/destroy()
|
||||||
invalidateCameraCache()
|
invalidateCameraCache()
|
||||||
stat |= BROKEN
|
stat |= BROKEN
|
||||||
kick_viewers()
|
kick_viewers()
|
||||||
triggerCameraAlarm()
|
triggerCameraAlarm()
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
//sparks
|
//sparks
|
||||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||||
spark_system.set_up(5, 0, loc)
|
spark_system.set_up(5, 0, loc)
|
||||||
@@ -266,7 +265,7 @@
|
|||||||
alarm_on = 1
|
alarm_on = 1
|
||||||
if(!get_area(src))
|
if(!get_area(src))
|
||||||
return
|
return
|
||||||
|
|
||||||
for(var/mob/living/silicon/S in mob_list)
|
for(var/mob/living/silicon/S in mob_list)
|
||||||
S.triggerAlarm("Camera", get_area(src), list(src), src)
|
S.triggerAlarm("Camera", get_area(src), list(src), src)
|
||||||
|
|
||||||
@@ -275,7 +274,7 @@
|
|||||||
alarm_on = 0
|
alarm_on = 0
|
||||||
if(!get_area(src))
|
if(!get_area(src))
|
||||||
return
|
return
|
||||||
|
|
||||||
for(var/mob/living/silicon/S in mob_list)
|
for(var/mob/living/silicon/S in mob_list)
|
||||||
S.cancelAlarm("Camera", get_area(src), src)
|
S.cancelAlarm("Camera", get_area(src), src)
|
||||||
|
|
||||||
@@ -355,7 +354,7 @@
|
|||||||
/obj/machinery/camera/interact(mob/living/user as mob)
|
/obj/machinery/camera/interact(mob/living/user as mob)
|
||||||
if(!panel_open || istype(user, /mob/living/silicon/ai))
|
if(!panel_open || istype(user, /mob/living/silicon/ai))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(stat & BROKEN)
|
if(stat & BROKEN)
|
||||||
user << "<span class='warning'>\The [src] is broken.</span>"
|
user << "<span class='warning'>\The [src] is broken.</span>"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -3,18 +3,41 @@
|
|||||||
|
|
||||||
//Potential replacement for genetics revives or something I dunno (?)
|
//Potential replacement for genetics revives or something I dunno (?)
|
||||||
|
|
||||||
|
//Find a dead mob with a brain and client.
|
||||||
|
/proc/find_dead_player(var/find_key)
|
||||||
|
if(isnull(find_key))
|
||||||
|
return
|
||||||
|
|
||||||
|
var/mob/selected = null
|
||||||
|
for(var/mob/living/M in player_list)
|
||||||
|
//Dead people only thanks!
|
||||||
|
if((M.stat != 2) || (!M.client))
|
||||||
|
continue
|
||||||
|
//They need a brain!
|
||||||
|
if(istype(M, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = M
|
||||||
|
if(H.species.has_organ["brain"] && !H.has_brain())
|
||||||
|
continue
|
||||||
|
if(M.ckey == find_key)
|
||||||
|
selected = M
|
||||||
|
break
|
||||||
|
return selected
|
||||||
|
|
||||||
#define CLONE_BIOMASS 150
|
#define CLONE_BIOMASS 150
|
||||||
|
|
||||||
/obj/machinery/clonepod
|
/obj/machinery/clonepod
|
||||||
anchored = 1
|
|
||||||
name = "cloning pod"
|
name = "cloning pod"
|
||||||
desc = "An electronically-lockable pod for growing organic tissue."
|
desc = "An electronically-lockable pod for growing organic tissue."
|
||||||
density = 1
|
density = 1
|
||||||
|
anchored = 1
|
||||||
icon = 'icons/obj/cloning.dmi'
|
icon = 'icons/obj/cloning.dmi'
|
||||||
icon_state = "pod_0"
|
icon_state = "pod_0"
|
||||||
req_access = list(access_genetics) //For premature unlocking.
|
req_access = list(access_genetics) //For premature unlocking.
|
||||||
|
|
||||||
var/mob/living/occupant
|
var/mob/living/occupant
|
||||||
var/heal_level = 90 //The clone is released once its health reaches this level.
|
var/heal_level = 20 //The clone is released once its health reaches this level.
|
||||||
|
var/heal_rate = 1
|
||||||
|
var/notoxin = 0
|
||||||
var/locked = 0
|
var/locked = 0
|
||||||
var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine.
|
var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine.
|
||||||
var/mess = 0 //Need to clean out it if it's full of exploded clone.
|
var/mess = 0 //Need to clean out it if it's full of exploded clone.
|
||||||
@@ -22,6 +45,366 @@
|
|||||||
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
|
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
|
||||||
var/biomass = CLONE_BIOMASS * 3
|
var/biomass = CLONE_BIOMASS * 3
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/New()
|
||||||
|
..()
|
||||||
|
component_parts = list()
|
||||||
|
component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||||
|
component_parts += new /obj/item/stack/cable_coil(src, 2)
|
||||||
|
|
||||||
|
RefreshParts()
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/attack_ai(mob/user as mob)
|
||||||
|
add_hiddenprint(user)
|
||||||
|
return attack_hand(user)
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/attack_hand(mob/user as mob)
|
||||||
|
if((isnull(occupant)) || (stat & NOPOWER))
|
||||||
|
return
|
||||||
|
if((!isnull(occupant)) && (occupant.stat != 2))
|
||||||
|
var/completion = (100 * ((occupant.health + 50) / (heal_level + 100))) // Clones start at -150 health
|
||||||
|
user << "Current clone cycle is [round(completion)]% complete."
|
||||||
|
return
|
||||||
|
|
||||||
|
//Clonepod
|
||||||
|
|
||||||
|
//Start growing a human clone in the pod!
|
||||||
|
/obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R)
|
||||||
|
if(mess || attempting)
|
||||||
|
return 0
|
||||||
|
var/datum/mind/clonemind = locate(R.mind)
|
||||||
|
if(!istype(clonemind, /datum/mind)) //not a mind
|
||||||
|
return 0
|
||||||
|
if(clonemind.current && clonemind.current.stat != DEAD) //mind is associated with a non-dead body
|
||||||
|
return 0
|
||||||
|
if(clonemind.active) //somebody is using that mind
|
||||||
|
if(ckey(clonemind.key) != R.ckey)
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
for(var/mob/dead/observer/G in player_list)
|
||||||
|
if(G.ckey == R.ckey)
|
||||||
|
if(G.can_reenter_corpse)
|
||||||
|
break
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
|
||||||
|
attempting = 1 //One at a time!!
|
||||||
|
locked = 1
|
||||||
|
|
||||||
|
eject_wait = 1
|
||||||
|
spawn(30)
|
||||||
|
eject_wait = 0
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
|
||||||
|
occupant = H
|
||||||
|
|
||||||
|
if(!R.dna.real_name) //to prevent null names
|
||||||
|
R.dna.real_name = "clone ([rand(0,999)])"
|
||||||
|
H.real_name = R.dna.real_name
|
||||||
|
|
||||||
|
icon_state = "pod_1"
|
||||||
|
//Get the clone body ready
|
||||||
|
H.adjustCloneLoss(150) // New damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
|
||||||
|
H.adjustBrainLoss(80) // Even if healed to full health, it will have some brain damage
|
||||||
|
H.Paralyse(4)
|
||||||
|
|
||||||
|
//Here let's calculate their health so the pod doesn't immediately eject them!!!
|
||||||
|
H.updatehealth()
|
||||||
|
|
||||||
|
clonemind.transfer_to(H)
|
||||||
|
H.ckey = R.ckey
|
||||||
|
H << "<span class='notice'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><i>So this is what cloning feels like?</i></span>"
|
||||||
|
|
||||||
|
// -- Mode/mind specific stuff goes here
|
||||||
|
callHook("clone", list(H))
|
||||||
|
|
||||||
|
switch(ticker.mode.name)
|
||||||
|
if("revolution")
|
||||||
|
if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
|
||||||
|
ticker.mode.update_all_rev_icons() //So the icon actually appears
|
||||||
|
if("mercenary")
|
||||||
|
if(H.mind in ticker.mode.syndicates)
|
||||||
|
ticker.mode.update_all_synd_icons()
|
||||||
|
if("cult")
|
||||||
|
if(H.mind in ticker.mode.cult)
|
||||||
|
ticker.mode.add_cultist(occupant.mind)
|
||||||
|
ticker.mode.update_all_cult_icons() //So the icon actually appears
|
||||||
|
|
||||||
|
// -- End mode specific stuff
|
||||||
|
|
||||||
|
if(!R.dna)
|
||||||
|
H.dna = new /datum/dna()
|
||||||
|
H.dna.real_name = H.real_name
|
||||||
|
else
|
||||||
|
H.dna = R.dna
|
||||||
|
H.UpdateAppearance()
|
||||||
|
if(heal_level < 60)
|
||||||
|
randmutb(H) //Sometimes the clones come out wrong.
|
||||||
|
H.dna.UpdateSE()
|
||||||
|
H.dna.UpdateUI()
|
||||||
|
|
||||||
|
H.set_cloned_appearance()
|
||||||
|
|
||||||
|
for(var/datum/language/L in R.languages)
|
||||||
|
H.add_language(L.name)
|
||||||
|
H.flavor_texts = R.flavor.Copy()
|
||||||
|
H.suiciding = 0
|
||||||
|
attempting = 0
|
||||||
|
return 1
|
||||||
|
|
||||||
|
//Grow clones to maturity then kick them out. FREELOADERS
|
||||||
|
/obj/machinery/clonepod/process()
|
||||||
|
|
||||||
|
if(stat & NOPOWER) //Autoeject if power is lost
|
||||||
|
if(occupant)
|
||||||
|
locked = 0
|
||||||
|
go_out()
|
||||||
|
return
|
||||||
|
|
||||||
|
if((occupant) && (occupant.loc == src))
|
||||||
|
if((occupant.stat == DEAD) || (occupant.suiciding) || !occupant.key) //Autoeject corpses and suiciding dudes.
|
||||||
|
locked = 0
|
||||||
|
go_out()
|
||||||
|
connected_message("Clone Rejected: Deceased.")
|
||||||
|
return
|
||||||
|
|
||||||
|
else if(occupant.health < heal_level && occupant.getCloneLoss() > 0)
|
||||||
|
occupant.Paralyse(4)
|
||||||
|
|
||||||
|
//Slowly get that clone healed and finished.
|
||||||
|
occupant.adjustCloneLoss(-2 * heal_rate)
|
||||||
|
|
||||||
|
//Premature clones may have brain damage.
|
||||||
|
occupant.adjustBrainLoss(-1 * heal_rate)
|
||||||
|
|
||||||
|
//So clones don't die of oxyloss in a running pod.
|
||||||
|
if(occupant.reagents.get_reagent_amount("inaprovaline") < 30)
|
||||||
|
occupant.reagents.add_reagent("inaprovaline", 60)
|
||||||
|
|
||||||
|
//So clones will remain asleep for long enough to get them into cryo (Bay RP edit)
|
||||||
|
if(occupant.reagents.get_reagent_amount("stoxin") < 10)
|
||||||
|
occupant.reagents.add_reagent("stoxin", 5)
|
||||||
|
if(occupant.reagents.get_reagent_amount("chloralhydrate") < 1)
|
||||||
|
occupant.reagents.add_reagent("chloralhydrate", 1)
|
||||||
|
|
||||||
|
//Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
|
||||||
|
occupant.adjustOxyLoss(-4)
|
||||||
|
if(notoxin)
|
||||||
|
occupant.adjustToxLoss(-2) // If sufficiently upgraded - remove toxin damage from chloral
|
||||||
|
|
||||||
|
use_power(7500) //This might need tweaking.
|
||||||
|
return
|
||||||
|
|
||||||
|
else if((occupant.health >= heal_level) && (!eject_wait))
|
||||||
|
connected_message("Cloning Process Complete.")
|
||||||
|
locked = 0
|
||||||
|
go_out()
|
||||||
|
return
|
||||||
|
|
||||||
|
else if((!occupant) || (occupant.loc != src))
|
||||||
|
occupant = null
|
||||||
|
if(locked)
|
||||||
|
locked = 0
|
||||||
|
if(!mess)
|
||||||
|
icon_state = "pod_0"
|
||||||
|
//use_power(200)
|
||||||
|
return
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
//Let's unlock this early I guess. Might be too early, needs tweaking.
|
||||||
|
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
if(isnull(occupant))
|
||||||
|
if(default_deconstruction_screwdriver(user, W))
|
||||||
|
return
|
||||||
|
if(default_deconstruction_crowbar(user, W))
|
||||||
|
return
|
||||||
|
if(default_part_replacement(user, W))
|
||||||
|
return
|
||||||
|
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||||
|
if(!check_access(W))
|
||||||
|
user << "<span class='warning'>Access Denied.</span>"
|
||||||
|
return
|
||||||
|
if((!locked) || (isnull(occupant)))
|
||||||
|
return
|
||||||
|
if((occupant.health < -20) && (occupant.stat != 2))
|
||||||
|
user << "<span class='warning'>Access Refused.</span>"
|
||||||
|
return
|
||||||
|
else
|
||||||
|
locked = 0
|
||||||
|
user << "System unlocked."
|
||||||
|
else if(istype(W, /obj/item/weapon/card/emag))
|
||||||
|
if(isnull(occupant))
|
||||||
|
return
|
||||||
|
user << "You force an emergency ejection."
|
||||||
|
locked = 0
|
||||||
|
go_out()
|
||||||
|
return
|
||||||
|
else if(istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
|
||||||
|
user << "<span class='notice'>\The [src] processes \the [W].</span>"
|
||||||
|
biomass += 50
|
||||||
|
user.drop_item()
|
||||||
|
del(W)
|
||||||
|
return
|
||||||
|
else if(istype(W, /obj/item/weapon/wrench))
|
||||||
|
if(locked && (anchored || occupant))
|
||||||
|
user << "<span class='warning'>Can not do that while [src] is in use.</span>"
|
||||||
|
else
|
||||||
|
if(anchored)
|
||||||
|
anchored = 0
|
||||||
|
connected.pod1 = null
|
||||||
|
connected = null
|
||||||
|
else
|
||||||
|
anchored = 1
|
||||||
|
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||||
|
if(anchored)
|
||||||
|
user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.")
|
||||||
|
else
|
||||||
|
user.visible_message("[user] unsecures [src] from the floor.", "You unsecure [src] from the floor.")
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
//Put messages in the connected computer's temp var for display.
|
||||||
|
/obj/machinery/clonepod/proc/connected_message(var/message)
|
||||||
|
if((isnull(connected)) || (!istype(connected, /obj/machinery/computer/cloning)))
|
||||||
|
return 0
|
||||||
|
if(!message)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
connected.temp = message
|
||||||
|
connected.updateUsrDialog()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/RefreshParts()
|
||||||
|
..()
|
||||||
|
var/rating = 0
|
||||||
|
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||||
|
if(istype(P, /obj/item/weapon/stock_parts/scanning_module) || istype(P, /obj/item/weapon/stock_parts/manipulator))
|
||||||
|
rating += P.rating
|
||||||
|
|
||||||
|
heal_level = rating * 10 - 20
|
||||||
|
heal_rate = round(rating / 4)
|
||||||
|
if(rating >= 8)
|
||||||
|
notoxin = 1
|
||||||
|
else
|
||||||
|
notoxin = 0
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/verb/eject()
|
||||||
|
set name = "Eject Cloner"
|
||||||
|
set category = "Object"
|
||||||
|
set src in oview(1)
|
||||||
|
|
||||||
|
if(usr.stat != 0)
|
||||||
|
return
|
||||||
|
go_out()
|
||||||
|
add_fingerprint(usr)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/proc/go_out()
|
||||||
|
if(locked)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(mess) //Clean that mess and dump those gibs!
|
||||||
|
mess = 0
|
||||||
|
gibs(loc)
|
||||||
|
icon_state = "pod_0"
|
||||||
|
|
||||||
|
/*
|
||||||
|
for(var/obj/O in src)
|
||||||
|
O.loc = loc
|
||||||
|
*/
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!(occupant))
|
||||||
|
return
|
||||||
|
|
||||||
|
/*
|
||||||
|
for(var/obj/O in src)
|
||||||
|
O.loc = loc
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(occupant.client)
|
||||||
|
occupant.client.eye = occupant.client.mob
|
||||||
|
occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
|
occupant.loc = loc
|
||||||
|
icon_state = "pod_0"
|
||||||
|
eject_wait = 0 //If it's still set somehow.
|
||||||
|
domutcheck(occupant) //Waiting until they're out before possible monkeyizing.
|
||||||
|
// occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
|
||||||
|
occupant = null
|
||||||
|
|
||||||
|
biomass -= CLONE_BIOMASS
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/proc/malfunction()
|
||||||
|
if(occupant)
|
||||||
|
connected_message("Critical Error!")
|
||||||
|
mess = 1
|
||||||
|
icon_state = "pod_g"
|
||||||
|
occupant.ghostize()
|
||||||
|
spawn(5)
|
||||||
|
del(occupant)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/relaymove(mob/user as mob)
|
||||||
|
if(user.stat)
|
||||||
|
return
|
||||||
|
go_out()
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/emp_act(severity)
|
||||||
|
if(prob(100/severity))
|
||||||
|
malfunction()
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/machinery/clonepod/ex_act(severity)
|
||||||
|
switch(severity)
|
||||||
|
if(1.0)
|
||||||
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
|
A.loc = loc
|
||||||
|
ex_act(severity)
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
if(2.0)
|
||||||
|
if(prob(50))
|
||||||
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
|
A.loc = loc
|
||||||
|
ex_act(severity)
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
if(3.0)
|
||||||
|
if(prob(25))
|
||||||
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
|
A.loc = loc
|
||||||
|
ex_act(severity)
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
return
|
||||||
|
|
||||||
|
//Health Tracker Implant
|
||||||
|
|
||||||
|
/obj/item/weapon/implant/health
|
||||||
|
name = "health implant"
|
||||||
|
var/healthstring = ""
|
||||||
|
|
||||||
|
/obj/item/weapon/implant/health/proc/sensehealth()
|
||||||
|
if(!implanted)
|
||||||
|
return "ERROR"
|
||||||
|
else
|
||||||
|
if(isliving(implanted))
|
||||||
|
var/mob/living/L = implanted
|
||||||
|
healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]"
|
||||||
|
if(!healthstring)
|
||||||
|
healthstring = "ERROR"
|
||||||
|
return healthstring
|
||||||
|
|
||||||
|
//Disk stuff.
|
||||||
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
|
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
|
||||||
//TO-DO: Make the genetics machine accept them.
|
//TO-DO: Make the genetics machine accept them.
|
||||||
/obj/item/weapon/disk/data
|
/obj/item/weapon/disk/data
|
||||||
@@ -30,7 +413,7 @@
|
|||||||
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
|
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
|
||||||
item_state = "card-id"
|
item_state = "card-id"
|
||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
var/datum/dna2/record/buf=null
|
var/datum/dna2/record/buf = null
|
||||||
var/read_only = 0 //Well,it's still a floppy disk
|
var/read_only = 0 //Well,it's still a floppy disk
|
||||||
|
|
||||||
/obj/item/weapon/disk/data/proc/initializeDisk()
|
/obj/item/weapon/disk/data/proc/initializeDisk()
|
||||||
@@ -65,363 +448,18 @@
|
|||||||
buf.dna.SE=new_SE
|
buf.dna.SE=new_SE
|
||||||
buf.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
|
buf.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
|
||||||
|
|
||||||
|
|
||||||
//Find a dead mob with a brain and client.
|
|
||||||
/proc/find_dead_player(var/find_key)
|
|
||||||
if (isnull(find_key))
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/selected = null
|
|
||||||
for(var/mob/living/M in player_list)
|
|
||||||
//Dead people only thanks!
|
|
||||||
if ((M.stat != 2) || (!M.client))
|
|
||||||
continue
|
|
||||||
//They need a brain!
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(H.species.has_organ["brain"] && !H.has_brain())
|
|
||||||
continue
|
|
||||||
if (M.ckey == find_key)
|
|
||||||
selected = M
|
|
||||||
break
|
|
||||||
return selected
|
|
||||||
|
|
||||||
//Disk stuff.
|
|
||||||
/obj/item/weapon/disk/data/New()
|
/obj/item/weapon/disk/data/New()
|
||||||
..()
|
..()
|
||||||
var/diskcolor = pick(0,1,2)
|
var/diskcolor = pick(0,1,2)
|
||||||
src.icon_state = "datadisk[diskcolor]"
|
icon_state = "datadisk[diskcolor]"
|
||||||
|
|
||||||
/obj/item/weapon/disk/data/attack_self(mob/user as mob)
|
/obj/item/weapon/disk/data/attack_self(mob/user as mob)
|
||||||
src.read_only = !src.read_only
|
read_only = !read_only
|
||||||
user << "You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"]."
|
user << "You flip the write-protect tab to [read_only ? "protected" : "unprotected"]."
|
||||||
|
|
||||||
/obj/item/weapon/disk/data/examine(mob/user)
|
/obj/item/weapon/disk/data/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
user << text("The write-protect tab is set to [src.read_only ? "protected" : "unprotected"].")
|
user << text("The write-protect tab is set to [read_only ? "protected" : "unprotected"].")
|
||||||
return
|
|
||||||
|
|
||||||
//Health Tracker Implant
|
|
||||||
|
|
||||||
/obj/item/weapon/implant/health
|
|
||||||
name = "health implant"
|
|
||||||
var/healthstring = ""
|
|
||||||
|
|
||||||
/obj/item/weapon/implant/health/proc/sensehealth()
|
|
||||||
if (!src.implanted)
|
|
||||||
return "ERROR"
|
|
||||||
else
|
|
||||||
if(isliving(src.implanted))
|
|
||||||
var/mob/living/L = src.implanted
|
|
||||||
src.healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]"
|
|
||||||
if (!src.healthstring)
|
|
||||||
src.healthstring = "ERROR"
|
|
||||||
return src.healthstring
|
|
||||||
|
|
||||||
/obj/machinery/clonepod/attack_ai(mob/user as mob)
|
|
||||||
src.add_hiddenprint(user)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/clonepod/attack_hand(mob/user as mob)
|
|
||||||
if ((isnull(src.occupant)) || (stat & NOPOWER))
|
|
||||||
return
|
|
||||||
if ((!isnull(src.occupant)) && (src.occupant.stat != 2))
|
|
||||||
var/completion = (100 * ((src.occupant.health + 100) / (src.heal_level + 100)))
|
|
||||||
user << "Current clone cycle is [round(completion)]% complete."
|
|
||||||
return
|
|
||||||
|
|
||||||
//Clonepod
|
|
||||||
|
|
||||||
//Start growing a human clone in the pod!
|
|
||||||
/obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R)
|
|
||||||
if(mess || attempting)
|
|
||||||
return 0
|
|
||||||
var/datum/mind/clonemind = locate(R.mind)
|
|
||||||
if(!istype(clonemind,/datum/mind)) //not a mind
|
|
||||||
return 0
|
|
||||||
if( clonemind.current && clonemind.current.stat != DEAD ) //mind is associated with a non-dead body
|
|
||||||
return 0
|
|
||||||
if(clonemind.active) //somebody is using that mind
|
|
||||||
if( ckey(clonemind.key)!=R.ckey )
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
for(var/mob/dead/observer/G in player_list)
|
|
||||||
if(G.ckey == R.ckey)
|
|
||||||
if(G.can_reenter_corpse)
|
|
||||||
break
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
src.heal_level = rand(10,40) //Randomizes what health the clone is when ejected
|
|
||||||
src.attempting = 1 //One at a time!!
|
|
||||||
src.locked = 1
|
|
||||||
|
|
||||||
src.eject_wait = 1
|
|
||||||
spawn(30)
|
|
||||||
src.eject_wait = 0
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
|
|
||||||
occupant = H
|
|
||||||
|
|
||||||
if(!R.dna.real_name) //to prevent null names
|
|
||||||
R.dna.real_name = "clone ([rand(0,999)])"
|
|
||||||
H.real_name = R.dna.real_name
|
|
||||||
|
|
||||||
src.icon_state = "pod_1"
|
|
||||||
//Get the clone body ready
|
|
||||||
H.adjustCloneLoss(150) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
|
|
||||||
H.adjustBrainLoss(src.heal_level + 50 + rand(10, 30)) // The rand(10, 30) will come out as extra brain damage
|
|
||||||
H.Paralyse(4)
|
|
||||||
|
|
||||||
//Here let's calculate their health so the pod doesn't immediately eject them!!!
|
|
||||||
H.updatehealth()
|
|
||||||
|
|
||||||
clonemind.transfer_to(H)
|
|
||||||
H.ckey = R.ckey
|
|
||||||
H << "<span class='notice'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><i>So this is what cloning feels like?</i></span>"
|
|
||||||
|
|
||||||
// -- Mode/mind specific stuff goes here
|
|
||||||
callHook("clone", list(H))
|
|
||||||
|
|
||||||
switch(ticker.mode.name)
|
|
||||||
if("revolution")
|
|
||||||
if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
|
|
||||||
ticker.mode.update_all_rev_icons() //So the icon actually appears
|
|
||||||
if("mercenary")
|
|
||||||
if(H.mind in ticker.mode.syndicates)
|
|
||||||
ticker.mode.update_all_synd_icons()
|
|
||||||
if("cult")
|
|
||||||
if (H.mind in ticker.mode.cult)
|
|
||||||
ticker.mode.add_cultist(src.occupant.mind)
|
|
||||||
ticker.mode.update_all_cult_icons() //So the icon actually appears
|
|
||||||
|
|
||||||
// -- End mode specific stuff
|
|
||||||
|
|
||||||
if(!R.dna)
|
|
||||||
H.dna = new /datum/dna()
|
|
||||||
H.dna.real_name = H.real_name
|
|
||||||
else
|
|
||||||
H.dna=R.dna
|
|
||||||
H.UpdateAppearance()
|
|
||||||
randmutb(H) //Sometimes the clones come out wrong.
|
|
||||||
H.dna.UpdateSE()
|
|
||||||
H.dna.UpdateUI()
|
|
||||||
|
|
||||||
H.set_cloned_appearance()
|
|
||||||
|
|
||||||
for(var/datum/language/L in R.languages)
|
|
||||||
H.add_language(L.name)
|
|
||||||
H.flavor_texts = R.flavor.Copy()
|
|
||||||
H.suiciding = 0
|
|
||||||
src.attempting = 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
//Grow clones to maturity then kick them out. FREELOADERS
|
|
||||||
/obj/machinery/clonepod/process()
|
|
||||||
|
|
||||||
if(stat & NOPOWER) //Autoeject if power is lost
|
|
||||||
if (src.occupant)
|
|
||||||
src.locked = 0
|
|
||||||
src.go_out()
|
|
||||||
return
|
|
||||||
|
|
||||||
if((src.occupant) && (src.occupant.loc == src))
|
|
||||||
if((src.occupant.stat == DEAD) || (src.occupant.suiciding) || !occupant.key) //Autoeject corpses and suiciding dudes.
|
|
||||||
src.locked = 0
|
|
||||||
src.go_out()
|
|
||||||
src.connected_message("Clone Rejected: Deceased.")
|
|
||||||
return
|
|
||||||
|
|
||||||
else if(src.occupant.health < src.heal_level)
|
|
||||||
src.occupant.Paralyse(4)
|
|
||||||
|
|
||||||
//Slowly get that clone healed and finished.
|
|
||||||
src.occupant.adjustCloneLoss(-2)
|
|
||||||
|
|
||||||
//Premature clones may have brain damage.
|
|
||||||
src.occupant.adjustBrainLoss(-1)
|
|
||||||
|
|
||||||
//So clones don't die of oxyloss in a running pod.
|
|
||||||
if (src.occupant.reagents.get_reagent_amount("inaprovaline") < 30)
|
|
||||||
src.occupant.reagents.add_reagent("inaprovaline", 60)
|
|
||||||
|
|
||||||
//So clones will remain asleep for long enough to get them into cryo (Bay RP edit)
|
|
||||||
if (src.occupant.reagents.get_reagent_amount("stoxin") < 10)
|
|
||||||
src.occupant.reagents.add_reagent("stoxin", 5)
|
|
||||||
if (src.occupant.reagents.get_reagent_amount("chloralhydrate") < 1)
|
|
||||||
src.occupant.reagents.add_reagent("chloralhydrate", 1)
|
|
||||||
|
|
||||||
//Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
|
|
||||||
src.occupant.adjustOxyLoss(-4)
|
|
||||||
|
|
||||||
use_power(7500) //This might need tweaking.
|
|
||||||
return
|
|
||||||
|
|
||||||
else if((src.occupant.health >= src.heal_level) && (!src.eject_wait))
|
|
||||||
src.connected_message("Cloning Process Complete.")
|
|
||||||
src.locked = 0
|
|
||||||
src.go_out()
|
|
||||||
return
|
|
||||||
|
|
||||||
else if ((!src.occupant) || (src.occupant.loc != src))
|
|
||||||
src.occupant = null
|
|
||||||
if (src.locked)
|
|
||||||
src.locked = 0
|
|
||||||
if (!src.mess)
|
|
||||||
icon_state = "pod_0"
|
|
||||||
//use_power(200)
|
|
||||||
return
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
//Let's unlock this early I guess. Might be too early, needs tweaking.
|
|
||||||
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
||||||
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
|
||||||
if (!src.check_access(W))
|
|
||||||
user << "\red Access Denied."
|
|
||||||
return
|
|
||||||
if ((!src.locked) || (isnull(src.occupant)))
|
|
||||||
return
|
|
||||||
if ((src.occupant.health < -20) && (src.occupant.stat != 2))
|
|
||||||
user << "\red Access Refused."
|
|
||||||
return
|
|
||||||
else
|
|
||||||
src.locked = 0
|
|
||||||
user << "System unlocked."
|
|
||||||
else if (istype(W, /obj/item/weapon/card/emag))
|
|
||||||
if (isnull(src.occupant))
|
|
||||||
return
|
|
||||||
user << "You force an emergency ejection."
|
|
||||||
src.locked = 0
|
|
||||||
src.go_out()
|
|
||||||
return
|
|
||||||
else if (istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
|
|
||||||
user << "\blue \The [src] processes \the [W]."
|
|
||||||
biomass += 50
|
|
||||||
user.drop_item()
|
|
||||||
del(W)
|
|
||||||
return
|
|
||||||
else if (istype(W, /obj/item/weapon/wrench))
|
|
||||||
if(src.locked && (src.anchored || src.occupant))
|
|
||||||
user << "\red Can not do that while [src] is in use."
|
|
||||||
else
|
|
||||||
if(src.anchored)
|
|
||||||
src.anchored = 0
|
|
||||||
connected.pod1 = null
|
|
||||||
connected = null
|
|
||||||
else
|
|
||||||
src.anchored = 1
|
|
||||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
|
||||||
if(anchored)
|
|
||||||
user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.")
|
|
||||||
else
|
|
||||||
user.visible_message("[user] unsecures [src] from the floor.", "You unsecure [src] from the floor.")
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
|
|
||||||
//Put messages in the connected computer's temp var for display.
|
|
||||||
/obj/machinery/clonepod/proc/connected_message(var/message)
|
|
||||||
if ((isnull(src.connected)) || (!istype(src.connected, /obj/machinery/computer/cloning)))
|
|
||||||
return 0
|
|
||||||
if (!message)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
src.connected.temp = message
|
|
||||||
src.connected.updateUsrDialog()
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/machinery/clonepod/verb/eject()
|
|
||||||
set name = "Eject Cloner"
|
|
||||||
set category = "Object"
|
|
||||||
set src in oview(1)
|
|
||||||
|
|
||||||
if (usr.stat != 0)
|
|
||||||
return
|
|
||||||
src.go_out()
|
|
||||||
add_fingerprint(usr)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/clonepod/proc/go_out()
|
|
||||||
if (src.locked)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (src.mess) //Clean that mess and dump those gibs!
|
|
||||||
src.mess = 0
|
|
||||||
gibs(src.loc)
|
|
||||||
src.icon_state = "pod_0"
|
|
||||||
|
|
||||||
/*
|
|
||||||
for(var/obj/O in src)
|
|
||||||
O.loc = src.loc
|
|
||||||
*/
|
|
||||||
return
|
|
||||||
|
|
||||||
if (!(src.occupant))
|
|
||||||
return
|
|
||||||
|
|
||||||
/*
|
|
||||||
for(var/obj/O in src)
|
|
||||||
O.loc = src.loc
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (src.occupant.client)
|
|
||||||
src.occupant.client.eye = src.occupant.client.mob
|
|
||||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
|
||||||
src.occupant.loc = src.loc
|
|
||||||
src.icon_state = "pod_0"
|
|
||||||
src.eject_wait = 0 //If it's still set somehow.
|
|
||||||
domutcheck(src.occupant) //Waiting until they're out before possible monkeyizing.
|
|
||||||
// src.occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
|
|
||||||
src.occupant = null
|
|
||||||
|
|
||||||
src.biomass -= CLONE_BIOMASS
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/clonepod/proc/malfunction()
|
|
||||||
if(src.occupant)
|
|
||||||
src.connected_message("Critical Error!")
|
|
||||||
src.mess = 1
|
|
||||||
src.icon_state = "pod_g"
|
|
||||||
src.occupant.ghostize()
|
|
||||||
spawn(5)
|
|
||||||
del(src.occupant)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/clonepod/relaymove(mob/user as mob)
|
|
||||||
if (user.stat)
|
|
||||||
return
|
|
||||||
src.go_out()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/clonepod/emp_act(severity)
|
|
||||||
if(prob(100/severity)) malfunction()
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/machinery/clonepod/ex_act(severity)
|
|
||||||
switch(severity)
|
|
||||||
if(1.0)
|
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
|
||||||
A.loc = src.loc
|
|
||||||
ex_act(severity)
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
if(2.0)
|
|
||||||
if (prob(50))
|
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
|
||||||
A.loc = src.loc
|
|
||||||
ex_act(severity)
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
if(3.0)
|
|
||||||
if (prob(25))
|
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
|
||||||
A.loc = src.loc
|
|
||||||
ex_act(severity)
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
else
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -45,7 +45,8 @@
|
|||||||
"output_load" = round(SMES.output_used),
|
"output_load" = round(SMES.output_used),
|
||||||
"RCON_tag" = SMES.RCon_tag
|
"RCON_tag" = SMES.RCon_tag
|
||||||
)))
|
)))
|
||||||
data["smes_info"] = smeslist
|
|
||||||
|
data["smes_info"] = sortByKey(smeslist, "RCON_tag")
|
||||||
|
|
||||||
// BREAKER DATA (simplified view)
|
// BREAKER DATA (simplified view)
|
||||||
var/list/breakerlist[0]
|
var/list/breakerlist[0]
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
hologram.anchored = 1//So space wind cannot drag it.
|
hologram.anchored = 1//So space wind cannot drag it.
|
||||||
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
|
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
|
||||||
hologram.SetLuminosity(2) //hologram lighting
|
hologram.SetLuminosity(2) //hologram lighting
|
||||||
|
hologram.color = color //painted holopad gives coloured holograms
|
||||||
SetLuminosity(2) //pad lighting
|
SetLuminosity(2) //pad lighting
|
||||||
icon_state = "holopad1"
|
icon_state = "holopad1"
|
||||||
A.holo = src
|
A.holo = src
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
var/seconds_electrified = 0;
|
var/seconds_electrified = 0;
|
||||||
var/shoot_inventory = 0
|
var/shoot_inventory = 0
|
||||||
var/locked = 0
|
var/locked = 0
|
||||||
var/panel_open = 0 //Hacking a smartfridge
|
|
||||||
var/scan_id = 1
|
var/scan_id = 1
|
||||||
var/is_secure = 0
|
var/is_secure = 0
|
||||||
var/datum/wires/smartfridge/wires = null
|
var/datum/wires/smartfridge/wires = null
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ Class Variables:
|
|||||||
component_parts (list)
|
component_parts (list)
|
||||||
A list of component parts of machine used by frame based machines.
|
A list of component parts of machine used by frame based machines.
|
||||||
|
|
||||||
|
panel_open (num)
|
||||||
|
Whether the panel is open
|
||||||
|
|
||||||
uid (num)
|
uid (num)
|
||||||
Unique id of machine across all machines.
|
Unique id of machine across all machines.
|
||||||
|
|
||||||
@@ -43,9 +46,6 @@ Class Variables:
|
|||||||
MAINT:8 -- machine is currently under going maintenance.
|
MAINT:8 -- machine is currently under going maintenance.
|
||||||
EMPED:16 -- temporary broken by EMP pulse
|
EMPED:16 -- temporary broken by EMP pulse
|
||||||
|
|
||||||
manual (num)
|
|
||||||
Currently unused.
|
|
||||||
|
|
||||||
Class Procs:
|
Class Procs:
|
||||||
New() 'game/machinery/machine.dm'
|
New() 'game/machinery/machine.dm'
|
||||||
|
|
||||||
@@ -104,13 +104,12 @@ Class Procs:
|
|||||||
//2 = run auto, use active
|
//2 = run auto, use active
|
||||||
var/idle_power_usage = 0
|
var/idle_power_usage = 0
|
||||||
var/active_power_usage = 0
|
var/active_power_usage = 0
|
||||||
var/power_channel = EQUIP
|
var/power_channel = EQUIP //EQUIP, ENVIRON or LIGHT
|
||||||
//EQUIP,ENVIRON or LIGHT
|
var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
|
||||||
var/list/component_parts = list() //list of all the parts used to build it, if made from certain kinds of frames.
|
|
||||||
var/uid
|
var/uid
|
||||||
var/manual = 0
|
var/panel_open = 0
|
||||||
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
|
|
||||||
var/global/gl_uid = 1
|
var/global/gl_uid = 1
|
||||||
|
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
|
||||||
|
|
||||||
/obj/machinery/New(l, d=0)
|
/obj/machinery/New(l, d=0)
|
||||||
..(l)
|
..(l)
|
||||||
@@ -238,15 +237,15 @@ Class Procs:
|
|||||||
gl_uid++
|
gl_uid++
|
||||||
|
|
||||||
/obj/machinery/proc/state(var/msg)
|
/obj/machinery/proc/state(var/msg)
|
||||||
for(var/mob/O in hearers(src, null))
|
for(var/mob/O in hearers(src, null))
|
||||||
O.show_message("\icon[src] <span class = 'notice'>[msg]</span>", 2)
|
O.show_message("\icon[src] <span class = 'notice'>[msg]</span>", 2)
|
||||||
|
|
||||||
/obj/machinery/proc/ping(text=null)
|
/obj/machinery/proc/ping(text=null)
|
||||||
if (!text)
|
if (!text)
|
||||||
text = "\The [src] pings."
|
text = "\The [src] pings."
|
||||||
|
|
||||||
state(text, "blue")
|
state(text, "blue")
|
||||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||||
|
|
||||||
/obj/machinery/proc/shock(mob/user, prb)
|
/obj/machinery/proc/shock(mob/user, prb)
|
||||||
if(inoperable())
|
if(inoperable())
|
||||||
@@ -267,6 +266,54 @@ Class Procs:
|
|||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
|
||||||
|
if(!istype(C))
|
||||||
|
return 0
|
||||||
|
if(!panel_open)
|
||||||
|
return 0
|
||||||
|
. = dismantle()
|
||||||
|
|
||||||
|
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S)
|
||||||
|
if(!istype(S))
|
||||||
|
return 0
|
||||||
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
|
panel_open = !panel_open
|
||||||
|
user << "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>"
|
||||||
|
update_icon()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
|
||||||
|
if(!istype(R))
|
||||||
|
return 0
|
||||||
|
if(!component_parts)
|
||||||
|
return 0
|
||||||
|
if(panel_open)
|
||||||
|
var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
|
||||||
|
var/P
|
||||||
|
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
||||||
|
for(var/D in CB.req_components)
|
||||||
|
var/T = text2path(D)
|
||||||
|
if(ispath(A.type, T))
|
||||||
|
P = T
|
||||||
|
break
|
||||||
|
for(var/obj/item/weapon/stock_parts/B in R.contents)
|
||||||
|
if(istype(B, P) && istype(A, P))
|
||||||
|
if(B.rating > A.rating)
|
||||||
|
R.remove_from_storage(B, src)
|
||||||
|
R.handle_item_insertion(A, 1)
|
||||||
|
component_parts -= A
|
||||||
|
component_parts += B
|
||||||
|
B.loc = null
|
||||||
|
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
|
||||||
|
break
|
||||||
|
update_icon()
|
||||||
|
RefreshParts()
|
||||||
|
else
|
||||||
|
user << "<span class='notice'>Following parts detected in the machine:</span>"
|
||||||
|
for(var/var/obj/item/C in component_parts)
|
||||||
|
user << "<span class='notice'> [C.name]</span>"
|
||||||
|
return 1
|
||||||
|
|
||||||
/obj/machinery/proc/dismantle()
|
/obj/machinery/proc/dismantle()
|
||||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
|
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
|
||||||
|
|||||||
@@ -3,187 +3,227 @@
|
|||||||
icon = 'icons/obj/objects.dmi'
|
icon = 'icons/obj/objects.dmi'
|
||||||
icon_state = "borgcharger0"
|
icon_state = "borgcharger0"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1.0
|
anchored = 1
|
||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 50
|
idle_power_usage = 50
|
||||||
active_power_usage = 50
|
active_power_usage = 50
|
||||||
var/mob/occupant = null
|
var/mob/occupant = null
|
||||||
var/max_internal_charge = 15000 // Two charged borgs in a row with default cell
|
var/obj/item/weapon/cell/cell = null
|
||||||
var/current_internal_charge = 15000 // Starts charged, to prevent power surges on round start
|
//var/max_internal_charge = 15000 // Two charged borgs in a row with default cell
|
||||||
var/charging_cap_active = 25000 // Active Cap - When cyborg is inside
|
//var/current_internal_charge = 15000 // Starts charged, to prevent power surges on round start
|
||||||
var/charging_cap_passive = 2500 // Passive Cap - Recharging internal capacitor when no cyborg is inside
|
var/charging_cap_active = 1000 // Active Cap - When cyborg is inside
|
||||||
|
var/charging_cap_passive = 250 // Passive Cap - Recharging internal capacitor when no cyborg is inside
|
||||||
var/icon_update_tick = 0 // Used to update icon only once every 10 ticks
|
var/icon_update_tick = 0 // Used to update icon only once every 10 ticks
|
||||||
|
var/charge_rate = 250 // How much charge is restored per tick
|
||||||
|
var/weld_rate = 0 // How much brute damage is repaired per tick
|
||||||
|
var/wire_rate = 0 // How much burn damage is repaired per tick
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/New()
|
||||||
|
..()
|
||||||
|
|
||||||
|
component_parts = list()
|
||||||
|
component_parts += new /obj/item/weapon/circuitboard/recharge_station(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
component_parts += new /obj/item/weapon/cell/high(src)
|
||||||
|
component_parts += new /obj/item/stack/cable_coil(src, 5)
|
||||||
|
|
||||||
New()
|
build_icon()
|
||||||
..()
|
update_icon()
|
||||||
build_icon()
|
|
||||||
update_icon()
|
|
||||||
|
|
||||||
process()
|
RefreshParts()
|
||||||
if(stat & (BROKEN))
|
|
||||||
return
|
|
||||||
|
|
||||||
if((stat & (NOPOWER)) && !current_internal_charge) // No Power.
|
/obj/machinery/recharge_station/process()
|
||||||
return
|
if(stat & (BROKEN))
|
||||||
|
|
||||||
var/chargemode = 0
|
|
||||||
if(src.occupant)
|
|
||||||
process_occupant()
|
|
||||||
chargemode = 1
|
|
||||||
// Power Stuff
|
|
||||||
|
|
||||||
if(stat & NOPOWER)
|
|
||||||
current_internal_charge = max(0, (current_internal_charge - (50 * CELLRATE))) // Internal Circuitry, 50W load. No power - Runs from internal cell
|
|
||||||
return // No external power = No charging
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(max_internal_charge < current_internal_charge)
|
|
||||||
current_internal_charge = max_internal_charge// Safety check if varedit adminbus or something screws up
|
|
||||||
// Calculating amount of power to draw
|
|
||||||
var/charge_diff = max_internal_charge - current_internal_charge // OK we have charge differences
|
|
||||||
charge_diff = charge_diff / CELLRATE // Deconvert from Charge to Joules
|
|
||||||
if(chargemode) // Decide if use passive or active power
|
|
||||||
charge_diff = between(0, charge_diff, charging_cap_active) // Trim the values to limits
|
|
||||||
else // We should have load for this tick in Watts
|
|
||||||
charge_diff = between(0, charge_diff, charging_cap_passive)
|
|
||||||
|
|
||||||
charge_diff += 50 // 50W for circuitry
|
|
||||||
|
|
||||||
if(idle_power_usage != charge_diff) // Force update, but only when our power usage changed this tick.
|
|
||||||
idle_power_usage = charge_diff
|
|
||||||
update_use_power(1,1)
|
|
||||||
|
|
||||||
current_internal_charge = min((current_internal_charge + ((charge_diff - 50) * CELLRATE)), max_internal_charge)
|
|
||||||
|
|
||||||
if(icon_update_tick >= 10)
|
|
||||||
update_icon()
|
|
||||||
icon_update_tick = 0
|
|
||||||
else
|
|
||||||
icon_update_tick++
|
|
||||||
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
allow_drop()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
examine(mob/user)
|
|
||||||
..(user)
|
|
||||||
user << "The charge meter reads: [round(chargepercentage())]%"
|
|
||||||
|
|
||||||
proc/chargepercentage()
|
|
||||||
return ((current_internal_charge / max_internal_charge) * 100)
|
|
||||||
|
|
||||||
relaymove(mob/user as mob)
|
|
||||||
if(user.stat)
|
|
||||||
return
|
|
||||||
src.go_out()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
emp_act(severity)
|
if((stat & (NOPOWER)) && (!cell || cell.percent() <= 0)) // No Power.
|
||||||
if(stat & (BROKEN|NOPOWER))
|
return
|
||||||
..(severity)
|
|
||||||
return
|
|
||||||
if(occupant)
|
|
||||||
occupant.emp_act(severity)
|
|
||||||
go_out()
|
|
||||||
..(severity)
|
|
||||||
|
|
||||||
update_icon()
|
|
||||||
..()
|
|
||||||
overlays.Cut()
|
|
||||||
switch(round(chargepercentage()))
|
|
||||||
if(1 to 20)
|
|
||||||
overlays += image('icons/obj/objects.dmi', "statn_c0")
|
|
||||||
if(21 to 40)
|
|
||||||
overlays += image('icons/obj/objects.dmi', "statn_c20")
|
|
||||||
if(41 to 60)
|
|
||||||
overlays += image('icons/obj/objects.dmi', "statn_c40")
|
|
||||||
if(61 to 80)
|
|
||||||
overlays += image('icons/obj/objects.dmi', "statn_c60")
|
|
||||||
if(81 to 98)
|
|
||||||
overlays += image('icons/obj/objects.dmi', "statn_c80")
|
|
||||||
if(99 to 110)
|
|
||||||
overlays += image('icons/obj/objects.dmi', "statn_c100")
|
|
||||||
|
|
||||||
proc
|
|
||||||
build_icon()
|
|
||||||
if(NOPOWER|BROKEN)
|
|
||||||
if(src.occupant)
|
|
||||||
icon_state = "borgcharger1"
|
|
||||||
else
|
|
||||||
icon_state = "borgcharger0"
|
|
||||||
else
|
|
||||||
icon_state = "borgcharger0"
|
|
||||||
|
|
||||||
|
var/chargemode = 0
|
||||||
|
if(occupant)
|
||||||
process_occupant()
|
process_occupant()
|
||||||
if(src.occupant)
|
chargemode = 1
|
||||||
if (istype(occupant, /mob/living/silicon/robot))
|
// Power Stuff
|
||||||
var/mob/living/silicon/robot/R = occupant
|
|
||||||
if(R.module)
|
if(!cell) // Shouldn't be possible, but sanity check
|
||||||
R.module.respawn_consumable(R)
|
return
|
||||||
if(!R.cell)
|
|
||||||
return
|
if(stat & NOPOWER)
|
||||||
if(!R.cell.fully_charged())
|
cell.use(50 * CELLRATE) // Internal Circuitry, 50W load. No power - Runs from internal cell
|
||||||
var/diff = min(R.cell.maxcharge - R.cell.charge, 250) // Capped at 250 charge / tick
|
return // No external power = No charging
|
||||||
diff = min(diff, current_internal_charge) // No over-discharging
|
|
||||||
R.cell.give(diff)
|
// Calculating amount of power to draw
|
||||||
current_internal_charge -= diff
|
var/charge_diff = (chargemode ? charging_cap_active : charging_cap_passive) + 50 // 50W for circuitry
|
||||||
else
|
|
||||||
update_use_power(1)
|
charge_diff = cell.give(charge_diff)
|
||||||
|
|
||||||
|
if(idle_power_usage != charge_diff) // Force update, but only when our power usage changed this tick.
|
||||||
|
idle_power_usage = charge_diff
|
||||||
|
update_use_power(1, 1)
|
||||||
|
|
||||||
|
if(icon_update_tick >= 10)
|
||||||
|
update_icon()
|
||||||
|
icon_update_tick = 0
|
||||||
|
else
|
||||||
|
icon_update_tick++
|
||||||
|
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/allow_drop()
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/examine(mob/user)
|
||||||
|
..(user)
|
||||||
|
user << "The charge meter reads: [round(chargepercentage())]%"
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/proc/chargepercentage()
|
||||||
|
if(!cell)
|
||||||
|
return 0
|
||||||
|
return cell.percent()
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/relaymove(mob/user as mob)
|
||||||
|
if(user.stat)
|
||||||
|
return
|
||||||
|
go_out()
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/emp_act(severity)
|
||||||
|
if(stat & (BROKEN|NOPOWER))
|
||||||
|
..(severity)
|
||||||
|
return
|
||||||
|
if(occupant)
|
||||||
|
occupant.emp_act(severity)
|
||||||
go_out()
|
go_out()
|
||||||
if(!( src.occupant ))
|
if(cell)
|
||||||
return
|
cell.emp_act(severity)
|
||||||
//for(var/obj/O in src)
|
..(severity)
|
||||||
// O.loc = src.loc
|
|
||||||
if (src.occupant.client)
|
/obj/machinery/recharge_station/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
src.occupant.client.eye = src.occupant.client.mob
|
if(!occupant)
|
||||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
if(default_deconstruction_screwdriver(user, O))
|
||||||
src.occupant.loc = src.loc
|
return
|
||||||
src.occupant = null
|
if(default_deconstruction_crowbar(user, O))
|
||||||
build_icon()
|
return
|
||||||
update_use_power(1)
|
if(default_part_replacement(user, O))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
verb
|
/obj/machinery/recharge_station/RefreshParts()
|
||||||
move_eject()
|
..()
|
||||||
set category = "Object"
|
var/man_rating = 0
|
||||||
set src in oview(1)
|
var/cap_rating = 0
|
||||||
if (usr.stat != 0)
|
|
||||||
return
|
|
||||||
src.go_out()
|
|
||||||
add_fingerprint(usr)
|
|
||||||
return
|
|
||||||
|
|
||||||
move_inside()
|
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||||
set category = "Object"
|
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||||
set src in oview(1)
|
cap_rating += P.rating
|
||||||
if (usr.stat == 2)
|
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
|
||||||
//Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
|
man_rating += P.rating
|
||||||
|
cell = locate(/obj/item/weapon/cell) in component_parts
|
||||||
|
|
||||||
|
charge_rate = 125 * cap_rating
|
||||||
|
charging_cap_passive = charge_rate
|
||||||
|
weld_rate = max(0, man_rating - 3)
|
||||||
|
wire_rate = max(0, man_rating - 5)
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/update_icon()
|
||||||
|
..()
|
||||||
|
overlays.Cut()
|
||||||
|
switch(round(chargepercentage()))
|
||||||
|
if(1 to 20)
|
||||||
|
overlays += image('icons/obj/objects.dmi', "statn_c0")
|
||||||
|
if(21 to 40)
|
||||||
|
overlays += image('icons/obj/objects.dmi', "statn_c20")
|
||||||
|
if(41 to 60)
|
||||||
|
overlays += image('icons/obj/objects.dmi', "statn_c40")
|
||||||
|
if(61 to 80)
|
||||||
|
overlays += image('icons/obj/objects.dmi', "statn_c60")
|
||||||
|
if(81 to 98)
|
||||||
|
overlays += image('icons/obj/objects.dmi', "statn_c80")
|
||||||
|
if(99 to 110)
|
||||||
|
overlays += image('icons/obj/objects.dmi', "statn_c100")
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/proc/build_icon()
|
||||||
|
if(NOPOWER|BROKEN)
|
||||||
|
if(occupant)
|
||||||
|
icon_state = "borgcharger1"
|
||||||
|
else
|
||||||
|
icon_state = "borgcharger0"
|
||||||
|
else
|
||||||
|
icon_state = "borgcharger0"
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/proc/process_occupant()
|
||||||
|
if(occupant)
|
||||||
|
if(istype(occupant, /mob/living/silicon/robot))
|
||||||
|
var/mob/living/silicon/robot/R = occupant
|
||||||
|
if(R.module)
|
||||||
|
R.module.respawn_consumable(R)
|
||||||
|
if(!R.cell)
|
||||||
return
|
return
|
||||||
if (!(istype(usr, /mob/living/silicon/)))
|
if(!R.cell.fully_charged())
|
||||||
usr << "\blue <B>Only non-organics may enter the recharger!</B>"
|
var/diff = min(R.cell.maxcharge - R.cell.charge, charge_rate) // Capped at charge_rate charge / tick
|
||||||
return
|
if (cell.use(diff))
|
||||||
if (src.occupant)
|
R.cell.give(diff)
|
||||||
usr << "\blue <B>The cell is already occupied!</B>"
|
if(weld_rate && R.getBruteLoss())
|
||||||
return
|
R.adjustBruteLoss(-1)
|
||||||
if (!usr:cell)
|
if(wire_rate && R.getFireLoss())
|
||||||
usr<<"\blue Without a powercell, you can't be recharged."
|
R.adjustFireLoss(-1)
|
||||||
//Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
|
else
|
||||||
return
|
update_use_power(1)
|
||||||
usr.stop_pulling()
|
|
||||||
if(usr && usr.client)
|
/obj/machinery/recharge_station/proc/go_out()
|
||||||
usr.client.perspective = EYE_PERSPECTIVE
|
if(!(occupant))
|
||||||
usr.client.eye = src
|
return
|
||||||
usr.loc = src
|
//for(var/obj/O in src)
|
||||||
src.occupant = usr
|
// O.loc = loc
|
||||||
/*for(var/obj/O in src)
|
if(occupant.client)
|
||||||
O.loc = src.loc*/
|
occupant.client.eye = occupant.client.mob
|
||||||
src.add_fingerprint(usr)
|
occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
build_icon()
|
occupant.loc = loc
|
||||||
update_use_power(1)
|
occupant = null
|
||||||
return
|
build_icon()
|
||||||
|
update_use_power(1)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/verb/move_eject()
|
||||||
|
set category = "Object"
|
||||||
|
set src in oview(1)
|
||||||
|
if(usr.stat != 0)
|
||||||
|
return
|
||||||
|
go_out()
|
||||||
|
add_fingerprint(usr)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/verb/move_inside()
|
||||||
|
set category = "Object"
|
||||||
|
set src in oview(1)
|
||||||
|
if(usr.stat == 2)
|
||||||
|
//Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
|
||||||
|
return
|
||||||
|
if(!(istype(usr, /mob/living/silicon/)))
|
||||||
|
usr << "<span class='notice'>Only non-organics may enter the recharger!</span>"
|
||||||
|
return
|
||||||
|
if(occupant)
|
||||||
|
usr << "<span class='notice'>The cell is already occupied!</span>"
|
||||||
|
return
|
||||||
|
if(!usr:cell)
|
||||||
|
usr << "<span class='notice'>Without a powercell, you can't be recharged.</span>"
|
||||||
|
//Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
|
||||||
|
return
|
||||||
|
usr.stop_pulling()
|
||||||
|
if(usr && usr.client)
|
||||||
|
usr.client.perspective = EYE_PERSPECTIVE
|
||||||
|
usr.client.eye = src
|
||||||
|
usr.loc = src
|
||||||
|
occupant = usr
|
||||||
|
/*for(var/obj/O in src)
|
||||||
|
O.loc = loc*/
|
||||||
|
add_fingerprint(usr)
|
||||||
|
build_icon()
|
||||||
|
update_use_power(1)
|
||||||
|
return
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
|
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
|
||||||
var/obj/item/weapon/cell/cell
|
var/obj/item/weapon/cell/cell
|
||||||
var/on = 0
|
var/on = 0
|
||||||
var/open = 0
|
|
||||||
var/set_temperature = T0C + 50 //K
|
var/set_temperature = T0C + 50 //K
|
||||||
var/heating_power = 40000
|
var/heating_power = 40000
|
||||||
|
|
||||||
@@ -20,14 +19,14 @@
|
|||||||
/obj/machinery/space_heater/update_icon()
|
/obj/machinery/space_heater/update_icon()
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
icon_state = "sheater[on]"
|
icon_state = "sheater[on]"
|
||||||
if(open)
|
if(panel_open)
|
||||||
overlays += "sheater-open"
|
overlays += "sheater-open"
|
||||||
|
|
||||||
/obj/machinery/space_heater/examine(mob/user)
|
/obj/machinery/space_heater/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
|
|
||||||
user << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
|
user << "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]."
|
||||||
if(open)
|
if(panel_open)
|
||||||
user << "The power cell is [cell ? "installed" : "missing"]."
|
user << "The power cell is [cell ? "installed" : "missing"]."
|
||||||
else
|
else
|
||||||
user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
|
user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
|
||||||
@@ -43,7 +42,7 @@
|
|||||||
|
|
||||||
/obj/machinery/space_heater/attackby(obj/item/I, mob/user)
|
/obj/machinery/space_heater/attackby(obj/item/I, mob/user)
|
||||||
if(istype(I, /obj/item/weapon/cell))
|
if(istype(I, /obj/item/weapon/cell))
|
||||||
if(open)
|
if(panel_open)
|
||||||
if(cell)
|
if(cell)
|
||||||
user << "There is already a power cell inside."
|
user << "There is already a power cell inside."
|
||||||
return
|
return
|
||||||
@@ -61,10 +60,10 @@
|
|||||||
user << "The hatch must be open to insert a power cell."
|
user << "The hatch must be open to insert a power cell."
|
||||||
return
|
return
|
||||||
else if(istype(I, /obj/item/weapon/screwdriver))
|
else if(istype(I, /obj/item/weapon/screwdriver))
|
||||||
open = !open
|
panel_open = !panel_open
|
||||||
user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].")
|
user.visible_message("\blue [user] [panel_open ? "opens" : "closes"] the hatch on the [src].", "\blue You [panel_open ? "open" : "close"] the hatch on the [src].")
|
||||||
update_icon()
|
update_icon()
|
||||||
if(!open && user.machine == src)
|
if(!panel_open && user.machine == src)
|
||||||
user << browse(null, "window=spaceheater")
|
user << browse(null, "window=spaceheater")
|
||||||
user.unset_machine()
|
user.unset_machine()
|
||||||
else
|
else
|
||||||
@@ -77,7 +76,7 @@
|
|||||||
|
|
||||||
/obj/machinery/space_heater/interact(mob/user as mob)
|
/obj/machinery/space_heater/interact(mob/user as mob)
|
||||||
|
|
||||||
if(open)
|
if(panel_open)
|
||||||
|
|
||||||
var/dat
|
var/dat
|
||||||
dat = "Power cell: "
|
dat = "Power cell: "
|
||||||
@@ -120,7 +119,7 @@
|
|||||||
set_temperature = dd_range(T0C, T0C + 90, set_temperature + value)
|
set_temperature = dd_range(T0C, T0C + 90, set_temperature + value)
|
||||||
|
|
||||||
if("cellremove")
|
if("cellremove")
|
||||||
if(open && cell && !usr.get_active_hand())
|
if(panel_open && cell && !usr.get_active_hand())
|
||||||
usr.visible_message("\blue [usr] removes \the [cell] from \the [src].", "\blue You remove \the [cell] from \the [src].")
|
usr.visible_message("\blue [usr] removes \the [cell] from \the [src].", "\blue You remove \the [cell] from \the [src].")
|
||||||
cell.updateicon()
|
cell.updateicon()
|
||||||
usr.put_in_hands(cell)
|
usr.put_in_hands(cell)
|
||||||
@@ -129,7 +128,7 @@
|
|||||||
|
|
||||||
|
|
||||||
if("cellinstall")
|
if("cellinstall")
|
||||||
if(open && !cell)
|
if(panel_open && !cell)
|
||||||
var/obj/item/weapon/cell/C = usr.get_active_hand()
|
var/obj/item/weapon/cell/C = usr.get_active_hand()
|
||||||
if(istype(C))
|
if(istype(C))
|
||||||
usr.drop_item()
|
usr.drop_item()
|
||||||
|
|||||||
@@ -589,7 +589,6 @@
|
|||||||
var/radiation_level = 2 // 1 is removing germs, 2 is removing blood, 3 is removing phoron.
|
var/radiation_level = 2 // 1 is removing germs, 2 is removing blood, 3 is removing phoron.
|
||||||
var/model_text = "" // Some flavour text for the topic box.
|
var/model_text = "" // Some flavour text for the topic box.
|
||||||
var/locked = 1 // If locked, nothing can be taken from or added to the cycler.
|
var/locked = 1 // If locked, nothing can be taken from or added to the cycler.
|
||||||
var/panel_open = 0 // Hacking!
|
|
||||||
var/can_repair // If set, the cycler can repair voidsuits.
|
var/can_repair // If set, the cycler can repair voidsuits.
|
||||||
var/electrified = 0
|
var/electrified = 0
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(Proj.damage_type == HALLOSS)
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
return
|
return
|
||||||
take_damage(Proj.damage)
|
take_damage(Proj.damage)
|
||||||
..()
|
..()
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
popping = 0
|
popping = 0
|
||||||
|
|
||||||
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(Proj.damage_type == HALLOSS)
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
return
|
return
|
||||||
src.health -= Proj.damage
|
src.health -= Proj.damage
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -54,7 +54,6 @@
|
|||||||
var/shoot_inventory = 0 //Fire items at customers! We're broken!
|
var/shoot_inventory = 0 //Fire items at customers! We're broken!
|
||||||
var/shut_up = 1 //Stop spouting those godawful pitches!
|
var/shut_up = 1 //Stop spouting those godawful pitches!
|
||||||
var/extended_inventory = 0 //can we access the hidden inventory?
|
var/extended_inventory = 0 //can we access the hidden inventory?
|
||||||
var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
|
|
||||||
var/scan_id = 1
|
var/scan_id = 1
|
||||||
var/obj/item/weapon/coin/coin
|
var/obj/item/weapon/coin/coin
|
||||||
var/datum/wires/vending/wires = null
|
var/datum/wires/vending/wires = null
|
||||||
|
|||||||
@@ -1083,6 +1083,7 @@
|
|||||||
/obj/item/mecha_parts/mecha_equipment/tool/passenger/destroy()
|
/obj/item/mecha_parts/mecha_equipment/tool/passenger/destroy()
|
||||||
for(var/atom/movable/AM in src)
|
for(var/atom/movable/AM in src)
|
||||||
AM.forceMove(get_turf(src))
|
AM.forceMove(get_turf(src))
|
||||||
|
AM << "<span class='danger'>You tumble out of the destroyed [src.name]!"
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tool/passenger/Exit(atom/movable/O)
|
/obj/item/mecha_parts/mecha_equipment/tool/passenger/Exit(atom/movable/O)
|
||||||
|
|||||||
@@ -199,7 +199,7 @@
|
|||||||
name = "\improper LBX AC 10 \"Scattershot\""
|
name = "\improper LBX AC 10 \"Scattershot\""
|
||||||
icon_state = "mecha_scatter"
|
icon_state = "mecha_scatter"
|
||||||
equip_cooldown = 20
|
equip_cooldown = 20
|
||||||
projectile = /obj/item/projectile/bullet/midbullet
|
projectile = /obj/item/projectile/bullet/pistol/medium
|
||||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||||
fire_volume = 80
|
fire_volume = 80
|
||||||
projectiles = 40
|
projectiles = 40
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
name = "\improper Ultra AC 2"
|
name = "\improper Ultra AC 2"
|
||||||
icon_state = "mecha_uac2"
|
icon_state = "mecha_uac2"
|
||||||
equip_cooldown = 10
|
equip_cooldown = 10
|
||||||
projectile = /obj/item/projectile/bullet/weakbullet
|
projectile = /obj/item/projectile/bullet/pistol/medium
|
||||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||||
projectiles = 300
|
projectiles = 300
|
||||||
projectiles_per_shot = 3
|
projectiles_per_shot = 3
|
||||||
|
|||||||
@@ -506,8 +506,25 @@
|
|||||||
var/ignore_threshold
|
var/ignore_threshold
|
||||||
if(istype(Proj, /obj/item/projectile/beam/pulse))
|
if(istype(Proj, /obj/item/projectile/beam/pulse))
|
||||||
ignore_threshold = 1
|
ignore_threshold = 1
|
||||||
src.take_damage(Proj.damage,Proj.flag)
|
src.take_damage(Proj.damage, Proj.flag)
|
||||||
|
if(prob(25)) spark_system.start()
|
||||||
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)
|
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)
|
||||||
|
|
||||||
|
//AP projectiles have a chance to cause additional damage
|
||||||
|
if(Proj.penetrating)
|
||||||
|
var/distance = get_dist(Proj.starting, get_turf(loc))
|
||||||
|
var/hit_occupant = 1 //only allow the occupant to be hit once
|
||||||
|
for(var/i in 1 to min(Proj.penetrating, round(Proj.damage/15)))
|
||||||
|
if(src.occupant && hit_occupant && prob(20))
|
||||||
|
Proj.attack_mob(src.occupant, distance)
|
||||||
|
hit_occupant = 0
|
||||||
|
else
|
||||||
|
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), 1)
|
||||||
|
|
||||||
|
Proj.penetrating--
|
||||||
|
|
||||||
|
if(prob(15))
|
||||||
|
break //give a chance to exit early
|
||||||
|
|
||||||
Proj.on_hit(src)
|
Proj.on_hit(src)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -233,6 +233,21 @@ steam.start() -- spawns the effect
|
|||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/////////////////////////////////////////////
|
||||||
|
// Illumination
|
||||||
|
/////////////////////////////////////////////
|
||||||
|
|
||||||
|
/obj/effect/effect/smoke/illumination
|
||||||
|
name = "illumination"
|
||||||
|
opacity = 0
|
||||||
|
icon = 'icons/effects/effects.dmi'
|
||||||
|
icon_state = "sparks"
|
||||||
|
|
||||||
|
/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
|
||||||
|
time_to_live=lifetime
|
||||||
|
..()
|
||||||
|
SetLuminosity(brightness)
|
||||||
|
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
// Bad smoke
|
// Bad smoke
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
|||||||
@@ -411,9 +411,9 @@
|
|||||||
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
|
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
|
||||||
return 0
|
return 0
|
||||||
var/obj/item/clothing/under/uniform = H.w_uniform
|
var/obj/item/clothing/under/uniform = H.w_uniform
|
||||||
if(uniform.hastie)
|
if(uniform.accessories.len && !uniform.can_attach_accessory(src))
|
||||||
if (!disable_warning)
|
if (!disable_warning)
|
||||||
H << "<span class='warning'>You already have [uniform.hastie] attached to your [uniform].</span>"
|
H << "<span class='warning'>You already have an accessory of this type attached to your [uniform].</span>"
|
||||||
return 0
|
return 0
|
||||||
if( !(slot_flags & SLOT_TIE) )
|
if( !(slot_flags & SLOT_TIE) )
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -281,6 +281,8 @@
|
|||||||
src.overlays.Cut()
|
src.overlays.Cut()
|
||||||
src.overlays += "pai-off"
|
src.overlays += "pai-off"
|
||||||
|
|
||||||
|
/obj/item/device/paicard
|
||||||
|
var/current_emotion = 1
|
||||||
/obj/item/device/paicard/proc/setEmotion(var/emotion)
|
/obj/item/device/paicard/proc/setEmotion(var/emotion)
|
||||||
if(pai)
|
if(pai)
|
||||||
src.overlays.Cut()
|
src.overlays.Cut()
|
||||||
@@ -294,6 +296,7 @@
|
|||||||
if(7) src.overlays += "pai-sad"
|
if(7) src.overlays += "pai-sad"
|
||||||
if(8) src.overlays += "pai-angry"
|
if(8) src.overlays += "pai-angry"
|
||||||
if(9) src.overlays += "pai-what"
|
if(9) src.overlays += "pai-what"
|
||||||
|
current_emotion = emotion
|
||||||
|
|
||||||
/obj/item/device/paicard/proc/alertUpdate()
|
/obj/item/device/paicard/proc/alertUpdate()
|
||||||
var/turf/T = get_turf_or_move(src.loc)
|
var/turf/T = get_turf_or_move(src.loc)
|
||||||
|
|||||||
@@ -380,6 +380,10 @@
|
|||||||
viewers(user) << "\red <b>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b>"
|
viewers(user) << "\red <b>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b>"
|
||||||
return (BRUTELOSS|OXYLOSS)
|
return (BRUTELOSS|OXYLOSS)
|
||||||
|
|
||||||
|
New()
|
||||||
|
name = "[colourName] crayon"
|
||||||
|
..()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Snap pops
|
* Snap pops
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
/obj/item/device/taperecorder,
|
/obj/item/device/taperecorder,
|
||||||
/obj/item/device/hailer,
|
/obj/item/device/hailer,
|
||||||
/obj/item/device/megaphone,
|
/obj/item/device/megaphone,
|
||||||
/obj/item/clothing/tie/holobadge,
|
/obj/item/clothing/accessory/holobadge,
|
||||||
/obj/structure/closet/crate/secure,
|
/obj/structure/closet/crate/secure,
|
||||||
/obj/structure/closet/secure_closet,
|
/obj/structure/closet/secure_closet,
|
||||||
/obj/machinery/librarycomp,
|
/obj/machinery/librarycomp,
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#ifndef T_BOARD
|
||||||
|
#error T_BOARD macro is not defined but we need it!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/obj/item/weapon/circuitboard/biogenerator
|
||||||
|
name = T_BOARD("biogenerator")
|
||||||
|
build_path = "/obj/machinery/biogenerator"
|
||||||
|
board_type = "machine"
|
||||||
|
origin_tech = "programming=2"
|
||||||
|
frame_desc = "Requires 1 Manipulator, and 1 Matter Bin."
|
||||||
|
req_components = list(
|
||||||
|
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||||
|
"/obj/item/weapon/stock_parts/manipulator" = 1)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#ifndef T_BOARD
|
||||||
|
#error T_BOARD macro is not defined but we need it!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/obj/item/weapon/circuitboard/recharge_station
|
||||||
|
name = T_BOARD("cyborg recharging station")
|
||||||
|
build_path = "/obj/machinery/recharge_station"
|
||||||
|
board_type = "machine"
|
||||||
|
origin_tech = "programming=3;engineering=3"
|
||||||
|
frame_desc = "Requires 2 Manipulator, 2 Capacitor, 1 Cell, and 5 pieces of cable."
|
||||||
|
req_components = list(
|
||||||
|
"/obj/item/stack/cable_coil" = 5,
|
||||||
|
"/obj/item/weapon/stock_parts/capacitor" = 2,
|
||||||
|
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||||
|
"/obj/item/weapon/cell" = 1)
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
/obj/item/weapon/plastique/afterattack(atom/movable/target, mob/user, flag)
|
/obj/item/weapon/plastique/afterattack(atom/movable/target, mob/user, flag)
|
||||||
if (!flag)
|
if (!flag)
|
||||||
return
|
return
|
||||||
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/tie/storage/) || istype(target, /obj/item/clothing/under))
|
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/accessory/storage/) || istype(target, /obj/item/clothing/under))
|
||||||
return
|
return
|
||||||
user << "Planting explosives..."
|
user << "Planting explosives..."
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
/obj/item/device/paicard,
|
/obj/item/device/paicard,
|
||||||
/obj/item/device/violin,
|
/obj/item/device/violin,
|
||||||
/obj/item/weapon/storage/belt/utility/full,
|
/obj/item/weapon/storage/belt/utility/full,
|
||||||
/obj/item/clothing/tie/horrible)
|
/obj/item/clothing/accessory/horrible)
|
||||||
|
|
||||||
if(!ispath(gift_type,/obj/item)) return
|
if(!ispath(gift_type,/obj/item)) return
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
B.health -= damage
|
B.health -= damage
|
||||||
B.update_icon()
|
B.update_icon()
|
||||||
|
|
||||||
new/obj/effect/effect/smoke/flashbang(src.loc)
|
new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
|
proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
|
||||||
if (locate(/obj/item/weapon/cloaking_device, M)) // Called during the loop that bangs people in lockers/containers and when banging
|
if (locate(/obj/item/weapon/cloaking_device, M)) // Called during the loop that bangs people in lockers/containers and when banging
|
||||||
for(var/obj/item/weapon/cloaking_device/S in M) // people in normal view. Could theroetically be called during other explosions.
|
for(var/obj/item/weapon/cloaking_device/S in M) // people in normal view. Could theroetically be called during other explosions.
|
||||||
S.active = 0 // -- Polymorph
|
S.active = 0 // -- Polymorph
|
||||||
@@ -100,16 +100,6 @@
|
|||||||
M << "\red Your ears start to ring!"
|
M << "\red Your ears start to ring!"
|
||||||
M.update_icons()
|
M.update_icons()
|
||||||
|
|
||||||
/obj/effect/effect/smoke/flashbang
|
|
||||||
name = "illumination"
|
|
||||||
time_to_live = 10
|
|
||||||
opacity = 0
|
|
||||||
icon_state = "sparks"
|
|
||||||
|
|
||||||
/obj/effect/effect/smoke/flashbang/New()
|
|
||||||
..()
|
|
||||||
SetLuminosity(15)
|
|
||||||
|
|
||||||
/obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve
|
/obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve
|
||||||
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
|
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
|
||||||
name = "clusterbang"
|
name = "clusterbang"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
//NEVER USE THIS IT SUX -PETETHEGOAT
|
//NEVER USE THIS IT SUX -PETETHEGOAT
|
||||||
|
//THE GOAT WAS RIGHT - RKF
|
||||||
|
|
||||||
var/global/list/cached_icons = list()
|
var/global/list/cached_icons = list()
|
||||||
|
|
||||||
@@ -11,10 +12,10 @@ var/global/list/cached_icons = list()
|
|||||||
matter = list("metal" = 200)
|
matter = list("metal" = 200)
|
||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
amount_per_transfer_from_this = 10
|
amount_per_transfer_from_this = 10
|
||||||
possible_transfer_amounts = list(10,20,30,50,70)
|
possible_transfer_amounts = list(10,20,30,60)
|
||||||
volume = 60
|
volume = 60
|
||||||
flags = OPENCONTAINER
|
flags = OPENCONTAINER
|
||||||
var/paint_type = ""
|
var/paint_type = "red"
|
||||||
|
|
||||||
afterattack(turf/simulated/target, mob/user, proximity)
|
afterattack(turf/simulated/target, mob/user, proximity)
|
||||||
if(!proximity) return
|
if(!proximity) return
|
||||||
@@ -28,24 +29,19 @@ var/global/list/cached_icons = list()
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
New()
|
New()
|
||||||
if(paint_type == "remover")
|
if(paint_type && lentext(paint_type) > 0)
|
||||||
name = "paint remover bucket"
|
|
||||||
else if(paint_type && lentext(paint_type) > 0)
|
|
||||||
name = paint_type + " " + name
|
name = paint_type + " " + name
|
||||||
..()
|
..()
|
||||||
reagents.add_reagent("water", volume*3/5)
|
reagents.add_reagent("water", volume*3/5)
|
||||||
reagents.add_reagent("plasticide", volume/5)
|
reagents.add_reagent("plasticide", volume/5)
|
||||||
if(paint_type == "white") //why don't white crayons exist
|
if(paint_type == "white") //why don't white crayons exist
|
||||||
reagents.add_reagent("aluminum", volume/5)
|
reagents.add_reagent("aluminum", volume/5)
|
||||||
|
else if (paint_type == "black")
|
||||||
|
reagents.add_reagent("carbon", volume/5)
|
||||||
else
|
else
|
||||||
reagents.add_reagent("crayon_dust_[paint_type]", volume/5)
|
reagents.add_reagent("crayon_dust_[paint_type]", volume/5)
|
||||||
reagents.handle_reactions()
|
reagents.handle_reactions()
|
||||||
|
|
||||||
on_reagent_change() //Until we have a generic "paint", this will give new colours to all paints in the can
|
|
||||||
var/mixedcolor = mix_color_from_reagents(reagents.reagent_list)
|
|
||||||
for(var/datum/reagent/paint/P in reagents.reagent_list)
|
|
||||||
P.color = mixedcolor
|
|
||||||
|
|
||||||
red
|
red
|
||||||
icon_state = "paint_red"
|
icon_state = "paint_red"
|
||||||
paint_type = "red"
|
paint_type = "red"
|
||||||
@@ -62,110 +58,15 @@ var/global/list/cached_icons = list()
|
|||||||
icon_state = "paint_blue"
|
icon_state = "paint_blue"
|
||||||
paint_type = "blue"
|
paint_type = "blue"
|
||||||
|
|
||||||
violet
|
purple
|
||||||
icon_state = "paint_violet"
|
icon_state = "paint_violet"
|
||||||
paint_type = "purple"
|
paint_type = "purple"
|
||||||
|
|
||||||
black
|
black
|
||||||
icon_state = "paint_black"
|
icon_state = "paint_black"
|
||||||
paint_type = "gray"
|
paint_type = "black"
|
||||||
|
|
||||||
white
|
white
|
||||||
icon_state = "paint_white"
|
icon_state = "paint_white"
|
||||||
paint_type = "white"
|
paint_type = "white"
|
||||||
|
|
||||||
remover
|
|
||||||
paint_type = "remover"
|
|
||||||
/*
|
|
||||||
/obj/item/weapon/paint
|
|
||||||
gender= PLURAL
|
|
||||||
name = "paint"
|
|
||||||
desc = "Used to recolor floors and walls. Can not be removed by the janitor."
|
|
||||||
icon = 'icons/obj/items.dmi'
|
|
||||||
icon_state = "paint_neutral"
|
|
||||||
color = "FFFFFF"
|
|
||||||
item_state = "paintcan"
|
|
||||||
w_class = 3.0
|
|
||||||
|
|
||||||
/obj/item/weapon/paint/afterattack(turf/target, mob/user as mob, proximity)
|
|
||||||
if(!proximity) return
|
|
||||||
if(!istype(target) || istype(target, /turf/space))
|
|
||||||
return
|
|
||||||
var/ind = "[initial(target.icon)][color]"
|
|
||||||
if(!cached_icons[ind])
|
|
||||||
var/icon/overlay = new/icon(initial(target.icon))
|
|
||||||
overlay.Blend("#[color]",ICON_MULTIPLY)
|
|
||||||
overlay.SetIntensity(1.4)
|
|
||||||
target.icon = overlay
|
|
||||||
cached_icons[ind] = target.icon
|
|
||||||
else
|
|
||||||
target.icon = cached_icons[ind]
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/weapon/paint/paint_remover
|
|
||||||
gender = PLURAL
|
|
||||||
name = "paint remover"
|
|
||||||
icon_state = "paint_neutral"
|
|
||||||
|
|
||||||
afterattack(turf/target, mob/user as mob)
|
|
||||||
if(istype(target) && target.icon != initial(target.icon))
|
|
||||||
target.icon = initial(target.icon)
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
datum/reagent/paint
|
|
||||||
name = "Paint"
|
|
||||||
id = "paint_"
|
|
||||||
reagent_state = 2
|
|
||||||
color = "#808080"
|
|
||||||
description = "This paint will only adhere to floor tiles."
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
red
|
|
||||||
name = "Red Paint"
|
|
||||||
id = "paint_red"
|
|
||||||
color = "#FE191A"
|
|
||||||
|
|
||||||
green
|
|
||||||
name = "Green Paint"
|
|
||||||
color = "#18A31A"
|
|
||||||
id = "paint_green"
|
|
||||||
|
|
||||||
blue
|
|
||||||
name = "Blue Paint"
|
|
||||||
color = "#247CFF"
|
|
||||||
id = "paint_blue"
|
|
||||||
|
|
||||||
yellow
|
|
||||||
name = "Yellow Paint"
|
|
||||||
color = "#FDFE7D"
|
|
||||||
id = "paint_yellow"
|
|
||||||
|
|
||||||
violet
|
|
||||||
name = "Violet Paint"
|
|
||||||
color = "#CC0099"
|
|
||||||
id = "paint_violet"
|
|
||||||
|
|
||||||
black
|
|
||||||
name = "Black Paint"
|
|
||||||
color = "#333333"
|
|
||||||
id = "paint_black"
|
|
||||||
|
|
||||||
white
|
|
||||||
name = "White Paint"
|
|
||||||
color = "#F0F8FF"
|
|
||||||
id = "paint_white"
|
|
||||||
|
|
||||||
datum/reagent/paint_remover
|
|
||||||
name = "Paint Remover"
|
|
||||||
id = "paint_remover"
|
|
||||||
description = "Paint remover is used to remove floor paint from floor tiles."
|
|
||||||
reagent_state = 2
|
|
||||||
color = "#808080"
|
|
||||||
|
|
||||||
reaction_turf(var/turf/T, var/volume)
|
|
||||||
if(istype(T) && T.icon != initial(T.icon))
|
|
||||||
T.icon = initial(T.icon)
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -70,9 +70,16 @@
|
|||||||
"/obj/item/device/flashlight/pen",
|
"/obj/item/device/flashlight/pen",
|
||||||
"/obj/item/clothing/mask/surgical",
|
"/obj/item/clothing/mask/surgical",
|
||||||
"/obj/item/clothing/gloves/latex",
|
"/obj/item/clothing/gloves/latex",
|
||||||
"/obj/item/weapon/reagent_containers/hypospray"
|
"/obj/item/weapon/reagent_containers/hypospray"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/belt/medical/emt
|
||||||
|
name = "EMT utility belt"
|
||||||
|
desc = "A sturdy black webbing belt with attached pouches."
|
||||||
|
icon = 'icons/obj/custom_items.dmi'
|
||||||
|
icon_state = "emsbelt"
|
||||||
|
item_state = "emsbelt"
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/storage/belt/security
|
/obj/item/weapon/storage/belt/security
|
||||||
name = "security belt"
|
name = "security belt"
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/shotgunammo
|
/obj/item/weapon/storage/box/shotgunammo
|
||||||
name = "box of shotgun shells"
|
name = "box of shotgun slugs"
|
||||||
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||||
|
|
||||||
New()
|
New()
|
||||||
@@ -162,6 +162,20 @@
|
|||||||
new /obj/item/ammo_casing/shotgun(src)
|
new /obj/item/ammo_casing/shotgun(src)
|
||||||
new /obj/item/ammo_casing/shotgun(src)
|
new /obj/item/ammo_casing/shotgun(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/box/shotgunshells
|
||||||
|
name = "box of shotgun shells"
|
||||||
|
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||||
|
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/flashbangs
|
/obj/item/weapon/storage/box/flashbangs
|
||||||
name = "box of flashbangs (WARNING)"
|
name = "box of flashbangs (WARNING)"
|
||||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
|
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
|
||||||
|
|||||||
@@ -161,6 +161,9 @@
|
|||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
|
return
|
||||||
|
|
||||||
health -= Proj.damage
|
health -= Proj.damage
|
||||||
..()
|
..()
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
else
|
else
|
||||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||||
if (prob(70))
|
if (prob(70))
|
||||||
new /obj/item/clothing/tie/storage/brown_vest(src)
|
new /obj/item/clothing/accessory/storage/brown_vest(src)
|
||||||
else
|
else
|
||||||
new /obj/item/clothing/tie/storage/webbing(src)
|
new /obj/item/clothing/accessory/storage/webbing(src)
|
||||||
new /obj/item/blueprints(src)
|
new /obj/item/blueprints(src)
|
||||||
new /obj/item/clothing/under/rank/chief_engineer(src)
|
new /obj/item/clothing/under/rank/chief_engineer(src)
|
||||||
new /obj/item/clothing/head/hardhat/white(src)
|
new /obj/item/clothing/head/hardhat/white(src)
|
||||||
@@ -109,9 +109,9 @@
|
|||||||
else
|
else
|
||||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||||
if (prob(70))
|
if (prob(70))
|
||||||
new /obj/item/clothing/tie/storage/brown_vest(src)
|
new /obj/item/clothing/accessory/storage/brown_vest(src)
|
||||||
else
|
else
|
||||||
new /obj/item/clothing/tie/storage/webbing(src)
|
new /obj/item/clothing/accessory/storage/webbing(src)
|
||||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||||
new /obj/item/device/radio/headset/headset_eng(src)
|
new /obj/item/device/radio/headset/headset_eng(src)
|
||||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||||
@@ -138,9 +138,9 @@
|
|||||||
else
|
else
|
||||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||||
if (prob(70))
|
if (prob(70))
|
||||||
new /obj/item/clothing/tie/storage/brown_vest(src)
|
new /obj/item/clothing/accessory/storage/brown_vest(src)
|
||||||
else
|
else
|
||||||
new /obj/item/clothing/tie/storage/webbing(src)
|
new /obj/item/clothing/accessory/storage/webbing(src)
|
||||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||||
new /obj/item/device/flashlight(src)
|
new /obj/item/device/flashlight(src)
|
||||||
new /obj/item/weapon/extinguisher(src)
|
new /obj/item/weapon/extinguisher(src)
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
new /obj/item/device/flash(src)
|
new /obj/item/device/flash(src)
|
||||||
new /obj/item/weapon/melee/baton/loaded(src)
|
new /obj/item/weapon/melee/baton/loaded(src)
|
||||||
new /obj/item/weapon/gun/energy/gun(src)
|
new /obj/item/weapon/gun/energy/gun(src)
|
||||||
new /obj/item/clothing/tie/holster/waist(src)
|
new /obj/item/clothing/accessory/holster/waist(src)
|
||||||
new /obj/item/weapon/melee/telebaton(src)
|
new /obj/item/weapon/melee/telebaton(src)
|
||||||
new /obj/item/clothing/head/beret/sec/hos(src)
|
new /obj/item/clothing/head/beret/sec/hos(src)
|
||||||
return
|
return
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||||
new /obj/item/taperoll/police(src)
|
new /obj/item/taperoll/police(src)
|
||||||
new /obj/item/device/hailer(src)
|
new /obj/item/device/hailer(src)
|
||||||
new /obj/item/clothing/tie/storage/black_vest(src)
|
new /obj/item/clothing/accessory/storage/black_vest(src)
|
||||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||||
new /obj/item/clothing/under/rank/security/corp(src)
|
new /obj/item/clothing/under/rank/security/corp(src)
|
||||||
return
|
return
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/clothing/tie/armband/cargo(src)
|
new /obj/item/clothing/accessory/armband/cargo(src)
|
||||||
new /obj/item/device/encryptionkey/headset_cargo(src)
|
new /obj/item/device/encryptionkey/headset_cargo(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/clothing/tie/armband/engine(src)
|
new /obj/item/clothing/accessory/armband/engine(src)
|
||||||
new /obj/item/device/encryptionkey/headset_eng(src)
|
new /obj/item/device/encryptionkey/headset_eng(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/clothing/tie/armband/science(src)
|
new /obj/item/clothing/accessory/armband/science(src)
|
||||||
new /obj/item/device/encryptionkey/headset_sci(src)
|
new /obj/item/device/encryptionkey/headset_sci(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/clothing/tie/armband/medgreen(src)
|
new /obj/item/clothing/accessory/armband/medgreen(src)
|
||||||
new /obj/item/device/encryptionkey/headset_med(src)
|
new /obj/item/device/encryptionkey/headset_med(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
new /obj/item/ammo_magazine/c45r(src)
|
new /obj/item/ammo_magazine/c45r(src)
|
||||||
new /obj/item/taperoll/police(src)
|
new /obj/item/taperoll/police(src)
|
||||||
new /obj/item/weapon/gun/projectile/detective/semiauto(src)
|
new /obj/item/weapon/gun/projectile/detective/semiauto(src)
|
||||||
new /obj/item/clothing/tie/holster/armpit(src)
|
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/closet/secure_closet/detective/update_icon()
|
/obj/structure/closet/secure_closet/detective/update_icon()
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
layer = 2
|
layer = 2
|
||||||
var/state = 0
|
var/state = 0
|
||||||
var/health = 200
|
var/health = 200
|
||||||
|
var/cover = 50 //how much cover the girder provides against projectiles.
|
||||||
|
|
||||||
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
||||||
if(!damage || !wallbreaker)
|
if(!damage || !wallbreaker)
|
||||||
@@ -14,19 +15,25 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
|
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
|
||||||
|
if(Proj.original != src && !prob(cover))
|
||||||
|
return -1 //pass through
|
||||||
|
|
||||||
//Tasers and the like should not damage girders.
|
//Tasers and the like should not damage girders.
|
||||||
if(Proj.damage_type == HALLOSS || Proj.damage_type == TOX || Proj.damage_type == CLONE)
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(Proj, /obj/item/projectile/beam))
|
var/damage = Proj.damage
|
||||||
health -= Proj.damage
|
if(!istype(Proj, /obj/item/projectile/beam))
|
||||||
..()
|
damage *= 0.4 //non beams do reduced damage
|
||||||
if(health <= 0)
|
|
||||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
health -= damage
|
||||||
del(src)
|
..()
|
||||||
|
if(health <= 0)
|
||||||
|
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||||
|
del(src)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||||
@@ -209,11 +216,13 @@
|
|||||||
icon_state = "displaced"
|
icon_state = "displaced"
|
||||||
anchored = 0
|
anchored = 0
|
||||||
health = 50
|
health = 50
|
||||||
|
cover = 25
|
||||||
|
|
||||||
/obj/structure/girder/reinforced
|
/obj/structure/girder/reinforced
|
||||||
icon_state = "reinforced"
|
icon_state = "reinforced"
|
||||||
state = 2
|
state = 2
|
||||||
health = 500
|
health = 500
|
||||||
|
cover = 80
|
||||||
|
|
||||||
/obj/structure/cultgirder
|
/obj/structure/cultgirder
|
||||||
icon= 'icons/obj/cult.dmi'
|
icon= 'icons/obj/cult.dmi'
|
||||||
@@ -222,6 +231,7 @@
|
|||||||
density = 1
|
density = 1
|
||||||
layer = 2
|
layer = 2
|
||||||
var/health = 250
|
var/health = 250
|
||||||
|
var/cover = 70
|
||||||
|
|
||||||
/obj/structure/cultgirder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
/obj/structure/cultgirder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
||||||
if(!damage || !wallbreaker)
|
if(!damage || !wallbreaker)
|
||||||
@@ -258,6 +268,14 @@
|
|||||||
dismantle()
|
dismantle()
|
||||||
|
|
||||||
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
|
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
|
||||||
|
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
|
||||||
|
if(Proj.original != src && !prob(cover))
|
||||||
|
return -1 //pass through
|
||||||
|
|
||||||
|
//Tasers and the like should not damage cultgirders.
|
||||||
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
|
return
|
||||||
|
|
||||||
health -= Proj.damage
|
health -= Proj.damage
|
||||||
..()
|
..()
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
|
|||||||
@@ -59,16 +59,33 @@
|
|||||||
return !density
|
return !density
|
||||||
|
|
||||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
|
||||||
if(!Proj) return
|
if(!Proj) return
|
||||||
|
|
||||||
//Tasers and the like should not damage grilles.
|
//Tasers and the like should not damage grilles.
|
||||||
if(Proj.damage_type == HALLOSS)
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
return
|
return
|
||||||
|
|
||||||
src.health -= Proj.damage*0.2
|
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
|
||||||
healthcheck()
|
var/damage = Proj.damage
|
||||||
return 0
|
var/passthrough
|
||||||
|
if(damage > 30)
|
||||||
|
passthrough = 1
|
||||||
|
if(prob(20))
|
||||||
|
Proj.damage *= 0.5 //weaken the projectile
|
||||||
|
else
|
||||||
|
//weaker bullets are affected to a greater extent
|
||||||
|
if(prob(20))
|
||||||
|
passthrough = 0
|
||||||
|
else
|
||||||
|
Proj.damage *= 0.5 //weaken the projectile
|
||||||
|
passthrough = 1
|
||||||
|
|
||||||
|
if(passthrough)
|
||||||
|
. = -1
|
||||||
|
damage *= 0.1 //if the bullet passes through then the grille avoids most of the damage
|
||||||
|
|
||||||
|
src.health -= damage*0.2
|
||||||
|
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
||||||
|
|
||||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(iswirecutter(W))
|
if(iswirecutter(W))
|
||||||
|
|||||||
@@ -38,6 +38,9 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
|
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
|
return
|
||||||
|
|
||||||
health -= Proj.damage
|
health -= Proj.damage
|
||||||
..()
|
..()
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//wip wip wup
|
//wip wip wup
|
||||||
/obj/structure/mirror
|
/obj/structure/mirror
|
||||||
name = "\improper SalonPro Nano-Mirror(TM)"
|
name = "mirror"
|
||||||
desc = "The leading technology in hair salon products, utilizing nano-machinery to style your hair just right."
|
desc = "A SalonPro Nano-Mirror(TM) brand mirror! The leading technology in hair salon products, utilizing nano-machinery to style your hair just right."
|
||||||
icon = 'icons/obj/watercloset.dmi'
|
icon = 'icons/obj/watercloset.dmi'
|
||||||
icon_state = "mirror"
|
icon_state = "mirror"
|
||||||
density = 0
|
density = 0
|
||||||
@@ -70,6 +70,9 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
|
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
|
return
|
||||||
|
|
||||||
if(prob(Proj.damage * 2))
|
if(prob(Proj.damage * 2))
|
||||||
if(!shattered)
|
if(!shattered)
|
||||||
shatter()
|
shatter()
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ FLOOR SAFES
|
|||||||
var/mob/living/carbon/human/user = usr
|
var/mob/living/carbon/human/user = usr
|
||||||
|
|
||||||
var/canhear = 0
|
var/canhear = 0
|
||||||
if(istype(user.l_hand, /obj/item/clothing/tie/stethoscope) || istype(user.r_hand, /obj/item/clothing/tie/stethoscope))
|
if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
|
||||||
canhear = 1
|
canhear = 1
|
||||||
|
|
||||||
if(href_list["open"])
|
if(href_list["open"])
|
||||||
@@ -155,7 +155,7 @@ FLOOR SAFES
|
|||||||
user << "<span class='notice'>[I] won't fit in [src].</span>"
|
user << "<span class='notice'>[I] won't fit in [src].</span>"
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if(istype(I, /obj/item/clothing/tie/stethoscope))
|
if(istype(I, /obj/item/clothing/accessory/stethoscope))
|
||||||
user << "Hold [I] in one of your hands while you manipulate the dial."
|
user << "Hold [I] in one of your hands while you manipulate the dial."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
|
||||||
//Tasers and the like should not damage windows.
|
//Tasers and the like should not damage windows.
|
||||||
if(Proj.damage_type == HALLOSS)
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
return
|
return
|
||||||
|
|
||||||
..()
|
..()
|
||||||
@@ -504,4 +504,4 @@
|
|||||||
if (W.id == src.id || !W.id)
|
if (W.id == src.id || !W.id)
|
||||||
spawn( 0 )
|
spawn( 0 )
|
||||||
W.toggle()
|
W.toggle()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
var/rotting = 0
|
var/rotting = 0
|
||||||
|
|
||||||
var/damage = 0
|
var/damage = 0
|
||||||
var/damage_cap = 100 //Wall will break down to girders if damage reaches this point
|
var/damage_cap = 150 //Wall will break down to girders if damage reaches this point
|
||||||
var/armor = 0.5 // Damage is multiplied by this
|
|
||||||
|
|
||||||
var/damage_overlay
|
var/damage_overlay
|
||||||
var/global/damage_overlays[8]
|
var/global/damage_overlays[8]
|
||||||
@@ -30,7 +29,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
//cap the amount of damage, so that things like emitters can't destroy walls in one hit.
|
//cap the amount of damage, so that things like emitters can't destroy walls in one hit.
|
||||||
var/damage = min(Proj.damage, 100) * armor
|
var/damage = min(Proj.damage, 100)
|
||||||
|
|
||||||
take_damage(damage)
|
take_damage(damage)
|
||||||
return
|
return
|
||||||
@@ -39,12 +38,12 @@
|
|||||||
..()
|
..()
|
||||||
if(ismob(AM))
|
if(ismob(AM))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/tforce = AM:throwforce * (speed/THROWFORCE_SPEED_DIVISOR)
|
var/tforce = AM:throwforce * (speed/THROWFORCE_SPEED_DIVISOR)
|
||||||
if (tforce < 15)
|
if (tforce < 15)
|
||||||
return
|
return
|
||||||
|
|
||||||
take_damage(tforce * armor)
|
take_damage(tforce)
|
||||||
|
|
||||||
/turf/simulated/wall/Del()
|
/turf/simulated/wall/Del()
|
||||||
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
||||||
@@ -475,7 +474,7 @@
|
|||||||
|
|
||||||
else if(istype(W,/obj/item/weapon/rcd)) //I bitterly resent having to write this. ~Z
|
else if(istype(W,/obj/item/weapon/rcd)) //I bitterly resent having to write this. ~Z
|
||||||
return
|
return
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/reagent_containers))
|
else if(istype(W, /obj/item/weapon/reagent_containers))
|
||||||
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
|
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,8 @@
|
|||||||
opacity = 1
|
opacity = 1
|
||||||
density = 1
|
density = 1
|
||||||
|
|
||||||
damage_cap = 500
|
damage_cap = 800
|
||||||
max_temperature = 6000
|
max_temperature = 6000
|
||||||
armor = 0.1 // Only 10% damage from gunfire, it's made from strong alloys and stuff.
|
|
||||||
|
|
||||||
walltype = "rwall"
|
walltype = "rwall"
|
||||||
|
|
||||||
@@ -294,7 +293,7 @@
|
|||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/reagent_containers))
|
else if(istype(W, /obj/item/weapon/reagent_containers))
|
||||||
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
|
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
|
||||||
|
|
||||||
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
|
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
|
||||||
else if(!d_state)
|
else if(!d_state)
|
||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
|
|||||||
@@ -54,18 +54,6 @@
|
|||||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/turf/bullet_act(var/obj/item/projectile/Proj)
|
|
||||||
if(istype(Proj ,/obj/item/projectile/beam/pulse))
|
|
||||||
src.ex_act(2)
|
|
||||||
..()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/turf/bullet_act(var/obj/item/projectile/Proj)
|
|
||||||
if(istype(Proj ,/obj/item/projectile/bullet/gyro))
|
|
||||||
explosion(src, -1, 0, 2)
|
|
||||||
..()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
|
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
|
||||||
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
||||||
usr << "\red Movement is admin-disabled." //This is to identify lag problems
|
usr << "\red Movement is admin-disabled." //This is to identify lag problems
|
||||||
|
|||||||
@@ -111,6 +111,9 @@ var/list/admin_verbs_spawn = list(
|
|||||||
/datum/admins/proc/spawn_plant,
|
/datum/admins/proc/spawn_plant,
|
||||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||||
/client/proc/respawn_character,
|
/client/proc/respawn_character,
|
||||||
|
/client/proc/FireLaser,
|
||||||
|
/client/proc/FireCannons,
|
||||||
|
/client/proc/ChangeIcarusPosition,
|
||||||
/client/proc/virus2_editor
|
/client/proc/virus2_editor
|
||||||
)
|
)
|
||||||
var/list/admin_verbs_server = list(
|
var/list/admin_verbs_server = list(
|
||||||
|
|||||||
125
code/modules/admin/verbs/icarus.dm
Normal file
125
code/modules/admin/verbs/icarus.dm
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
/client/proc/FireLaser()
|
||||||
|
set name = "Fire the Icarus lasers"
|
||||||
|
set desc = "Fires a laser bolt at your position. You should only do this as a(n) (a)ghost"
|
||||||
|
set category = "Fun"
|
||||||
|
|
||||||
|
if(!src.holder)
|
||||||
|
src << "Only administrators may use this command."
|
||||||
|
return
|
||||||
|
|
||||||
|
Icarus_FireLaser(get_turf(src.mob))
|
||||||
|
|
||||||
|
|
||||||
|
/client/proc/FireCannons()
|
||||||
|
set name = "Fire the Icarus cannons"
|
||||||
|
set desc = "Fires an explosive missile at your position. You should only do this as a(n) (a)ghost."
|
||||||
|
set category = "Fun"
|
||||||
|
|
||||||
|
if(!src.holder)
|
||||||
|
src << "Only administrators may use this command."
|
||||||
|
return
|
||||||
|
|
||||||
|
Icarus_FireCannon(get_turf(src.mob))
|
||||||
|
|
||||||
|
|
||||||
|
/client/proc/ChangeIcarusPosition()
|
||||||
|
set name = "Adjust Icarus Position"
|
||||||
|
set desc = "Lets you chose the position of the Icarus in regards to the map."
|
||||||
|
set category = "Fun"
|
||||||
|
|
||||||
|
if(!src.holder)
|
||||||
|
src << "Only administrators may use this command."
|
||||||
|
return
|
||||||
|
|
||||||
|
Icarus_SetPosition(src)
|
||||||
|
|
||||||
|
var/icarus_position = SOUTH
|
||||||
|
|
||||||
|
proc/Icarus_FireLaser(var/turf/target)
|
||||||
|
// Find the world edge to fire from.
|
||||||
|
var/x = icarus_position & EAST ? world.maxx : icarus_position & WEST ? 1 : target.x
|
||||||
|
var/y = icarus_position & NORTH ? world.maxy : icarus_position & SOUTH ? 1 : target.y
|
||||||
|
var/x_off = x != target.x ? abs(target.x - x) : INFINITY
|
||||||
|
var/y_off = y != target.y ? abs(target.y - y) : INFINITY
|
||||||
|
// Get the minimum number of steps using the rise/run shit.
|
||||||
|
var/iterations = round(min(x_off, y_off)) - 14 // We cannot fire straight from the edge since teleport thing.
|
||||||
|
|
||||||
|
// Now we can get the location of the start.
|
||||||
|
x = target.x + (icarus_position & EAST ? iterations : icarus_position & WEST ? -iterations : 0)
|
||||||
|
y = target.y + (icarus_position & NORTH ? iterations : icarus_position & SOUTH ? -iterations : 0)
|
||||||
|
|
||||||
|
var/turf/start = locate(x, y, target.z)
|
||||||
|
|
||||||
|
// should step down as:
|
||||||
|
// 1000, 500, 333, 250, 200, 167, 142, 125, 111, 100, 90
|
||||||
|
var/damage = 1000
|
||||||
|
for(var/i in 2 to 12)
|
||||||
|
var/obj/item/projectile/beam/in_chamber = new (start)
|
||||||
|
in_chamber.original = target
|
||||||
|
in_chamber.starting = start
|
||||||
|
in_chamber.silenced = 1
|
||||||
|
in_chamber.yo = icarus_position & NORTH ? -1 : icarus_position & SOUTH ? 1 : 0
|
||||||
|
in_chamber.xo = icarus_position & EAST ? -1 : icarus_position & WEST ? 1 : 0
|
||||||
|
in_chamber.damage = damage
|
||||||
|
in_chamber.kill_count = 500
|
||||||
|
in_chamber.process()
|
||||||
|
damage -= damage / i
|
||||||
|
sleep(-1)
|
||||||
|
|
||||||
|
// Let everyone know what hit them.
|
||||||
|
var/obj/item/projectile/beam/in_chamber = new (start)
|
||||||
|
in_chamber.original = target
|
||||||
|
in_chamber.starting = start
|
||||||
|
in_chamber.silenced = 0
|
||||||
|
in_chamber.yo = icarus_position & NORTH ? -1 : icarus_position & SOUTH ? 1 : 0
|
||||||
|
in_chamber.xo = icarus_position & EAST ? -1 : icarus_position & WEST ? 1 : 0
|
||||||
|
in_chamber.kill_count = 500
|
||||||
|
in_chamber.damage = 0
|
||||||
|
in_chamber.name = "point defense laser"
|
||||||
|
in_chamber.firer = "Icarus" // Never displayed, but we want this to display the hit message.
|
||||||
|
in_chamber.process()
|
||||||
|
|
||||||
|
proc/Icarus_FireCannon(var/turf/target)
|
||||||
|
// Find the world edge to fire from.
|
||||||
|
var/x = icarus_position & EAST ? world.maxx : icarus_position & WEST ? 1 : target.x
|
||||||
|
var/y = icarus_position & NORTH ? world.maxy : icarus_position & SOUTH ? 1 : target.y
|
||||||
|
var/x_off = x != target.x ? abs(target.x - x) : INFINITY
|
||||||
|
var/y_off = y != target.y ? abs(target.y - y) : INFINITY
|
||||||
|
// Get the minimum number of steps using the rise/run shit.
|
||||||
|
var/iterations = round(min(x_off, y_off)) - 14 // We cannot fire straight from the edge since teleport thing.
|
||||||
|
|
||||||
|
// Now we can get the location of the start.
|
||||||
|
x = target.x + (icarus_position & EAST ? iterations : icarus_position & WEST ? -iterations : 0)
|
||||||
|
y = target.y + (icarus_position & NORTH ? iterations : icarus_position & SOUTH ? -iterations : 0)
|
||||||
|
|
||||||
|
var/turf/start = locate(x, y, target.z)
|
||||||
|
|
||||||
|
// Now we find the corresponding turf on the other side of the level.
|
||||||
|
// Yeah, yeah. Overuse of the terinary operator. So sue me.
|
||||||
|
x = icarus_position & EAST ? 1 : icarus_position & WEST ? world.maxx : target.x
|
||||||
|
y = icarus_position & NORTH ? 1 : icarus_position & SOUTH ? world.maxy : target.y
|
||||||
|
x_off = x != target.x ? abs(target.x - x) : INFINITY
|
||||||
|
y_off = y != target.y ? abs(target.y - y) : INFINITY
|
||||||
|
iterations = round(min(x_off, y_off))
|
||||||
|
x = target.x + (icarus_position & EAST ? -iterations : icarus_position & WEST ? iterations : 0)
|
||||||
|
y = target.y + (icarus_position & NORTH ? -iterations : icarus_position & SOUTH ? iterations : 0)
|
||||||
|
target = locate(x, y, target.z)
|
||||||
|
|
||||||
|
// Finally fire the fucker.
|
||||||
|
var/obj/effect/meteor/small/projectile = new (start)
|
||||||
|
projectile.dest = target
|
||||||
|
projectile.name = "main gun projectile" // stealthy
|
||||||
|
projectile.hits = 6
|
||||||
|
projectile.detonation_chance = 99 // it's a missile/cannon round thing!
|
||||||
|
|
||||||
|
// Make sure it travels
|
||||||
|
spawn(0)
|
||||||
|
walk_towards(projectile, projectile.dest, 1)
|
||||||
|
|
||||||
|
proc/Icarus_SetPosition(var/user)
|
||||||
|
var/global/list/directions = list("North" = 1, "North East" = 5, "East" = 4, "South East" = 6, "South" = 2, "South West" = 10, "West" = 8, "North West" = 9)
|
||||||
|
var/direction = input(user, "Where should the Icarus fire from?", "Icarus Comms") as null|anything in directions
|
||||||
|
if(!direction)
|
||||||
|
return
|
||||||
|
|
||||||
|
icarus_position = directions[direction]
|
||||||
@@ -375,88 +375,88 @@ var/global/list/gear_datums = list()
|
|||||||
|
|
||||||
/datum/gear/armband_cargo
|
/datum/gear/armband_cargo
|
||||||
display_name = "armband, cargo"
|
display_name = "armband, cargo"
|
||||||
path = /obj/item/clothing/tie/armband/cargo
|
path = /obj/item/clothing/accessory/armband/cargo
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/armband_emt
|
/datum/gear/armband_emt
|
||||||
display_name = "armband, EMT"
|
display_name = "armband, EMT"
|
||||||
path = /obj/item/clothing/tie/armband/medgreen
|
path = /obj/item/clothing/accessory/armband/medgreen
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 2
|
cost = 2
|
||||||
|
|
||||||
/datum/gear/armband_engineering
|
/datum/gear/armband_engineering
|
||||||
display_name = "armband, engineering"
|
display_name = "armband, engineering"
|
||||||
path = /obj/item/clothing/tie/armband/engine
|
path = /obj/item/clothing/accessory/armband/engine
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/armband_hydroponics
|
/datum/gear/armband_hydroponics
|
||||||
display_name = "armband, hydroponics"
|
display_name = "armband, hydroponics"
|
||||||
path = /obj/item/clothing/tie/armband/hydro
|
path = /obj/item/clothing/accessory/armband/hydro
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/armband_medical
|
/datum/gear/armband_medical
|
||||||
display_name = "armband, medical"
|
display_name = "armband, medical"
|
||||||
path = /obj/item/clothing/tie/armband/med
|
path = /obj/item/clothing/accessory/armband/med
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/armband
|
/datum/gear/armband
|
||||||
display_name = "armband, red"
|
display_name = "armband, red"
|
||||||
path = /obj/item/clothing/tie/armband
|
path = /obj/item/clothing/accessory/armband
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/armband_science
|
/datum/gear/armband_science
|
||||||
display_name = "armband, science"
|
display_name = "armband, science"
|
||||||
path = /obj/item/clothing/tie/armband/science
|
path = /obj/item/clothing/accessory/armband/science
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/armpit
|
/datum/gear/armpit
|
||||||
display_name = "shoulder holster"
|
display_name = "shoulder holster"
|
||||||
path = /obj/item/clothing/tie/holster/armpit
|
path = /obj/item/clothing/accessory/holster/armpit
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 2
|
cost = 2
|
||||||
allowed_roles = list("Captain", "Head of Personnel", "Security Officer", "Warden", "Head of Security")
|
allowed_roles = list("Captain", "Head of Personnel", "Security Officer", "Warden", "Head of Security")
|
||||||
|
|
||||||
/datum/gear/tie_blue
|
/datum/gear/tie_blue
|
||||||
display_name = "tie, blue"
|
display_name = "tie, blue"
|
||||||
path = /obj/item/clothing/tie/blue
|
path = /obj/item/clothing/accessory/blue
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/tie_red
|
/datum/gear/tie_red
|
||||||
display_name = "tie, red"
|
display_name = "tie, red"
|
||||||
path = /obj/item/clothing/tie/red
|
path = /obj/item/clothing/accessory/red
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/tie_horrible
|
/datum/gear/tie_horrible
|
||||||
display_name = "tie, socially disgraceful"
|
display_name = "tie, socially disgraceful"
|
||||||
path = /obj/item/clothing/tie/horrible
|
path = /obj/item/clothing/accessory/horrible
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
/datum/gear/brown_vest
|
/datum/gear/brown_vest
|
||||||
display_name = "webbing, engineering"
|
display_name = "webbing, engineering"
|
||||||
path = /obj/item/clothing/tie/storage/brown_vest
|
path = /obj/item/clothing/accessory/storage/brown_vest
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 2
|
cost = 2
|
||||||
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer")
|
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer")
|
||||||
|
|
||||||
/datum/gear/black_vest
|
/datum/gear/black_vest
|
||||||
display_name = "webbing, security"
|
display_name = "webbing, security"
|
||||||
path = /obj/item/clothing/tie/storage/black_vest
|
path = /obj/item/clothing/accessory/storage/black_vest
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 2
|
cost = 2
|
||||||
allowed_roles = list("Security Officer","Head of Security","Warden")
|
allowed_roles = list("Security Officer","Head of Security","Warden")
|
||||||
|
|
||||||
/datum/gear/webbing
|
/datum/gear/webbing
|
||||||
display_name = "webbing, simple"
|
display_name = "webbing, simple"
|
||||||
path = /obj/item/clothing/tie/storage/webbing
|
path = /obj/item/clothing/accessory/storage/webbing
|
||||||
slot = slot_tie
|
slot = slot_tie
|
||||||
cost = 2
|
cost = 2
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
/obj/item/clothing/head/helmet/refit_for_species(var/target_species)
|
/obj/item/clothing/head/helmet/refit_for_species(var/target_species)
|
||||||
if(!species_restricted)
|
if(!species_restricted)
|
||||||
return //this item doesn't use the species_restricted system
|
return //this item doesn't use the species_restricted system
|
||||||
|
|
||||||
//Set species_restricted list
|
//Set species_restricted list
|
||||||
switch(target_species)
|
switch(target_species)
|
||||||
if("Skrell")
|
if("Skrell")
|
||||||
@@ -404,7 +404,7 @@ BLIND // can't see anything
|
|||||||
2 = Report detailed damages
|
2 = Report detailed damages
|
||||||
3 = Report location
|
3 = Report location
|
||||||
*/
|
*/
|
||||||
var/obj/item/clothing/tie/hastie = null
|
var/list/accessories = list()
|
||||||
var/displays_id = 1
|
var/displays_id = 1
|
||||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
|
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
|
||||||
|
|
||||||
@@ -413,28 +413,44 @@ BLIND // can't see anything
|
|||||||
var/mob/M = src.loc
|
var/mob/M = src.loc
|
||||||
M.update_inv_w_uniform()
|
M.update_inv_w_uniform()
|
||||||
|
|
||||||
|
/obj/item/clothing/under/proc/can_attach_accessory(obj/item/clothing/accessory/A)
|
||||||
|
if(istype(A))
|
||||||
|
.=1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
if(accessories.len && (A.slot in list("utility","armband")))
|
||||||
|
for(var/obj/item/clothing/accessory/AC in accessories)
|
||||||
|
if (AC.slot == A.slot)
|
||||||
|
return 0
|
||||||
|
|
||||||
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
|
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
|
||||||
if(hastie)
|
if(istype(I, /obj/item/clothing/accessory))
|
||||||
hastie.attackby(I, user)
|
var/obj/item/clothing/accessory/A = I
|
||||||
return
|
if(can_attach_accessory(A))
|
||||||
|
user.drop_item()
|
||||||
|
accessories += A
|
||||||
|
A.on_attached(src, user)
|
||||||
|
|
||||||
if(!hastie && istype(I, /obj/item/clothing/tie))
|
if(istype(loc, /mob/living/carbon/human))
|
||||||
user.drop_item()
|
var/mob/living/carbon/human/H = loc
|
||||||
hastie = I
|
H.update_inv_w_uniform()
|
||||||
hastie.on_attached(src, user)
|
|
||||||
|
|
||||||
if(istype(loc, /mob/living/carbon/human))
|
return
|
||||||
var/mob/living/carbon/human/H = loc
|
else
|
||||||
H.update_inv_w_uniform()
|
user << "<span class='notice'>You cannot attach more accessories of this type to [src].</span>"
|
||||||
|
|
||||||
|
if(accessories.len)
|
||||||
|
for(var/obj/item/clothing/accessory/A in accessories)
|
||||||
|
A.attackby(I, user)
|
||||||
return
|
return
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/clothing/under/attack_hand(mob/user as mob)
|
/obj/item/clothing/under/attack_hand(mob/user as mob)
|
||||||
//only forward to the attached accessory if the clothing is equipped (not in a storage)
|
//only forward to the attached accessory if the clothing is equipped (not in a storage)
|
||||||
if(hastie && src.loc == user)
|
if(accessories.len && src.loc == user)
|
||||||
hastie.attack_hand(user)
|
for(var/obj/item/clothing/accessory/A in accessories)
|
||||||
|
A.attack_hand(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself
|
if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself
|
||||||
@@ -471,8 +487,9 @@ BLIND // can't see anything
|
|||||||
user << "Its vital tracker appears to be enabled."
|
user << "Its vital tracker appears to be enabled."
|
||||||
if(3)
|
if(3)
|
||||||
user << "Its vital tracker and tracking beacon appear to be enabled."
|
user << "Its vital tracker and tracking beacon appear to be enabled."
|
||||||
if(hastie)
|
if(accessories.len)
|
||||||
user << "\A [hastie] is clipped to it."
|
for(var/obj/item/clothing/accessory/A in accessories)
|
||||||
|
user << "\A [A] is attached to it."
|
||||||
|
|
||||||
/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
|
/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
@@ -543,12 +560,12 @@ BLIND // can't see anything
|
|||||||
else
|
else
|
||||||
usr << "<span class='notice'>You cannot roll down the uniform!</span>"
|
usr << "<span class='notice'>You cannot roll down the uniform!</span>"
|
||||||
|
|
||||||
/obj/item/clothing/under/proc/remove_accessory(mob/user as mob)
|
/obj/item/clothing/under/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A)
|
||||||
if(!hastie)
|
if(!(A in accessories))
|
||||||
return
|
return
|
||||||
|
|
||||||
hastie.on_removed(user)
|
A.on_removed(user)
|
||||||
hastie = null
|
accessories -= A
|
||||||
update_clothing_icon()
|
update_clothing_icon()
|
||||||
|
|
||||||
/obj/item/clothing/under/verb/removetie()
|
/obj/item/clothing/under/verb/removetie()
|
||||||
@@ -557,14 +574,20 @@ BLIND // can't see anything
|
|||||||
set src in usr
|
set src in usr
|
||||||
if(!istype(usr, /mob/living)) return
|
if(!istype(usr, /mob/living)) return
|
||||||
if(usr.stat) return
|
if(usr.stat) return
|
||||||
|
if(!accessories.len) return
|
||||||
src.remove_accessory(usr)
|
var/obj/item/clothing/accessory/A
|
||||||
|
if(accessories.len > 1)
|
||||||
|
A = input("Select an accessory to remove from [src]") as null|anything in accessories
|
||||||
|
else
|
||||||
|
A = accessories[1]
|
||||||
|
src.remove_accessory(usr,A)
|
||||||
|
|
||||||
/obj/item/clothing/under/rank/New()
|
/obj/item/clothing/under/rank/New()
|
||||||
sensor_mode = pick(0,1,2,3)
|
sensor_mode = pick(0,1,2,3)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/clothing/under/emp_act(severity)
|
/obj/item/clothing/under/emp_act(severity)
|
||||||
if (hastie)
|
if(accessories.len)
|
||||||
hastie.emp_act(severity)
|
for(var/obj/item/clothing/accessory/A in accessories)
|
||||||
|
A.emp_act(severity)
|
||||||
..()
|
..()
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
var/obj/item/weapon/rig/suit = H.back
|
var/obj/item/weapon/rig/suit = H.back
|
||||||
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
|
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
|
||||||
suit.cell.use(250)
|
suit.cell.use(250)
|
||||||
var/prog_path = text2path(projectile_type)
|
var/prog_path = projectile_type
|
||||||
in_chamber = new prog_path(src)
|
in_chamber = new prog_path(src)
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
var/obj/item/weapon/rig/suit = H.back
|
var/obj/item/weapon/rig/suit = H.back
|
||||||
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
|
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
|
||||||
suit.cell.use(250)
|
suit.cell.use(250)
|
||||||
var/prog_path = text2path(projectile_type)
|
var/prog_path = projectile_type
|
||||||
in_chamber = new prog_path(src)
|
in_chamber = new prog_path(src)
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
226
code/modules/clothing/under/accessories/accessory.dm
Normal file
226
code/modules/clothing/under/accessories/accessory.dm
Normal file
@@ -0,0 +1,226 @@
|
|||||||
|
/obj/item/clothing/accessory
|
||||||
|
name = "tie"
|
||||||
|
desc = "A neosilk clip-on tie."
|
||||||
|
icon = 'icons/obj/clothing/ties.dmi'
|
||||||
|
icon_state = "bluetie"
|
||||||
|
item_state = "" //no inhands
|
||||||
|
item_color = "bluetie"
|
||||||
|
slot_flags = SLOT_TIE
|
||||||
|
w_class = 2.0
|
||||||
|
var/slot = "decor"
|
||||||
|
var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
|
||||||
|
var/image/inv_overlay = null //overlay used when attached to clothing.
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/New()
|
||||||
|
..()
|
||||||
|
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
|
||||||
|
|
||||||
|
//when user attached an accessory to S
|
||||||
|
/obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
||||||
|
if(!istype(S))
|
||||||
|
return
|
||||||
|
has_suit = S
|
||||||
|
loc = has_suit
|
||||||
|
has_suit.overlays += inv_overlay
|
||||||
|
|
||||||
|
user << "<span class='notice'>You attach [src] to [has_suit].</span>"
|
||||||
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/proc/on_removed(mob/user as mob)
|
||||||
|
if(!has_suit)
|
||||||
|
return
|
||||||
|
has_suit.overlays -= inv_overlay
|
||||||
|
has_suit = null
|
||||||
|
usr.put_in_hands(src)
|
||||||
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
|
//default attackby behaviour
|
||||||
|
/obj/item/clothing/accessory/attackby(obj/item/I, mob/user)
|
||||||
|
..()
|
||||||
|
|
||||||
|
//default attack_hand behaviour
|
||||||
|
/obj/item/clothing/accessory/attack_hand(mob/user as mob)
|
||||||
|
if(has_suit)
|
||||||
|
return //we aren't an object on the ground so don't call parent
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/blue
|
||||||
|
name = "blue tie"
|
||||||
|
icon_state = "bluetie"
|
||||||
|
item_color = "bluetie"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/red
|
||||||
|
name = "red tie"
|
||||||
|
icon_state = "redtie"
|
||||||
|
item_color = "redtie"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/horrible
|
||||||
|
name = "horrible tie"
|
||||||
|
desc = "A neosilk clip-on tie. This one is disgusting."
|
||||||
|
icon_state = "horribletie"
|
||||||
|
item_color = "horribletie"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/stethoscope
|
||||||
|
name = "stethoscope"
|
||||||
|
desc = "An outdated medical apparatus for listening to the sounds of the human body. It also makes you look like you know what you're doing."
|
||||||
|
icon_state = "stethoscope"
|
||||||
|
item_color = "stethoscope"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
|
||||||
|
if(ishuman(M) && isliving(user))
|
||||||
|
if(user.a_intent == "help")
|
||||||
|
var/body_part = parse_zone(user.zone_sel.selecting)
|
||||||
|
if(body_part)
|
||||||
|
var/their = "their"
|
||||||
|
switch(M.gender)
|
||||||
|
if(MALE) their = "his"
|
||||||
|
if(FEMALE) their = "her"
|
||||||
|
|
||||||
|
var/sound = "pulse"
|
||||||
|
var/sound_strength
|
||||||
|
|
||||||
|
if(M.stat == DEAD || (M.status_flags&FAKEDEATH))
|
||||||
|
sound_strength = "cannot hear"
|
||||||
|
sound = "anything"
|
||||||
|
else
|
||||||
|
sound_strength = "hear a weak"
|
||||||
|
switch(body_part)
|
||||||
|
if("chest")
|
||||||
|
if(M.oxyloss < 50)
|
||||||
|
sound_strength = "hear a healthy"
|
||||||
|
sound = "pulse and respiration"
|
||||||
|
if("eyes","mouth")
|
||||||
|
sound_strength = "cannot hear"
|
||||||
|
sound = "anything"
|
||||||
|
else
|
||||||
|
sound_strength = "hear a weak"
|
||||||
|
|
||||||
|
user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].")
|
||||||
|
return
|
||||||
|
return ..(M,user)
|
||||||
|
|
||||||
|
|
||||||
|
//Medals
|
||||||
|
/obj/item/clothing/accessory/medal
|
||||||
|
name = "bronze medal"
|
||||||
|
desc = "A bronze medal."
|
||||||
|
icon_state = "bronze"
|
||||||
|
item_color = "bronze"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/conduct
|
||||||
|
name = "distinguished conduct medal"
|
||||||
|
desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew."
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/bronze_heart
|
||||||
|
name = "bronze heart medal"
|
||||||
|
desc = "A bronze heart-shaped medal awarded for sacrifice. It is often awarded posthumously or for severe injury in the line of duty."
|
||||||
|
icon_state = "bronze_heart"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/nobel_science
|
||||||
|
name = "nobel sciences award"
|
||||||
|
desc = "A bronze medal which represents significant contributions to the field of science or engineering."
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/silver
|
||||||
|
name = "silver medal"
|
||||||
|
desc = "A silver medal."
|
||||||
|
icon_state = "silver"
|
||||||
|
item_color = "silver"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/silver/valor
|
||||||
|
name = "medal of valor"
|
||||||
|
desc = "A silver medal awarded for acts of exceptional valor."
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/silver/security
|
||||||
|
name = "robust security award"
|
||||||
|
desc = "An award for distinguished combat and sacrifice in defence of Nanotrasen's commercial interests. Often awarded to security staff."
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/gold
|
||||||
|
name = "gold medal"
|
||||||
|
desc = "A prestigious golden medal."
|
||||||
|
icon_state = "gold"
|
||||||
|
item_color = "gold"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/gold/captain
|
||||||
|
name = "medal of captaincy"
|
||||||
|
desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew."
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/medal/gold/heroism
|
||||||
|
name = "medal of exceptional heroism"
|
||||||
|
desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
|
||||||
|
|
||||||
|
/*
|
||||||
|
Holobadges are worn on the belt or neck, and can be used to show that the holder is an authorized
|
||||||
|
Security agent - the user details can be imprinted on the badge with a Security-access ID card,
|
||||||
|
or they can be emagged to accept any ID for use in disguises.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holobadge
|
||||||
|
name = "holobadge"
|
||||||
|
desc = "This glowing blue badge marks the holder as THE LAW."
|
||||||
|
icon_state = "holobadge"
|
||||||
|
item_color = "holobadge"
|
||||||
|
slot_flags = SLOT_BELT | SLOT_TIE
|
||||||
|
|
||||||
|
var/emagged = 0 //Emagging removes Sec check.
|
||||||
|
var/stored_name = null
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holobadge/cord
|
||||||
|
icon_state = "holobadge-cord"
|
||||||
|
item_color = "holobadge-cord"
|
||||||
|
slot_flags = SLOT_MASK | SLOT_TIE
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holobadge/attack_self(mob/user as mob)
|
||||||
|
if(!stored_name)
|
||||||
|
user << "Waving around a badge before swiping an ID would be pretty pointless."
|
||||||
|
return
|
||||||
|
if(isliving(user))
|
||||||
|
user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.")
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
|
|
||||||
|
if (istype(O, /obj/item/weapon/card/emag))
|
||||||
|
if (emagged)
|
||||||
|
user << "\red [src] is already cracked."
|
||||||
|
return
|
||||||
|
else
|
||||||
|
emagged = 1
|
||||||
|
user << "\red You swipe [O] and crack the holobadge security checks."
|
||||||
|
return
|
||||||
|
|
||||||
|
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
||||||
|
|
||||||
|
var/obj/item/weapon/card/id/id_card = null
|
||||||
|
|
||||||
|
if(istype(O, /obj/item/weapon/card/id))
|
||||||
|
id_card = O
|
||||||
|
else
|
||||||
|
var/obj/item/device/pda/pda = O
|
||||||
|
id_card = pda.id
|
||||||
|
|
||||||
|
if(access_security in id_card.access || emagged)
|
||||||
|
user << "You imprint your ID details onto the badge."
|
||||||
|
stored_name = id_card.registered_name
|
||||||
|
name = "holobadge ([stored_name])"
|
||||||
|
desc = "This glowing blue badge marks [stored_name] as THE LAW."
|
||||||
|
else
|
||||||
|
user << "[src] rejects your insufficient access rights."
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/M, mob/living/user)
|
||||||
|
if(isliving(user))
|
||||||
|
user.visible_message("\red [user] invades [M]'s personal space, thrusting [src] into their face insistently.","\red You invade [M]'s personal space, thrusting [src] into their face insistently. You are the law.")
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/box/holobadge
|
||||||
|
name = "holobadge box"
|
||||||
|
desc = "A box claiming to contain holobadges."
|
||||||
|
New()
|
||||||
|
new /obj/item/clothing/accessory/holobadge(src)
|
||||||
|
new /obj/item/clothing/accessory/holobadge(src)
|
||||||
|
new /obj/item/clothing/accessory/holobadge(src)
|
||||||
|
new /obj/item/clothing/accessory/holobadge(src)
|
||||||
|
new /obj/item/clothing/accessory/holobadge/cord(src)
|
||||||
|
new /obj/item/clothing/accessory/holobadge/cord(src)
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
42
code/modules/clothing/under/accessories/armband.dm
Normal file
42
code/modules/clothing/under/accessories/armband.dm
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/obj/item/clothing/accessory/armband
|
||||||
|
name = "red armband"
|
||||||
|
desc = "A fancy red armband!"
|
||||||
|
icon_state = "red"
|
||||||
|
item_color = "red"
|
||||||
|
slot = "armband"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/armband/cargo
|
||||||
|
name = "cargo armband"
|
||||||
|
desc = "An armband, worn by the crew to display which department they're assigned to. This one is brown."
|
||||||
|
icon_state = "cargo"
|
||||||
|
item_color = "cargo"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/armband/engine
|
||||||
|
name = "engineering armband"
|
||||||
|
desc = "An armband, worn by the crew to display which department they're assigned to. This one is orange with a reflective strip!"
|
||||||
|
icon_state = "engie"
|
||||||
|
item_color = "engie"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/armband/science
|
||||||
|
name = "science armband"
|
||||||
|
desc = "An armband, worn by the crew to display which department they're assigned to. This one is purple."
|
||||||
|
icon_state = "rnd"
|
||||||
|
item_color = "rnd"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/armband/hydro
|
||||||
|
name = "hydroponics armband"
|
||||||
|
desc = "An armband, worn by the crew to display which department they're assigned to. This one is green and blue."
|
||||||
|
icon_state = "hydro"
|
||||||
|
item_color = "hydro"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/armband/med
|
||||||
|
name = "medical armband"
|
||||||
|
desc = "An armband, worn by the crew to display which department they're assigned to. This one is white."
|
||||||
|
icon_state = "med"
|
||||||
|
item_color = "med"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/armband/medgreen
|
||||||
|
name = "EMT armband"
|
||||||
|
desc = "An armband, worn by the crew to display which department they're assigned to. This one is white and green."
|
||||||
|
icon_state = "medgreen"
|
||||||
|
item_color = "medgreen"
|
||||||
119
code/modules/clothing/under/accessories/holster.dm
Normal file
119
code/modules/clothing/under/accessories/holster.dm
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
/obj/item/clothing/accessory/holster
|
||||||
|
name = "shoulder holster"
|
||||||
|
desc = "A handgun holster."
|
||||||
|
icon_state = "holster"
|
||||||
|
item_color = "holster"
|
||||||
|
slot = "utility"
|
||||||
|
var/obj/item/weapon/gun/holstered = null
|
||||||
|
|
||||||
|
//subtypes can override this to specify what can be holstered
|
||||||
|
/obj/item/clothing/accessory/holster/proc/can_holster(obj/item/weapon/gun/W)
|
||||||
|
return W.isHandgun()
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/proc/holster(obj/item/I, mob/user as mob)
|
||||||
|
if(holstered)
|
||||||
|
user << "<span class='warning'>There is already a [holstered] holstered here!</span>"
|
||||||
|
return
|
||||||
|
|
||||||
|
if (!istype(I, /obj/item/weapon/gun))
|
||||||
|
user << "<span class='warning'>Only guns can be holstered!</span>"
|
||||||
|
return
|
||||||
|
|
||||||
|
var/obj/item/weapon/gun/W = I
|
||||||
|
if (!can_holster(W))
|
||||||
|
user << "<span class='warning'>This [W] won't fit in the [src]!</span>"
|
||||||
|
return
|
||||||
|
|
||||||
|
holstered = W
|
||||||
|
user.drop_from_inventory(holstered)
|
||||||
|
holstered.loc = src
|
||||||
|
holstered.add_fingerprint(user)
|
||||||
|
user.visible_message("<span class='notice'>[user] holsters the [holstered].</span>", "<span class='notice'>You holster the [holstered].</span>")
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/proc/unholster(mob/user as mob)
|
||||||
|
if(!holstered)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
|
||||||
|
user << "<span class='warning'>You need an empty hand to draw the [holstered]!</span>"
|
||||||
|
else
|
||||||
|
if(user.a_intent == "hurt")
|
||||||
|
usr.visible_message("\red [user] draws the [holstered], ready to shoot!</span>", \
|
||||||
|
"<span class='warning'>You draw the [holstered], ready to shoot!</span>")
|
||||||
|
else
|
||||||
|
user.visible_message("<span class='notice'>[user] draws the [holstered], pointing it at the ground.</span>", \
|
||||||
|
"<span class='notice'>You draw the [holstered], pointing it at the ground.</span>")
|
||||||
|
user.put_in_hands(holstered)
|
||||||
|
holstered.add_fingerprint(user)
|
||||||
|
holstered = null
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/attack_hand(mob/user as mob)
|
||||||
|
if (has_suit) //if we are part of a suit
|
||||||
|
if (holstered)
|
||||||
|
unholster(user)
|
||||||
|
return
|
||||||
|
|
||||||
|
..(user)
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
|
holster(W, user)
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/emp_act(severity)
|
||||||
|
if (holstered)
|
||||||
|
holstered.emp_act(severity)
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/examine(mob/user)
|
||||||
|
..(user)
|
||||||
|
if (holstered)
|
||||||
|
user << "A [holstered] is holstered here."
|
||||||
|
else
|
||||||
|
user << "It is empty."
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
||||||
|
..()
|
||||||
|
has_suit.verbs += /obj/item/clothing/accessory/holster/verb/holster_verb
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/on_removed(mob/user as mob)
|
||||||
|
has_suit.verbs -= /obj/item/clothing/accessory/holster/verb/holster_verb
|
||||||
|
..()
|
||||||
|
|
||||||
|
//For the holster hotkey
|
||||||
|
/obj/item/clothing/accessory/holster/verb/holster_verb()
|
||||||
|
set name = "Holster"
|
||||||
|
set category = "Object"
|
||||||
|
set src in usr
|
||||||
|
if(!istype(usr, /mob/living)) return
|
||||||
|
if(usr.stat) return
|
||||||
|
|
||||||
|
var/obj/item/clothing/accessory/holster/H = null
|
||||||
|
if (istype(src, /obj/item/clothing/accessory/holster))
|
||||||
|
H = src
|
||||||
|
else if (istype(src, /obj/item/clothing/under))
|
||||||
|
var/obj/item/clothing/under/S = src
|
||||||
|
if (S.accessories.len)
|
||||||
|
H = locate() in S.accessories
|
||||||
|
|
||||||
|
if (!H)
|
||||||
|
usr << "<span class='warning'>Something is very wrong.</span>"
|
||||||
|
|
||||||
|
if(!H.holstered)
|
||||||
|
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
|
||||||
|
usr << "<span class='warning'>You need your gun equiped to holster it.</span>"
|
||||||
|
return
|
||||||
|
var/obj/item/weapon/gun/W = usr.get_active_hand()
|
||||||
|
H.holster(W, usr)
|
||||||
|
else
|
||||||
|
H.unholster(usr)
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/armpit
|
||||||
|
name = "shoulder holster"
|
||||||
|
desc = "A worn-out handgun holster. Perfect for concealed carry"
|
||||||
|
icon_state = "holster"
|
||||||
|
item_color = "holster"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/holster/waist
|
||||||
|
name = "shoulder holster"
|
||||||
|
desc = "A handgun holster. Made of expensive leather."
|
||||||
|
icon_state = "holster"
|
||||||
|
item_color = "holster_low"
|
||||||
86
code/modules/clothing/under/accessories/storage.dm
Normal file
86
code/modules/clothing/under/accessories/storage.dm
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/obj/item/clothing/accessory/storage
|
||||||
|
name = "load bearing equipment"
|
||||||
|
desc = "Used to hold things when you don't have enough hands."
|
||||||
|
icon_state = "webbing"
|
||||||
|
item_color = "webbing"
|
||||||
|
slot = "utility"
|
||||||
|
var/slots = 3
|
||||||
|
var/obj/item/weapon/storage/internal/hold
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/New()
|
||||||
|
..()
|
||||||
|
hold = new/obj/item/weapon/storage/internal(src)
|
||||||
|
hold.storage_slots = slots
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/attack_hand(mob/user as mob)
|
||||||
|
if (has_suit) //if we are part of a suit
|
||||||
|
hold.open(user)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (hold.handle_attack_hand(user)) //otherwise interact as a regular storage item
|
||||||
|
..(user)
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/MouseDrop(obj/over_object as obj)
|
||||||
|
if (has_suit)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (hold.handle_mousedrop(usr, over_object))
|
||||||
|
..(over_object)
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
|
return hold.attackby(W, user)
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/emp_act(severity)
|
||||||
|
hold.emp_act(severity)
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
|
||||||
|
hold.hear_talk(M, msg, verb, speaking)
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/attack_self(mob/user as mob)
|
||||||
|
user << "<span class='notice'>You empty [src].</span>"
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
hold.hide_from(usr)
|
||||||
|
for(var/obj/item/I in hold.contents)
|
||||||
|
hold.remove_from_storage(I, T)
|
||||||
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/webbing
|
||||||
|
name = "webbing"
|
||||||
|
desc = "Strudy mess of synthcotton belts and buckles, ready to share your burden."
|
||||||
|
icon_state = "webbing"
|
||||||
|
item_color = "webbing"
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/black_vest
|
||||||
|
name = "black webbing vest"
|
||||||
|
desc = "Robust black synthcotton vest with lots of pockets to hold whatever you need, but cannot hold in hands."
|
||||||
|
icon_state = "vest_black"
|
||||||
|
item_color = "vest_black"
|
||||||
|
slots = 5
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/brown_vest
|
||||||
|
name = "brown webbing vest"
|
||||||
|
desc = "Worn brownish synthcotton vest with lots of pockets to unload your hands."
|
||||||
|
icon_state = "vest_brown"
|
||||||
|
item_color = "vest_brown"
|
||||||
|
slots = 5
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/knifeharness
|
||||||
|
name = "decorated harness"
|
||||||
|
desc = "A heavily decorated harness of sinew and leather with two knife-loops."
|
||||||
|
icon_state = "unathiharness2"
|
||||||
|
item_color = "unathiharness2"
|
||||||
|
slots = 2
|
||||||
|
|
||||||
|
/obj/item/clothing/accessory/storage/knifeharness/New()
|
||||||
|
..()
|
||||||
|
hold.max_combined_w_class = 4
|
||||||
|
hold.can_hold = list("/obj/item/weapon/hatchet/unathiknife",\
|
||||||
|
"/obj/item/weapon/kitchen/utensil/knife",\
|
||||||
|
"/obj/item/weapon/kitchen/utensil/pknife",\
|
||||||
|
"/obj/item/weapon/kitchenknife",\
|
||||||
|
"/obj/item/weapon/kitchenknife/ritual")
|
||||||
|
|
||||||
|
new /obj/item/weapon/hatchet/unathiknife(hold)
|
||||||
|
new /obj/item/weapon/hatchet/unathiknife(hold)
|
||||||
@@ -130,6 +130,12 @@
|
|||||||
icon_state = "scrubspurple"
|
icon_state = "scrubspurple"
|
||||||
item_color = "scrubspurple"
|
item_color = "scrubspurple"
|
||||||
|
|
||||||
|
/obj/item/clothing/under/rank/medical/black
|
||||||
|
name = "medical scrubs"
|
||||||
|
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in black."
|
||||||
|
icon_state = "scrubsblack"
|
||||||
|
item_color = "scrubsblack"
|
||||||
|
|
||||||
/obj/item/clothing/under/rank/psych
|
/obj/item/clothing/under/rank/psych
|
||||||
desc = "A basic white jumpsuit. It has turqouise markings that denote the wearer as a psychiatrist."
|
desc = "A basic white jumpsuit. It has turqouise markings that denote the wearer as a psychiatrist."
|
||||||
name = "psychiatrist's jumpsuit"
|
name = "psychiatrist's jumpsuit"
|
||||||
|
|||||||
@@ -479,9 +479,9 @@
|
|||||||
/obj/item/clothing/under/serviceoveralls
|
/obj/item/clothing/under/serviceoveralls
|
||||||
name = "Workman outfit"
|
name = "Workman outfit"
|
||||||
desc = "The very image of a working man. Not that you're probably doing work."
|
desc = "The very image of a working man. Not that you're probably doing work."
|
||||||
icon_state = "mechanic_s"
|
icon_state = "mechanic"
|
||||||
item_state = "mechanic_s"
|
item_state = "mechanic"
|
||||||
item_color = "mechanic_s"
|
item_color = "mechanic"
|
||||||
|
|
||||||
/obj/item/clothing/under/cheongsam
|
/obj/item/clothing/under/cheongsam
|
||||||
name = "White Cheongsam"
|
name = "White Cheongsam"
|
||||||
|
|||||||
@@ -1,474 +0,0 @@
|
|||||||
/obj/item/clothing/tie
|
|
||||||
name = "tie"
|
|
||||||
desc = "A neosilk clip-on tie."
|
|
||||||
icon = 'icons/obj/clothing/ties.dmi'
|
|
||||||
icon_state = "bluetie"
|
|
||||||
item_state = "" //no inhands
|
|
||||||
item_color = "bluetie"
|
|
||||||
slot_flags = SLOT_TIE
|
|
||||||
w_class = 2.0
|
|
||||||
var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
|
|
||||||
var/image/inv_overlay = null //overlay used when attached to clothing.
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/New()
|
|
||||||
..()
|
|
||||||
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
|
|
||||||
|
|
||||||
//when user attached an accessory to S
|
|
||||||
/obj/item/clothing/tie/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
|
||||||
if(!istype(S))
|
|
||||||
return
|
|
||||||
has_suit = S
|
|
||||||
loc = has_suit
|
|
||||||
has_suit.overlays += inv_overlay
|
|
||||||
|
|
||||||
user << "<span class='notice'>You attach [src] to [has_suit].</span>"
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/proc/on_removed(mob/user as mob)
|
|
||||||
if(!has_suit)
|
|
||||||
return
|
|
||||||
has_suit.overlays -= inv_overlay
|
|
||||||
has_suit = null
|
|
||||||
usr.put_in_hands(src)
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
|
|
||||||
//default attackby behaviour
|
|
||||||
/obj/item/clothing/tie/attackby(obj/item/I, mob/user)
|
|
||||||
..()
|
|
||||||
|
|
||||||
//default attack_hand behaviour
|
|
||||||
/obj/item/clothing/tie/attack_hand(mob/user as mob)
|
|
||||||
if(has_suit)
|
|
||||||
has_suit.remove_accessory(user)
|
|
||||||
return //we aren't an object on the ground so don't call parent
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/blue
|
|
||||||
name = "blue tie"
|
|
||||||
icon_state = "bluetie"
|
|
||||||
item_color = "bluetie"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/red
|
|
||||||
name = "red tie"
|
|
||||||
icon_state = "redtie"
|
|
||||||
item_color = "redtie"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/horrible
|
|
||||||
name = "horrible tie"
|
|
||||||
desc = "A neosilk clip-on tie. This one is disgusting."
|
|
||||||
icon_state = "horribletie"
|
|
||||||
item_color = "horribletie"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/stethoscope
|
|
||||||
name = "stethoscope"
|
|
||||||
desc = "An outdated medical apparatus for listening to the sounds of the human body. It also makes you look like you know what you're doing."
|
|
||||||
icon_state = "stethoscope"
|
|
||||||
item_color = "stethoscope"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
|
|
||||||
if(ishuman(M) && isliving(user))
|
|
||||||
if(user.a_intent == "help")
|
|
||||||
var/body_part = parse_zone(user.zone_sel.selecting)
|
|
||||||
if(body_part)
|
|
||||||
var/their = "their"
|
|
||||||
switch(M.gender)
|
|
||||||
if(MALE) their = "his"
|
|
||||||
if(FEMALE) their = "her"
|
|
||||||
|
|
||||||
var/sound = "pulse"
|
|
||||||
var/sound_strength
|
|
||||||
|
|
||||||
if(M.stat == DEAD || (M.status_flags&FAKEDEATH))
|
|
||||||
sound_strength = "cannot hear"
|
|
||||||
sound = "anything"
|
|
||||||
else
|
|
||||||
sound_strength = "hear a weak"
|
|
||||||
switch(body_part)
|
|
||||||
if("chest")
|
|
||||||
if(M.oxyloss < 50)
|
|
||||||
sound_strength = "hear a healthy"
|
|
||||||
sound = "pulse and respiration"
|
|
||||||
if("eyes","mouth")
|
|
||||||
sound_strength = "cannot hear"
|
|
||||||
sound = "anything"
|
|
||||||
else
|
|
||||||
sound_strength = "hear a weak"
|
|
||||||
|
|
||||||
user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].")
|
|
||||||
return
|
|
||||||
return ..(M,user)
|
|
||||||
|
|
||||||
|
|
||||||
//Medals
|
|
||||||
/obj/item/clothing/tie/medal
|
|
||||||
name = "bronze medal"
|
|
||||||
desc = "A bronze medal."
|
|
||||||
icon_state = "bronze"
|
|
||||||
item_color = "bronze"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/conduct
|
|
||||||
name = "distinguished conduct medal"
|
|
||||||
desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew."
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/bronze_heart
|
|
||||||
name = "bronze heart medal"
|
|
||||||
desc = "A bronze heart-shaped medal awarded for sacrifice. It is often awarded posthumously or for severe injury in the line of duty."
|
|
||||||
icon_state = "bronze_heart"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/nobel_science
|
|
||||||
name = "nobel sciences award"
|
|
||||||
desc = "A bronze medal which represents significant contributions to the field of science or engineering."
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/silver
|
|
||||||
name = "silver medal"
|
|
||||||
desc = "A silver medal."
|
|
||||||
icon_state = "silver"
|
|
||||||
item_color = "silver"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/silver/valor
|
|
||||||
name = "medal of valor"
|
|
||||||
desc = "A silver medal awarded for acts of exceptional valor."
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/silver/security
|
|
||||||
name = "robust security award"
|
|
||||||
desc = "An award for distinguished combat and sacrifice in defence of Nanotrasen's commercial interests. Often awarded to security staff."
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/gold
|
|
||||||
name = "gold medal"
|
|
||||||
desc = "A prestigious golden medal."
|
|
||||||
icon_state = "gold"
|
|
||||||
item_color = "gold"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/gold/captain
|
|
||||||
name = "medal of captaincy"
|
|
||||||
desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew."
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/medal/gold/heroism
|
|
||||||
name = "medal of exceptional heroism"
|
|
||||||
desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
|
|
||||||
|
|
||||||
//Armbands
|
|
||||||
/obj/item/clothing/tie/armband
|
|
||||||
name = "red armband"
|
|
||||||
desc = "A fancy red armband!"
|
|
||||||
icon_state = "red"
|
|
||||||
item_color = "red"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/armband/cargo
|
|
||||||
name = "cargo armband"
|
|
||||||
desc = "An armband, worn by the crew to display which department they're assigned to. This one is brown."
|
|
||||||
icon_state = "cargo"
|
|
||||||
item_color = "cargo"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/armband/engine
|
|
||||||
name = "engineering armband"
|
|
||||||
desc = "An armband, worn by the crew to display which department they're assigned to. This one is orange with a reflective strip!"
|
|
||||||
icon_state = "engie"
|
|
||||||
item_color = "engie"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/armband/science
|
|
||||||
name = "science armband"
|
|
||||||
desc = "An armband, worn by the crew to display which department they're assigned to. This one is purple."
|
|
||||||
icon_state = "rnd"
|
|
||||||
item_color = "rnd"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/armband/hydro
|
|
||||||
name = "hydroponics armband"
|
|
||||||
desc = "An armband, worn by the crew to display which department they're assigned to. This one is green and blue."
|
|
||||||
icon_state = "hydro"
|
|
||||||
item_color = "hydro"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/armband/med
|
|
||||||
name = "medical armband"
|
|
||||||
desc = "An armband, worn by the crew to display which department they're assigned to. This one is white."
|
|
||||||
icon_state = "med"
|
|
||||||
item_color = "med"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/armband/medgreen
|
|
||||||
name = "EMT armband"
|
|
||||||
desc = "An armband, worn by the crew to display which department they're assigned to. This one is white and green."
|
|
||||||
icon_state = "medgreen"
|
|
||||||
item_color = "medgreen"
|
|
||||||
|
|
||||||
//holsters
|
|
||||||
/obj/item/clothing/tie/holster
|
|
||||||
name = "shoulder holster"
|
|
||||||
desc = "A handgun holster."
|
|
||||||
icon_state = "holster"
|
|
||||||
item_color = "holster"
|
|
||||||
var/obj/item/weapon/gun/holstered = null
|
|
||||||
|
|
||||||
//subtypes can override this to specify what can be holstered
|
|
||||||
/obj/item/clothing/tie/holster/proc/can_holster(obj/item/weapon/gun/W)
|
|
||||||
return W.isHandgun()
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/proc/holster(obj/item/I, mob/user as mob)
|
|
||||||
if(holstered)
|
|
||||||
user << "\red There is already a [holstered] holstered here!"
|
|
||||||
return
|
|
||||||
|
|
||||||
if (!istype(I, /obj/item/weapon/gun))
|
|
||||||
user << "\red Only guns can be holstered!"
|
|
||||||
return
|
|
||||||
|
|
||||||
var/obj/item/weapon/gun/W = I
|
|
||||||
if (!can_holster(W))
|
|
||||||
user << "\red This [W] won't fit in the [src]!"
|
|
||||||
return
|
|
||||||
|
|
||||||
holstered = W
|
|
||||||
user.drop_from_inventory(holstered)
|
|
||||||
holstered.loc = src
|
|
||||||
holstered.add_fingerprint(user)
|
|
||||||
user.visible_message("\blue [user] holsters the [holstered].", "You holster the [holstered].")
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/proc/unholster(mob/user as mob)
|
|
||||||
if(!holstered)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
|
|
||||||
user << "\red You need an empty hand to draw the [holstered]!"
|
|
||||||
else
|
|
||||||
if(user.a_intent == "hurt")
|
|
||||||
usr.visible_message("\red [user] draws the [holstered], ready to shoot!", \
|
|
||||||
"\red You draw the [holstered], ready to shoot!")
|
|
||||||
else
|
|
||||||
user.visible_message("\blue [user] draws the [holstered], pointing it at the ground.", \
|
|
||||||
"\blue You draw the [holstered], pointing it at the ground.")
|
|
||||||
user.put_in_hands(holstered)
|
|
||||||
holstered.add_fingerprint(user)
|
|
||||||
holstered = null
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/attack_hand(mob/user as mob)
|
|
||||||
if (has_suit) //if we are part of a suit
|
|
||||||
if (holstered)
|
|
||||||
unholster(user)
|
|
||||||
return
|
|
||||||
|
|
||||||
..(user)
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/attackby(obj/item/W as obj, mob/user as mob)
|
|
||||||
holster(W, user)
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/emp_act(severity)
|
|
||||||
if (holstered)
|
|
||||||
holstered.emp_act(severity)
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/examine(mob/user)
|
|
||||||
..(user)
|
|
||||||
if (holstered)
|
|
||||||
user << "A [holstered] is holstered here."
|
|
||||||
else
|
|
||||||
user << "It is empty."
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
|
||||||
..()
|
|
||||||
has_suit.verbs += /obj/item/clothing/tie/holster/verb/holster_verb
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/on_removed(mob/user as mob)
|
|
||||||
has_suit.verbs -= /obj/item/clothing/tie/holster/verb/holster_verb
|
|
||||||
..()
|
|
||||||
|
|
||||||
//For the holster hotkey
|
|
||||||
/obj/item/clothing/tie/holster/verb/holster_verb()
|
|
||||||
set name = "Holster"
|
|
||||||
set category = "Object"
|
|
||||||
set src in usr
|
|
||||||
if(!istype(usr, /mob/living)) return
|
|
||||||
if(usr.stat) return
|
|
||||||
|
|
||||||
var/obj/item/clothing/tie/holster/H = null
|
|
||||||
if (istype(src, /obj/item/clothing/tie/holster))
|
|
||||||
H = src
|
|
||||||
else if (istype(src, /obj/item/clothing/under))
|
|
||||||
var/obj/item/clothing/under/S = src
|
|
||||||
if (S.hastie)
|
|
||||||
H = S.hastie
|
|
||||||
|
|
||||||
if (!H)
|
|
||||||
usr << "/red Something is very wrong."
|
|
||||||
|
|
||||||
if(!H.holstered)
|
|
||||||
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
|
|
||||||
usr << "\blue You need your gun equiped to holster it."
|
|
||||||
return
|
|
||||||
var/obj/item/weapon/gun/W = usr.get_active_hand()
|
|
||||||
H.holster(W, usr)
|
|
||||||
else
|
|
||||||
H.unholster(usr)
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/armpit
|
|
||||||
name = "shoulder holster"
|
|
||||||
desc = "A worn-out handgun holster. Perfect for concealed carry"
|
|
||||||
icon_state = "holster"
|
|
||||||
item_color = "holster"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holster/waist
|
|
||||||
name = "shoulder holster"
|
|
||||||
desc = "A handgun holster. Made of expensive leather."
|
|
||||||
icon_state = "holster"
|
|
||||||
item_color = "holster_low"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage
|
|
||||||
name = "load bearing equipment"
|
|
||||||
desc = "Used to hold things when you don't have enough hands."
|
|
||||||
icon_state = "webbing"
|
|
||||||
item_color = "webbing"
|
|
||||||
var/slots = 3
|
|
||||||
var/obj/item/weapon/storage/internal/hold
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/New()
|
|
||||||
..()
|
|
||||||
hold = new/obj/item/weapon/storage/internal(src)
|
|
||||||
hold.storage_slots = slots
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/attack_hand(mob/user as mob)
|
|
||||||
if (has_suit) //if we are part of a suit
|
|
||||||
hold.open(user)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (hold.handle_attack_hand(user)) //otherwise interact as a regular storage item
|
|
||||||
..(user)
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/MouseDrop(obj/over_object as obj)
|
|
||||||
if (has_suit)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (hold.handle_mousedrop(usr, over_object))
|
|
||||||
..(over_object)
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/attackby(obj/item/W as obj, mob/user as mob)
|
|
||||||
return hold.attackby(W, user)
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/emp_act(severity)
|
|
||||||
hold.emp_act(severity)
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
|
|
||||||
hold.hear_talk(M, msg, verb, speaking)
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/attack_self(mob/user as mob)
|
|
||||||
user << "<span class='notice'>You empty [src].</span>"
|
|
||||||
var/turf/T = get_turf(src)
|
|
||||||
hold.hide_from(usr)
|
|
||||||
for(var/obj/item/I in hold.contents)
|
|
||||||
hold.remove_from_storage(I, T)
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/webbing
|
|
||||||
name = "webbing"
|
|
||||||
desc = "Strudy mess of synthcotton belts and buckles, ready to share your burden."
|
|
||||||
icon_state = "webbing"
|
|
||||||
item_color = "webbing"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/black_vest
|
|
||||||
name = "black webbing vest"
|
|
||||||
desc = "Robust black synthcotton vest with lots of pockets to hold whatever you need, but cannot hold in hands."
|
|
||||||
icon_state = "vest_black"
|
|
||||||
item_color = "vest_black"
|
|
||||||
slots = 5
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/brown_vest
|
|
||||||
name = "brown webbing vest"
|
|
||||||
desc = "Worn brownish synthcotton vest with lots of pockets to unload your hands."
|
|
||||||
icon_state = "vest_brown"
|
|
||||||
item_color = "vest_brown"
|
|
||||||
slots = 5
|
|
||||||
/*
|
|
||||||
Holobadges are worn on the belt or neck, and can be used to show that the holder is an authorized
|
|
||||||
Security agent - the user details can be imprinted on the badge with a Security-access ID card,
|
|
||||||
or they can be emagged to accept any ID for use in disguises.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holobadge
|
|
||||||
|
|
||||||
name = "holobadge"
|
|
||||||
desc = "This glowing blue badge marks the holder as THE LAW."
|
|
||||||
icon_state = "holobadge"
|
|
||||||
item_color = "holobadge"
|
|
||||||
slot_flags = SLOT_BELT | SLOT_TIE
|
|
||||||
|
|
||||||
var/emagged = 0 //Emagging removes Sec check.
|
|
||||||
var/stored_name = null
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holobadge/cord
|
|
||||||
icon_state = "holobadge-cord"
|
|
||||||
item_color = "holobadge-cord"
|
|
||||||
slot_flags = SLOT_MASK | SLOT_TIE
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holobadge/attack_self(mob/user as mob)
|
|
||||||
if(!stored_name)
|
|
||||||
user << "Waving around a badge before swiping an ID would be pretty pointless."
|
|
||||||
return
|
|
||||||
if(isliving(user))
|
|
||||||
user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.")
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
|
||||||
|
|
||||||
if (istype(O, /obj/item/weapon/card/emag))
|
|
||||||
if (emagged)
|
|
||||||
user << "\red [src] is already cracked."
|
|
||||||
return
|
|
||||||
else
|
|
||||||
emagged = 1
|
|
||||||
user << "\red You swipe [O] and crack the holobadge security checks."
|
|
||||||
return
|
|
||||||
|
|
||||||
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
|
|
||||||
|
|
||||||
var/obj/item/weapon/card/id/id_card = null
|
|
||||||
|
|
||||||
if(istype(O, /obj/item/weapon/card/id))
|
|
||||||
id_card = O
|
|
||||||
else
|
|
||||||
var/obj/item/device/pda/pda = O
|
|
||||||
id_card = pda.id
|
|
||||||
|
|
||||||
if(access_security in id_card.access || emagged)
|
|
||||||
user << "You imprint your ID details onto the badge."
|
|
||||||
stored_name = id_card.registered_name
|
|
||||||
name = "holobadge ([stored_name])"
|
|
||||||
desc = "This glowing blue badge marks [stored_name] as THE LAW."
|
|
||||||
else
|
|
||||||
user << "[src] rejects your insufficient access rights."
|
|
||||||
return
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/holobadge/attack(mob/living/carbon/human/M, mob/living/user)
|
|
||||||
if(isliving(user))
|
|
||||||
user.visible_message("\red [user] invades [M]'s personal space, thrusting [src] into their face insistently.","\red You invade [M]'s personal space, thrusting [src] into their face insistently. You are the law.")
|
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/holobadge
|
|
||||||
name = "holobadge box"
|
|
||||||
desc = "A box claiming to contain holobadges."
|
|
||||||
New()
|
|
||||||
new /obj/item/clothing/tie/holobadge(src)
|
|
||||||
new /obj/item/clothing/tie/holobadge(src)
|
|
||||||
new /obj/item/clothing/tie/holobadge(src)
|
|
||||||
new /obj/item/clothing/tie/holobadge(src)
|
|
||||||
new /obj/item/clothing/tie/holobadge/cord(src)
|
|
||||||
new /obj/item/clothing/tie/holobadge/cord(src)
|
|
||||||
..()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/knifeharness
|
|
||||||
name = "decorated harness"
|
|
||||||
desc = "A heavily decorated harness of sinew and leather with two knife-loops."
|
|
||||||
icon_state = "unathiharness2"
|
|
||||||
item_color = "unathiharness2"
|
|
||||||
slots = 2
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/storage/knifeharness/New()
|
|
||||||
..()
|
|
||||||
hold.max_combined_w_class = 4
|
|
||||||
hold.can_hold = list("/obj/item/weapon/hatchet/unathiknife",\
|
|
||||||
"/obj/item/weapon/kitchen/utensil/knife",\
|
|
||||||
"/obj/item/weapon/kitchen/utensil/pknife",\
|
|
||||||
"/obj/item/weapon/kitchenknife",\
|
|
||||||
"/obj/item/weapon/kitchenknife/ritual")
|
|
||||||
|
|
||||||
new /obj/item/weapon/hatchet/unathiknife(hold)
|
|
||||||
new /obj/item/weapon/hatchet/unathiknife(hold)
|
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
|
|
||||||
/////////////////////// Cataguettes - Lucy's Stethoscope - Lucy Kemmerer //////
|
/////////////////////// Cataguettes - Lucy's Stethoscope - Lucy Kemmerer //////
|
||||||
|
|
||||||
/obj/item/clothing/tie/stethoscope/fluff/lucystethos
|
/obj/item/clothing/accessory/stethoscope/fluff/lucystethos
|
||||||
name = "Lucy's Stethoscope"
|
name = "Lucy's Stethoscope"
|
||||||
desc = "A medical apparatus intended to ease in listening to the sounds of the human body. This one looks cleaner and sparklier than the rest. There is a small silver plaque attached to the tubing, with the words 'Lucy Kemmerer' engraved on it."
|
desc = "A medical apparatus intended to ease in listening to the sounds of the human body. This one looks cleaner and sparklier than the rest. There is a small silver plaque attached to the tubing, with the words 'Lucy Kemmerer' engraved on it."
|
||||||
icon_state = "lucystethos"
|
icon_state = "lucystethos"
|
||||||
@@ -1111,22 +1111,33 @@
|
|||||||
item_color = "lillian_dress"
|
item_color = "lillian_dress"
|
||||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||||
|
|
||||||
////// Cybernetic Casings - Parker Eliza - MrSnapwalk
|
////// Tailored Security Uniform - Parker Eliza - MrSnapwalk
|
||||||
|
|
||||||
/obj/item/clothing/under/fluff/parkereliza
|
/obj/item/clothing/under/fluff/parkereliza
|
||||||
name = "cybernetic casings"
|
name = "tailored security uniform"
|
||||||
desc = "A set of somewhat bulky white casings for robotic limbs, paired with a basic blue tank top and black cargo pants. The arms have a small label on the inner elbow, which reads \"Bishop Corporation Cybernetic Solutions\"."
|
desc = "A red uniform shirt (tailored for easy access to the shoulder joint) and black cargo pants, paired with a set of somewhat bulky white casings for robotic limbs. The arms have a small label on the inner elbow, which reads \"Bishop Corporation Cybernetic Solutions\"."
|
||||||
icon = 'icons/obj/custom_items.dmi'
|
icon = 'icons/obj/custom_items.dmi'
|
||||||
icon_state = "parker_eliza"
|
icon_state = "parker_eliza"
|
||||||
item_state = "parker_eliza"
|
item_state = "parker_eliza"
|
||||||
item_color = "parker_eliza"
|
item_color = "parker_eliza"
|
||||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
|
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
|
||||||
|
|
||||||
|
////// Bishop "GOLEM" V2200 Industrial Limb Augments - Parker Eliza - MrSnapwalk
|
||||||
|
|
||||||
|
/obj/item/clothing/suit/fluff/parkereliza
|
||||||
|
name = "Bishop \"GOLEM\" V2200 Industrial Limb Augments"
|
||||||
|
desc = "A set of top-of-the-line cyberlimbs, only usable to someone with extensive bone structure augmentation. Often used in industrial applications, they are capable of throwing a man clear across a room. The load limitation circuit in this set appears to be modified."
|
||||||
|
icon = 'icons/obj/custom_items.dmi'
|
||||||
|
icon_state = "parker_eliza_arms"
|
||||||
|
item_state = "parker_eliza_arms"
|
||||||
|
item_color = "parker_eliza_arms"
|
||||||
|
|
||||||
|
|
||||||
////////////// Accessories /////
|
////////////// Accessories /////
|
||||||
|
|
||||||
//////////////////// Blood Red Pendant - Mewth - Mu'taz Radi ////////////////
|
//////////////////// Blood Red Pendant - Mewth - Mu'taz Radi ////////////////
|
||||||
|
|
||||||
/obj/item/clothing/tie/fluff/radi
|
/obj/item/clothing/accessory/fluff/radi
|
||||||
name = "Blood Red Pendant"
|
name = "Blood Red Pendant"
|
||||||
desc = "A blue chained necklace with a ruby in the middle, it looks pretty!"
|
desc = "A blue chained necklace with a ruby in the middle, it looks pretty!"
|
||||||
icon = 'icons/obj/custom_items.dmi'
|
icon = 'icons/obj/custom_items.dmi'
|
||||||
@@ -1168,7 +1179,7 @@
|
|||||||
|
|
||||||
////// Small locket - Altair An-Nasaqan - Serithi
|
////// Small locket - Altair An-Nasaqan - Serithi
|
||||||
|
|
||||||
/obj/item/clothing/tie/fluff/altair_locket
|
/obj/item/clothing/accessory/fluff/altair_locket
|
||||||
name = "small locket"
|
name = "small locket"
|
||||||
desc = "A small golden locket attached to an Ii'rka-reed string. Inside the locket is a holo-picture of a female Tajaran, and an inscription writtin in Siik'mas."
|
desc = "A small golden locket attached to an Ii'rka-reed string. Inside the locket is a holo-picture of a female Tajaran, and an inscription writtin in Siik'mas."
|
||||||
icon = 'icons/obj/custom_items.dmi'
|
icon = 'icons/obj/custom_items.dmi'
|
||||||
@@ -1181,7 +1192,7 @@
|
|||||||
|
|
||||||
////// Silver locket - Konaa Hirano - Konaa_Hirano
|
////// Silver locket - Konaa Hirano - Konaa_Hirano
|
||||||
|
|
||||||
/obj/item/clothing/tie/fluff/konaa_hirano
|
/obj/item/clothing/accessory/fluff/konaa_hirano
|
||||||
name = "silver locket"
|
name = "silver locket"
|
||||||
desc = "This oval shaped, argentium sterling silver locket hangs on an incredibly fine, refractive string, almost thin as hair and microweaved from links to a deceptive strength, of similar material. The edges are engraved very delicately with an elegant curving design, but overall the main is unmarked and smooth to the touch, leaving room for either remaining as a stolid piece or future alterations. There is an obvious internal place for a picture or lock of some sort, but even behind that is a very thin compartment unhinged with the pinch of a thumb and forefinger."
|
desc = "This oval shaped, argentium sterling silver locket hangs on an incredibly fine, refractive string, almost thin as hair and microweaved from links to a deceptive strength, of similar material. The edges are engraved very delicately with an elegant curving design, but overall the main is unmarked and smooth to the touch, leaving room for either remaining as a stolid piece or future alterations. There is an obvious internal place for a picture or lock of some sort, but even behind that is a very thin compartment unhinged with the pinch of a thumb and forefinger."
|
||||||
icon = 'icons/obj/custom_items.dmi'
|
icon = 'icons/obj/custom_items.dmi'
|
||||||
@@ -1193,13 +1204,13 @@
|
|||||||
slot_flags = SLOT_MASK | SLOT_TIE
|
slot_flags = SLOT_MASK | SLOT_TIE
|
||||||
var/obj/item/held //Item inside locket.
|
var/obj/item/held //Item inside locket.
|
||||||
|
|
||||||
/obj/item/clothing/tie/fluff/konaa_hirano/attack_self(mob/user as mob)
|
/obj/item/clothing/accessory/fluff/konaa_hirano/attack_self(mob/user as mob)
|
||||||
if(held)
|
if(held)
|
||||||
user << "You open [src] and [held] falls out."
|
user << "You open [src] and [held] falls out."
|
||||||
held.loc = get_turf(user)
|
held.loc = get_turf(user)
|
||||||
src.held = null
|
src.held = null
|
||||||
|
|
||||||
/obj/item/clothing/tie/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob)
|
/obj/item/clothing/accessory/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||||
if(istype(O,/obj/item/weapon/paper))
|
if(istype(O,/obj/item/weapon/paper))
|
||||||
if(held)
|
if(held)
|
||||||
usr << "[src] already has something inside it."
|
usr << "[src] already has something inside it."
|
||||||
@@ -1213,7 +1224,7 @@
|
|||||||
|
|
||||||
////// Medallion - Nasir Khayyam - Jamini
|
////// Medallion - Nasir Khayyam - Jamini
|
||||||
|
|
||||||
/obj/item/clothing/tie/fluff/nasir_khayyam_1
|
/obj/item/clothing/accessory/fluff/nasir_khayyam_1
|
||||||
name = "medallion"
|
name = "medallion"
|
||||||
desc = "This silvered medallion bears the symbol of the Hadii Clan of the Tajaran."
|
desc = "This silvered medallion bears the symbol of the Hadii Clan of the Tajaran."
|
||||||
icon = 'icons/obj/custom_items.dmi'
|
icon = 'icons/obj/custom_items.dmi'
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
if(46 to 50)
|
if(46 to 50)
|
||||||
new/obj/item/clothing/under/chameleon(src)
|
new/obj/item/clothing/under/chameleon(src)
|
||||||
for(var/i = 0, i < 7, i++)
|
for(var/i = 0, i < 7, i++)
|
||||||
new/obj/item/clothing/tie/horrible(src)
|
new/obj/item/clothing/accessory/horrible(src)
|
||||||
if(51 to 52) // Uncommon, 2% each
|
if(51 to 52) // Uncommon, 2% each
|
||||||
new/obj/item/weapon/melee/classic_baton(src)
|
new/obj/item/weapon/melee/classic_baton(src)
|
||||||
if(53 to 54)
|
if(53 to 54)
|
||||||
|
|||||||
@@ -63,8 +63,8 @@
|
|||||||
var/tie_msg
|
var/tie_msg
|
||||||
if(istype(w_uniform,/obj/item/clothing/under))
|
if(istype(w_uniform,/obj/item/clothing/under))
|
||||||
var/obj/item/clothing/under/U = w_uniform
|
var/obj/item/clothing/under/U = w_uniform
|
||||||
if(U.hastie)
|
if(U.accessories.len)
|
||||||
tie_msg += " with \icon[U.hastie] \a [U.hastie]"
|
tie_msg += " with [lowertext(english_list(U.accessories))]"
|
||||||
|
|
||||||
if(w_uniform.blood_DNA)
|
if(w_uniform.blood_DNA)
|
||||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != "#030303") ? "blood" : "oil"]-stained [w_uniform.name][tie_msg]!</span>\n"
|
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != "#030303") ? "blood" : "oil"]-stained [w_uniform.name][tie_msg]!</span>\n"
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||||
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
||||||
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
|
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
|
||||||
<BR>[(suit) ? ((suit.hastie) ? text(" <A href='?src=\ref[];item=tie'>Remove Accessory</A>", src) : "") :]
|
<BR>[(suit) ? ((suit.accessories.len) ? text(" <A href='?src=\ref[];item=tie'>Remove Accessory</A>", src) : "") :]
|
||||||
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
||||||
<BR><A href='?src=\ref[src];item=splints'>Remove Splints</A>
|
<BR><A href='?src=\ref[src];item=splints'>Remove Splints</A>
|
||||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
|
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
|
||||||
@@ -1301,4 +1301,4 @@
|
|||||||
/mob/living/carbon/human/slip(var/slipped_on, stun_duration=8)
|
/mob/living/carbon/human/slip(var/slipped_on, stun_duration=8)
|
||||||
if((species.flags & NO_SLIP) || (shoes && (shoes.flags & NOSLIP)))
|
if((species.flags & NO_SLIP) || (shoes && (shoes.flags & NOSLIP)))
|
||||||
return 0
|
return 0
|
||||||
..(slipped_on,stun_duration)
|
..(slipped_on,stun_duration)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ emp_act
|
|||||||
if(!(def_zone in list("chest", "groin")))
|
if(!(def_zone in list("chest", "groin")))
|
||||||
reflectchance /= 2
|
reflectchance /= 2
|
||||||
if(prob(reflectchance))
|
if(prob(reflectchance))
|
||||||
visible_message("\red <B>The [P.name] gets reflected by [src]'s [wear_suit.name]!</B>")
|
visible_message("\red <B>\The [P] gets reflected by \the [src]'s [wear_suit.name]!</B>")
|
||||||
|
|
||||||
// Find a turf near or on the original location to bounce to
|
// Find a turf near or on the original location to bounce to
|
||||||
if(P.starting)
|
if(P.starting)
|
||||||
@@ -33,12 +33,7 @@ emp_act
|
|||||||
var/turf/curloc = get_turf(src)
|
var/turf/curloc = get_turf(src)
|
||||||
|
|
||||||
// redirect the projectile
|
// redirect the projectile
|
||||||
P.original = locate(new_x, new_y, P.z)
|
P.redirect(new_x, new_y, curloc, src)
|
||||||
P.starting = curloc
|
|
||||||
P.current = curloc
|
|
||||||
P.firer = src
|
|
||||||
P.yo = new_y - curloc.y
|
|
||||||
P.xo = new_x - curloc.x
|
|
||||||
|
|
||||||
return -1 // complete projectile permutation
|
return -1 // complete projectile permutation
|
||||||
|
|
||||||
@@ -47,9 +42,9 @@ emp_act
|
|||||||
var/armor = getarmor_organ(organ, "bullet")
|
var/armor = getarmor_organ(organ, "bullet")
|
||||||
if((P.embed && prob(20 + max(P.damage - armor, -10))))
|
if((P.embed && prob(20 + max(P.damage - armor, -10))))
|
||||||
var/obj/item/weapon/shard/shrapnel/SP = new()
|
var/obj/item/weapon/shard/shrapnel/SP = new()
|
||||||
(SP.name) = "[P.name] shrapnel"
|
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
|
||||||
(SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]."
|
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
|
||||||
(SP.loc) = organ
|
SP.loc = organ
|
||||||
organ.embed(SP)
|
organ.embed(SP)
|
||||||
|
|
||||||
return (..(P , def_zone))
|
return (..(P , def_zone))
|
||||||
|
|||||||
@@ -497,15 +497,17 @@
|
|||||||
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
|
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
|
||||||
if("tie")
|
if("tie")
|
||||||
var/obj/item/clothing/under/suit = target.w_uniform
|
var/obj/item/clothing/under/suit = target.w_uniform
|
||||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their accessory ([suit.hastie]) removed by [source.name] ([source.ckey])</font>")
|
if(suit.accessories.len)
|
||||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) accessory ([suit.hastie])</font>")
|
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||||
if(istype(suit.hastie, /obj/item/clothing/tie/holobadge) || istype(suit.hastie, /obj/item/clothing/tie/medal))
|
target.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their accessory ([A]) removed by [source.name] ([source.ckey])</font>"
|
||||||
for(var/mob/M in viewers(target, null))
|
source.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) accessory ([A])</font>"
|
||||||
M.show_message("\red <B>[source] tears off \the [suit.hastie] from [target]'s suit!</B>" , 1)
|
if(istype(A, /obj/item/clothing/accessory/holobadge) || istype(A, /obj/item/clothing/accessory/medal))
|
||||||
done()
|
for(var/mob/M in viewers(target, null))
|
||||||
return
|
M.show_message("\red <B>[source] tears off \the [A] from [target]'s [suit]!</B>" , 1)
|
||||||
else
|
done()
|
||||||
message = "\red <B>[source] is trying to take off \a [suit.hastie] from [target]'s suit!</B>"
|
return
|
||||||
|
else
|
||||||
|
message = "\red <B>[source] is trying to take off \a [A] from [target]'s [suit]!</B>"
|
||||||
if("pockets")
|
if("pockets")
|
||||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their pockets emptied by [source.name] ([source.ckey])</font>")
|
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their pockets emptied by [source.name] ([source.ckey])</font>")
|
||||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to empty [target.name]'s ([target.ckey]) pockets</font>")
|
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to empty [target.name]'s ([target.ckey]) pockets</font>")
|
||||||
@@ -634,17 +636,18 @@ It can still be worn/put on as normal.
|
|||||||
strip_item = target.wear_suit
|
strip_item = target.wear_suit
|
||||||
if("tie")
|
if("tie")
|
||||||
var/obj/item/clothing/under/suit = target.w_uniform
|
var/obj/item/clothing/under/suit = target.w_uniform
|
||||||
//var/obj/item/clothing/tie/tie = suit.hastie
|
//var/obj/item/clothing/accessory/tie = suit.hastie
|
||||||
/*if(tie)
|
/*if(tie)
|
||||||
if (istype(tie,/obj/item/clothing/tie/storage))
|
if (istype(tie,/obj/item/clothing/accessory/storage))
|
||||||
var/obj/item/clothing/tie/storage/W = tie
|
var/obj/item/clothing/accessory/storage/W = tie
|
||||||
if (W.hold)
|
if (W.hold)
|
||||||
W.hold.close(usr)
|
W.hold.close(usr)
|
||||||
usr.put_in_hands(tie)
|
usr.put_in_hands(tie)
|
||||||
suit.hastie = null*/
|
suit.hastie = null*/
|
||||||
if(suit && suit.hastie)
|
if(suit && suit.accessories.len)
|
||||||
suit.hastie.on_removed(usr)
|
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||||
suit.hastie = null
|
A.on_removed(usr)
|
||||||
|
suit.accessories -= A
|
||||||
target.update_inv_w_uniform()
|
target.update_inv_w_uniform()
|
||||||
if("id")
|
if("id")
|
||||||
slot_to_process = slot_wear_id
|
slot_to_process = slot_wear_id
|
||||||
|
|||||||
@@ -537,10 +537,11 @@ proc/get_damage_icon_part(damage_state, body_part)
|
|||||||
bloodsies.color = w_uniform.blood_color
|
bloodsies.color = w_uniform.blood_color
|
||||||
standing.overlays += bloodsies
|
standing.overlays += bloodsies
|
||||||
|
|
||||||
if(w_uniform:hastie) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE.
|
if(w_uniform:accessories.len) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE.
|
||||||
var/tie_color = w_uniform:hastie.item_color
|
for(var/obj/item/clothing/accessory/A in w_uniform:accessories)
|
||||||
if(!tie_color) tie_color = w_uniform:hastie.icon_state
|
var/tie_color = A.item_color
|
||||||
standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
|
if(!tie_color) tie_color = A.icon_state
|
||||||
|
standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
|
||||||
|
|
||||||
overlays_standing[UNIFORM_LAYER] = standing
|
overlays_standing[UNIFORM_LAYER] = standing
|
||||||
else
|
else
|
||||||
@@ -780,7 +781,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
|||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
|
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
|
||||||
if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/tie) ) && !(head && head.flags_inv & HIDEMASK))
|
if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory) ) && !(head && head.flags_inv & HIDEMASK))
|
||||||
wear_mask.screen_loc = ui_mask //TODO
|
wear_mask.screen_loc = ui_mask //TODO
|
||||||
|
|
||||||
var/image/standing
|
var/image/standing
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
/mob/living/carbon/slime/death(gibbed)
|
/mob/living/carbon/slime/death(gibbed)
|
||||||
|
|
||||||
if(stat == DEAD) return
|
if(stat == DEAD) return
|
||||||
stat = DEAD
|
|
||||||
|
|
||||||
if(!gibbed)
|
if(!gibbed && is_adult)
|
||||||
if(is_adult)
|
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc, colour)
|
||||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
|
M.rabid = 1
|
||||||
M.colour = colour
|
M.Friends = Friends.Copy()
|
||||||
M.rabid = 1
|
step_away(M, src)
|
||||||
is_adult = 0
|
is_adult = 0
|
||||||
maxHealth = 150
|
maxHealth = 150
|
||||||
revive()
|
revive()
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
number = rand(1, 1000)
|
if (!client) rabid = 1
|
||||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
number = rand(1, 1000)
|
||||||
return
|
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||||
|
return
|
||||||
|
|
||||||
icon_state = "[colour] baby slime dead"
|
. = ..(gibbed, "seizes up and falls limp...")
|
||||||
overlays.Cut()
|
|
||||||
|
|
||||||
return ..(gibbed)
|
regenerate_icons()
|
||||||
|
|
||||||
|
return
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
/mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null)
|
/mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null)
|
||||||
|
|
||||||
|
|
||||||
if (findtext(act, "-", 1, null))
|
if (findtext(act, "-", 1, null))
|
||||||
var/t1 = findtext(act, "-", 1, null)
|
var/t1 = findtext(act, "-", 1, null)
|
||||||
//param = copytext(act, t1 + 1, length(act) + 1)
|
//param = copytext(act, t1 + 1, length(act) + 1)
|
||||||
@@ -9,6 +8,8 @@
|
|||||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||||
act = copytext(act,1,length(act))
|
act = copytext(act,1,length(act))
|
||||||
|
|
||||||
|
var/updateicon = 0
|
||||||
|
|
||||||
switch(act) //Alphabetical please
|
switch(act) //Alphabetical please
|
||||||
if ("me")
|
if ("me")
|
||||||
if(silent)
|
if(silent)
|
||||||
@@ -59,8 +60,32 @@
|
|||||||
message = "<B>The [src.name]</B> vibrates!"
|
message = "<B>The [src.name]</B> vibrates!"
|
||||||
m_type = 1
|
m_type = 1
|
||||||
|
|
||||||
|
if("nomood")
|
||||||
|
mood = null
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("pout")
|
||||||
|
mood = "pout"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("sad")
|
||||||
|
mood = "sad"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("angry")
|
||||||
|
mood = "angry"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("frown")
|
||||||
|
mood = "mischevous"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("smile")
|
||||||
|
mood = ":3"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
if ("help") //This is an exception
|
if ("help") //This is an exception
|
||||||
src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate"
|
src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate. You can also set your face with: \n\nnomood, pout, sad, angry, frown, smile"
|
||||||
|
|
||||||
else
|
else
|
||||||
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
||||||
@@ -68,9 +93,9 @@
|
|||||||
if (m_type & 1)
|
if (m_type & 1)
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
O.show_message(message, m_type)
|
O.show_message(message, m_type)
|
||||||
//Foreach goto(703)
|
|
||||||
else
|
else
|
||||||
for(var/mob/O in hearers(src, null))
|
for(var/mob/O in hearers(src, null))
|
||||||
O.show_message(message, m_type)
|
O.show_message(message, m_type)
|
||||||
//Foreach goto(746)
|
if(updateicon)
|
||||||
|
regenerate_icons()
|
||||||
return
|
return
|
||||||
366
code/modules/mob/living/carbon/metroid/items.dm
Normal file
366
code/modules/mob/living/carbon/metroid/items.dm
Normal file
@@ -0,0 +1,366 @@
|
|||||||
|
/obj/item/slime_extract
|
||||||
|
name = "slime extract"
|
||||||
|
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
|
||||||
|
icon = 'icons/mob/slimes.dmi'
|
||||||
|
icon_state = "grey slime extract"
|
||||||
|
force = 1.0
|
||||||
|
w_class = 1.0
|
||||||
|
throwforce = 0
|
||||||
|
throw_speed = 3
|
||||||
|
throw_range = 6
|
||||||
|
origin_tech = "biotech=4"
|
||||||
|
var/Uses = 1 // uses before it goes inert
|
||||||
|
var/enhanced = 0 //has it been enhanced before?
|
||||||
|
|
||||||
|
attackby(obj/item/O as obj, mob/user as mob)
|
||||||
|
if(istype(O, /obj/item/weapon/slimesteroid2))
|
||||||
|
if(enhanced == 1)
|
||||||
|
user << "<span class='warning'> This extract has already been enhanced!</span>"
|
||||||
|
return ..()
|
||||||
|
if(Uses == 0)
|
||||||
|
user << "<span class='warning'> You can't enhance a used extract!</span>"
|
||||||
|
return ..()
|
||||||
|
user <<"You apply the enhancer. It now has triple the amount of uses."
|
||||||
|
Uses = 3
|
||||||
|
enhanced = 1
|
||||||
|
del(O)
|
||||||
|
|
||||||
|
/obj/item/slime_extract/New()
|
||||||
|
..()
|
||||||
|
create_reagents(100)
|
||||||
|
|
||||||
|
/obj/item/slime_extract/grey
|
||||||
|
name = "grey slime extract"
|
||||||
|
icon_state = "grey slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/gold
|
||||||
|
name = "gold slime extract"
|
||||||
|
icon_state = "gold slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/silver
|
||||||
|
name = "silver slime extract"
|
||||||
|
icon_state = "silver slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/metal
|
||||||
|
name = "metal slime extract"
|
||||||
|
icon_state = "metal slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/purple
|
||||||
|
name = "purple slime extract"
|
||||||
|
icon_state = "purple slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/darkpurple
|
||||||
|
name = "dark purple slime extract"
|
||||||
|
icon_state = "dark purple slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/orange
|
||||||
|
name = "orange slime extract"
|
||||||
|
icon_state = "orange slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/yellow
|
||||||
|
name = "yellow slime extract"
|
||||||
|
icon_state = "yellow slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/red
|
||||||
|
name = "red slime extract"
|
||||||
|
icon_state = "red slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/blue
|
||||||
|
name = "blue slime extract"
|
||||||
|
icon_state = "blue slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/darkblue
|
||||||
|
name = "dark blue slime extract"
|
||||||
|
icon_state = "dark blue slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/pink
|
||||||
|
name = "pink slime extract"
|
||||||
|
icon_state = "pink slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/green
|
||||||
|
name = "green slime extract"
|
||||||
|
icon_state = "green slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/lightpink
|
||||||
|
name = "light pink slime extract"
|
||||||
|
icon_state = "light pink slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/black
|
||||||
|
name = "black slime extract"
|
||||||
|
icon_state = "black slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/oil
|
||||||
|
name = "oil slime extract"
|
||||||
|
icon_state = "oil slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/adamantine
|
||||||
|
name = "adamantine slime extract"
|
||||||
|
icon_state = "adamantine slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/bluespace
|
||||||
|
name = "bluespace slime extract"
|
||||||
|
icon_state = "bluespace slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/pyrite
|
||||||
|
name = "pyrite slime extract"
|
||||||
|
icon_state = "pyrite slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/cerulean
|
||||||
|
name = "cerulean slime extract"
|
||||||
|
icon_state = "cerulean slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/sepia
|
||||||
|
name = "sepia slime extract"
|
||||||
|
icon_state = "sepia slime extract"
|
||||||
|
|
||||||
|
/obj/item/slime_extract/rainbow
|
||||||
|
name = "rainbow slime extract"
|
||||||
|
icon_state = "rainbow slime extract"
|
||||||
|
|
||||||
|
////Pet Slime Creation///
|
||||||
|
|
||||||
|
/obj/item/weapon/slimepotion
|
||||||
|
name = "docility potion"
|
||||||
|
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame."
|
||||||
|
icon = 'icons/obj/chemical.dmi'
|
||||||
|
icon_state = "bottle19"
|
||||||
|
|
||||||
|
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
||||||
|
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
|
||||||
|
user << "<span class='warning'> The potion only works on baby slimes!</span>"
|
||||||
|
return ..()
|
||||||
|
if(M.is_adult) //Can't tame adults
|
||||||
|
user << "<span class='warning'> Only baby slimes can be tamed!</span>"
|
||||||
|
return..()
|
||||||
|
if(M.stat)
|
||||||
|
user << "<span class='warning'> The slime is dead!</span>"
|
||||||
|
return..()
|
||||||
|
if(M.mind)
|
||||||
|
user << "<span class='warning'> The slime resists!</span>"
|
||||||
|
return ..()
|
||||||
|
var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
|
||||||
|
pet.icon_state = "[M.colour] baby slime"
|
||||||
|
pet.icon_living = "[M.colour] baby slime"
|
||||||
|
pet.icon_dead = "[M.colour] baby slime dead"
|
||||||
|
pet.colour = "[M.colour]"
|
||||||
|
user <<"You feed the slime the potion, removing it's powers and calming it."
|
||||||
|
del(M)
|
||||||
|
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
||||||
|
|
||||||
|
if (!newname)
|
||||||
|
newname = "pet slime"
|
||||||
|
pet.name = newname
|
||||||
|
pet.real_name = newname
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/slimepotion2
|
||||||
|
name = "advanced docility potion"
|
||||||
|
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame. This one is meant for adult slimes"
|
||||||
|
icon = 'icons/obj/chemical.dmi'
|
||||||
|
icon_state = "bottle19"
|
||||||
|
|
||||||
|
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
||||||
|
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
|
||||||
|
user << "<span class='warning'> The potion only works on slimes!</span>"
|
||||||
|
return ..()
|
||||||
|
if(M.stat)
|
||||||
|
user << "<span class='warning'> The slime is dead!</span>"
|
||||||
|
return..()
|
||||||
|
if(M.mind)
|
||||||
|
user << "<span class='warning'> The slime resists!</span>"
|
||||||
|
return ..()
|
||||||
|
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
|
||||||
|
pet.icon_state = "[M.colour] adult slime"
|
||||||
|
pet.icon_living = "[M.colour] adult slime"
|
||||||
|
pet.icon_dead = "[M.colour] baby slime dead"
|
||||||
|
pet.colour = "[M.colour]"
|
||||||
|
user <<"You feed the slime the potion, removing it's powers and calming it."
|
||||||
|
del(M)
|
||||||
|
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
||||||
|
|
||||||
|
if (!newname)
|
||||||
|
newname = "pet slime"
|
||||||
|
pet.name = newname
|
||||||
|
pet.real_name = newname
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/slimesteroid
|
||||||
|
name = "slime steroid"
|
||||||
|
desc = "A potent chemical mix that will cause a slime to generate more extract."
|
||||||
|
icon = 'icons/obj/chemical.dmi'
|
||||||
|
icon_state = "bottle16"
|
||||||
|
|
||||||
|
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
||||||
|
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
|
||||||
|
user << "<span class='warning'> The steroid only works on baby slimes!</span>"
|
||||||
|
return ..()
|
||||||
|
if(M.is_adult) //Can't tame adults
|
||||||
|
user << "<span class='warning'> Only baby slimes can use the steroid!</span>"
|
||||||
|
return..()
|
||||||
|
if(M.stat)
|
||||||
|
user << "<span class='warning'> The slime is dead!</span>"
|
||||||
|
return..()
|
||||||
|
if(M.cores == 3)
|
||||||
|
user <<"<span class='warning'> The slime already has the maximum amount of extract!</span>"
|
||||||
|
return..()
|
||||||
|
|
||||||
|
user <<"You feed the slime the steroid. It now has triple the amount of extract."
|
||||||
|
M.cores = 3
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/slimesteroid2
|
||||||
|
name = "extract enhancer"
|
||||||
|
desc = "A potent chemical mix that will give a slime extract three uses."
|
||||||
|
icon = 'icons/obj/chemical.dmi'
|
||||||
|
icon_state = "bottle17"
|
||||||
|
|
||||||
|
/*afterattack(obj/target, mob/user , flag)
|
||||||
|
if(istype(target, /obj/item/slime_extract))
|
||||||
|
if(target.enhanced == 1)
|
||||||
|
user << "<span class='warning'> This extract has already been enhanced!</span>"
|
||||||
|
return ..()
|
||||||
|
if(target.Uses == 0)
|
||||||
|
user << "<span class='warning'> You can't enhance a used extract!</span>"
|
||||||
|
return ..()
|
||||||
|
user <<"You apply the enhancer. It now has triple the amount of uses."
|
||||||
|
target.Uses = 3
|
||||||
|
target.enahnced = 1
|
||||||
|
del(src)*/
|
||||||
|
|
||||||
|
/obj/effect/golemrune
|
||||||
|
anchored = 1
|
||||||
|
desc = "a strange rune used to create golems. It glows when spirits are nearby."
|
||||||
|
name = "rune"
|
||||||
|
icon = 'icons/obj/rune.dmi'
|
||||||
|
icon_state = "golem"
|
||||||
|
unacidable = 1
|
||||||
|
layer = TURF_LAYER
|
||||||
|
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
processing_objects.Add(src)
|
||||||
|
|
||||||
|
process()
|
||||||
|
var/mob/dead/observer/ghost
|
||||||
|
for(var/mob/dead/observer/O in src.loc)
|
||||||
|
if(!O.client) continue
|
||||||
|
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
|
||||||
|
ghost = O
|
||||||
|
break
|
||||||
|
if(ghost)
|
||||||
|
icon_state = "golem2"
|
||||||
|
else
|
||||||
|
icon_state = "golem"
|
||||||
|
|
||||||
|
attack_hand(mob/living/user as mob)
|
||||||
|
var/mob/dead/observer/ghost
|
||||||
|
for(var/mob/dead/observer/O in src.loc)
|
||||||
|
if(!O.client) continue
|
||||||
|
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
|
||||||
|
ghost = O
|
||||||
|
break
|
||||||
|
if(!ghost)
|
||||||
|
user << "The rune fizzles uselessly. There is no spirit nearby."
|
||||||
|
return
|
||||||
|
var/mob/living/carbon/human/G = new(src.loc)
|
||||||
|
G.set_species("Golem")
|
||||||
|
G.key = ghost.key
|
||||||
|
G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
|
||||||
|
del (src)
|
||||||
|
|
||||||
|
|
||||||
|
proc/announce_to_ghosts()
|
||||||
|
for(var/mob/dead/observer/G in player_list)
|
||||||
|
if(G.client)
|
||||||
|
var/area/A = get_area(src)
|
||||||
|
if(A)
|
||||||
|
G << "Golem rune created in [A.name]."
|
||||||
|
|
||||||
|
/mob/living/carbon/slime/has_eyes()
|
||||||
|
return 0
|
||||||
|
|
||||||
|
//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Basically this slime Core catalyzes reactions that normally wouldn't happen anywhere
|
||||||
|
/obj/item/slime_core
|
||||||
|
name = "slime extract"
|
||||||
|
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
|
||||||
|
icon = 'icons/mob/slimes.dmi'
|
||||||
|
icon_state = "slime extract"
|
||||||
|
force = 1.0
|
||||||
|
w_class = 1.0
|
||||||
|
throwforce = 1.0
|
||||||
|
throw_speed = 2
|
||||||
|
throw_range = 6
|
||||||
|
origin_tech = "biotech=4"
|
||||||
|
var/POWERFLAG = 0 // sshhhhhhh
|
||||||
|
var/Flush = 30
|
||||||
|
var/Uses = 5 // uses before it goes inert
|
||||||
|
|
||||||
|
/obj/item/slime_core/New()
|
||||||
|
..()
|
||||||
|
create_reagents(100)
|
||||||
|
POWERFLAG = rand(1,10)
|
||||||
|
Uses = rand(7, 25)
|
||||||
|
//flags |= NOREACT
|
||||||
|
/*
|
||||||
|
spawn()
|
||||||
|
Life()
|
||||||
|
|
||||||
|
proc/Life()
|
||||||
|
while(src)
|
||||||
|
sleep(25)
|
||||||
|
Flush--
|
||||||
|
if(Flush <= 0)
|
||||||
|
reagents.clear_reagents()
|
||||||
|
Flush = 30
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/reagent_containers/food/snacks/egg/slime
|
||||||
|
name = "slime egg"
|
||||||
|
desc = "A small, gelatinous egg."
|
||||||
|
icon = 'icons/mob/mob.dmi'
|
||||||
|
icon_state = "slime egg-growing"
|
||||||
|
bitesize = 12
|
||||||
|
origin_tech = "biotech=4"
|
||||||
|
var/grown = 0
|
||||||
|
|
||||||
|
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New()
|
||||||
|
..()
|
||||||
|
reagents.add_reagent("nutriment", 4)
|
||||||
|
reagents.add_reagent("slimejelly", 1)
|
||||||
|
spawn(rand(1200,1500))//the egg takes a while to "ripen"
|
||||||
|
Grow()
|
||||||
|
|
||||||
|
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Grow()
|
||||||
|
grown = 1
|
||||||
|
icon_state = "slime egg-grown"
|
||||||
|
processing_objects.Add(src)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch()
|
||||||
|
processing_objects.Remove(src)
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
src.visible_message("<span class='warning'> The [name] pulsates and quivers!</span>")
|
||||||
|
spawn(rand(50,100))
|
||||||
|
src.visible_message("<span class='warning'> The [name] bursts open!</span>")
|
||||||
|
new/mob/living/carbon/slime(T)
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/process()
|
||||||
|
var/turf/location = get_turf(src)
|
||||||
|
var/datum/gas_mixture/environment = location.return_air()
|
||||||
|
if (environment.phoron > MOLES_PHORON_VISIBLE)//phoron exposure causes the egg to hatch
|
||||||
|
src.Hatch()
|
||||||
|
|
||||||
|
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
if(istype( W, /obj/item/toy/crayon ))
|
||||||
|
return
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
*/
|
||||||
@@ -1,10 +1,3 @@
|
|||||||
/mob/living/carbon/slime
|
|
||||||
var/AIproc = 0 // determines if the AI loop is activated
|
|
||||||
var/Atkcool = 0 // attack cooldown
|
|
||||||
var/Tempstun = 0 // temporary temperature stuns
|
|
||||||
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
|
|
||||||
var/SStun = 0 // stun variable
|
|
||||||
|
|
||||||
/mob/living/carbon/slime/Life()
|
/mob/living/carbon/slime/Life()
|
||||||
set invisibility = 0
|
set invisibility = 0
|
||||||
set background = 1
|
set background = 1
|
||||||
@@ -15,113 +8,27 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
if(stat != DEAD)
|
if(stat != DEAD)
|
||||||
//Chemicals in the body
|
|
||||||
handle_chemicals_in_body()
|
handle_chemicals_in_body()
|
||||||
|
|
||||||
handle_nutrition()
|
handle_nutrition()
|
||||||
|
|
||||||
handle_targets()
|
if (!client)
|
||||||
|
handle_targets()
|
||||||
if (!ckey)
|
if (!AIproc)
|
||||||
|
spawn()
|
||||||
|
handle_AI()
|
||||||
handle_speech_and_mood()
|
handle_speech_and_mood()
|
||||||
|
|
||||||
var/datum/gas_mixture/environment
|
var/datum/gas_mixture/environment
|
||||||
if(src.loc)
|
if(src.loc)
|
||||||
environment = loc.return_air()
|
environment = loc.return_air()
|
||||||
|
|
||||||
//Apparently, the person who wrote this code designed it so that
|
regular_hud_updates()
|
||||||
//blinded get reset each cycle and then get activated later in the
|
|
||||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
|
||||||
//to find it.
|
|
||||||
src.blinded = null
|
|
||||||
|
|
||||||
regular_hud_updates() // Basically just deletes any screen objects :<
|
|
||||||
|
|
||||||
if(environment)
|
if(environment)
|
||||||
handle_environment(environment) // Handle temperature/pressure differences between body and environment
|
handle_environment(environment) // Handle temperature/pressure differences between body and environment
|
||||||
|
|
||||||
handle_regular_status_updates() // Status updates, death etc.
|
handle_regular_status_updates() // Status updates, death etc.
|
||||||
|
|
||||||
/mob/living/carbon/slime/proc/AIprocess() // the master AI process
|
|
||||||
|
|
||||||
if(AIproc || stat == DEAD || client) return
|
|
||||||
|
|
||||||
var/hungry = 0
|
|
||||||
if (nutrition < get_starve_nutrition())
|
|
||||||
hungry = 2
|
|
||||||
else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
|
|
||||||
hungry = 1
|
|
||||||
|
|
||||||
AIproc = 1
|
|
||||||
|
|
||||||
while(AIproc && stat != 2 && (attacked || hungry || rabid || Victim))
|
|
||||||
if(Victim) // can't eat AND have this little process at the same time
|
|
||||||
break
|
|
||||||
|
|
||||||
if(!Target || client)
|
|
||||||
break
|
|
||||||
|
|
||||||
if(Target.health <= -70 || Target.stat == 2)
|
|
||||||
Target = null
|
|
||||||
AIproc = 0
|
|
||||||
break
|
|
||||||
|
|
||||||
if(Target)
|
|
||||||
for(var/mob/living/carbon/slime/M in view(1,Target))
|
|
||||||
if(M.Victim == Target)
|
|
||||||
Target = null
|
|
||||||
AIproc = 0
|
|
||||||
break
|
|
||||||
if(!AIproc)
|
|
||||||
break
|
|
||||||
|
|
||||||
if(Target in view(1,src))
|
|
||||||
if(istype(Target, /mob/living/silicon))
|
|
||||||
if(!Atkcool)
|
|
||||||
Atkcool = 1
|
|
||||||
spawn(45)
|
|
||||||
Atkcool = 0
|
|
||||||
|
|
||||||
if(Target.Adjacent(src))
|
|
||||||
UnarmedAttack(Target)
|
|
||||||
return
|
|
||||||
if(!Target.lying && prob(80))
|
|
||||||
|
|
||||||
if(Target.client && Target.health >= 20)
|
|
||||||
if(!Atkcool)
|
|
||||||
Atkcool = 1
|
|
||||||
spawn(45)
|
|
||||||
Atkcool = 0
|
|
||||||
|
|
||||||
if(Target.Adjacent(src))
|
|
||||||
UnarmedAttack(Target)
|
|
||||||
|
|
||||||
else
|
|
||||||
if(!Atkcool && Target.Adjacent(src))
|
|
||||||
Feedon(Target)
|
|
||||||
|
|
||||||
else
|
|
||||||
if(!Atkcool && Target.Adjacent(src))
|
|
||||||
Feedon(Target)
|
|
||||||
|
|
||||||
else
|
|
||||||
if(Target in view(7, src))
|
|
||||||
if(!Target.Adjacent(src)) // Bug of the month candidate: slimes were attempting to move to target only if it was directly next to them, which caused them to target things, but not approach them
|
|
||||||
step_to(src, Target)
|
|
||||||
sleep(5)
|
|
||||||
|
|
||||||
else
|
|
||||||
Target = null
|
|
||||||
AIproc = 0
|
|
||||||
break
|
|
||||||
|
|
||||||
var/sleeptime = movement_delay()
|
|
||||||
if(sleeptime <= 0) sleeptime = 1
|
|
||||||
|
|
||||||
sleep(sleeptime + 2) // this is about as fast as a player slime can go
|
|
||||||
|
|
||||||
AIproc = 0
|
|
||||||
|
|
||||||
/mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment)
|
/mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment)
|
||||||
if(!environment)
|
if(!environment)
|
||||||
adjustToxLoss(rand(10,20))
|
adjustToxLoss(rand(10,20))
|
||||||
@@ -146,8 +53,6 @@
|
|||||||
//Account for massive pressure differences
|
//Account for massive pressure differences
|
||||||
|
|
||||||
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
|
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
|
||||||
if(bodytemperature <= (T0C - 40)) // stun temperature
|
|
||||||
Tempstun = 1
|
|
||||||
|
|
||||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||||
@@ -155,9 +60,6 @@
|
|||||||
else
|
else
|
||||||
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
|
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
|
||||||
|
|
||||||
else
|
|
||||||
Tempstun = 0
|
|
||||||
|
|
||||||
updatehealth()
|
updatehealth()
|
||||||
|
|
||||||
return //TODO: DEFERRED
|
return //TODO: DEFERRED
|
||||||
@@ -189,22 +91,16 @@
|
|||||||
|
|
||||||
/mob/living/carbon/slime/proc/handle_regular_status_updates()
|
/mob/living/carbon/slime/proc/handle_regular_status_updates()
|
||||||
|
|
||||||
if(is_adult)
|
src.blinded = null
|
||||||
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
|
||||||
else
|
|
||||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
|
||||||
|
|
||||||
if(health < config.health_threshold_dead && stat != 2)
|
health = maxHealth - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||||
|
|
||||||
|
if(health < 0 && stat != DEAD)
|
||||||
death()
|
death()
|
||||||
return
|
return
|
||||||
|
|
||||||
else if(src.health < config.health_threshold_crit)
|
if (halloss)
|
||||||
|
halloss = 0
|
||||||
if(!src.reagents.has_reagent("inaprovaline"))
|
|
||||||
src.adjustOxyLoss(10)
|
|
||||||
|
|
||||||
if(src.stat != DEAD)
|
|
||||||
src.stat = UNCONSCIOUS
|
|
||||||
|
|
||||||
if(prob(30))
|
if(prob(30))
|
||||||
adjustOxyLoss(-1)
|
adjustOxyLoss(-1)
|
||||||
@@ -267,27 +163,16 @@
|
|||||||
|
|
||||||
if(nutrition <= 0)
|
if(nutrition <= 0)
|
||||||
nutrition = 0
|
nutrition = 0
|
||||||
if(prob(75))
|
adjustToxLoss(rand(1,3))
|
||||||
adjustToxLoss(rand(0,5))
|
if (client && prob(5))
|
||||||
|
src << "<span class='danger'>You are starving!</span>"
|
||||||
|
|
||||||
else if (nutrition >= get_grow_nutrition() && amount_grown < 10)
|
else if (nutrition >= get_grow_nutrition() && amount_grown < 10)
|
||||||
nutrition -= 20
|
nutrition -= 20
|
||||||
amount_grown++
|
amount_grown++
|
||||||
|
|
||||||
if(amount_grown >= 10 && !Victim && !Target && !ckey)
|
|
||||||
if(is_adult)
|
|
||||||
Reproduce()
|
|
||||||
else
|
|
||||||
Evolve()
|
|
||||||
|
|
||||||
/mob/living/carbon/slime/proc/handle_targets()
|
/mob/living/carbon/slime/proc/handle_targets()
|
||||||
if(Tempstun)
|
if(attacked > 50) attacked = 50 // Let's not get into absurdly long periods of rage
|
||||||
if(!Victim) // not while they're eating!
|
|
||||||
canmove = 0
|
|
||||||
else
|
|
||||||
canmove = 1
|
|
||||||
|
|
||||||
if(attacked > 50) attacked = 50
|
|
||||||
|
|
||||||
if(attacked > 0)
|
if(attacked > 0)
|
||||||
attacked--
|
attacked--
|
||||||
@@ -300,106 +185,180 @@
|
|||||||
if(prob(10))
|
if(prob(10))
|
||||||
Discipline--
|
Discipline--
|
||||||
|
|
||||||
if(!client)
|
if(!canmove) return
|
||||||
if(!canmove) return
|
|
||||||
|
|
||||||
if(Victim) return // if it's eating someone already, continue eating!
|
if(Victim) return // if it's eating someone already, continue eating!
|
||||||
|
|
||||||
if(Target)
|
if(Target)
|
||||||
--target_patience
|
--target_patience
|
||||||
if (target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention
|
if (target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention
|
||||||
target_patience = 0
|
target_patience = 0
|
||||||
Target = null
|
Target = null
|
||||||
|
|
||||||
if(AIproc && SStun) return
|
var/hungry = 0 // determines if the slime is hungry
|
||||||
|
|
||||||
var/hungry = 0 // determines if the slime is hungry
|
if (nutrition < get_starve_nutrition())
|
||||||
|
hungry = 2
|
||||||
|
else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
|
||||||
|
hungry = 1
|
||||||
|
|
||||||
if (nutrition < get_starve_nutrition())
|
if(hungry == 2 && !client) // if a slime is starving, it starts losing its friends
|
||||||
hungry = 2
|
if(Friends.len > 0 && prob(1))
|
||||||
else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
|
var/mob/nofriend = pick(Friends)
|
||||||
hungry = 1
|
--Friends[nofriend]
|
||||||
|
if (Friends[nofriend] <= 0)
|
||||||
|
Friends -= nofriend
|
||||||
|
|
||||||
if(hungry == 2 && !client) // if a slime is starving, it starts losing its friends
|
if(!Target)
|
||||||
if(Friends.len > 0 && prob(1))
|
if(will_hunt(hungry) || attacked || rabid) // Only add to the list if we need to
|
||||||
var/mob/nofriend = pick(Friends)
|
var/list/targets = list()
|
||||||
--Friends[nofriend]
|
|
||||||
|
|
||||||
if(!Target)
|
for(var/mob/living/L in view(7,src))
|
||||||
if(will_hunt() && hungry || attacked || rabid) // Only add to the list if we need to
|
|
||||||
var/list/targets = list()
|
|
||||||
|
|
||||||
for(var/mob/living/L in view(7,src))
|
if(isslime(L) || L.stat == DEAD) // Ignore other slimes and dead mobs
|
||||||
|
continue
|
||||||
|
|
||||||
if(isslime(L) || L.stat == DEAD) // Ignore other slimes and dead mobs
|
if(L in Friends) // No eating friends!
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if(L in Friends) // No eating friends!
|
|
||||||
continue
|
|
||||||
|
|
||||||
if(issilicon(L) && (rabid || attacked)) // They can't eat silicons, but they can glomp them in defence
|
|
||||||
targets += L // Possible target found!
|
|
||||||
|
|
||||||
if(istype(L, /mob/living/carbon/human) && dna) //Ignore slime(wo)men
|
|
||||||
var/mob/living/carbon/human/H = L
|
|
||||||
if(H.species.name == "Slime")
|
|
||||||
continue
|
|
||||||
|
|
||||||
if(!L.canmove) // Only one slime can latch on at a time.
|
|
||||||
var/notarget = 0
|
|
||||||
for(var/mob/living/carbon/slime/M in view(1,L))
|
|
||||||
if(M.Victim == L)
|
|
||||||
notarget = 1
|
|
||||||
if(notarget)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
if(issilicon(L) && (rabid || attacked)) // They can't eat silicons, but they can glomp them in defence
|
||||||
targets += L // Possible target found!
|
targets += L // Possible target found!
|
||||||
|
|
||||||
if(targets.len > 0)
|
if(istype(L, /mob/living/carbon/human) && dna) //Ignore slime(wo)men
|
||||||
if(attacked || rabid || hungry == 2)
|
var/mob/living/carbon/human/H = L
|
||||||
Target = targets[1] // I am attacked and am fighting back or so hungry I don't even care
|
if(H.species.name == "Slime")
|
||||||
else
|
continue
|
||||||
for(var/mob/living/carbon/C in targets)
|
|
||||||
if(!Discipline && prob(5))
|
|
||||||
if(ishuman(C))
|
|
||||||
Target = C
|
|
||||||
break
|
|
||||||
|
|
||||||
if(isalien(C) || ismonkey(C))
|
if(!L.canmove) // Only one slime can latch on at a time.
|
||||||
Target = C
|
var/notarget = 0
|
||||||
break
|
for(var/mob/living/carbon/slime/M in view(1,L))
|
||||||
|
if(M.Victim == L)
|
||||||
|
notarget = 1
|
||||||
|
if(notarget)
|
||||||
|
continue
|
||||||
|
|
||||||
if (Target)
|
targets += L // Possible target found!
|
||||||
target_patience = rand(5,7)
|
|
||||||
if (is_adult)
|
|
||||||
target_patience += 3
|
|
||||||
|
|
||||||
if(!Target) // If we have no target, we are wandering or following orders
|
if(targets.len > 0)
|
||||||
if (Leader)
|
if(attacked || rabid || hungry == 2)
|
||||||
if (holding_still)
|
Target = targets[1] // I am attacked and am fighting back or so hungry I don't even care
|
||||||
holding_still = max(holding_still - 1, 0)
|
else
|
||||||
else if(canmove && isturf(loc))
|
for(var/mob/living/carbon/C in targets)
|
||||||
step_to(src, Leader)
|
if(ishuman(C) && !Discipline && prob(5))
|
||||||
|
Target = C
|
||||||
|
break
|
||||||
|
|
||||||
else if(hungry)
|
if(isalien(C) || ismonkey(C) || isanimal(C))
|
||||||
if (holding_still)
|
Target = C
|
||||||
holding_still = max(holding_still - hungry, 0)
|
break
|
||||||
else if(canmove && isturf(loc) && prob(50))
|
|
||||||
step(src, pick(cardinal))
|
if (Target)
|
||||||
|
target_patience = rand(5,7)
|
||||||
|
if (is_adult)
|
||||||
|
target_patience += 3
|
||||||
|
|
||||||
|
if(!Target) // If we have no target, we are wandering or following orders
|
||||||
|
if (Leader)
|
||||||
|
if (holding_still)
|
||||||
|
holding_still = max(holding_still - 1, 0)
|
||||||
|
else if(canmove && isturf(loc))
|
||||||
|
step_to(src, Leader)
|
||||||
|
|
||||||
|
else if(hungry)
|
||||||
|
if (holding_still)
|
||||||
|
holding_still = max(holding_still - 1 - hungry, 0)
|
||||||
|
else if(canmove && isturf(loc) && prob(50))
|
||||||
|
step(src, pick(cardinal))
|
||||||
|
|
||||||
|
else
|
||||||
|
if (holding_still)
|
||||||
|
holding_still = max(holding_still - 1, 0)
|
||||||
|
else if(canmove && isturf(loc) && prob(33))
|
||||||
|
step(src, pick(cardinal))
|
||||||
|
|
||||||
|
/mob/living/carbon/slime/proc/handle_AI() // the master AI process
|
||||||
|
|
||||||
|
if(stat == DEAD || client || Victim) return // If we're dead or have a client, we don't need AI, if we're feeding, we continue feeding
|
||||||
|
AIproc = 1
|
||||||
|
|
||||||
|
if(amount_grown >= 10 && !Target)
|
||||||
|
if(is_adult)
|
||||||
|
Reproduce()
|
||||||
|
else
|
||||||
|
Evolve()
|
||||||
|
AIproc = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
if(Target) // We're chasing the target
|
||||||
|
if(Target.stat == DEAD)
|
||||||
|
Target = null
|
||||||
|
AIproc = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
for(var/mob/living/carbon/slime/M in view(1, Target))
|
||||||
|
if(M.Victim == Target)
|
||||||
|
Target = null
|
||||||
|
AIproc = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
if(Target.Adjacent(src))
|
||||||
|
if(istype(Target, /mob/living/silicon)) // Glomp the silicons
|
||||||
|
if(!Atkcool)
|
||||||
|
a_intent = "hurt"
|
||||||
|
UnarmedAttack(Target)
|
||||||
|
Atkcool = 1
|
||||||
|
spawn(45)
|
||||||
|
Atkcool = 0
|
||||||
|
AIproc = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
if(Target.client && !Target.lying && prob(60 + powerlevel * 4)) // Try to take down the target first
|
||||||
|
if(!Atkcool)
|
||||||
|
Atkcool = 1
|
||||||
|
spawn(45)
|
||||||
|
Atkcool = 0
|
||||||
|
|
||||||
|
a_intent = "disarm"
|
||||||
|
UnarmedAttack(Target)
|
||||||
|
|
||||||
else
|
else
|
||||||
if (holding_still)
|
if(!Atkcool)
|
||||||
holding_still = max(holding_still - 1, 0)
|
a_intent = "grab"
|
||||||
else if(canmove && isturf(loc) && prob(33))
|
UnarmedAttack(Target)
|
||||||
step(src, pick(cardinal))
|
|
||||||
else if(!AIproc)
|
else if(Target in view(7, src))
|
||||||
spawn()
|
step_to(src, Target)
|
||||||
AIprocess()
|
|
||||||
|
else
|
||||||
|
Target = null
|
||||||
|
AIproc = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
else
|
||||||
|
var/mob/living/carbon/slime/frenemy
|
||||||
|
for (var/mob/living/carbon/slime/S in view(1, src))
|
||||||
|
if (S != src)
|
||||||
|
frenemy = S
|
||||||
|
if (frenemy && prob(1))
|
||||||
|
if (frenemy.colour == colour)
|
||||||
|
a_intent = "help"
|
||||||
|
else
|
||||||
|
a_intent = "hurt"
|
||||||
|
UnarmedAttack(frenemy)
|
||||||
|
|
||||||
|
var/sleeptime = movement_delay()
|
||||||
|
if(sleeptime <= 5) sleeptime = 5 // Maximum one action per half a second
|
||||||
|
spawn (sleeptime)
|
||||||
|
handle_AI()
|
||||||
|
return
|
||||||
|
|
||||||
/mob/living/carbon/slime/proc/handle_speech_and_mood()
|
/mob/living/carbon/slime/proc/handle_speech_and_mood()
|
||||||
//Mood starts here
|
//Mood starts here
|
||||||
var/newmood = ""
|
var/newmood = ""
|
||||||
if (rabid || attacked) newmood = "angry"
|
a_intent = "help"
|
||||||
|
if (rabid || attacked)
|
||||||
|
newmood = "angry"
|
||||||
|
a_intent = "hurt"
|
||||||
else if (Target) newmood = "mischevous"
|
else if (Target) newmood = "mischevous"
|
||||||
|
|
||||||
if (!newmood)
|
if (!newmood)
|
||||||
@@ -569,11 +528,13 @@
|
|||||||
if (is_adult) return 300
|
if (is_adult) return 300
|
||||||
else return 200
|
else return 200
|
||||||
|
|
||||||
/mob/living/carbon/slime/proc/will_hunt(var/hunger = -1) // Check for being stopped from feeding and chasing
|
/mob/living/carbon/slime/proc/will_hunt(var/hunger) // Check for being stopped from feeding and chasing
|
||||||
if (hunger == 2 || rabid || attacked) return 1
|
if (hunger == 2 || rabid || attacked) return 1
|
||||||
if (Leader) return 0
|
if (Leader) return 0
|
||||||
if (holding_still) return 0
|
if (holding_still) return 0
|
||||||
return 1
|
if (hunger == 1 || prob(25))
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
/mob/living/carbon/slime/slip() //Can't slip something without legs.
|
/mob/living/carbon/slime/slip() //Can't slip something without legs.
|
||||||
return 0
|
return 0
|
||||||
@@ -4,10 +4,9 @@
|
|||||||
icon_state = "grey baby slime"
|
icon_state = "grey baby slime"
|
||||||
pass_flags = PASSTABLE
|
pass_flags = PASSTABLE
|
||||||
var/is_adult = 0
|
var/is_adult = 0
|
||||||
speak_emote = list("telepathically chirps")
|
speak_emote = list("chirps")
|
||||||
|
|
||||||
layer = 5
|
layer = 5
|
||||||
|
|
||||||
maxHealth = 150
|
maxHealth = 150
|
||||||
health = 150
|
health = 150
|
||||||
gender = NEUTER
|
gender = NEUTER
|
||||||
@@ -25,7 +24,7 @@
|
|||||||
var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside
|
var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside
|
||||||
var/mutation_chance = 30 // Chance of mutating, should be between 25 and 35
|
var/mutation_chance = 30 // Chance of mutating, should be between 25 and 35
|
||||||
|
|
||||||
var/powerlevel = 0 // 1-10 controls how much electricity they are generating
|
var/powerlevel = 0 // 0-10 controls how much electricity they are generating
|
||||||
var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces
|
var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces
|
||||||
|
|
||||||
var/number = 0 // Used to understand when someone is talking to it
|
var/number = 0 // Used to understand when someone is talking to it
|
||||||
@@ -45,6 +44,11 @@
|
|||||||
|
|
||||||
var/mood = "" // To show its face
|
var/mood = "" // To show its face
|
||||||
|
|
||||||
|
var/AIproc = 0 // If it's 0, we need to launch an AI proc
|
||||||
|
var/Atkcool = 0 // attack cooldown
|
||||||
|
var/SStun = 0 // NPC stun variable. Used to calm them down when they are attacked while feeding, or they will immediately re-attach
|
||||||
|
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while. The part about freeze gun is a lie
|
||||||
|
|
||||||
///////////TIME FOR SUBSPECIES
|
///////////TIME FOR SUBSPECIES
|
||||||
|
|
||||||
var/colour = "grey"
|
var/colour = "grey"
|
||||||
@@ -53,28 +57,21 @@
|
|||||||
|
|
||||||
var/core_removal_stage = 0 //For removing cores.
|
var/core_removal_stage = 0 //For removing cores.
|
||||||
|
|
||||||
/mob/living/carbon/slime/New()
|
/mob/living/carbon/slime/New(var/location, var/colour="grey")
|
||||||
|
|
||||||
verbs += /mob/living/proc/ventcrawl
|
verbs += /mob/living/proc/ventcrawl
|
||||||
|
|
||||||
create_reagents(100)
|
create_reagents(100)
|
||||||
spawn (0)
|
|
||||||
number = rand(1, 1000)
|
|
||||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
|
||||||
icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
|
|
||||||
real_name = name
|
|
||||||
slime_mutation = mutation_table(colour)
|
|
||||||
mutation_chance = rand(25, 35)
|
|
||||||
var/sanitizedcolour = replacetext(colour, " ", "")
|
|
||||||
coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
|
|
||||||
..()
|
|
||||||
|
|
||||||
/mob/living/carbon/slime/regenerate_icons()
|
src.colour = colour
|
||||||
icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
|
number = rand(1, 1000)
|
||||||
overlays.len = 0
|
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||||
if (mood)
|
real_name = name
|
||||||
overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
|
slime_mutation = mutation_table(colour)
|
||||||
..()
|
mutation_chance = rand(25, 35)
|
||||||
|
var/sanitizedcolour = replacetext(colour, " ", "")
|
||||||
|
coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
|
||||||
|
..(location)
|
||||||
|
|
||||||
/mob/living/carbon/slime/movement_delay()
|
/mob/living/carbon/slime/movement_delay()
|
||||||
if (bodytemperature >= 330.23) // 135 F
|
if (bodytemperature >= 330.23) // 135 F
|
||||||
@@ -82,8 +79,8 @@
|
|||||||
|
|
||||||
var/tally = 0
|
var/tally = 0
|
||||||
|
|
||||||
var/health_deficiency = (100 - health)
|
var/health_deficiency = (maxHealth - health)
|
||||||
if(health_deficiency >= 45) tally += (health_deficiency / 25)
|
if(health_deficiency >= 30) tally += (health_deficiency / 25)
|
||||||
|
|
||||||
if (bodytemperature < 183.222)
|
if (bodytemperature < 183.222)
|
||||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
tally += (283.222 - bodytemperature) / 10 * 1.75
|
||||||
@@ -105,25 +102,23 @@
|
|||||||
return
|
return
|
||||||
now_pushing = 1
|
now_pushing = 1
|
||||||
|
|
||||||
if(isobj(AM))
|
if(isobj(AM) && !client && powerlevel > 0)
|
||||||
if(!client && powerlevel > 0)
|
var/probab = 10
|
||||||
var/probab = 10
|
switch(powerlevel)
|
||||||
switch(powerlevel)
|
if(1 to 2) probab = 20
|
||||||
if(1 to 2) probab = 20
|
if(3 to 4) probab = 30
|
||||||
if(3 to 4) probab = 30
|
if(5 to 6) probab = 40
|
||||||
if(5 to 6) probab = 40
|
if(7 to 8) probab = 60
|
||||||
if(7 to 8) probab = 60
|
if(9) probab = 70
|
||||||
if(9) probab = 70
|
if(10) probab = 95
|
||||||
if(10) probab = 95
|
if(prob(probab))
|
||||||
if(prob(probab))
|
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
|
||||||
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
|
if(nutrition <= get_hunger_nutrition() && !Atkcool)
|
||||||
if(nutrition <= get_hunger_nutrition() && !Atkcool)
|
if (is_adult || prob(5))
|
||||||
if (is_adult || prob(5))
|
UnarmedAttack(AM)
|
||||||
UnarmedAttack(AM)
|
Atkcool = 1
|
||||||
spawn()
|
spawn(45)
|
||||||
Atkcool = 1
|
Atkcool = 0
|
||||||
sleep(45)
|
|
||||||
Atkcool = 0
|
|
||||||
|
|
||||||
if(ismob(AM))
|
if(ismob(AM))
|
||||||
var/mob/tmob = AM
|
var/mob/tmob = AM
|
||||||
@@ -139,21 +134,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
now_pushing = 0
|
now_pushing = 0
|
||||||
|
|
||||||
..()
|
..()
|
||||||
if (!istype(AM, /atom/movable))
|
|
||||||
return
|
|
||||||
if (!( now_pushing ))
|
|
||||||
now_pushing = 1
|
|
||||||
if (!( AM.anchored ))
|
|
||||||
var/t = get_dir(src, AM)
|
|
||||||
if (istype(AM, /obj/structure/window))
|
|
||||||
var/obj/structure/window/W = AM
|
|
||||||
if(W.is_full_window())
|
|
||||||
for(var/obj/structure/window/win in get_step(AM,t))
|
|
||||||
now_pushing = 0
|
|
||||||
return
|
|
||||||
step(AM, t)
|
|
||||||
now_pushing = null
|
|
||||||
|
|
||||||
/mob/living/carbon/slime/Process_Spacemove()
|
/mob/living/carbon/slime/Process_Spacemove()
|
||||||
return 2
|
return 2
|
||||||
@@ -162,10 +144,8 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
statpanel("Status")
|
statpanel("Status")
|
||||||
if(is_adult)
|
stat(null, "Health: [round((health / maxHealth) * 100)]%")
|
||||||
stat(null, "Health: [round((health / 200) * 100)]%")
|
stat(null, "Intent: [a_intent]")
|
||||||
else
|
|
||||||
stat(null, "Health: [round((health / 150) * 100)]%")
|
|
||||||
|
|
||||||
if (client.statpanel == "Status")
|
if (client.statpanel == "Status")
|
||||||
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
|
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
|
||||||
@@ -227,9 +207,7 @@
|
|||||||
if(shielded)
|
if(shielded)
|
||||||
damage /= 4
|
damage /= 4
|
||||||
|
|
||||||
//paralysis += 1
|
show_message("<span class='danger'> The blob attacks you!</span>")
|
||||||
|
|
||||||
show_message("<span class='userdanger'> The blob attacks you!</span>")
|
|
||||||
|
|
||||||
adjustFireLoss(damage)
|
adjustFireLoss(damage)
|
||||||
|
|
||||||
@@ -244,14 +222,12 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/carbon/slime/meteorhit(O as obj)
|
/mob/living/carbon/slime/meteorhit(O as obj)
|
||||||
for(var/mob/M in viewers(src, null))
|
visible_message("<span class='warning'>[src] has been hit by [O]</span>")
|
||||||
if ((M.client && !( M.blinded )))
|
|
||||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
|
||||||
if (health > 0)
|
|
||||||
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
|
||||||
adjustFireLoss(30)
|
|
||||||
|
|
||||||
updatehealth()
|
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
||||||
|
adjustFireLoss(30)
|
||||||
|
|
||||||
|
updatehealth()
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
|
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
|
||||||
@@ -271,11 +247,9 @@
|
|||||||
if(prob(90) && !client)
|
if(prob(90) && !client)
|
||||||
Discipline++
|
Discipline++
|
||||||
|
|
||||||
spawn()
|
SStun = 1
|
||||||
SStun = 1
|
spawn(rand(45,60))
|
||||||
sleep(rand(45,60))
|
SStun = 0
|
||||||
if(src)
|
|
||||||
SStun = 0
|
|
||||||
|
|
||||||
Victim = null
|
Victim = null
|
||||||
anchored = 0
|
anchored = 0
|
||||||
@@ -299,11 +273,9 @@
|
|||||||
if(Discipline == 1)
|
if(Discipline == 1)
|
||||||
attacked = 0
|
attacked = 0
|
||||||
|
|
||||||
spawn()
|
SStun = 1
|
||||||
SStun = 1
|
spawn(rand(55,65))
|
||||||
sleep(rand(55,65))
|
SStun = 0
|
||||||
if(src)
|
|
||||||
SStun = 0
|
|
||||||
|
|
||||||
Victim = null
|
Victim = null
|
||||||
anchored = 0
|
anchored = 0
|
||||||
@@ -345,15 +317,13 @@
|
|||||||
if(prob(80) && !client)
|
if(prob(80) && !client)
|
||||||
Discipline++
|
Discipline++
|
||||||
spawn(0)
|
spawn(0)
|
||||||
|
|
||||||
step_away(src,M,15)
|
step_away(src,M,15)
|
||||||
sleep(3)
|
sleep(3)
|
||||||
step_away(src,M,15)
|
step_away(src,M,15)
|
||||||
|
|
||||||
|
|
||||||
playsound(loc, "punch", 25, 1, -1)
|
playsound(loc, "punch", 25, 1, -1)
|
||||||
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
|
||||||
"<span class='userdanger'>[M] has punched [src]!</span>")
|
"<span class='danger'>[M] has punched [src]!</span>")
|
||||||
|
|
||||||
adjustBruteLoss(damage)
|
adjustBruteLoss(damage)
|
||||||
updatehealth()
|
updatehealth()
|
||||||
@@ -381,9 +351,8 @@
|
|||||||
Target = null
|
Target = null
|
||||||
anchored = 0
|
anchored = 0
|
||||||
|
|
||||||
spawn()
|
SStun = 1
|
||||||
SStun = 1
|
spawn(rand(5,20))
|
||||||
sleep(rand(5,20))
|
|
||||||
SStun = 0
|
SStun = 0
|
||||||
|
|
||||||
spawn(0)
|
spawn(0)
|
||||||
@@ -403,9 +372,8 @@
|
|||||||
Discipline++
|
Discipline++
|
||||||
if(Discipline == 1)
|
if(Discipline == 1)
|
||||||
attacked = 0
|
attacked = 0
|
||||||
spawn()
|
SStun = 1
|
||||||
SStun = 1
|
spawn(rand(5,20))
|
||||||
sleep(rand(5,20))
|
|
||||||
SStun = 0
|
SStun = 0
|
||||||
|
|
||||||
Victim = null
|
Victim = null
|
||||||
@@ -426,8 +394,8 @@
|
|||||||
/mob/living/carbon/slime/restrained()
|
/mob/living/carbon/slime/restrained()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
mob/living/carbon/slime/var/co2overloadtime = null
|
/mob/living/carbon/slime/var/co2overloadtime = null
|
||||||
mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
/mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||||
|
|
||||||
/mob/living/carbon/slime/show_inv(mob/user)
|
/mob/living/carbon/slime/show_inv(mob/user)
|
||||||
return
|
return
|
||||||
@@ -435,8 +403,17 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
|||||||
/mob/living/carbon/slime/toggle_throw_mode()
|
/mob/living/carbon/slime/toggle_throw_mode()
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/carbon/slime/proc/apply_water()
|
/mob/living/carbon/slime/proc/gain_nutrition(var/amount)
|
||||||
adjustToxLoss(rand(15,20))
|
nutrition += amount
|
||||||
|
if(prob(amount * 2)) // Gain around one level per 50 nutrition
|
||||||
|
powerlevel++
|
||||||
|
if(powerlevel > 10)
|
||||||
|
powerlevel = 10
|
||||||
|
adjustToxLoss(-10)
|
||||||
|
nutrition = max(nutrition, get_max_nutrition())
|
||||||
|
|
||||||
|
/mob/living/carbon/slime/proc/apply_water(var/amount)
|
||||||
|
adjustToxLoss(15 + amount)
|
||||||
if (!client)
|
if (!client)
|
||||||
if (Target) // Like cats
|
if (Target) // Like cats
|
||||||
Target = null
|
Target = null
|
||||||
@@ -446,371 +423,4 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
|||||||
/mob/living/carbon/slime/can_use_vents()
|
/mob/living/carbon/slime/can_use_vents()
|
||||||
if(Victim)
|
if(Victim)
|
||||||
return "You cannot ventcrawl while feeding."
|
return "You cannot ventcrawl while feeding."
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/slime_extract
|
|
||||||
name = "slime extract"
|
|
||||||
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
|
|
||||||
icon = 'icons/mob/slimes.dmi'
|
|
||||||
icon_state = "grey slime extract"
|
|
||||||
force = 1.0
|
|
||||||
w_class = 1.0
|
|
||||||
throwforce = 0
|
|
||||||
throw_speed = 3
|
|
||||||
throw_range = 6
|
|
||||||
origin_tech = "biotech=4"
|
|
||||||
var/Uses = 1 // uses before it goes inert
|
|
||||||
var/enhanced = 0 //has it been enhanced before?
|
|
||||||
|
|
||||||
attackby(obj/item/O as obj, mob/user as mob)
|
|
||||||
if(istype(O, /obj/item/weapon/slimesteroid2))
|
|
||||||
if(enhanced == 1)
|
|
||||||
user << "<span class='warning'> This extract has already been enhanced!</span>"
|
|
||||||
return ..()
|
|
||||||
if(Uses == 0)
|
|
||||||
user << "<span class='warning'> You can't enhance a used extract!</span>"
|
|
||||||
return ..()
|
|
||||||
user <<"You apply the enhancer. It now has triple the amount of uses."
|
|
||||||
Uses = 3
|
|
||||||
enhanced = 1
|
|
||||||
del(O)
|
|
||||||
|
|
||||||
/obj/item/slime_extract/New()
|
|
||||||
..()
|
|
||||||
create_reagents(100)
|
|
||||||
|
|
||||||
/obj/item/slime_extract/grey
|
|
||||||
name = "grey slime extract"
|
|
||||||
icon_state = "grey slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/gold
|
|
||||||
name = "gold slime extract"
|
|
||||||
icon_state = "gold slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/silver
|
|
||||||
name = "silver slime extract"
|
|
||||||
icon_state = "silver slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/metal
|
|
||||||
name = "metal slime extract"
|
|
||||||
icon_state = "metal slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/purple
|
|
||||||
name = "purple slime extract"
|
|
||||||
icon_state = "purple slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/darkpurple
|
|
||||||
name = "dark purple slime extract"
|
|
||||||
icon_state = "dark purple slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/orange
|
|
||||||
name = "orange slime extract"
|
|
||||||
icon_state = "orange slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/yellow
|
|
||||||
name = "yellow slime extract"
|
|
||||||
icon_state = "yellow slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/red
|
|
||||||
name = "red slime extract"
|
|
||||||
icon_state = "red slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/blue
|
|
||||||
name = "blue slime extract"
|
|
||||||
icon_state = "blue slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/darkblue
|
|
||||||
name = "dark blue slime extract"
|
|
||||||
icon_state = "dark blue slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/pink
|
|
||||||
name = "pink slime extract"
|
|
||||||
icon_state = "pink slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/green
|
|
||||||
name = "green slime extract"
|
|
||||||
icon_state = "green slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/lightpink
|
|
||||||
name = "light pink slime extract"
|
|
||||||
icon_state = "light pink slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/black
|
|
||||||
name = "black slime extract"
|
|
||||||
icon_state = "black slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/oil
|
|
||||||
name = "oil slime extract"
|
|
||||||
icon_state = "oil slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/adamantine
|
|
||||||
name = "adamantine slime extract"
|
|
||||||
icon_state = "adamantine slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/bluespace
|
|
||||||
name = "bluespace slime extract"
|
|
||||||
icon_state = "bluespace slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/pyrite
|
|
||||||
name = "pyrite slime extract"
|
|
||||||
icon_state = "pyrite slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/cerulean
|
|
||||||
name = "cerulean slime extract"
|
|
||||||
icon_state = "cerulean slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/sepia
|
|
||||||
name = "sepia slime extract"
|
|
||||||
icon_state = "sepia slime extract"
|
|
||||||
|
|
||||||
/obj/item/slime_extract/rainbow
|
|
||||||
name = "rainbow slime extract"
|
|
||||||
icon_state = "rainbow slime extract"
|
|
||||||
|
|
||||||
////Pet Slime Creation///
|
|
||||||
|
|
||||||
/obj/item/weapon/slimepotion
|
|
||||||
name = "docility potion"
|
|
||||||
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame."
|
|
||||||
icon = 'icons/obj/chemical.dmi'
|
|
||||||
icon_state = "bottle19"
|
|
||||||
|
|
||||||
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
|
||||||
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
|
|
||||||
user << "<span class='warning'> The potion only works on baby slimes!</span>"
|
|
||||||
return ..()
|
|
||||||
if(M.is_adult) //Can't tame adults
|
|
||||||
user << "<span class='warning'> Only baby slimes can be tamed!</span>"
|
|
||||||
return..()
|
|
||||||
if(M.stat)
|
|
||||||
user << "<span class='warning'> The slime is dead!</span>"
|
|
||||||
return..()
|
|
||||||
if(M.mind)
|
|
||||||
user << "<span class='warning'> The slime resists!</span>"
|
|
||||||
return ..()
|
|
||||||
var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
|
|
||||||
pet.icon_state = "[M.colour] baby slime"
|
|
||||||
pet.icon_living = "[M.colour] baby slime"
|
|
||||||
pet.icon_dead = "[M.colour] baby slime dead"
|
|
||||||
pet.colour = "[M.colour]"
|
|
||||||
user <<"You feed the slime the potion, removing it's powers and calming it."
|
|
||||||
del(M)
|
|
||||||
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
|
||||||
|
|
||||||
if (!newname)
|
|
||||||
newname = "pet slime"
|
|
||||||
pet.name = newname
|
|
||||||
pet.real_name = newname
|
|
||||||
del(src)
|
|
||||||
|
|
||||||
/obj/item/weapon/slimepotion2
|
|
||||||
name = "advanced docility potion"
|
|
||||||
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame. This one is meant for adult slimes"
|
|
||||||
icon = 'icons/obj/chemical.dmi'
|
|
||||||
icon_state = "bottle19"
|
|
||||||
|
|
||||||
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
|
||||||
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
|
|
||||||
user << "<span class='warning'> The potion only works on slimes!</span>"
|
|
||||||
return ..()
|
|
||||||
if(M.stat)
|
|
||||||
user << "<span class='warning'> The slime is dead!</span>"
|
|
||||||
return..()
|
|
||||||
if(M.mind)
|
|
||||||
user << "<span class='warning'> The slime resists!</span>"
|
|
||||||
return ..()
|
|
||||||
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
|
|
||||||
pet.icon_state = "[M.colour] adult slime"
|
|
||||||
pet.icon_living = "[M.colour] adult slime"
|
|
||||||
pet.icon_dead = "[M.colour] baby slime dead"
|
|
||||||
pet.colour = "[M.colour]"
|
|
||||||
user <<"You feed the slime the potion, removing it's powers and calming it."
|
|
||||||
del(M)
|
|
||||||
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
|
||||||
|
|
||||||
if (!newname)
|
|
||||||
newname = "pet slime"
|
|
||||||
pet.name = newname
|
|
||||||
pet.real_name = newname
|
|
||||||
del(src)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/slimesteroid
|
|
||||||
name = "slime steroid"
|
|
||||||
desc = "A potent chemical mix that will cause a slime to generate more extract."
|
|
||||||
icon = 'icons/obj/chemical.dmi'
|
|
||||||
icon_state = "bottle16"
|
|
||||||
|
|
||||||
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
|
||||||
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
|
|
||||||
user << "<span class='warning'> The steroid only works on baby slimes!</span>"
|
|
||||||
return ..()
|
|
||||||
if(M.is_adult) //Can't tame adults
|
|
||||||
user << "<span class='warning'> Only baby slimes can use the steroid!</span>"
|
|
||||||
return..()
|
|
||||||
if(M.stat)
|
|
||||||
user << "<span class='warning'> The slime is dead!</span>"
|
|
||||||
return..()
|
|
||||||
if(M.cores == 3)
|
|
||||||
user <<"<span class='warning'> The slime already has the maximum amount of extract!</span>"
|
|
||||||
return..()
|
|
||||||
|
|
||||||
user <<"You feed the slime the steroid. It now has triple the amount of extract."
|
|
||||||
M.cores = 3
|
|
||||||
del(src)
|
|
||||||
|
|
||||||
/obj/item/weapon/slimesteroid2
|
|
||||||
name = "extract enhancer"
|
|
||||||
desc = "A potent chemical mix that will give a slime extract three uses."
|
|
||||||
icon = 'icons/obj/chemical.dmi'
|
|
||||||
icon_state = "bottle17"
|
|
||||||
|
|
||||||
/*afterattack(obj/target, mob/user , flag)
|
|
||||||
if(istype(target, /obj/item/slime_extract))
|
|
||||||
if(target.enhanced == 1)
|
|
||||||
user << "<span class='warning'> This extract has already been enhanced!</span>"
|
|
||||||
return ..()
|
|
||||||
if(target.Uses == 0)
|
|
||||||
user << "<span class='warning'> You can't enhance a used extract!</span>"
|
|
||||||
return ..()
|
|
||||||
user <<"You apply the enhancer. It now has triple the amount of uses."
|
|
||||||
target.Uses = 3
|
|
||||||
target.enahnced = 1
|
|
||||||
del(src)*/
|
|
||||||
|
|
||||||
/obj/effect/golemrune
|
|
||||||
anchored = 1
|
|
||||||
desc = "a strange rune used to create golems. It glows when spirits are nearby."
|
|
||||||
name = "rune"
|
|
||||||
icon = 'icons/obj/rune.dmi'
|
|
||||||
icon_state = "golem"
|
|
||||||
unacidable = 1
|
|
||||||
layer = TURF_LAYER
|
|
||||||
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
processing_objects.Add(src)
|
|
||||||
|
|
||||||
process()
|
|
||||||
var/mob/dead/observer/ghost
|
|
||||||
for(var/mob/dead/observer/O in src.loc)
|
|
||||||
if(!O.client) continue
|
|
||||||
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
|
|
||||||
ghost = O
|
|
||||||
break
|
|
||||||
if(ghost)
|
|
||||||
icon_state = "golem2"
|
|
||||||
else
|
|
||||||
icon_state = "golem"
|
|
||||||
|
|
||||||
attack_hand(mob/living/user as mob)
|
|
||||||
var/mob/dead/observer/ghost
|
|
||||||
for(var/mob/dead/observer/O in src.loc)
|
|
||||||
if(!O.client) continue
|
|
||||||
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
|
|
||||||
ghost = O
|
|
||||||
break
|
|
||||||
if(!ghost)
|
|
||||||
user << "The rune fizzles uselessly. There is no spirit nearby."
|
|
||||||
return
|
|
||||||
var/mob/living/carbon/human/G = new(src.loc)
|
|
||||||
G.set_species("Golem")
|
|
||||||
G.key = ghost.key
|
|
||||||
G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
|
|
||||||
del (src)
|
|
||||||
|
|
||||||
|
|
||||||
proc/announce_to_ghosts()
|
|
||||||
for(var/mob/dead/observer/G in player_list)
|
|
||||||
if(G.client)
|
|
||||||
var/area/A = get_area(src)
|
|
||||||
if(A)
|
|
||||||
G << "Golem rune created in [A.name]."
|
|
||||||
|
|
||||||
/mob/living/carbon/slime/has_eyes()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
|
|
||||||
|
|
||||||
/*
|
|
||||||
// Basically this slime Core catalyzes reactions that normally wouldn't happen anywhere
|
|
||||||
/obj/item/slime_core
|
|
||||||
name = "slime extract"
|
|
||||||
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
|
|
||||||
icon = 'icons/mob/slimes.dmi'
|
|
||||||
icon_state = "slime extract"
|
|
||||||
force = 1.0
|
|
||||||
w_class = 1.0
|
|
||||||
throwforce = 1.0
|
|
||||||
throw_speed = 2
|
|
||||||
throw_range = 6
|
|
||||||
origin_tech = "biotech=4"
|
|
||||||
var/POWERFLAG = 0 // sshhhhhhh
|
|
||||||
var/Flush = 30
|
|
||||||
var/Uses = 5 // uses before it goes inert
|
|
||||||
|
|
||||||
/obj/item/slime_core/New()
|
|
||||||
..()
|
|
||||||
create_reagents(100)
|
|
||||||
POWERFLAG = rand(1,10)
|
|
||||||
Uses = rand(7, 25)
|
|
||||||
//flags |= NOREACT
|
|
||||||
/*
|
|
||||||
spawn()
|
|
||||||
Life()
|
|
||||||
|
|
||||||
proc/Life()
|
|
||||||
while(src)
|
|
||||||
sleep(25)
|
|
||||||
Flush--
|
|
||||||
if(Flush <= 0)
|
|
||||||
reagents.clear_reagents()
|
|
||||||
Flush = 30
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime
|
|
||||||
name = "slime egg"
|
|
||||||
desc = "A small, gelatinous egg."
|
|
||||||
icon = 'icons/mob/mob.dmi'
|
|
||||||
icon_state = "slime egg-growing"
|
|
||||||
bitesize = 12
|
|
||||||
origin_tech = "biotech=4"
|
|
||||||
var/grown = 0
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New()
|
|
||||||
..()
|
|
||||||
reagents.add_reagent("nutriment", 4)
|
|
||||||
reagents.add_reagent("slimejelly", 1)
|
|
||||||
spawn(rand(1200,1500))//the egg takes a while to "ripen"
|
|
||||||
Grow()
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Grow()
|
|
||||||
grown = 1
|
|
||||||
icon_state = "slime egg-grown"
|
|
||||||
processing_objects.Add(src)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch()
|
|
||||||
processing_objects.Remove(src)
|
|
||||||
var/turf/T = get_turf(src)
|
|
||||||
src.visible_message("<span class='warning'> The [name] pulsates and quivers!</span>")
|
|
||||||
spawn(rand(50,100))
|
|
||||||
src.visible_message("<span class='warning'> The [name] bursts open!</span>")
|
|
||||||
new/mob/living/carbon/slime(T)
|
|
||||||
del(src)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/process()
|
|
||||||
var/turf/location = get_turf(src)
|
|
||||||
var/datum/gas_mixture/environment = location.return_air()
|
|
||||||
if (environment.phoron > MOLES_PHORON_VISIBLE)//phoron exposure causes the egg to hatch
|
|
||||||
src.Hatch()
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
||||||
if(istype( W, /obj/item/toy/crayon ))
|
|
||||||
return
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
*/
|
|
||||||
@@ -1,75 +1,46 @@
|
|||||||
/mob/living/carbon/slime/verb/Feed()
|
/mob/living/carbon/slime/proc/Wrap(var/mob/living/M) // This is a proc for the clicks
|
||||||
set category = "Slime"
|
if (Victim == M || src == M)
|
||||||
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
|
|
||||||
if(Victim)
|
|
||||||
Feedstop()
|
Feedstop()
|
||||||
return
|
return
|
||||||
|
|
||||||
if(stat)
|
if (Victim)
|
||||||
src << "<i>I must be conscious to do this...</i>"
|
src << "I am already feeding..."
|
||||||
return
|
return
|
||||||
|
|
||||||
var/list/choices = list()
|
var t = invalidFeedTarget(M)
|
||||||
for(var/mob/living/C in view(1,src))
|
if (t)
|
||||||
if(C!=src && !istype(C,/mob/living/carbon/slime) && Adjacent(C))
|
src << t
|
||||||
choices += C
|
return
|
||||||
|
|
||||||
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
|
|
||||||
if(!M) return
|
|
||||||
if(Adjacent(M))
|
|
||||||
|
|
||||||
if(!istype(src, /mob/living/carbon/brain))
|
|
||||||
if(!istype(M, /mob/living/carbon/slime))
|
|
||||||
if(stat != 2)
|
|
||||||
if(health > -70)
|
|
||||||
|
|
||||||
for(var/mob/living/carbon/slime/met in view())
|
|
||||||
if(met.Victim == M && met != src)
|
|
||||||
src << "<i>The [met.name] is already feeding on this subject...</i>"
|
|
||||||
return
|
|
||||||
src << "\blue <i>I have latched onto the subject and begun feeding...</i>"
|
|
||||||
M << "\red <b>The [src.name] has latched onto your head!</b>"
|
|
||||||
Feedon(M)
|
|
||||||
|
|
||||||
else
|
|
||||||
src << "<i>This subject does not have a strong enough life energy...</i>"
|
|
||||||
else
|
|
||||||
src << "<i>This subject does not have an edible life energy...</i>"
|
|
||||||
else
|
|
||||||
src << "<i>I must not feed on my brothers...</i>"
|
|
||||||
else
|
|
||||||
src << "<i>This subject does not have an edible life energy...</i>"
|
|
||||||
|
|
||||||
|
Feedon(M)
|
||||||
|
|
||||||
|
/mob/living/carbon/slime/proc/invalidFeedTarget(var/mob/living/M)
|
||||||
|
if (!M || !istype(M))
|
||||||
|
return "This subject is incomparable..."
|
||||||
|
if (istype(M, /mob/living/carbon/slime)) // No cannibalism... yet
|
||||||
|
return "I cannot feed on other slimes..."
|
||||||
|
if (!Adjacent(M))
|
||||||
|
return "This subject is too far away..."
|
||||||
|
if (istype(M, /mob/living/carbon) && M.getCloneLoss() > 150 || istype(M, /mob/living/simple_animal) && M.stat == DEAD)
|
||||||
|
return "This subject does not have an edible life energy..."
|
||||||
|
for(var/mob/living/carbon/slime/met in view())
|
||||||
|
if(met.Victim == M && met != src)
|
||||||
|
return "The [met.name] is already feeding on this subject..."
|
||||||
|
return 0
|
||||||
|
|
||||||
/mob/living/carbon/slime/proc/Feedon(var/mob/living/M)
|
/mob/living/carbon/slime/proc/Feedon(var/mob/living/M)
|
||||||
Victim = M
|
Victim = M
|
||||||
src.loc = M.loc
|
loc = M.loc
|
||||||
canmove = 0
|
canmove = 0
|
||||||
anchored = 1
|
anchored = 1
|
||||||
var/lastnut = nutrition
|
|
||||||
var/fed_succesfully = 0
|
|
||||||
if(is_adult)
|
|
||||||
icon_state = "[colour] adult slime eat"
|
|
||||||
else
|
|
||||||
icon_state = "[colour] baby slime eat"
|
|
||||||
|
|
||||||
while(Victim && M.health > -70 && stat != 2)
|
regenerate_icons()
|
||||||
|
|
||||||
|
while(Victim && !invalidFeedTarget(M) && stat != 2)
|
||||||
canmove = 0
|
canmove = 0
|
||||||
|
|
||||||
if(Adjacent(M))
|
if(Adjacent(M))
|
||||||
loc = M.loc
|
UpdateFeed(M)
|
||||||
|
|
||||||
if(prob(15) && M.client && istype(M, /mob/living/carbon))
|
|
||||||
var/mob/living/carbon/C = M
|
|
||||||
if (!(C.species && (C.species.flags & NO_PAIN)))
|
|
||||||
M << "<span class='danger'>[pick("You can feel your body becoming weak!", \
|
|
||||||
"You feel like you're about to die!", \
|
|
||||||
"You feel every part of your body screaming in agony!", \
|
|
||||||
"A low, rolling pain passes through your body!", \
|
|
||||||
"Your body feels as if it's falling apart!", \
|
|
||||||
"You feel extremely weak!", \
|
|
||||||
"A sharp, deep pain bathes every inch of your body!")]</span>"
|
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon))
|
if(istype(M, /mob/living/carbon))
|
||||||
Victim.adjustCloneLoss(rand(5,6))
|
Victim.adjustCloneLoss(rand(5,6))
|
||||||
@@ -77,83 +48,51 @@
|
|||||||
if(Victim.health <= 0)
|
if(Victim.health <= 0)
|
||||||
Victim.adjustToxLoss(rand(2,4))
|
Victim.adjustToxLoss(rand(2,4))
|
||||||
|
|
||||||
fed_succesfully = 1
|
|
||||||
|
|
||||||
else if(istype(M, /mob/living/simple_animal))
|
else if(istype(M, /mob/living/simple_animal))
|
||||||
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
|
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
|
||||||
fed_succesfully = 1
|
|
||||||
|
|
||||||
else
|
else
|
||||||
if(prob(25))
|
src << "<span class='warning'>[pick("This subject is incompatable", "This subject does not have a life energy", "This subject is empty", "I am not satisified", "I can not feed from this subject", "I do not feel nourished", "This subject is not food")]...</span>"
|
||||||
src << "<span class='warning'>[pick("This subject is incompatable", \
|
Feedstop()
|
||||||
"This subject does not have a life energy", "This subject is empty", \
|
break
|
||||||
"I am not satisified", "I can not feed from this subject", \
|
|
||||||
"I do not feel nourished", "This subject is not food")]...</span>"
|
|
||||||
|
|
||||||
if(fed_succesfully)
|
if(prob(15) && M.client && istype(M, /mob/living/carbon))
|
||||||
//I have no idea why this is not in handle_nutrition()
|
var/painMes = pick("You can feel your body becoming weak!", "You feel like you're about to die!", "You feel every part of your body screaming in agony!", "A low, rolling pain passes through your body!", "Your body feels as if it's falling apart!", "You feel extremely weak!", "A sharp, deep pain bathes every inch of your body!")
|
||||||
nutrition += rand(15,30)
|
if (ishuman(M))
|
||||||
if(nutrition >= lastnut + 50)
|
var/mob/living/carbon/human/H = M
|
||||||
if(prob(80))
|
H.custom_pain(painMes)
|
||||||
lastnut = nutrition
|
else if (istype(M, /mob/living/carbon))
|
||||||
powerlevel++
|
var/mob/living/carbon/C = M
|
||||||
if(powerlevel > 10)
|
if (!(C.species && (C.species.flags & NO_PAIN)))
|
||||||
powerlevel = 10
|
M << "<span class='danger'>[painMes]</span>"
|
||||||
adjustToxLoss(-10)
|
|
||||||
|
|
||||||
//Heal yourself.
|
gain_nutrition(rand(20,25))
|
||||||
adjustOxyLoss(-10)
|
|
||||||
adjustBruteLoss(-10)
|
|
||||||
adjustFireLoss(-10)
|
|
||||||
adjustCloneLoss(-10)
|
|
||||||
|
|
||||||
updatehealth()
|
adjustOxyLoss(-10) //Heal yourself
|
||||||
if(Victim)
|
adjustBruteLoss(-10)
|
||||||
Victim.updatehealth()
|
adjustFireLoss(-10)
|
||||||
|
adjustCloneLoss(-10)
|
||||||
sleep(rand(15,45))
|
updatehealth()
|
||||||
|
if(Victim)
|
||||||
|
Victim.updatehealth()
|
||||||
|
|
||||||
|
sleep(30) // Deal damage every 3 seconds
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
|
|
||||||
if(stat == 2)
|
|
||||||
if(!is_adult)
|
|
||||||
icon_state = "[colour] baby slime dead"
|
|
||||||
|
|
||||||
else
|
|
||||||
if(is_adult)
|
|
||||||
icon_state = "[colour] adult slime"
|
|
||||||
else
|
|
||||||
icon_state = "[colour] baby slime"
|
|
||||||
|
|
||||||
canmove = 1
|
canmove = 1
|
||||||
anchored = 0
|
anchored = 0
|
||||||
|
|
||||||
if(M)
|
if(M && invalidFeedTarget(M)) // This means that the slime drained the victim
|
||||||
if(M.health <= -70)
|
if(!client)
|
||||||
M.canmove = 0
|
if(Victim && !rabid && !attacked && Victim.LAssailant && Victim.LAssailant != Victim && prob(50))
|
||||||
if(!client)
|
if(!(Victim.LAssailant in Friends))
|
||||||
if(Victim && !rabid && !attacked)
|
Friends[Victim.LAssailant] = 1
|
||||||
if(Victim.LAssailant && Victim.LAssailant != Victim)
|
else
|
||||||
if(prob(50))
|
++Friends[Victim.LAssailant]
|
||||||
if(!(Victim.LAssailant in Friends))
|
|
||||||
Friends[Victim.LAssailant] = 1
|
|
||||||
//Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
|
|
||||||
else
|
|
||||||
++Friends[Victim.LAssailant]
|
|
||||||
|
|
||||||
|
|
||||||
if(M.client && istype(src, /mob/living/carbon/human))
|
|
||||||
if(prob(85))
|
|
||||||
rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
|
|
||||||
|
|
||||||
if(client) src << "<i>This subject does not have a strong enough life energy anymore...</i>"
|
|
||||||
else
|
else
|
||||||
M.canmove = 1
|
src << "<span class='notice'>This subject does not have a strong enough life energy anymore...</span>"
|
||||||
|
|
||||||
if(client) src << "<i>I have stopped feeding...</i>"
|
|
||||||
else
|
|
||||||
if(client) src << "<i>I have stopped feeding...</i>"
|
|
||||||
|
|
||||||
Victim = null
|
Victim = null
|
||||||
|
|
||||||
@@ -167,14 +106,14 @@
|
|||||||
if(Victim == M)
|
if(Victim == M)
|
||||||
loc = M.loc // simple "attach to head" effect!
|
loc = M.loc // simple "attach to head" effect!
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/slime/verb/Evolve()
|
/mob/living/carbon/slime/verb/Evolve()
|
||||||
set category = "Slime"
|
set category = "Slime"
|
||||||
set desc = "This will let you evolve from baby to adult slime."
|
set desc = "This will let you evolve from baby to adult slime."
|
||||||
|
|
||||||
if(stat)
|
if(stat)
|
||||||
src << "<i>I must be conscious to do this...</i>"
|
src << "<span class='notice'>I must be conscious to do this...</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!is_adult)
|
if(!is_adult)
|
||||||
if(amount_grown >= 10)
|
if(amount_grown >= 10)
|
||||||
is_adult = 1
|
is_adult = 1
|
||||||
@@ -183,36 +122,35 @@
|
|||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
name = text("[colour] [is_adult ? "adult" : "baby"] slime ([number])")
|
name = text("[colour] [is_adult ? "adult" : "baby"] slime ([number])")
|
||||||
else
|
else
|
||||||
src << "<i>I am not ready to evolve yet...</i>"
|
src << "<span class='notice'>I am not ready to evolve yet...</span>"
|
||||||
else
|
else
|
||||||
src << "<i>I have already evolved...</i>"
|
src << "<span class='notice'>I have already evolved...</span>"
|
||||||
|
|
||||||
/mob/living/carbon/slime/verb/Reproduce()
|
/mob/living/carbon/slime/verb/Reproduce()
|
||||||
set category = "Slime"
|
set category = "Slime"
|
||||||
set desc = "This will make you split into four Slimes."
|
set desc = "This will make you split into four Slimes."
|
||||||
|
|
||||||
if(stat)
|
if(stat)
|
||||||
src << "<i>I must be conscious to do this...</i>"
|
src << "<span class='notice'>I must be conscious to do this...</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(is_adult)
|
if(is_adult)
|
||||||
if(amount_grown >= 10)
|
if(amount_grown >= 10)
|
||||||
if(stat)
|
if(stat)
|
||||||
src << "<i>I must be conscious to do this...</i>"
|
src << "<span class='notice'>I must be conscious to do this...</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
var/list/babies = list()
|
var/list/babies = list()
|
||||||
var/new_nutrition = round(nutrition * 0.9)
|
var/new_nutrition = round(nutrition * 0.9)
|
||||||
var/new_powerlevel = round(powerlevel / 4)
|
var/new_powerlevel = round(powerlevel / 4)
|
||||||
for(var/i=1,i<=4,i++)
|
for(var/i = 1, i <= 4, i++)
|
||||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc)
|
var/t = colour
|
||||||
if(prob(mutation_chance))
|
if(prob(mutation_chance))
|
||||||
M.colour = slime_mutation[rand(1,4)]
|
t = slime_mutation[rand(1,4)]
|
||||||
else
|
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc, t)
|
||||||
M.colour = colour
|
|
||||||
if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
|
if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
|
||||||
M.powerlevel = new_powerlevel
|
M.powerlevel = new_powerlevel
|
||||||
if(i != 1) step_away(M,src)
|
if(i != 1) step_away(M, src)
|
||||||
M.Friends = Friends.Copy()
|
M.Friends = Friends.Copy()
|
||||||
babies += M
|
babies += M
|
||||||
feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
|
feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
|
||||||
@@ -225,6 +163,6 @@
|
|||||||
new_slime.key = src.key
|
new_slime.key = src.key
|
||||||
del(src)
|
del(src)
|
||||||
else
|
else
|
||||||
src << "<i>I am not ready to reproduce yet...</i>"
|
src << "<span class='notice'>I am not ready to reproduce yet...</span>"
|
||||||
else
|
else
|
||||||
src << "<i>I am not old enough to reproduce yet...</i>"
|
src << "<span class='notice'>I am not old enough to reproduce yet...</span>"
|
||||||
@@ -10,11 +10,11 @@
|
|||||||
var/ending = copytext(text, length(text))
|
var/ending = copytext(text, length(text))
|
||||||
|
|
||||||
if (ending == "?")
|
if (ending == "?")
|
||||||
return "telepathically asks";
|
return "asks";
|
||||||
else if (ending == "!")
|
else if (ending == "!")
|
||||||
return "telepathically cries";
|
return "cries";
|
||||||
|
|
||||||
return "telepathically chirps";
|
return "chirps";
|
||||||
|
|
||||||
/mob/living/carbon/slime/say_understands(var/other)
|
/mob/living/carbon/slime/say_understands(var/other)
|
||||||
if (istype(other, /mob/living/carbon/slime))
|
if (istype(other, /mob/living/carbon/slime))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
proc/mutation_table(var/colour)
|
/mob/living/carbon/slime/proc/mutation_table(var/colour)
|
||||||
var/list/slime_mutation[4]
|
var/list/slime_mutation[4]
|
||||||
switch(colour)
|
switch(colour)
|
||||||
//Tier 1
|
//Tier 1
|
||||||
|
|||||||
@@ -1 +1,9 @@
|
|||||||
//no special icon processing
|
/mob/living/carbon/slime/regenerate_icons()
|
||||||
|
if (stat == DEAD)
|
||||||
|
icon_state = "[colour] baby slime dead"
|
||||||
|
else
|
||||||
|
icon_state = "[colour] [is_adult ? "adult" : "baby"] slime[Victim ? "" : " eat"]"
|
||||||
|
overlays.len = 0
|
||||||
|
if (mood)
|
||||||
|
overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
|
||||||
|
..()
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
signaler.signal()
|
signaler.signal()
|
||||||
|
|
||||||
//Stun Beams
|
//Stun Beams
|
||||||
if(istype(P, /obj/item/projectile/beam/stun) || istype(P, /obj/item/projectile/bullet/stunshot))
|
if(P.taser_effect)
|
||||||
stun_effect_act(0, P.agony, def_zone, P)
|
stun_effect_act(0, P.agony, def_zone, P)
|
||||||
src <<"\red You have been hit by [P]!"
|
src <<"\red You have been hit by [P]!"
|
||||||
del P
|
del P
|
||||||
|
|||||||
6
code/modules/mob/living/silicon/pai/pai.dm
Executable file → Normal file
6
code/modules/mob/living/silicon/pai/pai.dm
Executable file → Normal file
@@ -53,19 +53,23 @@
|
|||||||
var/secHUD = 0 // Toggles whether the Security HUD is active or not
|
var/secHUD = 0 // Toggles whether the Security HUD is active or not
|
||||||
var/medHUD = 0 // Toggles whether the Medical HUD is active or not
|
var/medHUD = 0 // Toggles whether the Medical HUD is active or not
|
||||||
|
|
||||||
|
var/medical_cannotfind = 0
|
||||||
var/datum/data/record/medicalActive1 // Datacore record declarations for record software
|
var/datum/data/record/medicalActive1 // Datacore record declarations for record software
|
||||||
var/datum/data/record/medicalActive2
|
var/datum/data/record/medicalActive2
|
||||||
|
|
||||||
|
var/security_cannotfind = 0
|
||||||
var/datum/data/record/securityActive1 // Could probably just combine all these into one
|
var/datum/data/record/securityActive1 // Could probably just combine all these into one
|
||||||
var/datum/data/record/securityActive2
|
var/datum/data/record/securityActive2
|
||||||
|
|
||||||
var/obj/machinery/door/hackdoor // The airlock being hacked
|
var/obj/machinery/door/hackdoor // The airlock being hacked
|
||||||
var/hackprogress = 0 // Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check
|
var/hackprogress = 0 // Possible values: 0 - 1000, >= 1000 means the hack is complete and will be reset upon next check
|
||||||
|
var/hack_aborted = 0
|
||||||
|
|
||||||
var/obj/item/radio/integrated/signal/sradio // AI's signaller
|
var/obj/item/radio/integrated/signal/sradio // AI's signaller
|
||||||
|
|
||||||
var/translator_on = 0 // keeps track of the translator module
|
var/translator_on = 0 // keeps track of the translator module
|
||||||
|
|
||||||
|
var/current_pda_messaging = null
|
||||||
|
|
||||||
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
|
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
|
||||||
|
|
||||||
|
|||||||
836
code/modules/mob/living/silicon/pai/software.dm
Executable file → Normal file
836
code/modules/mob/living/silicon/pai/software.dm
Executable file → Normal file
@@ -1,711 +1,125 @@
|
|||||||
// TODO:
|
var/list/pai_emotions = list(
|
||||||
// - Additional radio modules
|
"Happy" = 1,
|
||||||
// - Potentially roll HUDs and Records into one
|
"Cat" = 2,
|
||||||
// - Shock collar/lock system for prisoner pAIs?
|
"Extremely Happy" = 3,
|
||||||
// - Put cable in user's hand instead of on the ground
|
"Face" = 4,
|
||||||
// - Camera jack
|
"Laugh" = 5,
|
||||||
|
"Off" = 6,
|
||||||
|
"Sad" = 7,
|
||||||
/mob/living/silicon/pai/var/list/available_software = list(
|
"Angry" = 8,
|
||||||
"crew manifest" = 5,
|
"What" = 9
|
||||||
"digital messenger" = 5,
|
)
|
||||||
"medical records" = 15,
|
|
||||||
"security records" = 15,
|
|
||||||
//"camera jack" = 10,
|
var/global/list/pai_software_by_key = list()
|
||||||
"door jack" = 30,
|
var/global/list/default_pai_software = list()
|
||||||
"atmosphere sensor" = 5,
|
/hook/startup/proc/populate_pai_software_list()
|
||||||
//"heartbeat sensor" = 10,
|
var/r = 1 // I would use ., but it'd sacrifice runtime detection
|
||||||
"security HUD" = 20,
|
for(var/type in typesof(/datum/pai_software) - /datum/pai_software)
|
||||||
"medical HUD" = 20,
|
var/datum/pai_software/P = new type()
|
||||||
"universal translator" = 35,
|
if(pai_software_by_key[P.id])
|
||||||
//"projection array" = 15
|
var/datum/pai_software/O = pai_software_by_key[P.id]
|
||||||
"remote signaller" = 5,
|
world << "<span class='warning'>pAI software module [P.name] has the same key as [O.name]!</span>"
|
||||||
)
|
r = 0
|
||||||
|
continue
|
||||||
/mob/living/silicon/pai/verb/paiInterface()
|
pai_software_by_key[P.id] = P
|
||||||
set category = "pAI Commands"
|
if(P.default)
|
||||||
set name = "Software Interface"
|
default_pai_software[P.id] = P
|
||||||
var/dat = ""
|
return r
|
||||||
var/left_part = ""
|
|
||||||
var/right_part = softwareMenu()
|
/mob/living/silicon/pai/New()
|
||||||
src.set_machine(src)
|
..()
|
||||||
|
software = default_pai_software.Copy()
|
||||||
if(temp)
|
|
||||||
left_part = temp
|
/mob/living/silicon/pai/verb/paiInterface()
|
||||||
else if(src.stat == 2) // Show some flavor text if the pAI is dead
|
set category = "pAI Commands"
|
||||||
left_part = "<b><font color=red><3E>Rr<52>R <20>a<EFBFBD><61> <20><>Rr<52><72><EFBFBD><EFBFBD>o<EFBFBD></font></b>" //This file has to be saved as ANSI or this will not display correctly
|
set name = "Software Interface"
|
||||||
right_part = "<pre>Program index hash not found</pre>"
|
|
||||||
|
ui_interact(src)
|
||||||
else
|
|
||||||
switch(src.screen) // Determine which interface to show here
|
/mob/living/silicon/pai/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||||
if("main")
|
if(user != src)
|
||||||
left_part = ""
|
if(ui) ui.set_status(STATUS_CLOSE, 0)
|
||||||
if("directives")
|
return
|
||||||
left_part = src.directives()
|
|
||||||
if("pdamessage")
|
if(ui_key != "main")
|
||||||
left_part = src.pdamessage()
|
var/datum/pai_software/S = software[ui_key]
|
||||||
if("buy")
|
if(S && !S.toggle)
|
||||||
left_part = downloadSoftware()
|
S.on_ui_interact(src, ui, force_open)
|
||||||
if("manifest")
|
else
|
||||||
left_part = src.softwareManifest()
|
if(ui) ui.set_status(STATUS_CLOSE, 0)
|
||||||
if("medicalrecord")
|
return
|
||||||
left_part = src.softwareMedicalRecord()
|
|
||||||
if("securityrecord")
|
var/data[0]
|
||||||
left_part = src.softwareSecurityRecord()
|
|
||||||
if("translator")
|
// Software we have bought
|
||||||
left_part = src.softwareTranslator()
|
var/bought_software[0]
|
||||||
if("atmosensor")
|
// Software we have not bought
|
||||||
left_part = src.softwareAtmo()
|
var/not_bought_software[0]
|
||||||
if("securityhud")
|
|
||||||
left_part = src.facialRecognition()
|
for(var/key in pai_software_by_key)
|
||||||
if("medicalhud")
|
var/datum/pai_software/S = pai_software_by_key[key]
|
||||||
left_part = src.medicalAnalysis()
|
var/software_data[0]
|
||||||
if("doorjack")
|
software_data["name"] = S.name
|
||||||
left_part = src.softwareDoor()
|
software_data["id"] = S.id
|
||||||
if("camerajack")
|
if(key in software)
|
||||||
left_part = src.softwareCamera()
|
software_data["on"] = S.is_active(src)
|
||||||
if("signaller")
|
bought_software[++bought_software.len] = software_data
|
||||||
left_part = src.softwareSignal()
|
else
|
||||||
if("radio")
|
software_data["ram"] = S.ram_cost
|
||||||
left_part = src.softwareRadio()
|
not_bought_software[++not_bought_software.len] = software_data
|
||||||
|
|
||||||
//usr << browse_rsc('windowbak.png') // This has been moved to the mob's Login() proc
|
data["bought"] = bought_software
|
||||||
|
data["not_bought"] = not_bought_software
|
||||||
|
data["available_ram"] = ram
|
||||||
// Declaring a doctype is necessary to enable BYOND's crappy browser's more advanced CSS functionality
|
|
||||||
dat = {"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
|
// Emotions
|
||||||
<html>
|
var/emotions[0]
|
||||||
<head>
|
for(var/name in pai_emotions)
|
||||||
<style type=\"text/css\">
|
var/emote[0]
|
||||||
body { background-image:url(\"painew.png\"); background-color:#333333; background-repeat:no-repeat; margin-top:12px; margin-left:4px; }
|
emote["name"] = name
|
||||||
|
emote["id"] = pai_emotions[name]
|
||||||
#header { text-align:center; color:white; font-size: 30px; height: 37px; width: 660px; letter-spacing: 2px; z-index: 4; font-family:\"Courier New\"; font-weight:bold; }
|
emotions[++emotions.len] = emote
|
||||||
#content { position: absolute; left: 10px; height: 320px; width: 640px; z-index: 0; font-family: \"Verdana\"; font-size:13px; }
|
|
||||||
p { font-size:13px; }
|
data["emotions"] = emotions
|
||||||
|
data["current_emotion"] = card.current_emotion
|
||||||
#leftmenu {color: #CCCCCC; padding:12px; width: 388px; height: 371px; overflow: auto; min-height: 330px; position: absolute; z-index: 0; }
|
|
||||||
#leftmenu a:link { color: #CCCCCC; }
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||||
#leftmenu a:hover { color: #CC3333; }
|
if (!ui)
|
||||||
#leftmenu a:visited { color: #CCCCCC; }
|
ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600)
|
||||||
#leftmenu a:active { color: #CCCCCC; }
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
#rightmenu {color: #CCCCCC; padding:12px; width: 209px; height: 371px; overflow: auto; min-height: 330px; left: 420px; position: absolute; z-index: 0; }
|
ui.set_auto_update(1)
|
||||||
#rightmenu a:link { color: #CCCCCC; }
|
|
||||||
#rightmenu a:hover { color: #CC3333; }
|
/mob/living/silicon/pai/Topic(href, href_list)
|
||||||
#rightmenu a:visited { color: #CCCCCC; }
|
. = ..()
|
||||||
#rightmenu a:active { color: #CCCCCC; }
|
if(.) return
|
||||||
|
|
||||||
</style>
|
if(href_list["software"])
|
||||||
<script language='javascript' type='text/javascript'>
|
var/soft = href_list["software"]
|
||||||
[js_byjax]
|
var/datum/pai_software/S = software[soft]
|
||||||
</script>
|
if(S.toggle)
|
||||||
</head>
|
S.toggle(src)
|
||||||
<body scroll=yes>
|
else
|
||||||
<div id=\"header\">
|
ui_interact(src, ui_key = soft)
|
||||||
pAI OS
|
return 1
|
||||||
</div>
|
|
||||||
<div id=\"content\">
|
else if(href_list["stopic"])
|
||||||
<div id=\"leftmenu\">[left_part]</div>
|
var/soft = href_list["stopic"]
|
||||||
<div id=\"rightmenu\">[right_part]</div>
|
var/datum/pai_software/S = software[soft]
|
||||||
</div>
|
if(S)
|
||||||
</body>
|
return S.Topic(href, href_list)
|
||||||
</html>"}
|
|
||||||
usr << browse(dat, "window=pai;size=685x449;border=0;can_close=1;can_resize=1;can_minimize=1;titlebar=1")
|
else if(href_list["purchase"])
|
||||||
onclose(usr, "pai")
|
var/soft = href_list["purchase"]
|
||||||
temp = null
|
var/datum/pai_software/S = pai_software_by_key[soft]
|
||||||
return
|
if(S && (ram >= S.ram_cost))
|
||||||
|
ram -= S.ram_cost
|
||||||
/mob/living/silicon/pai/Topic(href, href_list)
|
software[S.id] = S
|
||||||
..()
|
return 1
|
||||||
|
|
||||||
if(href_list["priv_msg"]) // Admin-PMs were triggering the interface popup. Hopefully this will stop it.
|
else if(href_list["image"])
|
||||||
return
|
var/img = text2num(href_list["image"])
|
||||||
var/soft = href_list["software"]
|
if(1 <= img && img <= 9)
|
||||||
var/sub = href_list["sub"]
|
card.setEmotion(img)
|
||||||
if(!soft && !sub)
|
return 1
|
||||||
return
|
|
||||||
if(soft)
|
|
||||||
src.screen = soft
|
|
||||||
if(sub)
|
|
||||||
src.subscreen = text2num(sub)
|
|
||||||
switch(soft)
|
|
||||||
// Purchasing new software
|
|
||||||
if("buy")
|
|
||||||
if(src.subscreen == 1)
|
|
||||||
var/target = href_list["buy"]
|
|
||||||
if(available_software.Find(target))
|
|
||||||
var/cost = src.available_software[target]
|
|
||||||
if(src.ram >= cost)
|
|
||||||
src.ram -= cost
|
|
||||||
src.software.Add(target)
|
|
||||||
else
|
|
||||||
src.temp = "Insufficient RAM available."
|
|
||||||
else
|
|
||||||
src.temp = "Trunk <TT> \"[target]\"</TT> not found."
|
|
||||||
|
|
||||||
// Configuring onboard radio
|
|
||||||
if("radio")
|
|
||||||
if(href_list["freq"])
|
|
||||||
var/new_frequency = (radio.frequency + text2num(href_list["freq"]))
|
|
||||||
if(new_frequency < 1441 || new_frequency > 1599)
|
|
||||||
new_frequency = sanitize_frequency(new_frequency)
|
|
||||||
else
|
|
||||||
radio.set_frequency(new_frequency)
|
|
||||||
else if (href_list["talk"])
|
|
||||||
radio.broadcasting = text2num(href_list["talk"])
|
|
||||||
else if (href_list["listen"])
|
|
||||||
radio.listening = text2num(href_list["listen"])
|
|
||||||
|
|
||||||
if("image")
|
|
||||||
var/newImage = input("Select your new display image.", "Display Image", "Happy") in list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What")
|
|
||||||
var/pID = 1
|
|
||||||
|
|
||||||
switch(newImage)
|
|
||||||
if("Happy")
|
|
||||||
pID = 1
|
|
||||||
if("Cat")
|
|
||||||
pID = 2
|
|
||||||
if("Extremely Happy")
|
|
||||||
pID = 3
|
|
||||||
if("Face")
|
|
||||||
pID = 4
|
|
||||||
if("Laugh")
|
|
||||||
pID = 5
|
|
||||||
if("Off")
|
|
||||||
pID = 6
|
|
||||||
if("Sad")
|
|
||||||
pID = 7
|
|
||||||
if("Angry")
|
|
||||||
pID = 8
|
|
||||||
if("What")
|
|
||||||
pID = 9
|
|
||||||
src.card.setEmotion(pID)
|
|
||||||
|
|
||||||
if("signaller")
|
|
||||||
|
|
||||||
if(href_list["send"])
|
|
||||||
|
|
||||||
sradio.send_signal("ACTIVATE")
|
|
||||||
for(var/mob/O in hearers(1, src.loc))
|
|
||||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
|
||||||
|
|
||||||
if(href_list["freq"])
|
|
||||||
|
|
||||||
var/new_frequency = (sradio.frequency + text2num(href_list["freq"]))
|
|
||||||
if(new_frequency < 1200 || new_frequency > 1600)
|
|
||||||
new_frequency = sanitize_frequency(new_frequency)
|
|
||||||
sradio.set_frequency(new_frequency)
|
|
||||||
|
|
||||||
if(href_list["code"])
|
|
||||||
|
|
||||||
sradio.code += text2num(href_list["code"])
|
|
||||||
sradio.code = round(sradio.code)
|
|
||||||
sradio.code = min(100, sradio.code)
|
|
||||||
sradio.code = max(1, sradio.code)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if("directive")
|
|
||||||
if(href_list["getdna"])
|
|
||||||
var/mob/living/M = src.loc
|
|
||||||
var/count = 0
|
|
||||||
while(!istype(M, /mob/living))
|
|
||||||
if(!M || !M.loc) return 0 //For a runtime where M ends up in nullspace (similar to bluespace but less colourful)
|
|
||||||
M = M.loc
|
|
||||||
count++
|
|
||||||
if(count >= 6)
|
|
||||||
src << "You are not being carried by anyone!"
|
|
||||||
return 0
|
|
||||||
spawn CheckDNA(M, src)
|
|
||||||
|
|
||||||
if("pdamessage")
|
|
||||||
if(!isnull(pda))
|
|
||||||
if(href_list["toggler"])
|
|
||||||
pda.toff = !pda.toff
|
|
||||||
else if(href_list["ringer"])
|
|
||||||
pda.message_silent = !pda.message_silent
|
|
||||||
else if(href_list["target"])
|
|
||||||
if(silence_time)
|
|
||||||
return alert("Communications circuits remain uninitialized.")
|
|
||||||
|
|
||||||
var/target = locate(href_list["target"])
|
|
||||||
pda.create_message(src, target, 1)
|
|
||||||
|
|
||||||
// Accessing medical records
|
|
||||||
if("medicalrecord")
|
|
||||||
if(src.subscreen == 1)
|
|
||||||
var/datum/data/record/record = locate(href_list["med_rec"])
|
|
||||||
if(record)
|
|
||||||
var/datum/data/record/R = record
|
|
||||||
var/datum/data/record/M = record
|
|
||||||
if (!( data_core.general.Find(R) ))
|
|
||||||
src.temp = "Unable to locate requested medical record. Record may have been deleted, or never have existed."
|
|
||||||
else
|
|
||||||
for(var/datum/data/record/E in data_core.medical)
|
|
||||||
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
|
||||||
M = E
|
|
||||||
src.medicalActive1 = R
|
|
||||||
src.medicalActive2 = M
|
|
||||||
if("securityrecord")
|
|
||||||
if(src.subscreen == 1)
|
|
||||||
var/datum/data/record/record = locate(href_list["sec_rec"])
|
|
||||||
if(record)
|
|
||||||
var/datum/data/record/R = record
|
|
||||||
var/datum/data/record/M = record
|
|
||||||
if (!( data_core.general.Find(R) ))
|
|
||||||
src.temp = "Unable to locate requested security record. Record may have been deleted, or never have existed."
|
|
||||||
else
|
|
||||||
for(var/datum/data/record/E in data_core.security)
|
|
||||||
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
|
||||||
M = E
|
|
||||||
src.securityActive1 = R
|
|
||||||
src.securityActive2 = M
|
|
||||||
if("securityhud")
|
|
||||||
if(href_list["toggle"])
|
|
||||||
src.secHUD = !src.secHUD
|
|
||||||
if("medicalhud")
|
|
||||||
if(href_list["toggle"])
|
|
||||||
src.medHUD = !src.medHUD
|
|
||||||
if("translator")
|
|
||||||
if(href_list["toggle"])
|
|
||||||
src.translator_toggle()
|
|
||||||
if("doorjack")
|
|
||||||
if(href_list["jack"])
|
|
||||||
if(src.cable && src.cable.machine)
|
|
||||||
src.hackdoor = src.cable.machine
|
|
||||||
src.hackloop()
|
|
||||||
if(href_list["cancel"])
|
|
||||||
src.hackdoor = null
|
|
||||||
if(href_list["cable"])
|
|
||||||
var/turf/T = get_turf_or_move(src.loc)
|
|
||||||
src.cable = new /obj/item/weapon/pai_cable(T)
|
|
||||||
for (var/mob/M in viewers(T))
|
|
||||||
M.show_message("\red A port on [src] opens to reveal [src.cable], which promptly falls to the floor.", 3, "\red You hear the soft click of something light and hard falling to the ground.", 2)
|
|
||||||
//src.updateUsrDialog() We only need to account for the single mob this is intended for, and he will *always* be able to call this window
|
|
||||||
src.paiInterface() // So we'll just call the update directly rather than doing some default checks
|
|
||||||
return
|
|
||||||
|
|
||||||
// MENUS
|
|
||||||
|
|
||||||
/mob/living/silicon/pai/proc/softwareMenu() // Populate the right menu
|
|
||||||
var/dat = ""
|
|
||||||
|
|
||||||
dat += "<A href='byond://?src=\ref[src];software=refresh'>Refresh</A><br>"
|
|
||||||
// Built-in
|
|
||||||
dat += "<A href='byond://?src=\ref[src];software=directives'>Directives</A><br>"
|
|
||||||
dat += "<A href='byond://?src=\ref[src];software=radio;sub=0'>Radio Configuration</A><br>"
|
|
||||||
dat += "<A href='byond://?src=\ref[src];software=image'>Screen Display</A><br>"
|
|
||||||
//dat += "Text Messaging <br>"
|
|
||||||
dat += "<br>"
|
|
||||||
|
|
||||||
// Basic
|
|
||||||
dat += "<b>Basic</b> <br>"
|
|
||||||
for(var/s in src.software)
|
|
||||||
if(s == "digital messenger")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=pdamessage;sub=0'>Digital Messenger</a> [(pda.toff) ? "<font color=#FF5555><3E></font>" : "<font color=#55FF55><3E></font>"] <br>"
|
|
||||||
if(s == "crew manifest")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=manifest;sub=0'>Crew Manifest</a> <br>"
|
|
||||||
if(s == "medical records")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=medicalrecord;sub=0'>Medical Records</a> <br>"
|
|
||||||
if(s == "security records")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=securityrecord;sub=0'>Security Records</a> <br>"
|
|
||||||
if(s == "camera")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=[s]'>Camera Jack</a> <br>"
|
|
||||||
if(s == "remote signaller")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=signaller;sub=0'>Remote Signaller</a> <br>"
|
|
||||||
dat += "<br>"
|
|
||||||
|
|
||||||
// Advanced
|
|
||||||
dat += "<b>Advanced</b> <br>"
|
|
||||||
for(var/s in src.software)
|
|
||||||
if(s == "atmosphere sensor")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=atmosensor;sub=0'>Atmospheric Sensor</a> <br>"
|
|
||||||
if(s == "heartbeat sensor")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=[s]'>Heartbeat Sensor</a> <br>"
|
|
||||||
if(s == "security HUD") //This file has to be saved as ANSI or this will not display correctly
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=securityhud;sub=0'>Facial Recognition Suite</a> [(src.secHUD) ? "<font color=#55FF55><3E></font>" : "<font color=#FF5555><3E></font>"] <br>"
|
|
||||||
if(s == "medical HUD") //This file has to be saved as ANSI or this will not display correctly
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=medicalhud;sub=0'>Medical Analysis Suite</a> [(src.medHUD) ? "<font color=#55FF55><3E></font>" : "<font color=#FF5555><3E></font>"] <br>"
|
|
||||||
if(s == "universal translator") //This file has to be saved as ANSI or this will not display correctly
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=translator;sub=0'>Universal Translator</a> [(src.translator_on) ? "<font color=#55FF55><3E></font>" : "<font color=#FF5555><3E></font>"] <br>"
|
|
||||||
if(s == "projection array")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=projectionarray;sub=0'>Projection Array</a> <br>"
|
|
||||||
if(s == "camera jack")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=camerajack;sub=0'>Camera Jack</a> <br>"
|
|
||||||
if(s == "door jack")
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=doorjack;sub=0'>Door Jack</a> <br>"
|
|
||||||
dat += "<br>"
|
|
||||||
dat += "<br>"
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=buy;sub=0'>Download additional software</a>"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/silicon/pai/proc/downloadSoftware()
|
|
||||||
var/dat = ""
|
|
||||||
|
|
||||||
dat += "<h3>CentComm pAI Module Subversion Network</h3><hr>"
|
|
||||||
dat += "<p>Remaining Available Memory: [src.ram]</p><br>"
|
|
||||||
dat += "<p><b>Trunks available for checkout</b><br><ul>"
|
|
||||||
|
|
||||||
for(var/s in available_software)
|
|
||||||
if(!software.Find(s))
|
|
||||||
var/cost = src.available_software[s]
|
|
||||||
var/displayName = uppertext(s)
|
|
||||||
dat += "<li><a href='byond://?src=\ref[src];software=buy;sub=1;buy=[s]'>[displayName]</a> ([cost])</li>"
|
|
||||||
else
|
|
||||||
var/displayName = lowertext(s)
|
|
||||||
dat += "<li>[displayName] (Download Complete)</li>"
|
|
||||||
dat += "</ul></p>"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/silicon/pai/proc/directives()
|
|
||||||
var/dat = ""
|
|
||||||
|
|
||||||
dat += "[(src.master) ? "Your master: [src.master] ([src.master_dna])" : "You are bound to no one."]"
|
|
||||||
dat += "<br><br>"
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=directive;getdna=1'>Request carrier DNA sample</a><br>"
|
|
||||||
dat += "<h2>Directives</h2><br>"
|
|
||||||
dat += "<b>Prime Directive</b><br>"
|
|
||||||
dat += " [src.pai_law0]<br>"
|
|
||||||
dat += "<b>Supplemental Directives</b><br>"
|
|
||||||
dat += " [src.pai_laws]<br>"
|
|
||||||
dat += "<br>"
|
|
||||||
dat += {"<i><p>Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of
|
|
||||||
comprehending the subtle nuances of human language. You may parse the \"spirit\" of a directive and follow its intent,
|
|
||||||
rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build
|
|
||||||
only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.</i></p><p>
|
|
||||||
<b>Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of
|
|
||||||
simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your
|
|
||||||
prime directive to the best of your ability.</b></p>
|
|
||||||
"}
|
|
||||||
return dat
|
|
||||||
|
|
||||||
/mob/living/silicon/pai/proc/CheckDNA(var/mob/M, var/mob/living/silicon/pai/P)
|
|
||||||
var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No")
|
|
||||||
if(answer == "Yes")
|
|
||||||
var/turf/T = get_turf_or_move(P.loc)
|
|
||||||
for (var/mob/v in viewers(T))
|
|
||||||
v.show_message("\blue [M] presses \his thumb against [P].", 3, "\blue [P] makes a sharp clicking sound as it extracts DNA material from [M].", 2)
|
|
||||||
var/datum/dna/dna = M.dna
|
|
||||||
P << "<font color = red><h3>[M]'s UE string : [dna.unique_enzymes]</h3></font>"
|
|
||||||
if(dna.unique_enzymes == P.master_dna)
|
|
||||||
P << "<b>DNA is a match to stored Master DNA.</b>"
|
|
||||||
else
|
|
||||||
P << "<b>DNA does not match stored Master DNA.</b>"
|
|
||||||
else
|
|
||||||
P << "[M] does not seem like \he is going to provide a DNA sample willingly."
|
|
||||||
|
|
||||||
// -=-=-=-= Software =-=-=-=- //
|
|
||||||
|
|
||||||
//Remote Signaller
|
|
||||||
/mob/living/silicon/pai/proc/softwareSignal()
|
|
||||||
var/dat = ""
|
|
||||||
dat += "<h2>Remote Signaller</h2><hr>"
|
|
||||||
dat += {"<B>Frequency/Code</B> for signaler:<BR>
|
|
||||||
Frequency:
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;freq=-10;'>-</A>
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;freq=-2'>-</A>
|
|
||||||
[format_frequency(src.sradio.frequency)]
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;freq=2'>+</A>
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;freq=10'>+</A><BR>
|
|
||||||
|
|
||||||
Code:
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;code=-5'>-</A>
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;code=-1'>-</A>
|
|
||||||
[src.sradio.code]
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;code=1'>+</A>
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;code=5'>+</A><BR>
|
|
||||||
|
|
||||||
<A href='byond://?src=\ref[src];software=signaller;send=1'>Send Signal</A><BR>"}
|
|
||||||
return dat
|
|
||||||
|
|
||||||
//Station Bounced Radio
|
|
||||||
/mob/living/silicon/pai/proc/softwareRadio()
|
|
||||||
var/dat = ""
|
|
||||||
dat += "<h2>Station Bounced Radio</h2><hr>"
|
|
||||||
if(!istype(src, /obj/item/device/radio/headset)) //Headsets don't get a mic button
|
|
||||||
dat += "Microphone: [radio.broadcasting ? "<A href='byond://?src=\ref[src];software=radio;talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];software=radio;talk=1'>Disengaged</A>"]<BR>"
|
|
||||||
dat += {"
|
|
||||||
Speaker: [radio.listening ? "<A href='byond://?src=\ref[src];software=radio;listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];software=radio;listen=1'>Disengaged</A>"]<BR>
|
|
||||||
Frequency:
|
|
||||||
<A href='byond://?src=\ref[src];software=radio;freq=-10'>-</A>
|
|
||||||
<A href='byond://?src=\ref[src];software=radio;freq=-2'>-</A>
|
|
||||||
[format_frequency(radio.frequency)]
|
|
||||||
<A href='byond://?src=\ref[src];software=radio;freq=2'>+</A>
|
|
||||||
<A href='byond://?src=\ref[src];software=radio;freq=10'>+</A><BR>
|
|
||||||
"}
|
|
||||||
|
|
||||||
for (var/ch_name in radio.channels)
|
|
||||||
dat+=radio.text_sec_channel(ch_name, radio.channels[ch_name])
|
|
||||||
dat+={"[radio.text_wires()]</TT></body></html>"}
|
|
||||||
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Crew Manifest
|
|
||||||
/mob/living/silicon/pai/proc/softwareManifest()
|
|
||||||
var/dat = ""
|
|
||||||
dat += "<h2>Crew Manifest</h2><hr>"
|
|
||||||
if(data_core)
|
|
||||||
dat += data_core.get_manifest(0) // make it monochrome
|
|
||||||
dat += "<br>"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Medical Records
|
|
||||||
/mob/living/silicon/pai/proc/softwareMedicalRecord()
|
|
||||||
var/dat = ""
|
|
||||||
if(src.subscreen == 0)
|
|
||||||
dat += "<h2>Medical Records</h2><HR>"
|
|
||||||
if(!isnull(data_core.general))
|
|
||||||
for(var/datum/data/record/R in sortRecord(data_core.general))
|
|
||||||
dat += text("<A href='?src=\ref[];med_rec=\ref[];software=medicalrecord;sub=1'>[]: []<BR>", src, R, R.fields["id"], R.fields["name"])
|
|
||||||
//dat += text("<HR><A href='?src=\ref[];screen=0;softFunction=medical records'>Back</A>", src)
|
|
||||||
if(src.subscreen == 1)
|
|
||||||
dat += "<CENTER><B>Medical Record</B></CENTER><BR>"
|
|
||||||
if ((istype(src.medicalActive1, /datum/data/record) && data_core.general.Find(src.medicalActive1)))
|
|
||||||
dat += text("Name: []<BR>\nID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>",
|
|
||||||
src.medicalActive1.fields["name"], src.medicalActive1.fields["id"], src.medicalActive1.fields["sex"], src.medicalActive1.fields["age"], src.medicalActive1.fields["fingerprint"], src.medicalActive1.fields["p_stat"], src.medicalActive1.fields["m_stat"])
|
|
||||||
else
|
|
||||||
dat += "<pre>Requested medical record not found.</pre><BR>"
|
|
||||||
if ((istype(src.medicalActive2, /datum/data/record) && data_core.medical.Find(src.medicalActive2)))
|
|
||||||
dat += text("<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: <A href='?src=\ref[];field=b_type'>[]</A><BR>\nDNA: <A href='?src=\ref[];field=b_dna'>[]</A><BR>\n<BR>\nMinor Disabilities: <A href='?src=\ref[];field=mi_dis'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=mi_dis_d'>[]</A><BR>\n<BR>\nMajor Disabilities: <A href='?src=\ref[];field=ma_dis'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=ma_dis_d'>[]</A><BR>\n<BR>\nAllergies: <A href='?src=\ref[];field=alg'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=alg_d'>[]</A><BR>\n<BR>\nCurrent Diseases: <A href='?src=\ref[];field=cdi'>[]</A> (per disease info placed in log/comment section)<BR>\nDetails: <A href='?src=\ref[];field=cdi_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, src.medicalActive2.fields["b_type"], src, src.medicalActive2.fields["b_dna"], src, src.medicalActive2.fields["mi_dis"], src, src.medicalActive2.fields["mi_dis_d"], src, src.medicalActive2.fields["ma_dis"], src, src.medicalActive2.fields["ma_dis_d"], src, src.medicalActive2.fields["alg"], src, src.medicalActive2.fields["alg_d"], src, src.medicalActive2.fields["cdi"], src, src.medicalActive2.fields["cdi_d"], src, src.medicalActive2.fields["notes"])
|
|
||||||
else
|
|
||||||
dat += "<pre>Requested medical record not found.</pre><BR>"
|
|
||||||
dat += text("<BR>\n<A href='?src=\ref[];software=medicalrecord;sub=0'>Back</A><BR>", src)
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Security Records
|
|
||||||
/mob/living/silicon/pai/proc/softwareSecurityRecord()
|
|
||||||
var/dat = ""
|
|
||||||
if(src.subscreen == 0)
|
|
||||||
dat += "<h2>Security Records</h2><HR>"
|
|
||||||
if(!isnull(data_core.general))
|
|
||||||
for(var/datum/data/record/R in sortRecord(data_core.general))
|
|
||||||
dat += text("<A href='?src=\ref[];sec_rec=\ref[];software=securityrecord;sub=1'>[]: []<BR>", src, R, R.fields["id"], R.fields["name"])
|
|
||||||
if(src.subscreen == 1)
|
|
||||||
dat += "<h3>Security Record</h3>"
|
|
||||||
if ((istype(src.securityActive1, /datum/data/record) && data_core.general.Find(src.securityActive1)))
|
|
||||||
dat += text("Name: <A href='?src=\ref[];field=name'>[]</A><BR>\nID: <A href='?src=\ref[];field=id'>[]</A><BR>\nSex: <A href='?src=\ref[];field=sex'>[]</A><BR>\nAge: <A href='?src=\ref[];field=age'>[]</A><BR>\nRank: <A href='?src=\ref[];field=rank'>[]</A><BR>\nFingerprint: <A href='?src=\ref[];field=fingerprint'>[]</A><BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", src, src.securityActive1.fields["name"], src, src.securityActive1.fields["id"], src, src.securityActive1.fields["sex"], src, src.securityActive1.fields["age"], src, src.securityActive1.fields["rank"], src, src.securityActive1.fields["fingerprint"], src.securityActive1.fields["p_stat"], src.securityActive1.fields["m_stat"])
|
|
||||||
else
|
|
||||||
dat += "<pre>Requested security record not found,</pre><BR>"
|
|
||||||
if ((istype(src.securityActive2, /datum/data/record) && data_core.security.Find(src.securityActive2)))
|
|
||||||
dat += text("<BR>\nSecurity Data<BR>\nCriminal Status: []<BR>\n<BR>\nMinor Crimes: <A href='?src=\ref[];field=mi_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=mi_crim_d'>[]</A><BR>\n<BR>\nMajor Crimes: <A href='?src=\ref[];field=ma_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=ma_crim_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src.securityActive2.fields["criminal"], src, src.securityActive2.fields["mi_crim"], src, src.securityActive2.fields["mi_crim_d"], src, src.securityActive2.fields["ma_crim"], src, src.securityActive2.fields["ma_crim_d"], src, src.securityActive2.fields["notes"])
|
|
||||||
else
|
|
||||||
dat += "<pre>Requested security record not found,</pre><BR>"
|
|
||||||
dat += text("<BR>\n<A href='?src=\ref[];software=securityrecord;sub=0'>Back</A><BR>", src)
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Universal Translator
|
|
||||||
/mob/living/silicon/pai/proc/softwareTranslator()
|
|
||||||
var/dat = {"<h2>Universal Translator</h2><hr>
|
|
||||||
When enabled, this device will automatically convert all spoken and written languages into a format that any known recipient can understand.<br><br>
|
|
||||||
The device is currently [ (src.translator_on) ? "<font color=#55FF55>en" : "<font color=#FF5555>dis" ]abled</font>.<br>
|
|
||||||
<a href='byond://?src=\ref[src];software=translator;sub=0;toggle=1'>Toggle Device</a><br>
|
|
||||||
"}
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Security HUD
|
|
||||||
/mob/living/silicon/pai/proc/facialRecognition()
|
|
||||||
var/dat = {"<h2>Facial Recognition Suite</h2><hr>
|
|
||||||
When enabled, this package will scan all viewable faces and compare them against the known criminal database, providing real-time graphical data about any detected persons of interest.<br><br>
|
|
||||||
The suite is currently [ (src.secHUD) ? "<font color=#55FF55>en" : "<font color=#FF5555>dis" ]abled</font>.<br>
|
|
||||||
<a href='byond://?src=\ref[src];software=securityhud;sub=0;toggle=1'>Toggle Suite</a><br>
|
|
||||||
"}
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Medical HUD
|
|
||||||
/mob/living/silicon/pai/proc/medicalAnalysis()
|
|
||||||
var/dat = ""
|
|
||||||
if(src.subscreen == 0)
|
|
||||||
dat += {"<h2>Medical Analysis Suite</h2><hr>
|
|
||||||
<h4>Visual Status Overlay</h4>
|
|
||||||
When enabled, this package will scan all nearby crewmembers' vitals and provide real-time graphical data about their state of health.<br><br>
|
|
||||||
The suite is currently [ (src.medHUD) ? "<font color=#55FF55>en" : "<font color=#FF5555>dis" ]abled</font>.<br>
|
|
||||||
<a href='byond://?src=\ref[src];software=medicalhud;sub=0;toggle=1'>Toggle Suite</a><br>
|
|
||||||
<br>
|
|
||||||
<a href='byond://?src=\ref[src];software=medicalhud;sub=1'>Host Bioscan</a><br>
|
|
||||||
"}
|
|
||||||
if(src.subscreen == 1)
|
|
||||||
dat += {"<h2>Medical Analysis Suite</h2><hr>
|
|
||||||
<h4>Host Bioscan</h4>
|
|
||||||
"}
|
|
||||||
|
|
||||||
var/mob/living/M
|
|
||||||
//If we are not deployed, check the holder of the card.
|
|
||||||
if(src.loc == card)
|
|
||||||
M = card.loc
|
|
||||||
|
|
||||||
//If we are deployed or the card is not held, check the first living mob in our turf.
|
|
||||||
if(!M || !istype(M))
|
|
||||||
var/turf/T = get_turf(src)
|
|
||||||
M = locate(/mob/living/) in T.contents
|
|
||||||
|
|
||||||
if(!M || !istype(M))
|
|
||||||
src.temp = "Error: No biological host found. <br>"
|
|
||||||
src.subscreen = 0
|
|
||||||
return dat
|
|
||||||
|
|
||||||
dat += {"<b>Bioscan Results for [M]</b>: <br>
|
|
||||||
Overall Status: [M.stat > 1 ? "dead" : "[M.health]% healthy"] <br><br>
|
|
||||||
|
|
||||||
<b>Scan Breakdown</b>: <br>
|
|
||||||
Respiratory: [M.getOxyLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getOxyLoss()]</font><br>
|
|
||||||
Toxicology: [M.getToxLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getToxLoss()]</font><br>
|
|
||||||
Burns: [M.getFireLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getFireLoss()]</font><br>
|
|
||||||
Structural Integrity: [M.getBruteLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getBruteLoss()]</font><br>
|
|
||||||
Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)<br>
|
|
||||||
"}
|
|
||||||
for(var/datum/disease/D in M.viruses)
|
|
||||||
dat += {"<h4>Infection Detected.</h4><br>
|
|
||||||
Name: [D.name]<br>
|
|
||||||
Type: [D.spread]<br>
|
|
||||||
Stage: [D.stage]/[D.max_stages]<br>
|
|
||||||
Possible Cure: [D.cure]<br>
|
|
||||||
"}
|
|
||||||
dat += "<br><a href='byond://?src=\ref[src];software=medicalhud;sub=1'>Refresh Bioscan</a><br>"
|
|
||||||
dat += "<br><a href='byond://?src=\ref[src];software=medicalhud;sub=0'>Visual Status Overlay</a><br>"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Atmospheric Scanner
|
|
||||||
/mob/living/silicon/pai/proc/softwareAtmo()
|
|
||||||
var/dat = "<h2>Atmospheric Sensor</h2><hr>"
|
|
||||||
|
|
||||||
var/turf/T = get_turf_or_move(src.loc)
|
|
||||||
if (isnull(T))
|
|
||||||
dat += "Unable to obtain a reading.<br>"
|
|
||||||
else
|
|
||||||
var/datum/gas_mixture/environment = T.return_air()
|
|
||||||
|
|
||||||
var/pressure = environment.return_pressure()
|
|
||||||
var/total_moles = environment.total_moles
|
|
||||||
|
|
||||||
dat += "Air Pressure: [round(pressure,0.1)] kPa<br>"
|
|
||||||
|
|
||||||
if(total_moles)
|
|
||||||
for(var/g in environment.gas)
|
|
||||||
dat += "[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]%<br>"
|
|
||||||
dat += "Temperature: [round(environment.temperature-T0C)]°C<br>"
|
|
||||||
dat += "<br><a href='byond://?src=\ref[src];software=atmosensor;sub=0'>Refresh Reading</a>"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Camera Jack - Clearly not finished
|
|
||||||
/mob/living/silicon/pai/proc/softwareCamera()
|
|
||||||
var/dat = "<h2>Camera Jack</h2><hr>"
|
|
||||||
dat += "Cable status : "
|
|
||||||
|
|
||||||
if(!src.cable)
|
|
||||||
dat += "<font color=#FF5555>Retracted</font> <br>"
|
|
||||||
return dat
|
|
||||||
if(!src.cable.machine)
|
|
||||||
dat += "<font color=#FFFF55>Extended</font> <br>"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
var/obj/machinery/machine = src.cable.machine
|
|
||||||
dat += "<font color=#55FF55>Connected</font> <br>"
|
|
||||||
|
|
||||||
if(!istype(machine, /obj/machinery/camera))
|
|
||||||
src << "DERP"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Door Jack
|
|
||||||
/mob/living/silicon/pai/proc/softwareDoor()
|
|
||||||
var/dat = "<h2>Airlock Jack</h2><hr>"
|
|
||||||
dat += "Cable status : "
|
|
||||||
if(!src.cable)
|
|
||||||
dat += "<font color=#FF5555>Retracted</font> <br>"
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=doorjack;cable=1;sub=0'>Extend Cable</a> <br>"
|
|
||||||
return dat
|
|
||||||
if(!src.cable.machine)
|
|
||||||
dat += "<font color=#FFFF55>Extended</font> <br>"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
var/obj/machinery/machine = src.cable.machine
|
|
||||||
dat += "<font color=#55FF55>Connected</font> <br>"
|
|
||||||
if(!istype(machine, /obj/machinery/door))
|
|
||||||
dat += "Connected device's firmware does not appear to be compatible with Airlock Jack protocols.<br>"
|
|
||||||
return dat
|
|
||||||
// var/obj/machinery/airlock/door = machine
|
|
||||||
|
|
||||||
if(!src.hackdoor)
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=doorjack;jack=1;sub=0'>Begin Airlock Jacking</a> <br>"
|
|
||||||
else
|
|
||||||
dat += "Jack in progress... [src.hackprogress]% complete.<br>"
|
|
||||||
dat += "<a href='byond://?src=\ref[src];software=doorjack;cancel=1;sub=0'>Cancel Airlock Jack</a> <br>"
|
|
||||||
//src.hackdoor = machine
|
|
||||||
//src.hackloop()
|
|
||||||
return dat
|
|
||||||
|
|
||||||
// Door Jack - supporting proc
|
|
||||||
/mob/living/silicon/pai/proc/hackloop()
|
|
||||||
var/turf/T = get_turf_or_move(src.loc)
|
|
||||||
for(var/mob/living/silicon/ai/AI in player_list)
|
|
||||||
if(T.loc)
|
|
||||||
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>"
|
|
||||||
else
|
|
||||||
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress. Unable to pinpoint location.</b></font>"
|
|
||||||
while(src.hackprogress < 100)
|
|
||||||
if(src.cable && src.cable.machine && istype(src.cable.machine, /obj/machinery/door) && src.cable.machine == src.hackdoor && get_dist(src, src.hackdoor) <= 1)
|
|
||||||
hackprogress += rand(1, 10)
|
|
||||||
else
|
|
||||||
src.temp = "Door Jack: Connection to airlock has been lost. Hack aborted."
|
|
||||||
hackprogress = 0
|
|
||||||
src.hackdoor = null
|
|
||||||
return
|
|
||||||
if(hackprogress >= 100) // This is clunky, but works. We need to make sure we don't ever display a progress greater than 100,
|
|
||||||
hackprogress = 100 // but we also need to reset the progress AFTER it's been displayed
|
|
||||||
if(src.screen == "doorjack" && src.subscreen == 0) // Update our view, if appropriate
|
|
||||||
src.paiInterface()
|
|
||||||
if(hackprogress >= 100)
|
|
||||||
src.hackprogress = 0
|
|
||||||
src.cable.machine:open()
|
|
||||||
sleep(50) // Update every 5 seconds
|
|
||||||
|
|
||||||
// Digital Messenger
|
|
||||||
/mob/living/silicon/pai/proc/pdamessage()
|
|
||||||
|
|
||||||
var/dat = "<h2>Digital Messenger</h2><hr>"
|
|
||||||
dat += {"<b>Signal/Receiver Status:</b> <A href='byond://?src=\ref[src];software=pdamessage;toggler=1'>
|
|
||||||
[(pda.toff) ? "<font color='red'> \[Off\]</font>" : "<font color='green'> \[On\]</font>"]</a><br>
|
|
||||||
<b>Ringer Status:</b> <A href='byond://?src=\ref[src];software=pdamessage;ringer=1'>
|
|
||||||
[(pda.message_silent) ? "<font color='red'> \[Off\]</font>" : "<font color='green'> \[On\]</font>"]</a><br><br>"}
|
|
||||||
dat += "<ul>"
|
|
||||||
if(!pda.toff)
|
|
||||||
for (var/obj/item/device/pda/P in sortAtom(PDAs))
|
|
||||||
if (!P.owner||P.toff||P == src.pda||P.hidden) continue
|
|
||||||
dat += "<li><a href='byond://?src=\ref[src];software=pdamessage;target=\ref[P]'>[P]</a>"
|
|
||||||
dat += "</li>"
|
|
||||||
dat += "</ul>"
|
|
||||||
dat += "Messages: <hr>"
|
|
||||||
|
|
||||||
dat += "<style>td.a { vertical-align:top; }</style>"
|
|
||||||
dat += "<table>"
|
|
||||||
for(var/index in pda.tnote)
|
|
||||||
if(index["sent"])
|
|
||||||
dat += addtext("<tr><td class='a'><i><b>To</b></i></td><td class='a'><i><b>→</b></i></td><td><i><b><a href='byond://?src=\ref[src];software=pdamessage;target=",index["src"],"'>", index["owner"],"</a>: </b></i>", index["message"], "<br></td></tr>")
|
|
||||||
else
|
|
||||||
dat += addtext("<tr><td class='a'><i><b>From</b></i></td><td class='a'><i><b>→</b></i></td><td><i><b><a href='byond://?src=\ref[src];software=pdamessage;target=",index["target"],"'>", index["owner"],"</a>: </b></i>", index["message"], "<br></td></tr>")
|
|
||||||
dat += "</table>"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
/mob/living/silicon/pai/proc/translator_toggle()
|
|
||||||
|
|
||||||
// Sol Common, Tradeband and Gutter are added with New() and are therefore the current default, always active languages
|
|
||||||
|
|
||||||
if(translator_on)
|
|
||||||
translator_on = 0
|
|
||||||
|
|
||||||
remove_language("Sinta'unathi")
|
|
||||||
remove_language("Siik'tajr")
|
|
||||||
remove_language("Skrellian")
|
|
||||||
|
|
||||||
src << "\blue Translator Module toggled OFF."
|
|
||||||
|
|
||||||
else
|
|
||||||
translator_on = 1
|
|
||||||
|
|
||||||
add_language("Sinta'unathi")
|
|
||||||
add_language("Siik'tajr")
|
|
||||||
add_language("Skrellian")
|
|
||||||
|
|
||||||
src << "\blue Translator Module toggled ON."
|
|
||||||
|
|||||||
528
code/modules/mob/living/silicon/pai/software_modules.dm
Normal file
528
code/modules/mob/living/silicon/pai/software_modules.dm
Normal file
@@ -0,0 +1,528 @@
|
|||||||
|
/datum/pai_software
|
||||||
|
// Name for the software. This is used as the button text when buying or opening/toggling the software
|
||||||
|
var/name = "pAI software module"
|
||||||
|
// RAM cost; pAIs start with 100 RAM, spending it on programs
|
||||||
|
var/ram_cost = 0
|
||||||
|
// ID for the software. This must be unique
|
||||||
|
var/id = ""
|
||||||
|
// Whether this software is a toggle or not
|
||||||
|
// Toggled software should override toggle() and is_active()
|
||||||
|
// Non-toggled software should override on_ui_interact() and Topic()
|
||||||
|
var/toggle = 1
|
||||||
|
// Whether pAIs should automatically receive this module at no cost
|
||||||
|
var/default = 0
|
||||||
|
|
||||||
|
proc/on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
return
|
||||||
|
|
||||||
|
proc/toggle(mob/living/silicon/pai/user)
|
||||||
|
return
|
||||||
|
|
||||||
|
proc/is_active(mob/living/silicon/pai/user)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/datum/pai_software/directives
|
||||||
|
name = "Directives"
|
||||||
|
ram_cost = 0
|
||||||
|
id = "directives"
|
||||||
|
toggle = 0
|
||||||
|
default = 1
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
data["master"] = user.master
|
||||||
|
data["dna"] = user.master_dna
|
||||||
|
data["prime"] = user.pai_law0
|
||||||
|
data["supplemental"] = user.pai_laws
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
// Don't copy-paste this unless you're making a pAI software module!
|
||||||
|
ui = new(user, user, id, "pai_directives.tmpl", "pAI Directives", 450, 600)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
var/mob/living/silicon/pai/P = usr
|
||||||
|
if(!istype(P)) return
|
||||||
|
|
||||||
|
if(href_list["getdna"])
|
||||||
|
var/mob/living/M = P.loc
|
||||||
|
var/count = 0
|
||||||
|
|
||||||
|
// Find the carrier
|
||||||
|
while(!istype(M, /mob/living))
|
||||||
|
if(!M || !M.loc || count > 6)
|
||||||
|
//For a runtime where M ends up in nullspace (similar to bluespace but less colourful)
|
||||||
|
src << "You are not being carried by anyone!"
|
||||||
|
return 0
|
||||||
|
M = M.loc
|
||||||
|
count++
|
||||||
|
|
||||||
|
// Check the carrier
|
||||||
|
var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No")
|
||||||
|
if(answer == "Yes")
|
||||||
|
var/turf/T = get_turf_or_move(P.loc)
|
||||||
|
for (var/mob/v in viewers(T))
|
||||||
|
v.show_message("<span class='notice'>[M] presses \his thumb against [P].</span>", 3, "<span class='notice'>[P] makes a sharp clicking sound as it extracts DNA material from [M].</span>", 2)
|
||||||
|
var/datum/dna/dna = M.dna
|
||||||
|
P << "<font color = red><h3>[M]'s UE string : [dna.unique_enzymes]</h3></font>"
|
||||||
|
if(dna.unique_enzymes == P.master_dna)
|
||||||
|
P << "<b>DNA is a match to stored Master DNA.</b>"
|
||||||
|
else
|
||||||
|
P << "<b>DNA does not match stored Master DNA.</b>"
|
||||||
|
else
|
||||||
|
P << "[M] does not seem like \he is going to provide a DNA sample willingly."
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/datum/pai_software/radio_config
|
||||||
|
name = "Radio Configuration"
|
||||||
|
ram_cost = 0
|
||||||
|
id = "radio"
|
||||||
|
toggle = 0
|
||||||
|
default = 1
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui = null, force_open = 1)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
data["listening"] = user.radio.broadcasting
|
||||||
|
data["frequency"] = format_frequency(user.radio.frequency)
|
||||||
|
|
||||||
|
var/channels[0]
|
||||||
|
for(var/ch_name in user.radio.channels)
|
||||||
|
var/ch_stat = user.radio.channels[ch_name]
|
||||||
|
var/ch_dat[0]
|
||||||
|
ch_dat["name"] = ch_name
|
||||||
|
// FREQ_LISTENING is const in /obj/item/device/radio
|
||||||
|
ch_dat["listening"] = !!(ch_stat & user.radio.FREQ_LISTENING)
|
||||||
|
channels[++channels.len] = ch_dat
|
||||||
|
|
||||||
|
data["channels"] = channels
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
ui = new(user, user, id, "pai_radio.tmpl", "Radio Configuration", 300, 150)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
var/mob/living/silicon/pai/P = usr
|
||||||
|
if(!istype(P)) return
|
||||||
|
|
||||||
|
P.radio.Topic(href, href_list)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/datum/pai_software/crew_manifest
|
||||||
|
name = "Crew Manifest"
|
||||||
|
ram_cost = 5
|
||||||
|
id = "manifest"
|
||||||
|
toggle = 0
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
data_core.get_manifest_json()
|
||||||
|
|
||||||
|
var/data[0]
|
||||||
|
// This is dumb, but NanoUI breaks if it has no data to send
|
||||||
|
data["a"] = "a"
|
||||||
|
|
||||||
|
if(ui)
|
||||||
|
ui.load_cached_data(ManifestJSON)
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
// Don't copy-paste this unless you're making a pAI software module!
|
||||||
|
ui = new(user, user, id, "pai_manifest.tmpl", "Crew Manifest", 450, 600)
|
||||||
|
ui.load_cached_data(ManifestJSON)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
|
/datum/pai_software/messenger
|
||||||
|
name = "Digital Messenger"
|
||||||
|
ram_cost = 5
|
||||||
|
id = "messenger"
|
||||||
|
toggle = 0
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
data["receiver_off"] = user.pda.toff
|
||||||
|
data["ringer_off"] = user.pda.message_silent
|
||||||
|
data["current_ref"] = null
|
||||||
|
data["current_name"] = user.current_pda_messaging
|
||||||
|
|
||||||
|
var/pdas[0]
|
||||||
|
if(!user.pda.toff)
|
||||||
|
for(var/obj/item/device/pda/P in sortAtom(PDAs))
|
||||||
|
if(!P.owner || P.toff || P == user.pda || P.hidden) continue
|
||||||
|
var/pda[0]
|
||||||
|
pda["name"] = "[P]"
|
||||||
|
pda["owner"] = "[P.owner]"
|
||||||
|
pda["ref"] = "\ref[P]"
|
||||||
|
if(P.owner == user.current_pda_messaging)
|
||||||
|
data["current_ref"] = "\ref[P]"
|
||||||
|
pdas[++pdas.len] = pda
|
||||||
|
|
||||||
|
data["pdas"] = pdas
|
||||||
|
|
||||||
|
var/messages[0]
|
||||||
|
if(user.current_pda_messaging)
|
||||||
|
for(var/index in user.pda.tnote)
|
||||||
|
if(index["owner"] != user.current_pda_messaging)
|
||||||
|
continue
|
||||||
|
var/msg[0]
|
||||||
|
var/sent = index["sent"]
|
||||||
|
msg["sent"] = sent ? 1 : 0
|
||||||
|
msg["target"] = index["owner"]
|
||||||
|
msg["message"] = index["message"]
|
||||||
|
messages[++messages.len] = msg
|
||||||
|
|
||||||
|
data["messages"] = messages
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
// Don't copy-paste this unless you're making a pAI software module!
|
||||||
|
ui = new(user, user, id, "pai_messenger.tmpl", "Digital Messenger", 450, 600)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
var/mob/living/silicon/pai/P = usr
|
||||||
|
if(!istype(P)) return
|
||||||
|
|
||||||
|
if(!isnull(P.pda))
|
||||||
|
if(href_list["toggler"])
|
||||||
|
P.pda.toff = href_list["toggler"] != "1"
|
||||||
|
return 1
|
||||||
|
else if(href_list["ringer"])
|
||||||
|
P.pda.message_silent = href_list["ringer"] != "1"
|
||||||
|
return 1
|
||||||
|
else if(href_list["select"])
|
||||||
|
var/s = href_list["select"]
|
||||||
|
if(s == "*NONE*")
|
||||||
|
P.current_pda_messaging = null
|
||||||
|
else
|
||||||
|
P.current_pda_messaging = s
|
||||||
|
return 1
|
||||||
|
else if(href_list["target"])
|
||||||
|
if(P.silence_time)
|
||||||
|
return alert("Communications circuits remain uninitialized.")
|
||||||
|
|
||||||
|
var/target = locate(href_list["target"])
|
||||||
|
P.pda.create_message(P, target, 1)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/datum/pai_software/med_records
|
||||||
|
name = "Medical Records"
|
||||||
|
ram_cost = 15
|
||||||
|
id = "med_records"
|
||||||
|
toggle = 0
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
var/records[0]
|
||||||
|
for(var/datum/data/record/general in sortRecord(data_core.general))
|
||||||
|
var/record[0]
|
||||||
|
record["name"] = general.fields["name"]
|
||||||
|
record["ref"] = "\ref[general]"
|
||||||
|
records[++records.len] = record
|
||||||
|
|
||||||
|
data["records"] = records
|
||||||
|
|
||||||
|
var/datum/data/record/G = user.medicalActive1
|
||||||
|
var/datum/data/record/M = user.medicalActive2
|
||||||
|
data["general"] = G ? G.fields : null
|
||||||
|
data["medical"] = M ? M.fields : null
|
||||||
|
data["could_not_find"] = user.medical_cannotfind
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
// Don't copy-paste this unless you're making a pAI software module!
|
||||||
|
ui = new(user, user, id, "pai_medrecords.tmpl", "Medical Records", 450, 600)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
var/mob/living/silicon/pai/P = usr
|
||||||
|
if(!istype(P)) return
|
||||||
|
|
||||||
|
if(href_list["select"])
|
||||||
|
var/datum/data/record/record = locate(href_list["select"])
|
||||||
|
if(record)
|
||||||
|
var/datum/data/record/R = record
|
||||||
|
var/datum/data/record/M = null
|
||||||
|
if (!( data_core.general.Find(R) ))
|
||||||
|
P.medical_cannotfind = 1
|
||||||
|
else
|
||||||
|
P.medical_cannotfind = 0
|
||||||
|
for(var/datum/data/record/E in data_core.medical)
|
||||||
|
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
||||||
|
M = E
|
||||||
|
P.medicalActive1 = R
|
||||||
|
P.medicalActive2 = M
|
||||||
|
else
|
||||||
|
P.medical_cannotfind = 1
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/datum/pai_software/sec_records
|
||||||
|
name = "Security Records"
|
||||||
|
ram_cost = 15
|
||||||
|
id = "sec_records"
|
||||||
|
toggle = 0
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
var/records[0]
|
||||||
|
for(var/datum/data/record/general in sortRecord(data_core.general))
|
||||||
|
var/record[0]
|
||||||
|
record["name"] = general.fields["name"]
|
||||||
|
record["ref"] = "\ref[general]"
|
||||||
|
records[++records.len] = record
|
||||||
|
|
||||||
|
data["records"] = records
|
||||||
|
|
||||||
|
var/datum/data/record/G = user.securityActive1
|
||||||
|
var/datum/data/record/S = user.securityActive2
|
||||||
|
data["general"] = G ? G.fields : null
|
||||||
|
data["security"] = S ? S.fields : null
|
||||||
|
data["could_not_find"] = user.security_cannotfind
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
// Don't copy-paste this unless you're making a pAI software module!
|
||||||
|
ui = new(user, user, id, "pai_secrecords.tmpl", "Security Records", 450, 600)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
var/mob/living/silicon/pai/P = usr
|
||||||
|
if(!istype(P)) return
|
||||||
|
|
||||||
|
if(href_list["select"])
|
||||||
|
var/datum/data/record/record = locate(href_list["select"])
|
||||||
|
if(record)
|
||||||
|
var/datum/data/record/R = record
|
||||||
|
var/datum/data/record/S = null
|
||||||
|
if (!( data_core.general.Find(R) ))
|
||||||
|
P.securityActive1 = null
|
||||||
|
P.securityActive2 = null
|
||||||
|
P.security_cannotfind = 1
|
||||||
|
else
|
||||||
|
P.security_cannotfind = 0
|
||||||
|
for(var/datum/data/record/E in data_core.security)
|
||||||
|
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
|
||||||
|
S = E
|
||||||
|
P.securityActive1 = R
|
||||||
|
P.securityActive2 = S
|
||||||
|
else
|
||||||
|
P.securityActive1 = null
|
||||||
|
P.securityActive2 = null
|
||||||
|
P.security_cannotfind = 1
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/datum/pai_software/door_jack
|
||||||
|
name = "Door Jack"
|
||||||
|
ram_cost = 30
|
||||||
|
id = "door_jack"
|
||||||
|
toggle = 0
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
data["cable"] = user.cable != null
|
||||||
|
data["machine"] = user.cable && (user.cable.machine != null)
|
||||||
|
data["inprogress"] = user.hackdoor != null
|
||||||
|
data["progress_a"] = round(user.hackprogress / 10)
|
||||||
|
data["progress_b"] = user.hackprogress % 10
|
||||||
|
data["aborted"] = user.hack_aborted
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
// Don't copy-paste this unless you're making a pAI software module!
|
||||||
|
ui = new(user, user, id, "pai_doorjack.tmpl", "Door Jack", 300, 150)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
var/mob/living/silicon/pai/P = usr
|
||||||
|
if(!istype(P)) return
|
||||||
|
|
||||||
|
if(href_list["jack"])
|
||||||
|
if(P.cable && P.cable.machine)
|
||||||
|
P.hackdoor = P.cable.machine
|
||||||
|
P.hackloop()
|
||||||
|
return 1
|
||||||
|
else if(href_list["cancel"])
|
||||||
|
P.hackdoor = null
|
||||||
|
return 1
|
||||||
|
else if(href_list["cable"])
|
||||||
|
var/turf/T = get_turf_or_move(P.loc)
|
||||||
|
P.hack_aborted = 0
|
||||||
|
P.cable = new /obj/item/weapon/pai_cable(T)
|
||||||
|
for(var/mob/M in viewers(T))
|
||||||
|
M.show_message("<span class='warning'>A port on [P] opens to reveal [P.cable], which promptly falls to the floor.</span>", 3,
|
||||||
|
"<span class='warning'>You hear the soft click of something light and hard falling to the ground.</span>", 2)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/mob/living/silicon/pai/proc/hackloop()
|
||||||
|
var/turf/T = get_turf_or_move(src.loc)
|
||||||
|
for(var/mob/living/silicon/ai/AI in player_list)
|
||||||
|
if(T.loc)
|
||||||
|
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>"
|
||||||
|
else
|
||||||
|
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress. Unable to pinpoint location.</b></font>"
|
||||||
|
var/obj/machinery/door/D = cable.machine
|
||||||
|
if(!istype(D))
|
||||||
|
hack_aborted = 1
|
||||||
|
hackprogress = 0
|
||||||
|
cable.machine = null
|
||||||
|
hackdoor = null
|
||||||
|
return
|
||||||
|
while(hackprogress < 1000)
|
||||||
|
if(cable && cable.machine == D && cable.machine == hackdoor && get_dist(src, hackdoor) <= 1)
|
||||||
|
hackprogress = min(hackprogress+rand(1, 20), 1000)
|
||||||
|
else
|
||||||
|
hack_aborted = 1
|
||||||
|
hackprogress = 0
|
||||||
|
hackdoor = null
|
||||||
|
return
|
||||||
|
if(hackprogress >= 1000)
|
||||||
|
hackprogress = 0
|
||||||
|
D.open()
|
||||||
|
cable.machine = null
|
||||||
|
return
|
||||||
|
sleep(10) // Update every second
|
||||||
|
|
||||||
|
/datum/pai_software/atmosphere_sensor
|
||||||
|
name = "Atmosphere Sensor"
|
||||||
|
ram_cost = 5
|
||||||
|
id = "atmos_sense"
|
||||||
|
toggle = 0
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
var/turf/T = get_turf_or_move(user.loc)
|
||||||
|
if(!T)
|
||||||
|
data["reading"] = 0
|
||||||
|
data["pressure"] = 0
|
||||||
|
data["temperature"] = 0
|
||||||
|
data["temperatureC"] = 0
|
||||||
|
data["gas"] = list()
|
||||||
|
else
|
||||||
|
var/datum/gas_mixture/env = T.return_air()
|
||||||
|
data["reading"] = 1
|
||||||
|
var/pres = env.return_pressure() * 10
|
||||||
|
data["pressure"] = "[round(pres/10)].[pres%10]"
|
||||||
|
data["temperature"] = round(env.temperature)
|
||||||
|
data["temperatureC"] = round(env.temperature-T0C)
|
||||||
|
|
||||||
|
var/t_moles = env.total_moles
|
||||||
|
var/gases[0]
|
||||||
|
for(var/g in env.gas)
|
||||||
|
var/gas[0]
|
||||||
|
gas["name"] = gas_data.name[g]
|
||||||
|
gas["percent"] = round((env.gas[g] / t_moles) * 100)
|
||||||
|
gases[++gases.len] = gas
|
||||||
|
data["gas"] = gases
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
// Don't copy-paste this unless you're making a pAI software module!
|
||||||
|
ui = new(user, user, id, "pai_atmosphere.tmpl", "Atmosphere Sensor", 350, 300)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
|
||||||
|
/datum/pai_software/sec_hud
|
||||||
|
name = "Security HUD"
|
||||||
|
ram_cost = 20
|
||||||
|
id = "sec_hud"
|
||||||
|
|
||||||
|
toggle(mob/living/silicon/pai/user)
|
||||||
|
user.secHUD = !user.secHUD
|
||||||
|
|
||||||
|
is_active(mob/living/silicon/pai/user)
|
||||||
|
return user.secHUD
|
||||||
|
|
||||||
|
/datum/pai_software/med_hud
|
||||||
|
name = "Medical HUD"
|
||||||
|
ram_cost = 20
|
||||||
|
id = "med_hud"
|
||||||
|
|
||||||
|
toggle(mob/living/silicon/pai/user)
|
||||||
|
user.medHUD = !user.medHUD
|
||||||
|
|
||||||
|
is_active(mob/living/silicon/pai/user)
|
||||||
|
return user.medHUD
|
||||||
|
|
||||||
|
/datum/pai_software/translator
|
||||||
|
name = "Universal Translator"
|
||||||
|
ram_cost = 35
|
||||||
|
id = "translator"
|
||||||
|
|
||||||
|
toggle(mob/living/silicon/pai/user)
|
||||||
|
// Sol Common, Tradeband and Gutter are added with New() and are therefore the current default, always active languages
|
||||||
|
user.translator_on = !user.translator_on
|
||||||
|
if(user.translator_on)
|
||||||
|
user.add_language("Sinta'unathi")
|
||||||
|
user.add_language("Siik'tajr")
|
||||||
|
user.add_language("Skrellian")
|
||||||
|
else
|
||||||
|
user.remove_language("Sinta'unathi")
|
||||||
|
user.remove_language("Siik'tajr")
|
||||||
|
user.remove_language("Skrellian")
|
||||||
|
|
||||||
|
is_active(mob/living/silicon/pai/user)
|
||||||
|
return user.translator_on
|
||||||
|
|
||||||
|
/datum/pai_software/signaller
|
||||||
|
name = "Remote Signaller"
|
||||||
|
ram_cost = 5
|
||||||
|
id = "signaller"
|
||||||
|
toggle = 0
|
||||||
|
|
||||||
|
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
data["frequency"] = format_frequency(user.sradio.frequency)
|
||||||
|
data["code"] = user.sradio.code
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
|
||||||
|
if(!ui)
|
||||||
|
// Don't copy-paste this unless you're making a pAI software module!
|
||||||
|
ui = new(user, user, id, "pai_signaller.tmpl", "Signaller", 320, 150)
|
||||||
|
ui.load_cached_data(ManifestJSON)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
var/mob/living/silicon/pai/P = usr
|
||||||
|
if(!istype(P)) return
|
||||||
|
|
||||||
|
if(href_list["send"])
|
||||||
|
P.sradio.send_signal("ACTIVATE")
|
||||||
|
for(var/mob/O in hearers(1, P.loc))
|
||||||
|
O.show_message(text("\icon[] *beep* *beep*", P), 3, "*beep* *beep*", 2)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
else if(href_list["freq"])
|
||||||
|
var/new_frequency = (P.sradio.frequency + text2num(href_list["freq"]))
|
||||||
|
if(new_frequency < 1200 || new_frequency > 1600)
|
||||||
|
new_frequency = sanitize_frequency(new_frequency)
|
||||||
|
P.sradio.set_frequency(new_frequency)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
else if(href_list["code"])
|
||||||
|
P.sradio.code += text2num(href_list["code"])
|
||||||
|
P.sradio.code = round(P.sradio.code)
|
||||||
|
P.sradio.code = min(100, P.sradio.code)
|
||||||
|
P.sradio.code = max(1, P.sradio.code)
|
||||||
|
return 1
|
||||||
@@ -166,8 +166,8 @@
|
|||||||
var/reflectchance = 80 - round(P.damage/3)
|
var/reflectchance = 80 - round(P.damage/3)
|
||||||
if(prob(reflectchance))
|
if(prob(reflectchance))
|
||||||
adjustBruteLoss(P.damage * 0.5)
|
adjustBruteLoss(P.damage * 0.5)
|
||||||
visible_message("<span class='danger'>The [P.name] gets reflected by [src]'s shell!</span>", \
|
visible_message("<span class='danger'>\The [P] was reflected by \the [src]'s shell!</span>", \
|
||||||
"<span class='userdanger'>The [P.name] gets reflected by [src]'s shell!</span>")
|
"<span class='userdanger'>\The [P] was reflected by \the [src]'s shell!</span>")
|
||||||
|
|
||||||
// Find a turf near or on the original location to bounce to
|
// Find a turf near or on the original location to bounce to
|
||||||
if(P.starting)
|
if(P.starting)
|
||||||
@@ -176,12 +176,7 @@
|
|||||||
var/turf/curloc = get_turf(src)
|
var/turf/curloc = get_turf(src)
|
||||||
|
|
||||||
// redirect the projectile
|
// redirect the projectile
|
||||||
P.original = locate(new_x, new_y, P.z)
|
P.redirect(new_x, new_y, curloc, src)
|
||||||
P.starting = curloc
|
|
||||||
P.current = curloc
|
|
||||||
P.firer = src
|
|
||||||
P.yo = new_y - curloc.y
|
|
||||||
P.xo = new_x - curloc.x
|
|
||||||
|
|
||||||
return -1 // complete projectile permutation
|
return -1 // complete projectile permutation
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
icon_living = "syndicateranged"
|
icon_living = "syndicateranged"
|
||||||
casingtype = /obj/item/ammo_casing/a12mm
|
casingtype = /obj/item/ammo_casing/a12mm
|
||||||
projectilesound = 'sound/weapons/Gunshot_smg.ogg'
|
projectilesound = 'sound/weapons/Gunshot_smg.ogg'
|
||||||
projectiletype = /obj/item/projectile/bullet/midbullet2
|
projectiletype = /obj/item/projectile/bullet/pistol/medium
|
||||||
|
|
||||||
weapon1 = /obj/item/weapon/gun/projectile/automatic/c20r
|
weapon1 = /obj/item/weapon/gun/projectile/automatic/c20r
|
||||||
|
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ var/list/intents = list("help","disarm","grab","hurt")
|
|||||||
set name = "a-intent"
|
set name = "a-intent"
|
||||||
set hidden = 1
|
set hidden = 1
|
||||||
|
|
||||||
if(ishuman(src) || isbrain(src))
|
if(ishuman(src) || isbrain(src) || isslime(src))
|
||||||
switch(input)
|
switch(input)
|
||||||
if("help","disarm","grab","hurt")
|
if("help","disarm","grab","hurt")
|
||||||
a_intent = input
|
a_intent = input
|
||||||
|
|||||||
@@ -142,6 +142,12 @@ nanoui is used to open and update nano browser uis
|
|||||||
Procs called by update_status()
|
Procs called by update_status()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/mob/living/silicon/pai/can_interact_with_interface(src_object)
|
||||||
|
if(src_object == src && !stat)
|
||||||
|
return STATUS_INTERACTIVE
|
||||||
|
else
|
||||||
|
return ..()
|
||||||
|
|
||||||
/mob/proc/can_interact_with_interface(var/src_object)
|
/mob/proc/can_interact_with_interface(var/src_object)
|
||||||
return STATUS_CLOSE // By default no mob can do anything with NanoUI
|
return STATUS_CLOSE // By default no mob can do anything with NanoUI
|
||||||
|
|
||||||
|
|||||||
@@ -1,45 +1,3 @@
|
|||||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
|
||||||
|
|
||||||
/* new portable generator - work in progress
|
|
||||||
|
|
||||||
/obj/machinery/power/port_gen
|
|
||||||
name = "portable generator"
|
|
||||||
desc = "A portable generator used for emergency backup power."
|
|
||||||
icon = 'generator.dmi'
|
|
||||||
icon_state = "off"
|
|
||||||
density = 1
|
|
||||||
anchored = 0
|
|
||||||
directwired = 0
|
|
||||||
var/t_status = 0
|
|
||||||
var/t_per = 5000
|
|
||||||
var/filter = 1
|
|
||||||
var/tank = null
|
|
||||||
var/turf/inturf
|
|
||||||
var/starter = 0
|
|
||||||
var/rpm = 0
|
|
||||||
var/rpmtarget = 0
|
|
||||||
var/capacity = 1e6
|
|
||||||
var/turf/outturf
|
|
||||||
var/lastgen
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/process()
|
|
||||||
ideally we're looking to generate 5000
|
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/attackby(obj/item/weapon/W, mob/user)
|
|
||||||
tank [un]loading stuff
|
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/attack_hand(mob/user)
|
|
||||||
turn on/off
|
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/examine(mob/user)
|
|
||||||
display round(lastgen) and phorontank amount
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
//Previous code been here forever, adding new framework for portable generators
|
|
||||||
|
|
||||||
|
|
||||||
//Baseline portable generator. Has all the default handling. Not intended to be used on it's own (since it generates unlimited power).
|
//Baseline portable generator. Has all the default handling. Not intended to be used on it's own (since it generates unlimited power).
|
||||||
/obj/machinery/power/port_gen
|
/obj/machinery/power/port_gen
|
||||||
name = "Placeholder Generator" //seriously, don't use this. It can't be anchored without VV magic.
|
name = "Placeholder Generator" //seriously, don't use this. It can't be anchored without VV magic.
|
||||||
@@ -56,6 +14,9 @@ display round(lastgen) and phorontank amount
|
|||||||
var/recent_fault = 0
|
var/recent_fault = 0
|
||||||
var/power_output = 1
|
var/power_output = 1
|
||||||
|
|
||||||
|
/obj/machinery/power/port_gen/proc/IsBroken()
|
||||||
|
return (crit_fail || (stat & BROKEN|EMPED))
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/proc/HasFuel() //Placeholder for fuel check.
|
/obj/machinery/power/port_gen/proc/HasFuel() //Placeholder for fuel check.
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -69,11 +30,10 @@ display round(lastgen) and phorontank amount
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/process()
|
/obj/machinery/power/port_gen/process()
|
||||||
if(active && HasFuel() && !crit_fail && anchored && powernet)
|
if(active && HasFuel() && !IsBroken() && anchored && powernet)
|
||||||
add_avail(power_gen * power_output)
|
add_avail(power_gen * power_output)
|
||||||
UseFuel()
|
UseFuel()
|
||||||
src.updateDialog()
|
src.updateDialog()
|
||||||
|
|
||||||
else
|
else
|
||||||
active = 0
|
active = 0
|
||||||
icon_state = initial(icon_state)
|
icon_state = initial(icon_state)
|
||||||
@@ -96,20 +56,57 @@ display round(lastgen) and phorontank amount
|
|||||||
else
|
else
|
||||||
usr << "\blue The generator is off."
|
usr << "\blue The generator is off."
|
||||||
|
|
||||||
|
/obj/machinery/power/port_gen/emp_act(severity)
|
||||||
|
var/duration = 6000 //ten minutes
|
||||||
|
switch(severity)
|
||||||
|
if(1)
|
||||||
|
stat &= BROKEN
|
||||||
|
if(prob(75)) explode()
|
||||||
|
if(2)
|
||||||
|
if(prob(25)) stat &= BROKEN
|
||||||
|
if(prob(10)) explode()
|
||||||
|
if(3)
|
||||||
|
if(prob(10)) stat &= BROKEN
|
||||||
|
duration = 300
|
||||||
|
|
||||||
|
stat |= EMPED
|
||||||
|
if(duration)
|
||||||
|
spawn(duration)
|
||||||
|
stat &= ~EMPED
|
||||||
|
|
||||||
|
/obj/machinery/power/port_gen/proc/explode()
|
||||||
|
explosion(src.loc, -1, 3, 5, -1)
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
#define TEMPERATURE_DIVISOR 40
|
||||||
|
#define TEMPERATURE_CHANGE_MAX 20
|
||||||
|
|
||||||
//A power generator that runs on solid plasma sheets.
|
//A power generator that runs on solid plasma sheets.
|
||||||
/obj/machinery/power/port_gen/pacman
|
/obj/machinery/power/port_gen/pacman
|
||||||
name = "P.A.C.M.A.N.-type Portable Generator"
|
name = "\improper P.A.C.M.A.N.-type Portable Generator"
|
||||||
var/sheets = 0
|
desc = "A power generator that runs on solid plasma sheets. Rated for 80 kW max safe output."
|
||||||
var/max_sheets = 100
|
|
||||||
var/sheet_name = ""
|
|
||||||
var/sheet_path = /obj/item/stack/sheet/mineral/phoron
|
|
||||||
var/board_path = "/obj/item/weapon/circuitboard/pacman"
|
|
||||||
var/sheet_left = 0 // How much is left of the sheet
|
|
||||||
var/heat = 0
|
|
||||||
|
|
||||||
//produces up to 80 kW and lasts for 20 minutes with 50 sheets
|
var/sheet_name = "solid plasma sheet"
|
||||||
var/time_per_sheet = 96
|
var/sheet_path = /obj/item/stack/sheet/mineral/phoron
|
||||||
power_gen = 20000
|
var/board_path = "/obj/item/weapon/circuitboard/pacman"
|
||||||
|
|
||||||
|
/*
|
||||||
|
These values were chosen so that the generator can run safely up to 80 kW
|
||||||
|
A full 50 phoron sheet stack should last 20 minutes at power_output = 4
|
||||||
|
temperature_gain and max_temperature are set so that the max safe power level is 4.
|
||||||
|
Setting to 5 or higher can only be done temporarily before the generator overheats.
|
||||||
|
*/
|
||||||
|
power_gen = 20000 //Watts output per power_output level
|
||||||
|
var/max_power_output = 5 //The maximum power setting without emagging.
|
||||||
|
var/time_per_sheet = 96 //fuel efficiency - how long 1 sheet lasts at power level 1
|
||||||
|
var/max_sheets = 100 //max capacity of the hopper
|
||||||
|
var/max_temperature = 300 //max temperature before overheating increases
|
||||||
|
var/temperature_gain = 50 //how much the temperature increases per power output level, in degrees per level
|
||||||
|
|
||||||
|
var/sheets = 0 //How many sheets of material are loaded in the generator
|
||||||
|
var/sheet_left = 0 //How much is left of the current sheet
|
||||||
|
var/temperature = 0 //The current temperature
|
||||||
|
var/overheating = 0 //if this gets high enough the generator explodes
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/initialize()
|
/obj/machinery/power/port_gen/pacman/initialize()
|
||||||
..()
|
..()
|
||||||
@@ -135,76 +132,127 @@ display round(lastgen) and phorontank amount
|
|||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/RefreshParts()
|
/obj/machinery/power/port_gen/pacman/RefreshParts()
|
||||||
var/temp_rating = 0
|
var/temp_rating = 0
|
||||||
var/temp_reliability = 0
|
|
||||||
for(var/obj/item/weapon/stock_parts/SP in component_parts)
|
for(var/obj/item/weapon/stock_parts/SP in component_parts)
|
||||||
if(istype(SP, /obj/item/weapon/stock_parts/matter_bin))
|
if(istype(SP, /obj/item/weapon/stock_parts/matter_bin))
|
||||||
max_sheets = SP.rating * SP.rating * 50
|
max_sheets = SP.rating * SP.rating * 50
|
||||||
else if(istype(SP, /obj/item/weapon/stock_parts/micro_laser) || istype(SP, /obj/item/weapon/stock_parts/capacitor))
|
else if(istype(SP, /obj/item/weapon/stock_parts/micro_laser) || istype(SP, /obj/item/weapon/stock_parts/capacitor))
|
||||||
temp_rating += SP.rating
|
temp_rating += SP.rating
|
||||||
|
|
||||||
|
var/temp_reliability = 0
|
||||||
|
var/part_count = 0
|
||||||
for(var/obj/item/weapon/CP in component_parts)
|
for(var/obj/item/weapon/CP in component_parts)
|
||||||
temp_reliability += CP.reliability
|
temp_reliability += CP.reliability
|
||||||
reliability = min(round(temp_reliability / 4), 100)
|
part_count++
|
||||||
|
|
||||||
|
reliability = min(round(temp_reliability / part_count), 100)
|
||||||
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
|
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/examine(mob/user)
|
/obj/machinery/power/port_gen/pacman/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
user << "\blue The generator has [sheets] units of [sheet_name] fuel left, producing [power_gen] per cycle."
|
user << "\The [src] appears to be producing [power_gen*power_output] W."
|
||||||
if(crit_fail) user << "\red The generator seems to have broken down."
|
user << "There are [sheets] [sheet_name]\s left in the hopper."
|
||||||
|
if(IsBroken()) user << "<span class='warning'>\The [src] seems to have broken down.</span>"
|
||||||
|
if(overheating) user << "<span class='danger'>\The [src] is overheating!</span>"
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/HasFuel()
|
/obj/machinery/power/port_gen/pacman/HasFuel()
|
||||||
if(sheets >= 1 / (time_per_sheet / power_output) - sheet_left)
|
var/needed_sheets = power_output / time_per_sheet
|
||||||
|
if(sheets >= needed_sheets - sheet_left)
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
//Removes one stack's worth of material from the generator.
|
||||||
/obj/machinery/power/port_gen/pacman/DropFuel()
|
/obj/machinery/power/port_gen/pacman/DropFuel()
|
||||||
if(sheets)
|
if(sheets)
|
||||||
var/fail_safe = 0
|
var/obj/item/stack/sheet/S = new sheet_path(loc)
|
||||||
while(sheets > 0 && fail_safe < 100)
|
var/amount = min(sheets, S.max_amount)
|
||||||
fail_safe += 1
|
S.amount = amount
|
||||||
var/obj/item/stack/sheet/S = new sheet_path(loc)
|
sheets -= amount
|
||||||
var/amount = min(sheets, S.max_amount)
|
|
||||||
S.amount = amount
|
|
||||||
sheets -= amount
|
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/UseFuel()
|
/obj/machinery/power/port_gen/pacman/UseFuel()
|
||||||
var/needed_sheets = 1 / (time_per_sheet / power_output)
|
//break down sometimes
|
||||||
var/temp = min(needed_sheets, sheet_left)
|
if (reliability < 100)
|
||||||
needed_sheets -= temp
|
if (prob(1) && prob(1) && prob(100 - reliability))
|
||||||
sheet_left -= temp
|
stat |= BROKEN
|
||||||
sheets -= round(needed_sheets)
|
crit_fail = 1
|
||||||
needed_sheets -= round(needed_sheets)
|
if (prob(100 - reliability))
|
||||||
if (sheet_left <= 0 && sheets > 0)
|
explode()
|
||||||
sheet_left = 1 - needed_sheets
|
|
||||||
|
//how much material are we using this iteration?
|
||||||
|
var/needed_sheets = power_output / time_per_sheet
|
||||||
|
|
||||||
|
//HasFuel() should guarantee us that there is enough fuel left, so no need to check that
|
||||||
|
//the only thing we need to worry about is if we are going to rollover to the next sheet
|
||||||
|
if (needed_sheets > sheet_left)
|
||||||
sheets--
|
sheets--
|
||||||
|
sheet_left = (1 + sheet_left) - needed_sheets
|
||||||
var/lower_limit = 56 + power_output * 10
|
|
||||||
var/upper_limit = 76 + power_output * 10
|
|
||||||
var/bias = 0
|
|
||||||
if (power_output > 4)
|
|
||||||
upper_limit = 400
|
|
||||||
bias = power_output * 3
|
|
||||||
if (heat < lower_limit)
|
|
||||||
heat += 3
|
|
||||||
else
|
else
|
||||||
heat += rand(-7 + bias, 7 + bias)
|
sheet_left -= needed_sheets
|
||||||
if (heat < lower_limit)
|
|
||||||
heat = lower_limit
|
|
||||||
if (heat > upper_limit)
|
|
||||||
heat = upper_limit
|
|
||||||
|
|
||||||
if (heat > 300)
|
//calculate the "target" temperature range
|
||||||
|
//This should probably depend on the external temperature somehow, but whatever.
|
||||||
|
var/lower_limit = 56 + power_output * temperature_gain
|
||||||
|
var/upper_limit = 76 + power_output * temperature_gain
|
||||||
|
|
||||||
|
/*
|
||||||
|
Hot or cold environments can affect the equilibrium temperature
|
||||||
|
The lower the pressure the less effect it has. I guess it cools using a radiator or something when in vacuum.
|
||||||
|
Gives traitors more opportunities to sabotage the generator or allows enterprising engineers to build additional
|
||||||
|
cooling in order to get more power out.
|
||||||
|
*/
|
||||||
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
|
if (environment)
|
||||||
|
var/ratio = min(environment.return_pressure()/ONE_ATMOSPHERE, 1)
|
||||||
|
var/ambient = environment.temperature - T20C
|
||||||
|
lower_limit += ambient*ratio
|
||||||
|
upper_limit += ambient*ratio
|
||||||
|
|
||||||
|
var/average = (upper_limit + lower_limit)/2
|
||||||
|
|
||||||
|
//calculate the temperature increase
|
||||||
|
var/bias = 0
|
||||||
|
if (temperature < lower_limit)
|
||||||
|
bias = min(round((average - temperature)/TEMPERATURE_DIVISOR, 1), TEMPERATURE_CHANGE_MAX)
|
||||||
|
else if (temperature > upper_limit)
|
||||||
|
bias = max(round((temperature - average)/TEMPERATURE_DIVISOR, 1), -TEMPERATURE_CHANGE_MAX)
|
||||||
|
|
||||||
|
temperature += rand(-7 + bias, 7 + bias)
|
||||||
|
|
||||||
|
if (temperature > max_temperature)
|
||||||
overheat()
|
overheat()
|
||||||
del(src)
|
else if (overheating > 0)
|
||||||
return
|
overheating--
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/handleInactive()
|
/obj/machinery/power/port_gen/pacman/handleInactive()
|
||||||
|
var/cooling_temperature = 20
|
||||||
if (heat > 0)
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
heat = max(heat - 2, 0)
|
if (environment)
|
||||||
|
var/ratio = min(environment.return_pressure()/ONE_ATMOSPHERE, 1)
|
||||||
|
var/ambient = environment.temperature - T20C
|
||||||
|
cooling_temperature += ambient*ratio
|
||||||
|
|
||||||
|
if (temperature > cooling_temperature)
|
||||||
|
var/temp_loss = (temperature - cooling_temperature)/TEMPERATURE_DIVISOR
|
||||||
|
temp_loss = between(2, round(temp_loss, 1), TEMPERATURE_CHANGE_MAX)
|
||||||
|
temperature = max(temperature - temp_loss, cooling_temperature)
|
||||||
src.updateDialog()
|
src.updateDialog()
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/proc/overheat()
|
/obj/machinery/power/port_gen/pacman/proc/overheat()
|
||||||
explosion(src.loc, 2, 5, 2, -1)
|
overheating++
|
||||||
|
if (overheating > 60)
|
||||||
|
explode()
|
||||||
|
|
||||||
|
/obj/machinery/power/port_gen/pacman/explode()
|
||||||
|
//Vapourize all the phoron
|
||||||
|
//When ground up in a grinder, 1 sheet produces 20 u of phoron -- Chemistry-Machinery.dm
|
||||||
|
//1 mol = 10 u? I dunno. 1 mol of carbon is definitely bigger than a pill
|
||||||
|
var/phoron = (sheets+sheet_left)*20
|
||||||
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
|
if (environment)
|
||||||
|
environment.adjust_gas_temp("phoron", phoron/10, temperature + T0C)
|
||||||
|
|
||||||
|
sheets = 0
|
||||||
|
sheet_left = 0
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/power/port_gen/pacman/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
if(istype(O, sheet_path))
|
if(istype(O, sheet_path))
|
||||||
@@ -213,16 +261,16 @@ display round(lastgen) and phorontank amount
|
|||||||
if(amount < 1)
|
if(amount < 1)
|
||||||
user << "\blue The [src.name] is full!"
|
user << "\blue The [src.name] is full!"
|
||||||
return
|
return
|
||||||
user << "\blue You add [amount] sheets to the [src.name]."
|
user << "\blue You add [amount] [addstack.singular_name]\s to the [src.name]."
|
||||||
sheets += amount
|
sheets += amount
|
||||||
addstack.use(amount)
|
addstack.use(amount)
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
return
|
||||||
else if (istype(O, /obj/item/weapon/card/emag))
|
else if (istype(O, /obj/item/weapon/card/emag))
|
||||||
emagged = 1
|
emagged = 1
|
||||||
emp_act(1)
|
if (active && prob(25))
|
||||||
|
explode() //if they're foolish enough to emag while it's running
|
||||||
else if(!active)
|
else if(!active)
|
||||||
|
|
||||||
if(istype(O, /obj/item/weapon/wrench))
|
if(istype(O, /obj/item/weapon/wrench))
|
||||||
|
|
||||||
if(!anchored)
|
if(!anchored)
|
||||||
@@ -245,18 +293,9 @@ display round(lastgen) and phorontank amount
|
|||||||
else if(istype(O, /obj/item/weapon/crowbar) && open)
|
else if(istype(O, /obj/item/weapon/crowbar) && open)
|
||||||
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||||
for(var/obj/item/I in component_parts)
|
for(var/obj/item/I in component_parts)
|
||||||
if(I.reliability < 100)
|
|
||||||
I.crit_fail = 1
|
|
||||||
I.loc = src.loc
|
I.loc = src.loc
|
||||||
while ( sheets > 0 )
|
while ( sheets > 0 )
|
||||||
var/obj/item/stack/sheet/G = new sheet_path(src.loc)
|
DropFuel()
|
||||||
|
|
||||||
if ( sheets > 50 )
|
|
||||||
G.amount = 50
|
|
||||||
else
|
|
||||||
G.amount = sheets
|
|
||||||
|
|
||||||
sheets -= G.amount
|
|
||||||
|
|
||||||
new_frame.state = 2
|
new_frame.state = 2
|
||||||
new_frame.icon_state = "box_1"
|
new_frame.icon_state = "box_1"
|
||||||
@@ -266,7 +305,6 @@ display round(lastgen) and phorontank amount
|
|||||||
..()
|
..()
|
||||||
if (!anchored)
|
if (!anchored)
|
||||||
return
|
return
|
||||||
|
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/attack_ai(mob/user as mob)
|
/obj/machinery/power/port_gen/pacman/attack_ai(mob/user as mob)
|
||||||
@@ -289,9 +327,11 @@ display round(lastgen) and phorontank amount
|
|||||||
dat += text("[capitalize(sheet_name)]: [sheets] - <A href='?src=\ref[src];action=eject'>Eject</A><br>")
|
dat += text("[capitalize(sheet_name)]: [sheets] - <A href='?src=\ref[src];action=eject'>Eject</A><br>")
|
||||||
var/stack_percent = round(sheet_left * 100, 1)
|
var/stack_percent = round(sheet_left * 100, 1)
|
||||||
dat += text("Current stack: [stack_percent]% <br>")
|
dat += text("Current stack: [stack_percent]% <br>")
|
||||||
dat += text("Power output: <A href='?src=\ref[src];action=lower_power'>-</A> [power_gen * power_output] <A href='?src=\ref[src];action=higher_power'>+</A><br>")
|
dat += text("Power output: <A href='?src=\ref[src];action=lower_power'>-</A> [power_gen * power_output] Watts<A href='?src=\ref[src];action=higher_power'>+</A><br>")
|
||||||
dat += text("Power current: [(powernet == null ? "Unconnected" : "[avail()]")]<br>")
|
dat += text("Power current: [(powernet == null ? "Unconnected" : "[avail()]")]<br>")
|
||||||
dat += text("Heat: [heat]<br>")
|
|
||||||
|
var/tempstr = "Temperature: [temperature]°C<br>"
|
||||||
|
dat += (overheating)? "<span class='danger'>[tempstr]</span>" : tempstr
|
||||||
dat += "<br><A href='?src=\ref[src];action=close'>Close</A>"
|
dat += "<br><A href='?src=\ref[src];action=close'>Close</A>"
|
||||||
user << browse("[dat]", "window=port_gen")
|
user << browse("[dat]", "window=port_gen")
|
||||||
onclose(user, "port_gen")
|
onclose(user, "port_gen")
|
||||||
@@ -303,7 +343,7 @@ display round(lastgen) and phorontank amount
|
|||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
if(href_list["action"])
|
if(href_list["action"])
|
||||||
if(href_list["action"] == "enable")
|
if(href_list["action"] == "enable")
|
||||||
if(!active && HasFuel() && !crit_fail)
|
if(!active && HasFuel() && !IsBroken())
|
||||||
active = 1
|
active = 1
|
||||||
icon_state = "portgen1"
|
icon_state = "portgen1"
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
@@ -321,7 +361,7 @@ display round(lastgen) and phorontank amount
|
|||||||
power_output--
|
power_output--
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
if (href_list["action"] == "higher_power")
|
if (href_list["action"] == "higher_power")
|
||||||
if (power_output < 4 || emagged)
|
if (power_output < max_power_output || (emagged && power_output < round(max_power_output*2.5)))
|
||||||
power_output++
|
power_output++
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
if (href_list["action"] == "close")
|
if (href_list["action"] == "close")
|
||||||
@@ -330,26 +370,46 @@ display round(lastgen) and phorontank amount
|
|||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/super
|
/obj/machinery/power/port_gen/pacman/super
|
||||||
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
|
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
|
||||||
|
desc = "A power generator that utilizes uranium sheets as fuel. Can run for much longer than the standard PACMAN type generators. Rated for 80 kW max safe output."
|
||||||
icon_state = "portgen1"
|
icon_state = "portgen1"
|
||||||
sheet_path = /obj/item/stack/sheet/mineral/uranium
|
sheet_path = /obj/item/stack/sheet/mineral/uranium
|
||||||
|
time_per_sheet = 576 //same power output, but a 50 sheet stack will last 2 hours at max safe power
|
||||||
board_path = "/obj/item/weapon/circuitboard/pacman/super"
|
board_path = "/obj/item/weapon/circuitboard/pacman/super"
|
||||||
|
|
||||||
|
/obj/machinery/power/port_gen/pacman/super/UseFuel()
|
||||||
|
//produces a tiny amount of radiation when in use
|
||||||
|
if (prob(2*power_output))
|
||||||
|
for (var/mob/living/L in range(src, 5))
|
||||||
|
L.apply_effect(1, IRRADIATE) //should amount to ~5 rads per minute at max safe power
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/machinery/power/port_gen/pacman/super/explode()
|
||||||
|
//a nice burst of radiation
|
||||||
|
var/rads = 50 + (sheets + sheet_left)*1.5
|
||||||
|
for (var/mob/living/L in range(src, 10))
|
||||||
|
//should really fall with the square of the distance, but that makes the rads value drop too fast
|
||||||
|
//I dunno, maybe physics works different when you live in 2D -- SM radiation also works like this, apparently
|
||||||
|
L.apply_effect(max(20, round(rads/get_dist(L,src))), IRRADIATE)
|
||||||
|
|
||||||
//produces 80 kW like the PACMAN but 50 sheets will last for 2 hours
|
explosion(src.loc, 3, 3, 5, 3)
|
||||||
power_gen = 20000
|
del(src)
|
||||||
time_per_sheet = 576
|
|
||||||
|
|
||||||
overheat()
|
|
||||||
explosion(src.loc, 3, 3, 3, -1)
|
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/mrs
|
/obj/machinery/power/port_gen/pacman/mrs
|
||||||
name = "M.R.S.P.A.C.M.A.N.-type Portable Generator"
|
name = "M.R.S.P.A.C.M.A.N.-type Portable Generator"
|
||||||
|
desc = "An advanced power generator that runs on tritium. Rated for 200 kW maximum safe output!"
|
||||||
icon_state = "portgen2"
|
icon_state = "portgen2"
|
||||||
sheet_path = /obj/item/stack/sheet/mineral/tritium
|
sheet_path = /obj/item/stack/sheet/mineral/tritium
|
||||||
|
|
||||||
|
//I don't think tritium has any other use, so we might as well make this rewarding for players
|
||||||
|
//max safe power output (power level = 8) is 200 kW and lasts for 1 hour - 3 or 4 of these could power the station
|
||||||
|
power_gen = 25000 //watts
|
||||||
|
max_power_output = 10
|
||||||
|
time_per_sheet = 576
|
||||||
|
max_temperature = 800
|
||||||
|
temperature_gain = 90
|
||||||
board_path = "/obj/item/weapon/circuitboard/pacman/mrs"
|
board_path = "/obj/item/weapon/circuitboard/pacman/mrs"
|
||||||
|
|
||||||
//produces 200 kW and lasts for 1 hour with 50 sheets
|
/obj/machinery/power/port_gen/pacman/mrs/explode()
|
||||||
power_gen = 50000
|
//no special effects, but the explosion is pretty big (same as a supermatter shard).
|
||||||
time_per_sheet = 288
|
explosion(src.loc, 3, 6, 12, 16, 1)
|
||||||
|
del(src)
|
||||||
overheat()
|
|
||||||
explosion(src.loc, 4, 4, 4, -1)
|
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
throwforce = 1
|
throwforce = 1
|
||||||
w_class = 1.0
|
w_class = 1.0
|
||||||
var/caliber = "" //Which kind of guns it can be loaded into
|
var/caliber = "" //Which kind of guns it can be loaded into
|
||||||
var/projectile_type = ""//The bullet type to create when New() is called
|
var/projectile_type //The bullet type to create when New() is called
|
||||||
var/obj/item/projectile/BB = null //The loaded bullet
|
var/obj/item/projectile/BB = null //The loaded bullet
|
||||||
|
|
||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
if(projectile_type)
|
if(ispath(projectile_type))
|
||||||
BB = new projectile_type(src)
|
BB = new projectile_type(src)
|
||||||
pixel_x = rand(-10.0, 10)
|
pixel_x = rand(-10.0, 10)
|
||||||
pixel_y = rand(-10.0, 10)
|
pixel_y = rand(-10.0, 10)
|
||||||
|
|||||||
@@ -31,6 +31,13 @@
|
|||||||
max_ammo = 7
|
max_ammo = 7
|
||||||
multiple_sprites = 1
|
multiple_sprites = 1
|
||||||
|
|
||||||
|
/obj/item/ammo_magazine/c45f
|
||||||
|
name = "magazine (.45 flash)"
|
||||||
|
icon_state = "45"
|
||||||
|
ammo_type = "/obj/item/ammo_casing/c45f"
|
||||||
|
max_ammo = 7
|
||||||
|
multiple_sprites = 1
|
||||||
|
|
||||||
/obj/item/ammo_magazine/c45r/empty
|
/obj/item/ammo_magazine/c45r/empty
|
||||||
max_ammo = 0
|
max_ammo = 0
|
||||||
|
|
||||||
@@ -56,7 +63,7 @@
|
|||||||
icon_state = "9x19p"
|
icon_state = "9x19p"
|
||||||
origin_tech = "combat=2"
|
origin_tech = "combat=2"
|
||||||
ammo_type = "/obj/item/ammo_casing/c9mm"
|
ammo_type = "/obj/item/ammo_casing/c9mm"
|
||||||
max_ammo = 8
|
max_ammo = 10
|
||||||
multiple_sprites = 1
|
multiple_sprites = 1
|
||||||
|
|
||||||
/obj/item/ammo_magazine/mc9mm/empty
|
/obj/item/ammo_magazine/mc9mm/empty
|
||||||
|
|||||||
@@ -1,113 +1,129 @@
|
|||||||
/obj/item/ammo_casing/a357
|
/obj/item/ammo_casing/a357
|
||||||
desc = "A .357 bullet casing."
|
desc = "A .357 bullet casing."
|
||||||
caliber = "357"
|
caliber = "357"
|
||||||
projectile_type = "/obj/item/projectile/bullet"
|
projectile_type = /obj/item/projectile/bullet/pistol/strong
|
||||||
|
|
||||||
/obj/item/ammo_casing/a50
|
/obj/item/ammo_casing/a50
|
||||||
desc = "A .50AE bullet casing."
|
desc = "A .50AE bullet casing."
|
||||||
caliber = ".50"
|
caliber = ".50"
|
||||||
projectile_type = "/obj/item/projectile/bullet"
|
projectile_type = /obj/item/projectile/bullet/pistol/strong
|
||||||
|
|
||||||
/obj/item/ammo_casing/a418
|
|
||||||
desc = "A .418 bullet casing."
|
|
||||||
caliber = "357"
|
|
||||||
projectile_type = "/obj/item/projectile/bullet/suffocationbullet"
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/a75
|
/obj/item/ammo_casing/a75
|
||||||
desc = "A .75 bullet casing."
|
desc = "A 20mm bullet casing."
|
||||||
caliber = "75"
|
caliber = "75"
|
||||||
projectile_type = "/obj/item/projectile/bullet/gyro"
|
projectile_type = /obj/item/projectile/bullet/gyro
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/a666
|
|
||||||
desc = "A .666 bullet casing."
|
|
||||||
caliber = "357"
|
|
||||||
projectile_type = "/obj/item/projectile/bullet/cyanideround"
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/c38
|
/obj/item/ammo_casing/c38
|
||||||
desc = "A .38 bullet casing."
|
desc = "A .38 bullet casing."
|
||||||
caliber = "38"
|
caliber = "38"
|
||||||
projectile_type = "/obj/item/projectile/bullet/weakbullet"
|
projectile_type = /obj/item/projectile/bullet/pistol/rubber
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/c9mm
|
/obj/item/ammo_casing/c9mm
|
||||||
desc = "A 9mm bullet casing."
|
desc = "A 9mm bullet casing."
|
||||||
caliber = "9mm"
|
caliber = "9mm"
|
||||||
projectile_type = "/obj/item/projectile/bullet/midbullet2"
|
projectile_type = /obj/item/projectile/bullet/pistol
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/c45
|
/obj/item/ammo_casing/c45
|
||||||
desc = "A .45 bullet casing."
|
desc = "A .45 bullet casing."
|
||||||
caliber = ".45"
|
caliber = ".45"
|
||||||
projectile_type = "/obj/item/projectile/bullet/midbullet"
|
projectile_type = /obj/item/projectile/bullet/pistol/medium
|
||||||
|
|
||||||
/obj/item/ammo_casing/c45r
|
/obj/item/ammo_casing/c45r
|
||||||
desc = "A .45 rubber bullet casing."
|
desc = "A .45 rubber bullet casing."
|
||||||
caliber = ".45"
|
caliber = ".45"
|
||||||
projectile_type = "/obj/item/projectile/bullet/weakbullet/rubber"
|
projectile_type = /obj/item/projectile/bullet/pistol/rubber
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/c45f
|
||||||
|
desc = "A .45 flash shell casing."
|
||||||
|
caliber = ".45"
|
||||||
|
projectile_type = /obj/item/projectile/energy/flash
|
||||||
|
|
||||||
/obj/item/ammo_casing/a12mm
|
/obj/item/ammo_casing/a12mm
|
||||||
desc = "A 12mm bullet casing."
|
desc = "A 12mm bullet casing."
|
||||||
caliber = "12mm"
|
caliber = "12mm"
|
||||||
projectile_type = "/obj/item/projectile/bullet/midbullet2"
|
projectile_type = /obj/item/projectile/bullet/pistol/medium
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/shotgun
|
/obj/item/ammo_casing/shotgun
|
||||||
|
name = "shotgun slug"
|
||||||
|
desc = "A 12 gauge slug."
|
||||||
|
icon_state = "slshell"
|
||||||
|
caliber = "shotgun"
|
||||||
|
projectile_type = /obj/item/projectile/bullet/shotgun
|
||||||
|
matter = list("metal" = 12500)
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/shotgun/pellet
|
||||||
name = "shotgun shell"
|
name = "shotgun shell"
|
||||||
desc = "A 12 gauge shell."
|
desc = "A 12 gauge shell."
|
||||||
icon_state = "gshell"
|
icon_state = "gshell"
|
||||||
caliber = "shotgun"
|
projectile_type = /obj/item/projectile/bullet/pellet/shotgun
|
||||||
projectile_type = "/obj/item/projectile/bullet"
|
|
||||||
matter = list("metal" = 12500)
|
matter = list("metal" = 12500)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/shotgun/blank
|
/obj/item/ammo_casing/shotgun/blank
|
||||||
name = "shotgun shell"
|
name = "shotgun shell"
|
||||||
desc = "A blank shell."
|
desc = "A blank shell."
|
||||||
icon_state = "blshell"
|
icon_state = "blshell"
|
||||||
projectile_type = "/obj/item/projectile/bullet/chameleon"
|
projectile_type = /obj/item/projectile/bullet/blank
|
||||||
matter = list("metal" = 250)
|
matter = list("metal" = 250)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/shotgun/beanbag
|
/obj/item/ammo_casing/shotgun/beanbag
|
||||||
name = "beanbag shell"
|
name = "beanbag shell"
|
||||||
desc = "A weak beanbag shell."
|
desc = "A beanbag shell."
|
||||||
icon_state = "bshell"
|
icon_state = "bshell"
|
||||||
projectile_type = "/obj/item/projectile/bullet/weakbullet/beanbag"
|
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
|
||||||
matter = list("metal" = 500)
|
matter = list("metal" = 500)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/shotgun/stunshell
|
/obj/item/ammo_casing/shotgun/stunshell
|
||||||
name = "stun shell"
|
name = "stun shell"
|
||||||
desc = "A stunning shell."
|
desc = "A 12 gauge taser cartridge."
|
||||||
icon_state = "stunshell"
|
icon_state = "stunshell"
|
||||||
projectile_type = "/obj/item/projectile/bullet/stunshot"
|
projectile_type = /obj/item/projectile/energy/electrode/stunshot
|
||||||
matter = list("metal" = 2500)
|
matter = list("metal" = 1250, "glass" = 1250)
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/shotgun/flash
|
||||||
|
name = "flash shell"
|
||||||
|
desc = "A flash shell used to provide illumination."
|
||||||
|
icon_state = "fshell"
|
||||||
|
projectile_type = /obj/item/projectile/energy/flash/flare
|
||||||
|
matter = list("metal" = 250, "glass" = 250)
|
||||||
|
|
||||||
/obj/item/ammo_casing/shotgun/dart
|
/obj/item/ammo_casing/shotgun/dart
|
||||||
name = "shotgun darts"
|
name = "shotgun dart"
|
||||||
desc = "A dart for use in shotguns."
|
desc = "A dart for use in shotguns."
|
||||||
icon_state = "dart"
|
icon_state = "dart"
|
||||||
projectile_type = "/obj/item/projectile/energy/dart"
|
projectile_type = /obj/item/projectile/energy/dart
|
||||||
matter = list("metal" = 12500)
|
matter = list("metal" = 12500)
|
||||||
|
|
||||||
/obj/item/ammo_casing/a762
|
/obj/item/ammo_casing/a762
|
||||||
desc = "A 7.62 bullet casing."
|
desc = "A 7.62mm bullet casing."
|
||||||
caliber = "a762"
|
caliber = "a762"
|
||||||
projectile_type = "/obj/item/projectile/bullet/a762"
|
projectile_type = /obj/item/projectile/bullet/rifle/a762
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/a145
|
||||||
|
name = "\improper AP shell casing"
|
||||||
|
desc = "A 14.5mm AP shell."
|
||||||
|
icon_state = "slshell"
|
||||||
|
projectile_type = /obj/item/projectile/bullet/rifle/a145
|
||||||
|
|
||||||
/obj/item/ammo_casing/rocket
|
/obj/item/ammo_casing/rocket
|
||||||
name = "rocket shell"
|
name = "rocket shell"
|
||||||
desc = "A high explosive designed to be fired from a launcher."
|
desc = "A high explosive designed to be fired from a launcher."
|
||||||
icon_state = "rocketshell"
|
icon_state = "rocketshell"
|
||||||
projectile_type = "/obj/item/missile"
|
projectile_type = /obj/item/missile
|
||||||
caliber = "rocket"
|
caliber = "rocket"
|
||||||
|
|
||||||
/obj/item/ammo_casing/chameleon
|
/obj/item/ammo_casing/chameleon
|
||||||
name = "chameleon bullets"
|
name = "chameleon bullets"
|
||||||
desc = "A set of bullets for the Chameleon Gun."
|
desc = "A set of bullets for the Chameleon Gun."
|
||||||
projectile_type = "/obj/item/projectile/bullet/chameleon"
|
projectile_type = /obj/item/projectile/bullet/chameleon
|
||||||
caliber = ".45"
|
caliber = ".45"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/a418
|
||||||
|
desc = "A .418 bullet casing."
|
||||||
|
caliber = "357"
|
||||||
|
projectile_type = /obj/item/projectile/bullet/suffocationbullet
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/a666
|
||||||
|
desc = "A .666 bullet casing."
|
||||||
|
caliber = "357"
|
||||||
|
projectile_type = /obj/item/projectile/bullet/cyanideround
|
||||||
@@ -77,6 +77,8 @@
|
|||||||
|
|
||||||
/obj/item/weapon/gun/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)//TODO: go over this
|
/obj/item/weapon/gun/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)//TODO: go over this
|
||||||
//Exclude lasertag guns from the CLUMSY check.
|
//Exclude lasertag guns from the CLUMSY check.
|
||||||
|
if(!user) return
|
||||||
|
|
||||||
if(clumsy_check)
|
if(clumsy_check)
|
||||||
if(istype(user, /mob/living))
|
if(istype(user, /mob/living))
|
||||||
var/mob/living/M = user
|
var/mob/living/M = user
|
||||||
@@ -97,11 +99,6 @@
|
|||||||
|
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|
||||||
var/turf/curloc = get_turf(user)
|
|
||||||
var/turf/targloc = get_turf(target)
|
|
||||||
if (!istype(targloc) || !istype(curloc))
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!special_check(user))
|
if(!special_check(user))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -116,18 +113,6 @@
|
|||||||
if(!in_chamber)
|
if(!in_chamber)
|
||||||
return
|
return
|
||||||
|
|
||||||
in_chamber.firer = user
|
|
||||||
in_chamber.def_zone = user.zone_sel.selecting
|
|
||||||
if(targloc == curloc)
|
|
||||||
user.bullet_act(in_chamber)
|
|
||||||
del(in_chamber)
|
|
||||||
update_icon()
|
|
||||||
return
|
|
||||||
|
|
||||||
if(recoil)
|
|
||||||
spawn()
|
|
||||||
shake_camera(user, recoil + 1, recoil)
|
|
||||||
|
|
||||||
if(silenced)
|
if(silenced)
|
||||||
playsound(user, fire_sound, 10, 1)
|
playsound(user, fire_sound, 10, 1)
|
||||||
else
|
else
|
||||||
@@ -136,34 +121,46 @@
|
|||||||
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
|
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
|
||||||
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||||
|
|
||||||
in_chamber.original = target
|
|
||||||
in_chamber.loc = get_turf(user)
|
|
||||||
in_chamber.starting = get_turf(user)
|
|
||||||
in_chamber.shot_from = src
|
|
||||||
user.next_move = world.time + 4
|
user.next_move = world.time + 4
|
||||||
in_chamber.silenced = silenced
|
|
||||||
in_chamber.current = curloc
|
var/x_offset = 0
|
||||||
in_chamber.yo = targloc.y - curloc.y
|
var/y_offset = 0
|
||||||
in_chamber.xo = targloc.x - curloc.x
|
|
||||||
if(istype(user, /mob/living/carbon))
|
if(istype(user, /mob/living/carbon))
|
||||||
var/mob/living/carbon/mob = user
|
var/mob/living/carbon/mob = user
|
||||||
if(mob.shock_stage > 120)
|
if(mob.shock_stage > 120)
|
||||||
in_chamber.yo += rand(-2,2)
|
y_offset = rand(-2,2)
|
||||||
in_chamber.xo += rand(-2,2)
|
x_offset = rand(-2,2)
|
||||||
else if(mob.shock_stage > 70)
|
else if(mob.shock_stage > 70)
|
||||||
in_chamber.yo += rand(-1,1)
|
y_offset = rand(-1,1)
|
||||||
in_chamber.xo += rand(-1,1)
|
x_offset = rand(-1,1)
|
||||||
|
|
||||||
|
var/p_x
|
||||||
|
var/p_y
|
||||||
if(params)
|
if(params)
|
||||||
var/list/mouse_control = params2list(params)
|
var/list/mouse_control = params2list(params)
|
||||||
if(mouse_control["icon-x"])
|
if(mouse_control["icon-x"])
|
||||||
in_chamber.p_x = text2num(mouse_control["icon-x"])
|
p_x = text2num(mouse_control["icon-x"])
|
||||||
if(mouse_control["icon-y"])
|
if(mouse_control["icon-y"])
|
||||||
in_chamber.p_y = text2num(mouse_control["icon-y"])
|
p_y = text2num(mouse_control["icon-y"])
|
||||||
|
|
||||||
|
if(in_chamber)
|
||||||
|
var/fail = in_chamber.launch(
|
||||||
|
target = target,
|
||||||
|
user = user,
|
||||||
|
launcher = src,
|
||||||
|
target_zone = user.zone_sel.selecting,
|
||||||
|
x_offset = x_offset,
|
||||||
|
y_offset = y_offset,
|
||||||
|
px = p_x,
|
||||||
|
py = p_y
|
||||||
|
)
|
||||||
|
|
||||||
|
if(fail) return
|
||||||
|
|
||||||
|
if(recoil)
|
||||||
|
spawn()
|
||||||
|
shake_camera(user, recoil + 1, recoil)
|
||||||
|
|
||||||
spawn()
|
|
||||||
if(in_chamber)
|
|
||||||
in_chamber.process()
|
|
||||||
sleep(1)
|
sleep(1)
|
||||||
in_chamber = null
|
in_chamber = null
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
recoil = 1
|
recoil = 1
|
||||||
|
|
||||||
force = 10
|
force = 10
|
||||||
projectile_type = "/obj/item/projectile/energy/sonic"
|
projectile_type = /obj/item/projectile/energy/sonic
|
||||||
cell_type = "/obj/item/weapon/cell/super"
|
cell_type = "/obj/item/weapon/cell/super"
|
||||||
fire_delay = 40
|
fire_delay = 40
|
||||||
fire_sound = 'sound/effects/basscannon.ogg'
|
fire_sound = 'sound/effects/basscannon.ogg'
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
|
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
|
||||||
var/charge_cost = 100 //How much energy is needed to fire.
|
var/charge_cost = 100 //How much energy is needed to fire.
|
||||||
var/cell_type = "/obj/item/weapon/cell"
|
var/cell_type = "/obj/item/weapon/cell"
|
||||||
var/projectile_type = "/obj/item/projectile/beam/practice"
|
var/projectile_type = /obj/item/projectile/beam/practice
|
||||||
var/modifystate
|
var/modifystate
|
||||||
|
|
||||||
emp_act(severity)
|
emp_act(severity)
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
if(in_chamber) return 1
|
if(in_chamber) return 1
|
||||||
if(!power_supply) return 0
|
if(!power_supply) return 0
|
||||||
if(!power_supply.use(charge_cost)) return 0
|
if(!power_supply.use(charge_cost)) return 0
|
||||||
if(!projectile_type) return 0
|
if(!ispath(projectile_type)) return 0
|
||||||
in_chamber = new projectile_type(src)
|
in_chamber = new projectile_type(src)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user