Dev merge.

This commit is contained in:
Zuhayr
2015-02-21 19:49:47 +10:30
124 changed files with 3443 additions and 2188 deletions
+3 -1
View File
@@ -100,6 +100,7 @@
#include "code\datums\computerfiles.dm"
#include "code\datums\datacore.dm"
#include "code\datums\datumvars.dm"
#include "code\datums\descriptions.dm"
#include "code\datums\disease.dm"
#include "code\datums\mind.dm"
#include "code\datums\mixed.dm"
@@ -569,6 +570,7 @@
#include "code\game\objects\items\robot\robot_items.dm"
#include "code\game\objects\items\robot\robot_parts.dm"
#include "code\game\objects\items\robot\robot_upgrades.dm"
#include "code\game\objects\items\stacks\matter_synth.dm"
#include "code\game\objects\items\stacks\medical.dm"
#include "code\game\objects\items\stacks\nanopaste.dm"
#include "code\game\objects\items\stacks\rods.dm"
@@ -1232,9 +1234,9 @@
#include "code\modules\nano\JSON Reader.dm"
#include "code\modules\nano\JSON Writer.dm"
#include "code\modules\nano\nanoexternal.dm"
#include "code\modules\nano\nanointeraction.dm"
#include "code\modules\nano\nanomanager.dm"
#include "code\modules\nano\nanomapgen.dm"
#include "code\modules\nano\nanoprocs.dm"
#include "code\modules\nano\nanoui.dm"
#include "code\modules\nano\modules\crew_monitor.dm"
#include "code\modules\nano\modules\power_monitor.dm"
@@ -173,7 +173,7 @@
use_power = !use_power
if(signal.data["panic_siphon"]) //must be before if("scrubbing" thing
panic = text2num(signal.data["panic_siphon"] != null)
panic = text2num(signal.data["panic_siphon"])
if(panic)
use_power = 1
scrubbing = 0
@@ -189,8 +189,12 @@
if(signal.data["scrubbing"] != null)
scrubbing = text2num(signal.data["scrubbing"])
if(scrubbing)
panic = 0
if(signal.data["toggle_scrubbing"])
scrubbing = !scrubbing
if(scrubbing)
panic = 0
var/list/toggle = list()
+1 -1
View File
@@ -1305,7 +1305,7 @@ proc/is_hot(obj/item/W as obj)
/proc/can_operate(mob/living/carbon/M)
return (M.lying && \
locate(/obj/machinery/optable, M.loc) || \
(locate(/obj/structure/stool/bed/roller, M.loc) && prob(75)) || \
(locate(/obj/structure/bed/roller, M.loc) && prob(75)) || \
(locate(/obj/structure/table/, M.loc) && prob(66)))
/proc/reverse_direction(var/dir)
+22
View File
@@ -0,0 +1,22 @@
/*
This is what is supplied to the examine tab. Everything has a 'descriptions' variable, which is null by default. When it is not null,
it contains this datum. To add this datum to something, all you do is add this to the thing..
descriptions = new/datum/descriptions("I am some helpful blue text","I have backstory text about this obj.","You can use this to kill everyone.")
First string is the 'info' var, second is the 'fluff' var, and third is the 'antag' var. All are optional. Just add it to the object you want to have it.
If you are wondering, BYOND does not let you do desc = new/datum/descriptions .
More strings can be added easily, but you will need to add a proc to retrieve it from the atom. The procs are defined in atoms.dm.
*/
/datum/descriptions
var/info
var/fluff
var/antag
/datum/descriptions/New(var/info, var/fluff, var/antag)
src.info = info
src.fluff = fluff
src.antag = antag
+1 -1
View File
@@ -108,7 +108,7 @@
playSpecials(curturf,effectin,soundin)
var/obj/structure/stool/bed/chair/C = null
var/obj/structure/bed/chair/C = null
if(isliving(teleatom))
var/mob/living/L = teleatom
if(L.buckled)
+1 -1
View File
@@ -19,7 +19,7 @@
spawn(0)
if(target.buckled)
var/obj/structure/stool/bed/buckled_to = target.buckled.
var/obj/structure/bed/buckled_to = target.buckled.
buckled_to.unbuckle_mob()
var/mobloc = get_turf(target.loc)
+63 -25
View File
@@ -154,21 +154,31 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/storage/toolbox/emergency,
/obj/item/clothing/suit/storage/hazardvest,
/obj/item/clothing/suit/storage/hazardvest,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/weapon/tank/emergency_oxygen,
/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/storage/vest,
/obj/item/weapon/tank/emergency_oxygen/engi,
/obj/item/weapon/tank/emergency_oxygen/engi,
/obj/item/weapon/tank/emergency_oxygen/engi,
/obj/item/weapon/tank/emergency_oxygen/engi,
/obj/item/clothing/suit/space/emergency,
/obj/item/clothing/suit/space/emergency,
/obj/item/clothing/suit/space/emergency,
/obj/item/clothing/suit/space/emergency,
/obj/item/clothing/head/helmet/space/emergency,
/obj/item/clothing/head/helmet/space/emergency,
/obj/item/clothing/head/helmet/space/emergency,
/obj/item/clothing/head/helmet/space/emergency,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas)
cost = 35
cost = 45
containertype = /obj/structure/closet/crate/internals
containername = "Emergency crate"
group = "Atmospherics"
/datum/supply_packs/inflatable
name = "Inflatable barriers"
contains = list(/obj/item/weapon/storage/briefcase/inflatable,
@@ -690,6 +700,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/gun/energy/laser,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/gun/projectile/sec,
/obj/item/weapon/gun/projectile/sec,
/obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/storage/box/flashbangs)
cost = 30
@@ -698,6 +710,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_security
group = "Security"
/datum/supply_packs/eweapons
name = "Experimental weapons crate"
contains = list(/obj/item/weapon/gun/energy/xray,
@@ -712,18 +725,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_heads
group = "Security"
/datum/supply_packs/armor
/datum/supply_packs/randomised/armor
num_contained = 5
contains = list(/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/storage/vest/officer,
/obj/item/clothing/suit/storage/vest/warden,
/obj/item/clothing/suit/storage/vest/hos,
/obj/item/clothing/suit/storage/vest/pcrc,
/obj/item/clothing/suit/storage/vest/detective,
/obj/item/clothing/suit/storage/vest/heavy,
/obj/item/clothing/suit/storage/vest/heavy/officer,
/obj/item/clothing/suit/storage/vest/heavy/warden,
/obj/item/clothing/suit/storage/vest/heavy/hos,
/obj/item/clothing/suit/storage/vest/heavy/pcrc)
name = "Armor crate"
contains = list(/obj/item/clothing/head/helmet,
/obj/item/clothing/head/helmet,
/obj/item/clothing/suit/armor/vest,
/obj/item/clothing/suit/armor/vest)
cost = 15
cost = 40
containertype = /obj/structure/closet/crate/secure
containername = "Armor crate"
access = access_security
group = "Security"
/datum/supply_packs/riot
name = "Riot gear crate"
contains = list(/obj/item/weapon/melee/baton,
@@ -761,15 +784,16 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_armory
group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
/datum/supply_packs/shotgun
name = "Shotgun crate"
contains = list(/obj/item/clothing/suit/armor/bulletproof,
/obj/item/clothing/suit/armor/bulletproof,
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
/obj/item/weapon/storage/box/shotgunammo,
/obj/item/weapon/gun/projectile/shotgun/pump,
/obj/item/weapon/gun/projectile/shotgun/pump/combat)
cost = 50
containertype = /obj/structure/closet/crate/secure
containername = "Ballistic gear crate"
containername = "Shotgun crate"
access = access_armory
group = "Security"
@@ -779,7 +803,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/suit/armor/laserproof,
/obj/item/weapon/gun/energy/sniperrifle,
/obj/item/weapon/gun/energy/sniperrifle)
cost = 50
cost = 90
containertype = /obj/structure/closet/crate/secure
containername = "Energy marksman crate"
access = access_armory
@@ -797,6 +821,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_armory
group = "Security"
/datum/supply_packs/ionweapons
name = "Electromagnetic weapons crate"
contains = list(/obj/item/weapon/gun/energy/ionrifle,
/obj/item/weapon/gun/energy/ionrifle,
/obj/item/weapon/storage/box/emps)
cost = 50
containertype = /obj/structure/closet/crate/secure
containername = "electromagnetic weapons crate"
access = access_armory
group = "Security"
/datum/supply_packs/randomised/automatic
name = "Automatic weapon crate"
num_contained = 2
contains = list(/obj/item/weapon/gun/projectile/automatic/wt550,
/obj/item/weapon/gun/projectile/automatic/z8)
cost = 90
containertype = /obj/structure/closet/crate/secure
containername = "Automatic weapon crate"
access = access_armory
group = "Security"
/*
/datum/supply_packs/loyalty
name = "Loyalty implant crate"
@@ -1250,14 +1296,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
/obj/item/weapon/storage/belt/security/tactical,
/obj/item/clothing/shoes/jackboots,
/obj/item/clothing/gloves/black,
/obj/item/clothing/under/tactical,
/obj/item/clothing/suit/armor/tactical,
/obj/item/clothing/head/helmet/tactical,
/obj/item/clothing/mask/balaclava/tactical,
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
/obj/item/weapon/storage/belt/security/tactical,
/obj/item/clothing/shoes/jackboots,
/obj/item/clothing/gloves/black)
/datum/supply_packs/carpet
+39
View File
@@ -12,6 +12,9 @@
var/throwpass = 0
var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom.
//Examine tab
var/datum/descriptions/descriptions = null //See code/datums/descriptions.dm for details.
///Chemistry.
var/datum/reagents/reagents = null
@@ -202,11 +205,47 @@ its easier to just keep the beam vertical.
user << "\icon[src] That's [f_name] [suffix]"
var/datum/descriptions/D = descriptions
if(istype(D))
user.description_holders["info"] = get_descriptions_info()
user.description_holders["fluff"] = get_descriptions_fluff()
if(user.mind.special_role)
user.description_holders["antag"] = get_descriptions_antag()
else
user.description_holders["info"] = null
user.description_holders["fluff"] = null
user.description_holders["antag"] = null
if(name) //This shouldn't be needed but I'm paranoid.
user.description_holders["name"] = "[src.name]" //\icon[src]
user.description_holders["icon"] = "\icon[src]"
if(desc)
user << desc
user.description_holders["desc"] = src.desc
else
user.description_holders["desc"] = null //This is needed, or else if you examine one thing with a desc, then another without, the panel will retain the first examined's desc.
return distance == -1 || (get_dist(src, user) <= distance)
//Override these if you need special behaviour for a specific type.
/atom/proc/get_descriptions_info()
if(descriptions && descriptions.info)
return descriptions.info
return
/atom/proc/get_descriptions_fluff()
if(descriptions && descriptions.fluff)
return descriptions.fluff
return
/atom/proc/get_descriptions_antag()
if(descriptions && descriptions.antag)
return descriptions.antag
return
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
// see code/modules/mob/mob_movement.dm for more.
/atom/proc/relaymove()
+1 -1
View File
@@ -185,7 +185,7 @@ var/global/datum/controller/gameticker/ticker
cinematic.mouse_opacity = 0
cinematic.screen_loc = "1,0"
var/obj/structure/stool/bed/temp_buckle = new(src)
var/obj/structure/bed/temp_buckle = new(src)
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
if(station_missed)
for(var/mob/living/M in living_mob_list)
+5 -8
View File
@@ -27,18 +27,15 @@
ninja.special_role = "Ninja"
ninja.original = ninja.current
/*if(ninjastart.len == 0)
ninja.current << "<B>\red A proper starting location for you could not be found, please report this bug!</B>"
ninja.current << "<B>\red Attempting to place at a carpspawn.</B>"*/
if(ninjastart.len == 0)
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "carpspawn")
ninjastart.Add(L)
//Until such a time as people want to place ninja spawn points, carpspawn will do fine.
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "carpspawn")
ninjastart.Add(L)
if(ninjastart.len == 0 && latejoin.len > 0)
ninja.current << "<B>\red No spawneable locations could be found. Defaulting to latejoin.</B>"
return 1
else if (ninjastart.len == 0)
else
ninja.current << "<B>\red No spawneable locations could be found. Aborting.</B>"
return 0
+2 -2
View File
@@ -421,7 +421,7 @@ var/global/datum/controller/occupations/job_master
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/stool/bed/chair/wheelchair))
if(H.buckled && istype(H.buckled, /obj/structure/bed/chair/wheelchair))
H.buckled.loc = H.loc
H.buckled.set_dir(H.dir)
@@ -516,7 +516,7 @@ var/global/datum/controller/occupations/job_master
var/datum/organ/external/l_foot = H.get_organ("l_foot")
var/datum/organ/external/r_foot = H.get_organ("r_foot")
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
var/obj/structure/stool/bed/chair/wheelchair/W = new /obj/structure/stool/bed/chair/wheelchair(H.loc)
var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc)
H.buckled = W
H.update_canmove()
W.set_dir(H.dir)
+169 -294
View File
@@ -195,7 +195,6 @@
if(RCON_YES)
remote_control = 1
updateDialog()
return
/obj/machinery/alarm/proc/handle_heating_cooling(var/datum/gas_mixture/environment)
@@ -468,7 +467,7 @@
frequency.post_signal(src, alert_signal)
/obj/machinery/alarm/attack_ai(mob/user)
return interact(user)
ui_interact(user)
/obj/machinery/alarm/attack_hand(mob/user)
. = ..()
@@ -477,315 +476,179 @@
return interact(user)
/obj/machinery/alarm/interact(mob/user)
user.set_machine(src)
ui_interact(user)
wires.Interact(user)
if(buildstage!=2)
return
/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/custom_state = null)
var/data[0]
var/remote_connection = 0
var/remote_access = 0
if(custom_state)
var/list/state = custom_state.href_list(user)
remote_connection = state["remote_connection"] // Remote connection means we're non-adjacent/connecting from another computer
remote_access = state["remote_access"] // Remote access means we also have the privilege to alter the air alarm.
if((get_dist(src, user) > 1 ))
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=air_alarm")
user << browse(null, "window=AAlarmwires")
return
data["locked"] = locked && !user.isSilicon()
data["remote_connection"] = remote_connection
data["remote_access"] = remote_access
data["rcon"] = rcon_setting
data["screen"] = screen
populate_status(data)
else if (istype(user, /mob/living/silicon) && aidisabled)
user << "AI control for this Air Alarm interface has been disabled."
user << browse(null, "window=air_alarm")
return
if(!(locked && !remote_connection) || remote_access || user.isSilicon())
populate_controls(data)
if(wiresexposed && (!istype(user, /mob/living/silicon/ai)))
wires.Interact(user)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "air_alarm.tmpl", src.name, 625, 625, master_ui = master_ui, custom_state = custom_state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
if(!shorted)
user << browse(return_text(user),"window=air_alarm")
onclose(user, "air_alarm")
return
/obj/machinery/alarm/proc/return_text(mob/user)
if(!(istype(user, /mob/living/silicon)) && locked)
return "<html><head><title>\The [src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
else
return "<html><head><title>\The [src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr>[return_controls()]</body></html>"
/obj/machinery/alarm/proc/return_status()
/obj/machinery/alarm/proc/populate_status(var/data)
var/turf/location = get_turf(src)
var/datum/gas_mixture/environment = location.return_air()
var/total = environment.total_moles
var/output = "<b>Air Status:</b><br>"
if(total == 0)
output += "<font color='red'><b>Warning: Cannot obtain air sample for analysis.</b></font>"
return output
var/list/environment_data = new
data["has_environment"] = total
if(total)
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
output += {"
<style>
.dl0 { color: green; }
.dl1 { color: orange; }
.dl2 { color: red; font-weght: bold;}
</style>
"}
var/list/current_settings = TLV["pressure"]
var/pressure = environment.return_pressure()
var/pressure_danger = get_danger_level(pressure, current_settings)
environment_data[++environment_data.len] = list("name" = "Pressure", "value" = pressure, "unit" = "kPa", "danger_level" = pressure_danger)
data["total_danger"] = pressure_danger
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
current_settings = TLV["oxygen"]
var/oxygen_danger = get_danger_level(environment.gas["oxygen"]*partial_pressure, current_settings)
environment_data[++environment_data.len] = list("name" = "Oxygen", "value" = environment.gas["oxygen"] / total * 100, "unit" = "%", "danger_level" = oxygen_danger)
data["total_danger"] = max(oxygen_danger, data["total_danger"])
var/list/current_settings = TLV["pressure"]
var/environment_pressure = environment.return_pressure()
var/pressure_dangerlevel = get_danger_level(environment_pressure, current_settings)
current_settings = TLV["carbon dioxide"]
var/carbon_dioxide_danger = get_danger_level(environment.gas["carbon dioxide"]*partial_pressure, current_settings)
environment_data[++environment_data.len] = list("name" = "Carbon dioxide", "value" = environment.gas["carbon dioxide"] / total * 100, "unit" = "%", "danger_level" = carbon_dioxide_danger)
data["total_danger"] = max(carbon_dioxide_danger, data["total_danger"])
current_settings = TLV["oxygen"]
var/oxygen_dangerlevel = get_danger_level(environment.gas["oxygen"]*partial_pressure, current_settings)
var/oxygen_percent = round(environment.gas["oxygen"] / total * 100, 2)
current_settings = TLV["phoron"]
var/phoron_danger = get_danger_level(environment.gas["phoron"]*partial_pressure, current_settings)
environment_data[++environment_data.len] = list("name" = "Toxins", "value" = environment.gas["phoron"] / total * 100, "unit" = "%", "danger_level" = phoron_danger)
data["total_danger"] = max(phoron_danger, data["total_danger"])
current_settings = TLV["carbon dioxide"]
var/co2_dangerlevel = get_danger_level(environment.gas["carbon_dioxide"]*partial_pressure, current_settings)
var/co2_percent = round(environment.gas["carbon_dioxide"] / total * 100, 2)
current_settings = TLV["temperature"]
var/temperature_danger = get_danger_level(environment.temperature, current_settings)
environment_data[++environment_data.len] = list("name" = "Temperature", "value" = environment.temperature, "unit" = "K ([round(environment.temperature - T0C, 0.1)]C)", "danger_level" = temperature_danger)
data["total_danger"] = max(temperature_danger, data["total_danger"])
current_settings = TLV["phoron"]
var/phoron_dangerlevel = get_danger_level(environment.gas["phoron"]*partial_pressure, current_settings)
var/phoron_percent = round(environment.gas["phoron"] / total * 100, 2)
//current_settings = TLV["other"]
//var/other_moles = 0.0
//for(var/datum/gas/G in environment.trace_gases)
// other_moles+=G.moles
//var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, current_settings)
current_settings = TLV["temperature"]
var/temperature_dangerlevel = get_danger_level(environment.temperature, current_settings)
output += {"
Pressure: <span class='dl[pressure_dangerlevel]'>[environment_pressure]</span>kPa<br>
Oxygen: <span class='dl[oxygen_dangerlevel]'>[oxygen_percent]</span>%<br>
Carbon dioxide: <span class='dl[co2_dangerlevel]'>[co2_percent]</span>%<br>
Toxins: <span class='dl[phoron_dangerlevel]'>[phoron_percent]</span>%<br>
"}
//if (other_dangerlevel==2)
// output += "Notice: <span class='dl2'>High Concentration of Unknown Particles Detected</span><br>"
//else if (other_dangerlevel==1)
// output += "Notice: <span class='dl1'>Low Concentration of Unknown Particles Detected</span><br>"
output += "Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]</span>K ([round(environment.temperature - T0C, 0.1)]C)<br>"
//'Local Status' should report the LOCAL status, damnit.
output += "Local Status: "
switch(max(pressure_dangerlevel,oxygen_dangerlevel,co2_dangerlevel,phoron_dangerlevel,other_dangerlevel,temperature_dangerlevel))
if(2)
output += "<span class='dl2'>DANGER: Internals Required</span><br>"
if(1)
output += "<span class='dl1'>Caution</span><br>"
if(0)
output += "<span class='dl0'>Optimal</span><br>"
output += "Area Status: "
if(alarm_area.atmosalm)
output += "<span class='dl1'>Atmos alert in area</span>"
else if (alarm_area.fire)
output += "<span class='dl1'>Fire alarm in area</span>"
else
output += "No alerts"
return output
/obj/machinery/alarm/proc/rcon_text()
var/dat = "<table width=\"100%\"><td align=\"center\"><b>Remote Control:</b><br>"
if(rcon_setting == RCON_NO)
dat += "<b>Off</b>"
else
dat += "<a href='?src=\ref[src];rcon=[RCON_NO]'>Off</a>"
dat += " | "
if(rcon_setting == RCON_AUTO)
dat += "<b>Auto</b>"
else
dat += "<a href='?src=\ref[src];rcon=[RCON_AUTO]'>Auto</a>"
dat += " | "
if(rcon_setting == RCON_YES)
dat += "<b>On</b>"
else
dat += "<a href='?src=\ref[src];rcon=[RCON_YES]'>On</a></td>"
//Hackish, I know. I didn't feel like bothering to rework all of this.
dat += "<td align=\"center\"><b>Thermostat:</b><br><a href='?src=\ref[src];temperature=1'>[target_temperature - T0C]C</a></td></table>"
return dat
/obj/machinery/alarm/proc/return_controls(var/source = src)
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
data["environment"] = environment_data
data["atmos_alarm"] = alarm_area.atmosalm
data["fire_alarm"] = alarm_area.fire != null
data["target_temperature"] = "[target_temperature - T0C]C"
/obj/machinery/alarm/proc/populate_controls(var/list/data)
switch(screen)
if (AALARM_SCREEN_MAIN)
if(alarm_area.atmosalm)
output += "<a href='?src=\ref[source];atmos_reset=1'>Reset - Area Atmospheric Alarm</a><hr>"
else
output += "<a href='?src=\ref[source];atmos_alarm=1'>Activate - Area Atmospheric Alarm</a><hr>"
if(AALARM_SCREEN_MAIN)
data["mode"] = mode
if(AALARM_SCREEN_VENT)
var/vents[0]
for(var/id_tag in alarm_area.air_vent_names)
var/long_name = alarm_area.air_vent_names[id_tag]
var/list/info = alarm_area.air_vent_info[id_tag]
if(!info)
continue
vents[++vents.len] = list(
"id_tag" = id_tag,
"long_name" = sanitize(long_name),
"power" = info["power"],
"checks" = info["checks"],
"direction" = info["direction"],
"external" = info["external"]
)
data["vents"] = vents
if(AALARM_SCREEN_SCRUB)
var/scrubbers[0]
for(var/id_tag in alarm_area.air_scrub_names)
var/long_name = alarm_area.air_scrub_names[id_tag]
var/list/info = alarm_area.air_scrub_info[id_tag]
if(!info)
continue
scrubbers[++scrubbers.len] = list(
"id_tag" = id_tag,
"long_name" = sanitize(long_name),
"power" = info["power"],
"scrubbing" = info["scrubbing"],
"panic" = info["panic"],
"filters" = list()
)
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Oxygen", "command" = "o2_scrub", "val" = info["filter_o2"]))
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Nitrogen", "command" = "n2_scrub", "val" = info["filter_n2"]))
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Carbon Dioxide", "command" = "co2_scrub","val" = info["filter_co2"]))
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Toxin" , "command" = "tox_scrub","val" = info["filter_phoron"]))
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Nitrous Oxide", "command" = "n2o_scrub","val" = info["filter_n2o"]))
data["scrubbers"] = scrubbers
if(AALARM_SCREEN_MODE)
var/modes[0]
modes[++modes.len] = list("name" = "Filtering - Scrubs out contaminants", "mode" = AALARM_MODE_SCRUBBING, "selected" = mode == AALARM_MODE_SCRUBBING, "danger" = 0)
modes[++modes.len] = list("name" = "Replace Air - Siphons out air while replacing", "mode" = AALARM_MODE_REPLACEMENT, "selected" = mode == AALARM_MODE_REPLACEMENT, "danger" = 0)
modes[++modes.len] = list("name" = "Panic - Siphons air out of the room", "mode" = AALARM_MODE_PANIC, "selected" = mode == AALARM_MODE_PANIC, "danger" = 1)
modes[++modes.len] = list("name" = "Cycle - Siphons air before replacing", "mode" = AALARM_MODE_CYCLE, "selected" = mode == AALARM_MODE_CYCLE, "danger" = 1)
modes[++modes.len] = list("name" = "Fill - Shuts off scrubbers and opens vents", "mode" = AALARM_MODE_FILL, "selected" = mode == AALARM_MODE_FILL, "danger" = 0)
modes[++modes.len] = list("name" = "Off - Shuts off vents and scrubbers", "mode" = AALARM_MODE_OFF, "selected" = mode == AALARM_MODE_OFF, "danger" = 0)
data["modes"] = modes
data["mode"] = mode
if(AALARM_SCREEN_SENSORS)
var/list/selected
var/thresholds[0]
output += {"
<a href='?src=\ref[source];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
<a href='?src=\ref[source];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
<a href='?src=\ref[source];screen=[AALARM_SCREEN_MODE]'>Set environmentals mode</a><br>
<a href='?src=\ref[source];screen=[AALARM_SCREEN_SENSORS]'>Sensor Settings</a><br>
<HR>
"}
if (mode==AALARM_MODE_PANIC)
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[source];mode=[AALARM_MODE_SCRUBBING]'>Turn syphoning off</A>"
else
output += "<A href='?src=\ref[source];mode=[AALARM_MODE_PANIC]'><font color='red'>ACTIVATE PANIC SYPHON IN AREA</font></A>"
if (AALARM_SCREEN_VENT)
var/sensor_data = ""
if(alarm_area.air_vent_names.len)
for(var/id_tag in alarm_area.air_vent_names)
var/long_name = alarm_area.air_vent_names[id_tag]
var/list/data = alarm_area.air_vent_info[id_tag]
if(!data)
continue;
var/state = ""
sensor_data += {"
<B>[long_name]</B>[state]<BR>
<B>Operating:</B>
<A href='?src=\ref[source];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A>
<BR>
<B>Pressure checks:</B>
<A href='?src=\ref[source];id_tag=[id_tag];command=checks;val=[data["checks"]^1]' [(data["checks"]&1)?"style='font-weight:bold;'":""]>external</A>
<A href='?src=\ref[source];id_tag=[id_tag];command=checks;val=[data["checks"]^2]' [(data["checks"]&2)?"style='font-weight:bold;'":""]>internal</A>
<BR>
<B>External pressure bound:</B>
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-1000'>-</A>
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-100'>-</A>
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-10'>-</A>
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-1'>-</A>
[data["external"]]
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+1'>+</A>
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
<A href='?src=\ref[source];id_tag=[id_tag];command=set_external_pressure;val=[ONE_ATMOSPHERE]'> (reset) </A>
<BR>
"}
if (data["direction"] == "siphon")
sensor_data += {"
<B>Direction:</B>
siphoning
<BR>
"}
sensor_data += {"<HR>"}
else
sensor_data = "No vents connected.<BR>"
output = {"<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
if (AALARM_SCREEN_SCRUB)
var/sensor_data = ""
if(alarm_area.air_scrub_names.len)
for(var/id_tag in alarm_area.air_scrub_names)
var/long_name = alarm_area.air_scrub_names[id_tag]
var/list/data = alarm_area.air_scrub_info[id_tag]
if(!data)
continue;
var/state = ""
sensor_data += {"
<B>[long_name]</B>[state]<BR>
<B>Operating:</B>
<A href='?src=\ref[source];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A><BR>
<B>Type:</B>
<A href='?src=\ref[source];id_tag=[id_tag];command=scrubbing;val=[!data["scrubbing"]]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>
"}
if(data["scrubbing"])
sensor_data += {"
<B>Filtering:</B>
Oxygen
<A href='?src=\ref[source];id_tag=[id_tag];command=o2_scrub;val=[!data["filter_o2"]]'>[data["filter_o2"]?"on":"off"]</A>;
Nitrogen
<A href='?src=\ref[source];id_tag=[id_tag];command=n2_scrub;val=[!data["filter_n2"]]'>[data["filter_n2"]?"on":"off"]</A>;
Carbon Dioxide
<A href='?src=\ref[source];id_tag=[id_tag];command=co2_scrub;val=[!data["filter_co2"]]'>[data["filter_co2"]?"on":"off"]</A>;
Toxins
<A href='?src=\ref[source];id_tag=[id_tag];command=tox_scrub;val=[!data["filter_phoron"]]'>[data["filter_phoron"]?"on":"off"]</A>;
Nitrous Oxide
<A href='?src=\ref[source];id_tag=[id_tag];command=n2o_scrub;val=[!data["filter_n2o"]]'>[data["filter_n2o"]?"on":"off"]</A>
<BR>
"}
sensor_data += {"
<B>Panic syphon:</B> [data["panic"]?"<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>":""]
<A href='?src=\ref[source];id_tag=[id_tag];command=panic_siphon;val=[!data["panic"]]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate</font></A><BR>
<HR>
"}
else
sensor_data = "No scrubbers connected.<BR>"
output = {"<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
if (AALARM_SCREEN_MODE)
output += "<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br><b>Air machinery mode for the area:</b><ul>"
var/list/modes = list(AALARM_MODE_SCRUBBING = "Filtering - Scrubs out contaminants",\
AALARM_MODE_REPLACEMENT = "<font color='blue'>Replace Air - Siphons out air while replacing</font>",\
AALARM_MODE_PANIC = "<font color='red'>Panic - Siphons air out of the room</font>",\
AALARM_MODE_CYCLE = "<font color='red'>Cycle - Siphons air before replacing</font>",\
AALARM_MODE_FILL = "<font color='green'>Fill - Shuts off scrubbers and opens vents</font>",\
AALARM_MODE_OFF = "<font color='blue'>Off - Shuts off vents and scrubbers</font>",)
for (var/m=1,m<=modes.len,m++)
if (mode==m)
output += "<li><A href='?src=\ref[source];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"
else
output += "<li><A href='?src=\ref[source];mode=[m]'>[modes[m]]</A></li>"
output += "</ul>"
if (AALARM_SCREEN_SENSORS)
output += {"
<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
<b>Alarm thresholds:</b><br>
Partial pressure for gases
<style>/* some CSS woodoo here. Does not work perfect in ie6 but who cares? */
table td { border-left: 1px solid black; border-top: 1px solid black;}
table tr:first-child th { border-left: 1px solid black;}
table th:first-child { border-top: 1px solid black; font-weight: normal;}
table tr:first-child th:first-child { border: none;}
.dl0 { color: green; }
.dl1 { color: orange; }
.dl2 { color: red; font-weght: bold;}
</style>
<table cellspacing=0>
<TR><th></th><th class=dl2>min2</th><th class=dl1>min1</th><th class=dl1>max1</th><th class=dl2>max2</th></TR>
"}
var/list/gases = list(
var/list/gas_names = list(
"oxygen" = "O<sub>2</sub>",
"carbon dioxide" = "CO<sub>2</sub>",
"phoron" = "Toxin",
"other" = "Other",)
var/list/selected
for (var/g in gases)
output += "<TR><th>[gases[g]]</th>"
"other" = "Other")
for (var/g in gas_names)
thresholds[++thresholds.len] = list("name" = gas_names[g], "settings" = list())
selected = TLV[g]
for(var/i = 1, i <= 4, i++)
output += "<td><A href='?src=\ref[source];command=set_threshold;env=[g];var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
output += "</TR>"
thresholds[thresholds.len]["settings"] += list(list("env" = g, "val" = i, "selected" = selected[i]))
selected = TLV["pressure"]
output += " <TR><th>Pressure</th>"
thresholds[++thresholds.len] = list("name" = "Pressure", "settings" = list())
for(var/i = 1, i <= 4, i++)
output += "<td><A href='?src=\ref[source];command=set_threshold;env=pressure;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
output += "</TR>"
thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = i, "selected" = selected[i]))
selected = TLV["temperature"]
output += "<TR><th>Temperature</th>"
thresholds[++thresholds.len] = list("name" = "Temperature", "settings" = list())
for(var/i = 1, i <= 4, i++)
output += "<td><A href='?src=\ref[source];command=set_threshold;env=temperature;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
output += "</TR></table>"
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = i, "selected" = selected[i]))
return output
/obj/machinery/alarm/Topic(href, href_list, var/nowindow = 0, var/remote = 0)
if(..(href, href_list, nowindow, !remote) || !( Adjacent(usr) || nowindow || istype(usr, /mob/living/silicon)) ) // dont forget calling super in machine Topics -walter0o
usr.machine = null
usr << browse(null, "window=air_alarm")
usr << browse(null, "window=AAlarmwires")
return
data["thresholds"] = thresholds
add_fingerprint(usr)
usr.set_machine(src)
/obj/machinery/alarm/CanUseTopic(var/mob/user, href_list, var/datum/topic_state/custom_state)
if(buildstage != 2)
return STATUS_CLOSE
if(aidisabled && user.isAI())
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
return STATUS_CLOSE
. = shorted ? STATUS_DISABLED : STATUS_INTERACTIVE
if(. == STATUS_INTERACTIVE)
var/extra_href = custom_state.href_list(usr)
// Prevent remote users from altering RCON settings unless they already have access (I realize the risks)
if(href_list["rcon"] && extra_href["remote_connection"] && !extra_href["remote_access"])
. = STATUS_UPDATE
//TODO: Move the rest of if(!locked || extra_href["remote_access"] || usr.isAI()) and hrefs here
return min(..(), .)
/obj/machinery/alarm/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state)
if(..(href, href_list, nowindow, custom_state))
return 1
// hrefs that can always be called -walter0o
if(href_list["rcon"])
@@ -798,28 +661,38 @@ table tr:first-child th:first-child { border: none;}
rcon_setting = RCON_AUTO
if(RCON_YES)
rcon_setting = RCON_YES
else
return
return 1
if(href_list["temperature"])
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [min_temperature]C and [max_temperature]C)", "Thermostat Controls") as num|null
if(!input_temperature || input_temperature > max_temperature || input_temperature < min_temperature)
usr << "Temperature must be between [min_temperature]C and [max_temperature]C"
else
target_temperature = input_temperature + T0C
var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C) as num|null
if(isnum(input_temperature))
if(input_temperature > max_temperature || input_temperature < min_temperature)
usr << "Temperature must be between [min_temperature]C and [max_temperature]C"
else
target_temperature = input_temperature + T0C
return 1
// hrefs that need the AA unlocked -walter0o
if(!locked || remote || istype(usr, /mob/living/silicon))
var/extra_href = custom_state.href_list(usr)
if(!(locked && !extra_href["remote_connection"]) || extra_href["remote_access"] || usr.isSilicon())
if(href_list["command"])
var/device_id = href_list["id_tag"]
switch(href_list["command"])
if("set_external_pressure")
var/input_pressure = input("What pressure you like the system to mantain?", "Pressure Controls") as num|null
if(isnum(input_pressure))
send_signal(device_id, list(href_list["command"] = input_pressure))
return 1
if("reset_external_pressure")
send_signal(device_id, list(href_list["command"] = ONE_ATMOSPHERE))
return 1
if( "power",
"adjust_external_pressure",
"set_external_pressure",
"checks",
"o2_scrub",
"n2_scrub",
@@ -830,6 +703,7 @@ table tr:first-child th:first-child { border: none;}
"scrubbing")
send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) )
return 1
if("set_threshold")
var/env = href_list["env"]
@@ -838,7 +712,7 @@ table tr:first-child th:first-child { border: none;}
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num
if (isnull(newval))
return
return 1
if (newval<0)
selected[threshold] = -1.0
else if (env=="temperature" && newval>5000)
@@ -880,9 +754,11 @@ table tr:first-child th:first-child { border: none;}
selected[3] = selected[4]
apply_mode()
return 1
if(href_list["screen"])
screen = text2num(href_list["screen"])
return 1
if(href_list["atmos_unlock"])
switch(href_list["atmos_unlock"])
@@ -890,24 +766,24 @@ table tr:first-child th:first-child { border: none;}
alarm_area.air_doors_close()
if("1")
alarm_area.air_doors_open()
return 1
if(href_list["atmos_alarm"])
if (alarm_area.atmosalert(2))
apply_danger_level(2)
update_icon()
return 1
if(href_list["atmos_reset"])
if (alarm_area.atmosalert(0))
apply_danger_level(0)
update_icon()
return 1
if(href_list["mode"])
mode = text2num(href_list["mode"])
apply_mode()
if(!nowindow)
updateUsrDialog()
return 1
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
@@ -937,7 +813,6 @@ table tr:first-child th:first-child { border: none;}
if(allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN))
locked = !locked
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
updateUsrDialog()
else
user << "\red Access denied."
return
+17
View File
@@ -231,6 +231,11 @@
path = /obj/item/ammo_magazine/c45m/flash
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_smg_rubber
name = "ammunition (9mm rubber top mounted)"
path = /obj/item/ammo_magazine/mc9mmt/rubber
category = "Arms and Ammunition"
/datum/autolathe/recipe/consolescreen
name = "console screen"
path = /obj/item/weapon/stock_parts/console_screen
@@ -317,6 +322,18 @@
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_smg
name = "ammunition (9mm top mounted)"
path = /obj/item/ammo_magazine/mc9mmt
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_carbine
name = "ammunition (5.56)"
path = /obj/item/ammo_magazine/a556
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun
name = "ammunition (slug, shotgun)"
path = /obj/item/ammo_casing/shotgun
+5 -2
View File
@@ -1,6 +1,6 @@
/obj/machinery/computer/arcade
name = "arcade machine"
desc = "Does not support Pin ball."
desc = "Does not support pinball."
icon = 'icons/obj/computer.dmi'
icon_state = "arcade"
circuit = "/obj/item/weapon/circuitboard/arcade"
@@ -32,7 +32,10 @@
/obj/item/toy/prize/mauler = 1,
/obj/item/toy/prize/odysseus = 1,
/obj/item/toy/prize/phazon = 1,
/obj/item/toy/waterflower = 1
/obj/item/toy/waterflower = 1,
/obj/item/toy/figure = 1,
/obj/random/plushie = 1,
/obj/item/toy/cultsword = 1
)
/obj/machinery/computer/arcade
+45 -42
View File
@@ -9,11 +9,11 @@
density = 1
anchored = 1.0
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
var/obj/machinery/alarm/current
var/overridden = 0 //not set yet, can't think of a good way to do it
req_access = list(access_ce)
var/list/monitored_alarm_ids = null
var/list/monitored_alarms = null
var/ui_ref
/obj/machinery/computer/atmoscontrol/laptop
name = "Atmospherics Laptop"
@@ -32,36 +32,29 @@
monitored_alarms = dd_sortedObjectList(monitored_alarms)
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
return interact(user)
return ui_interact(user)
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
if(..())
return
return interact(user)
return ui_interact(user)
/obj/machinery/computer/atmoscontrol/interact(mob/user)
user.set_machine(src)
if(allowed(user))
overridden = 1
else if(!emagged)
overridden = 0
var/dat = "<a href='?src=\ref[src]&reset=1'>Main Menu</a><hr>"
if(monitored_alarms && monitored_alarms.len == 1)
current = monitored_alarms[1]
if(current)
dat += specific()
else
for(var/obj/machinery/alarm/alarm in monitored_alarms ? monitored_alarms : machines)
dat += "<a href='?src=\ref[src]&alarm=\ref[alarm]'>"
switch(max(alarm.danger_level, alarm.alarm_area.atmosalm))
if (0)
dat += "<font color=green>"
if (1)
dat += "<font color=blue>"
if (2)
dat += "<font color=red>"
dat += "[sanitize(alarm.name)]</font></a><br/>"
user << browse(dat, "window=atmoscontrol")
/obj/machinery/computer/atmoscontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
var/alarms[0]
// TODO: Move these to a cache, similar to cameras
for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : machines))
alarms[++alarms.len] = list("name" = sanitize(alarm.name), "ref"= "\ref[alarm]", "danger" = max(alarm.danger_level, alarm.alarm_area.atmosalm))
data["alarms"] = alarms
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 625, 625)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
ui_ref = ui
/obj/machinery/computer/atmoscontrol/attackby(var/obj/item/I as obj, var/mob/user as mob)
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
@@ -73,23 +66,33 @@
return
return ..()
/obj/machinery/computer/atmoscontrol/proc/specific()
if(!current)
return ""
var/dat = "<h3>[current.name]</h3><hr>"
dat += current.return_status()
if(current.remote_control || overridden)
dat += "<hr>[current.return_controls(src)]"
return dat
//a bunch of this is copied from atmos alarms
/obj/machinery/computer/atmoscontrol/Topic(href, href_list)
if(..())
return
if(href_list["reset"])
current = null
return 1
if(href_list["alarm"])
current = locate(href_list["alarm"])
else if(current)
current.Topic(href, href_list, 1, 1)
interact(usr)
if(ui_ref)
var/obj/machinery/alarm/alarm = locate(href_list["alarm"]) in (monitored_alarms ? monitored_alarms : machines)
if(alarm)
var/datum/topic_state/TS = generate_state(alarm)
alarm.ui_interact(usr, master_ui = ui_ref, custom_state = TS)
return 1
/obj/machinery/computer/atmoscontrol/proc/generate_state(var/alarm)
var/datum/topic_state/air_alarm/state = new()
state.atmos_control = src
state.air_alarm = alarm
return state
/datum/topic_state/air_alarm
flags = NANO_IGNORE_DISTANCE
var/obj/machinery/computer/atmoscontrol/atmos_control = null
var/obj/machinery/alarm/air_alarm = null
/datum/topic_state/air_alarm/href_list(var/mob/user)
var/list/extra_href = list()
extra_href["remote_connection"] = 1
extra_href["remote_access"] = user && (atmos_control.allowed(user) || atmos_control.emagged || air_alarm.rcon_setting == RCON_YES || (air_alarm.alarm_area.atmosalm && air_alarm.rcon_setting == RCON_AUTO))
return extra_href
+2 -2
View File
@@ -102,8 +102,8 @@
else
flick("door_deny", src)
return
if(istype(AM, /obj/structure/stool/bed/chair/wheelchair))
var/obj/structure/stool/bed/chair/wheelchair/wheel = AM
if(istype(AM, /obj/structure/bed/chair/wheelchair))
var/obj/structure/bed/chair/wheelchair/wheel = AM
if(density)
if(wheel.pulling && (src.allowed(wheel.pulling)))
open()
+11 -6
View File
@@ -182,13 +182,18 @@ Class Procs:
/obj/machinery/proc/inoperable(var/additional_flags = 0)
return (stat & (NOPOWER|BROKEN|additional_flags))
/obj/machinery/CanUseTopic(var/mob/user, var/be_close)
if(!interact_offline && (stat & (NOPOWER|BROKEN)))
return STATUS_CLOSE
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
if(..())
return 1
if(!interact_offline && stat & (NOPOWER|BROKEN))
return 1
return 0
return ..()
/obj/machinery/CouldUseTopic(var/mob/user)
..()
user.set_machine(src)
/obj/machinery/CouldNotUseTopic(var/mob/user)
usr.unset_machine()
////////////////////////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -162,7 +162,7 @@
if(istype(occupant, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = occupant
if(R.module)
R.module.respawn_consumable(R)
R.module.respawn_consumable(R, charge_rate / 250)
if(!R.cell)
return
if(!R.cell.fully_charged())
+30 -30
View File
@@ -15,16 +15,16 @@
/datum/data/vending_product/New(var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL)
..()
src.product_path = path
if(!name)
var/atom/tmp = new path
src.product_name = initial(tmp.name)
del(tmp)
else
src.product_name = name
src.amount = amount
src.price = price
src.display_color = color
@@ -58,7 +58,7 @@
var/datum/data/vending_product/currently_vending = null // What we're requesting payment for right now
var/status_message = "" // Status screen messages like "insufficient funds", displayed in NanoUI
var/status_error = 0 // Set to 1 if status_message is an error
/*
Variables used to initialize the product list
These are used for initialization only, and so are optional if
@@ -140,7 +140,7 @@
product.price = (entry in src.prices) ? src.prices[entry] : 0
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
product.category = category
src.product_records.Add(product)
/obj/machinery/vending/Del()
@@ -212,7 +212,7 @@
src.overlays.Cut()
if(src.panel_open)
src.overlays += image(src.icon, "[initial(icon_state)]-panel")
nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
return
else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters))
@@ -257,8 +257,8 @@
*/
/obj/machinery/vending/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, mob/user)
if(currently_vending.price > cashmoney.worth)
// This is not a status display message, since it's something the character
// This is not a status display message, since it's something the character
// themselves is meant to see BEFORE putting the money in
usr << "\icon[cashmoney] <span class='warning'>That is not enough money.</span>"
return 0
@@ -294,9 +294,9 @@
return 1
/**
* Scan a chargecard and deduct payment from it.
* Scan a chargecard and deduct payment from it.
*
* Takes payment for whatever is the currently_vending item. Returns 1 if
* Takes payment for whatever is the currently_vending item. Returns 1 if
* successful, 0 if failed.
*/
/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
@@ -313,7 +313,7 @@
/**
* Scan a card and attempt to transfer payment from associated account.
*
* Takes payment for whatever is the currently_vending item. Returns 1 if
* Takes payment for whatever is the currently_vending item. Returns 1 if
* successful, 0 if failed
*/
/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I)
@@ -371,9 +371,9 @@
/**
* Add money for current purchase to the vendor account.
*
*
* Called after the money has already been taken from the customer.
*/
*/
/obj/machinery/vending/proc/credit_purchase(var/target as text)
vendor_account.money += currently_vending.price
@@ -403,11 +403,11 @@
/**
* Display the NanoUI window for the vending machine.
*
* See NanoUI documentation for details.
* See NanoUI documentation for details.
*/
/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
user.set_machine(src)
var/list/data = list()
if(currently_vending)
data["mode"] = 1
@@ -422,28 +422,28 @@
for(var/key = 1 to src.product_records.len)
var/datum/data/vending_product/I = src.product_records[key]
if(!(I.category & src.categories))
continue
listed_products.Add(list(list(
"key" = key,
"name" = I.product_name,
"price" = I.price,
"color" = I.display_color,
"amount" = I.amount)))
data["products"] = listed_products
if(src.coin)
data["coin"] = src.coin.name
if(src.panel_open)
data["panel"] = 1
data["speaker"] = src.shut_up ? 0 : 1
else
data["panel"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
@@ -488,11 +488,11 @@
var/key = text2num(href_list["vend"])
var/datum/data/vending_product/R = product_records[key]
// This should not happen unless the request from NanoUI was bad
if(!(R.category & src.categories))
return
if(R.price <= 0)
src.vend(R, usr)
else
@@ -522,7 +522,7 @@
src.status_message = "Vending..."
src.status_error = 0
nanomanager.update_uis(src)
if (R.category & CAT_COIN)
if(!coin)
user << "\blue You need to insert a coin to get this item."
@@ -619,7 +619,7 @@
new dump_path(src.loc)
R.amount--
break
stat |= BROKEN
src.icon_state = "[initial(icon_state)]-broken"
return
@@ -732,8 +732,8 @@
icon_state = "snack"
products = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 6,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 6,/obj/item/weapon/reagent_containers/food/snacks/chips =6,
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 6,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 6,
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6)
contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6)
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6, /obj/item/weapon/reagent_containers/food/snacks/tastybread = 6)
contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6, /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks = 3)
prices = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 1,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 5,/obj/item/weapon/reagent_containers/food/snacks/chips = 1,
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 2,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 1,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 1,
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 1)
@@ -750,7 +750,7 @@
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 10,
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/space_up = 10,
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice = 10)
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko = 5)
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko = 5, /obj/item/weapon/reagent_containers/food/snacks/liquidfood = 6)
prices = list(/obj/item/weapon/reagent_containers/food/drinks/cans/cola = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind = 1,
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 1,
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle = 2,/obj/item/weapon/reagent_containers/food/drinks/cans/space_up = 1,
@@ -867,7 +867,7 @@
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/mtearseed = 2,
/obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,)
premium = list(/obj/item/toy/waterflower = 1)
/**
* Populate hydroseeds product_records
*
@@ -891,7 +891,7 @@
product.price = (entry in src.prices) ? src.prices[entry] : 0
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
product.category = category
src.product_records.Add(product)
/obj/machinery/vending/magivend
+29 -26
View File
@@ -15,36 +15,39 @@
action(atom/target)
if(!action_checks(target)) return
if(!cargo_holder) return
if(istype(target, /obj/structure/stool)) return
for(var/M in target.contents)
if(istype(M, /mob/living))
return
//loading
if(istype(target,/obj))
var/obj/O = target
if(!O.anchored)
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
occupant_message("You lift [target] and start to load it into cargo compartment.")
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
set_ready_state(0)
chassis.use_power(energy_drain)
O.anchored = 1
var/T = chassis.loc
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
cargo_holder.cargo += O
O.loc = chassis
O.anchored = 0
occupant_message("<font color='blue'>[target] succesfully loaded.</font>")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
occupant_message("<font color='red'>You must hold still while handling objects.</font>")
O.anchored = initial(O.anchored)
else
occupant_message("<font color='red'>Not enough room in cargo compartment.</font>")
else
if(O.buckled_mob)
return
if(locate(/mob/living) in O)
return
if(O.anchored)
occupant_message("<font color='red'>[target] is firmly secured.</font>")
return
if(cargo_holder.cargo.len >= cargo_holder.cargo_capacity)
occupant_message("<font color='red'>Not enough room in cargo compartment.</font>")
return
occupant_message("You lift [target] and start to load it into cargo compartment.")
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
set_ready_state(0)
chassis.use_power(energy_drain)
O.anchored = 1
var/T = chassis.loc
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
cargo_holder.cargo += O
O.loc = chassis
O.anchored = 0
occupant_message("<font color='blue'>[target] succesfully loaded.</font>")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
occupant_message("<font color='red'>You must hold still while handling objects.</font>")
O.anchored = initial(O.anchored)
//attacking
else if(istype(target,/mob/living))
var/mob/living/M = target
if(M.stat>1) return
@@ -79,8 +79,8 @@ var/global/list/image/splatter_cache=list()
if(!perp.feet_blood_DNA)
perp.feet_blood_DNA = list()
perp.feet_blood_DNA |= blood_DNA.Copy()
else if (perp.buckled && istype(perp.buckled, /obj/structure/stool/bed/chair/wheelchair))
var/obj/structure/stool/bed/chair/wheelchair/W = perp.buckled
else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair))
var/obj/structure/bed/chair/wheelchair/W = perp.buckled
W.bloodiness = 4
perp.update_inv_shoes(1)
+7 -1
View File
@@ -6,7 +6,6 @@
unacidable = 1
/obj/effect/landmark/New()
..()
tag = text("landmark*[]", name)
invisibility = 101
@@ -113,6 +112,13 @@
return 1
/obj/effect/landmark/start/ninja
name = "ninja"
/obj/effect/landmark/start/ninja/New()
..()
ninjastart += loc
//Costume spawner landmarks
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
@@ -55,7 +55,7 @@
var/uses = 0
var/emagged = 0
var/failmsg = ""
var/charge = 1
var/charge = 0
/obj/item/device/lightreplacer/New()
uses = max_uses / 2
@@ -122,11 +122,11 @@
/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1)
uses = min(max(uses + amount, 0), max_uses)
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
charge += 1
if(charge > 7)
/obj/item/device/lightreplacer/proc/Charge(var/mob/user, var/amount = 1)
charge += amount
if(charge > 6)
AddUses(1)
charge = 1
charge = 0
/obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
@@ -0,0 +1,50 @@
/datum/matter_synth
var/name = "Generic Synthesizer"
var/max_energy = 60000
var/recharge_rate = 2000
var/energy
/datum/matter_synth/New(var/store = 0)
if(store)
max_energy = store
energy = max_energy
return
/datum/matter_synth/proc/get_charge()
return energy
/datum/matter_synth/proc/use_charge(var/amount)
if (energy >= amount)
energy -= amount
return 1
return 0
/datum/matter_synth/proc/add_charge(var/amount)
energy = min(energy + amount, max_energy)
/datum/matter_synth/proc/emp_act(var/severity)
use_charge(max_energy * 0.1 / severity)
/datum/matter_synth/medicine
name = "Medicine Synthesizer"
/datum/matter_synth/metal
name = "Metal Synthesizer"
/datum/matter_synth/plasteel
name = "Plasteel Synthesizer"
max_energy = 10000
/datum/matter_synth/glass
name = "Glass Synthesizer"
/datum/matter_synth/wood
name = "Wood Synthesizer"
/datum/matter_synth/plastic
name = "Plastic Synthesizer"
/datum/matter_synth/wire
name = "Wire Synthesizer"
max_energy = 50
recharge_rate = 2
+11 -2
View File
@@ -13,12 +13,21 @@
max_amount = 60
attack_verb = list("hit", "bludgeoned", "whacked")
/obj/item/stack/rods/cyborg
name = "metal rod synthesizer"
desc = "A device that makes metal rods."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(500)
stacktype = /obj/item/stack/rods
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(amount < 2)
if(get_amount() < 2)
user << "\red You need at least two rods to do this."
return
@@ -54,7 +63,7 @@
return 1
else if(!in_use)
if(amount < 2)
if(get_amount() < 2)
user << "\blue You need at least two rods to do this."
return
usr << "\blue Assembling grille..."
+16 -10
View File
@@ -22,12 +22,13 @@
var/list/construction_options = list("One Direction", "Full Window")
/obj/item/stack/sheet/glass/cyborg
name = "glass"
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
name = "glass synthesizer"
desc = "A device that makes glass."
gender = NEUTER
singular_name = "glass"
matter = null
created_window = /obj/structure/window/basic
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/glass
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
@@ -69,7 +70,7 @@
if(!user.IsAdvancedToolUser())
return 0
var/title = "Sheet-[name]"
title += " ([src.amount] sheet\s left)"
title += " ([src.get_amount()] sheet\s left)"
switch(input(title, "What would you like to construct?") as null|anything in construction_options)
if("One Direction")
if(!src) return 1
@@ -102,7 +103,7 @@
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 4)
if(src.get_amount() < 4)
user << "\red You need more glass to do that."
return 1
if(locate(/obj/structure/window) in user.loc)
@@ -124,7 +125,7 @@
user << "\red There is already a windoor in that location."
return 1
if(src.amount < 5)
if(src.get_amount() < 5)
user << "\red You need more glass to do that."
return 1
@@ -151,10 +152,15 @@
construction_options = list("One Direction", "Full Window", "Windoor")
/obj/item/stack/sheet/glass/reinforced/cyborg
name = "reinforced glass"
desc = "Glass which has been reinforced with metal rods."
name = "reinforced glass synthesizer"
desc = "A device that makes reinforced glass."
gender = NEUTER
matter = null
uses_charge = 2
charge_costs = list(1000)
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
charge_costs = list(500, 1000)
/*
* Phoron Glass sheets
@@ -137,9 +137,10 @@ obj/item/stack/sheet/mineral/iron/New()
recipes = plastic_recipes
/obj/item/stack/sheet/mineral/plastic/cyborg
name = "plastic sheets"
icon_state = "sheet-plastic"
perunit = 2000
name = "plastic sheets synthesizer"
gender = NEUTER
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/mineral/plastic
/obj/item/stack/sheet/mineral/gold
@@ -11,20 +11,20 @@
* Metal
*/
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("office chairs",list( \
new/datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("dark office chair", /obj/structure/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
), 5), \
new/datum/stack_recipe_list("comfy chairs", list( \
new/datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("beige comfy chair", /obj/structure/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
), 2), \
null, \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
@@ -86,12 +86,12 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
origin_tech = "materials=1"
/obj/item/stack/sheet/metal/cyborg
name = "metal"
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
singular_name = "metal sheet"
icon_state = "sheet-metal"
throwforce = 14.0
flags = CONDUCT
name = "metal synthesizer"
desc = "A device that makes metal sheets."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/metal
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
@@ -121,9 +121,19 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
flags = CONDUCT
origin_tech = "materials=2"
/obj/item/stack/sheet/plasteel/cyborg
name = "plasteel synthesizer"
desc = "A device that makes plasteel sheets."
gender = NEUTER
singular_name = "plasteel sheet"
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/plasteel
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
return ..()
recipes = plasteel_recipes
return ..()
/*
* Wood
@@ -132,7 +142,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
@@ -149,10 +159,13 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
origin_tech = "materials=1;biotech=1"
/obj/item/stack/sheet/wood/cyborg
name = "wooden plank"
desc = "One can only guess that this is a bunch of wood."
name = "wood synthesizer"
desc = "A device that makes wooden planks."
gender = NEUTER
singular_name = "wood plank"
icon_state = "sheet-wood"
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/wood
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
+71 -22
View File
@@ -17,6 +17,9 @@
var/amount = 1
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
var/stacktype //determines whether different stack types can merge
var/uses_charge = 0
var/list/charge_costs = null
var/list/datum/matter_synth/synths = null
/obj/item/stack/New(var/loc, var/amount=null)
..()
@@ -27,13 +30,18 @@
return
/obj/item/stack/Del()
if(uses_charge)
return
if (src && usr && usr.machine == src)
usr << browse(null, "window=stack")
..()
/obj/item/stack/examine(mob/user)
if(..(user, 1))
user << "There are [src.amount] [src.singular_name]\s in the stack."
if(!uses_charge)
user << "There are [src.amount] [src.singular_name]\s in the stack."
else
user << "There is enough charge for [get_amount()]."
/obj/item/stack/attack_self(mob/user as mob)
list_recipes(user)
@@ -41,14 +49,14 @@
/obj/item/stack/proc/list_recipes(mob/user as mob, recipes_sublist)
if (!recipes)
return
if (!src || amount<=0)
if (!src || get_amount() <= 0)
user << browse(null, "window=stack")
user.set_machine(src) //for correct work of onclose
var/list/recipe_list = recipes
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
recipe_list = srl.recipes
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.amount)
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.get_amount())
for(var/i=1;i<=recipe_list.len,i++)
var/E = recipe_list[i]
if (isnull(E))
@@ -60,14 +68,14 @@
if (istype(E, /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = E
if (src.amount >= srl.req_amount)
if (src.get_amount() >= srl.req_amount)
t1 += "<a href='?src=\ref[src];sublist=[i]'>[srl.title] ([srl.req_amount] [src.singular_name]\s)</a>"
else
t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)<br>"
if (istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
var/max_multiplier = round(src.amount / R.req_amount)
var/max_multiplier = round(src.get_amount() / R.req_amount)
var/title as text
var/can_build = 1
can_build = can_build && (max_multiplier>0)
@@ -142,7 +150,7 @@
list_recipes(usr, text2num(href_list["sublist"]))
if (href_list["make"])
if (src.amount < 1) del(src) //Never should happen
if (src.get_amount() < 1) del(src) //Never should happen
var/list/recipes_list = recipes
if (href_list["sublist"])
@@ -165,28 +173,44 @@
//Return 1 if an immediate subsequent call to use() would succeed.
//Ensures that code dealing with stacks uses the same logic
/obj/item/stack/proc/can_use(var/used)
if (amount < used)
if (get_amount() < used)
return 0
return 1
/obj/item/stack/proc/use(var/used)
if (!can_use(used))
return 0
amount -= used
if (amount <= 0)
spawn(0) //delete the empty stack once the current context yields
if (amount <= 0) //check again in case someone transferred stuff to us
if(usr)
usr.before_take_item(src)
del(src)
return 1
if(!uses_charge)
amount -= used
if (amount <= 0)
spawn(0) //delete the empty stack once the current context yields
if (amount <= 0) //check again in case someone transferred stuff to us
if(usr)
usr.before_take_item(src)
del(src)
return 1
else
if(get_amount() < used)
return 0
for(var/i = 1 to uses_charge)
var/datum/matter_synth/S = synths[i]
S.use_charge(charge_costs[i] * used) // Doesn't need to be deleted
return 1
return 0
/obj/item/stack/proc/add(var/extra)
if(amount + extra > max_amount)
if(!uses_charge)
if(amount + extra > get_max_amount())
return 0
else
amount += extra
return 1
else if(!synths || synths.len < uses_charge)
return 0
else
amount += extra
return 1
for(var/i = 1 to uses_charge)
var/datum/matter_synth/S = synths[i]
S.add_charge(charge_costs[i] * extra)
/*
The transfer and split procs work differently than use() and add().
@@ -196,16 +220,16 @@
//attempts to transfer amount to S, and returns the amount actually transferred
/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null)
if (!amount)
if (!get_amount())
return 0
if (stacktype != S.stacktype)
return 0
if (isnull(tamount))
tamount = src.amount
tamount = src.get_amount()
var/transfer = max(min(tamount, src.amount, (S.max_amount - S.amount)), 0)
var/transfer = max(min(tamount, src.get_amount(), (S.get_max_amount() - S.get_amount())), 0)
var/orig_amount = src.amount
var/orig_amount = src.get_amount()
if (transfer && src.use(transfer))
S.add(transfer)
if (prob(transfer/orig_amount * 100))
@@ -220,6 +244,8 @@
/obj/item/stack/proc/split(var/tamount)
if (!amount)
return null
if(uses_charge)
return null
var/transfer = max(min(tamount, src.amount, initial(max_amount)), 0)
@@ -234,8 +260,31 @@
return null
/obj/item/stack/proc/get_amount()
if(uses_charge)
if(!synths || synths.len < uses_charge)
return 0
var/datum/matter_synth/S = synths[1]
. = round(S.get_charge() / charge_costs[1])
if(uses_charge > 1)
for(var/i = 2 to uses_charge)
S = synths[i]
. = min(., round(S.get_charge() / charge_costs[i]))
return
return amount
/obj/item/stack/proc/get_max_amount()
if(uses_charge)
if(!synths || synths.len < uses_charge)
return 0
var/datum/matter_synth/S = synths[1]
. = round(S.max_energy / charge_costs[1])
if(uses_charge > 1)
for(var/i = 2 to uses_charge)
S = synths[i]
. = min(., round(S.max_energy / charge_costs[i]))
return
return max_amount
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
for (var/obj/item/stack/item in usr.loc)
if (item==src)
@@ -3,14 +3,12 @@
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon"
icon_state = "tile"
w_class = 3.0
force = 6.0
matter = list("metal" = 937.5)
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
..()
@@ -18,6 +16,16 @@
src.pixel_y = rand(1, 14)
return
/obj/item/stack/tile/plasteel/cyborg
name = "floor tile synthesizer"
desc = "A device that makes floor tiles."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/plasteel
build_type = /obj/item/stack/tile/plasteel
/*
/obj/item/stack/tile/plasteel/attack_self(mob/user as mob)
if (usr.stat)
@@ -1,9 +1,18 @@
/* Diffrent misc types of tiles
* Contains:
* Prototype
* Grass
* Wood
* Carpet
*/
/obj/item/stack/tile
name = "tile"
singular_name = "tile"
desc = "A non-descript floor tile"
w_class = 3
max_amount = 60
var/build_type = null
/*
* Grass
@@ -13,13 +22,11 @@
singular_name = "grass floor tile"
desc = "A patch of grass like they often use on golf courses."
icon_state = "tile_grass"
w_class = 3.0
force = 1.0
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
origin_tech = "biotech=1"
/*
@@ -30,13 +37,19 @@
singular_name = "wood floor tile"
desc = "An easy to fit wooden floor tile."
icon_state = "tile-wood"
w_class = 3.0
force = 1.0
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
/obj/item/stack/tile/wood/cyborg
name = "wood floor tile synthesizer"
desc = "A device that makes wood floor tiles."
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/wood
build_type = /obj/item/stack/tile/wood
/*
* Carpets
@@ -46,10 +59,8 @@
singular_name = "carpet"
desc = "A piece of carpet. It is the same size as a normal floor tile!"
icon_state = "tile-carpet"
w_class = 3.0
force = 1.0
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
+321 -2
View File
@@ -6,6 +6,7 @@
* Toy gun
* Toy crossbow
* Toy swords
* Toy bosun's whistle
* Toy mechs
* Crayons
* Snap pops
@@ -13,6 +14,9 @@
* Therapy dolls
* Toddler doll
* Inflatable duck
* Action figures
* Plushies
* Toy cult sword
*/
@@ -98,7 +102,7 @@
icon_state = "syndballoon"
item_state = "syndballoon"
w_class = 4.0
/obj/item/toy/nanotrasenballoon
name = "criminal balloon"
desc = "Across the balloon the following is printed: \"Man, I love NT soooo much. I use only NanoTrasen products. You have NO idea.\""
@@ -498,6 +502,22 @@
if(..(user, 0))
user << text("\icon[] [] units of water left!", src, src.reagents.total_volume)
/*
* Bosun's whistle
*/
/obj/item/toy/bosunwhistle
name = "bosun's whistle"
desc = "A genuine Admiral Krush Bosun's Whistle, for the aspiring ship's captain! Suitable for ages 8 and up, do not swallow."
icon = 'icons/obj/toy.dmi'
icon_state = "bosunwhistle"
var/cooldown = 0
/obj/item/toy/bosunwhistle/attack_self(mob/user as mob)
if(cooldown < world.time - 35)
user << "<span class='notice'>You blow on [src], creating an ear-splitting noise!</span>"
playsound(user, 'sound/misc/boatswain.ogg', 20, 1)
cooldown = world.time
/*
* Mech prizes
@@ -542,7 +562,6 @@
desc = "Mini-Mecha action figure! Collect them all! 4/11."
icon_state = "gygaxtoy"
/obj/item/toy/prize/durand
name = "toy durand"
desc = "Mini-Mecha action figure! Collect them all! 5/11."
@@ -578,6 +597,206 @@
desc = "Mini-Mecha action figure! Collect them all! 11/11."
icon_state = "phazonprize"
/*
* Action figures
*/
/obj/item/toy/figure
name = "Completely Glitched action figure"
desc = "A \"Space Life\" brand... wait, what the hell is this thing? It seems to be requesting the sweet release of death."
icon_state = "assistant"
icon = 'icons/obj/toy.dmi'
/obj/item/toy/figure/cmo
name = "Chief Medical Officer action figure"
desc = "A \"Space Life\" brand Chief Medical Officer action figure."
icon_state = "cmo"
/obj/item/toy/figure/assistant
name = "Assistant action figure"
desc = "A \"Space Life\" brand Assistant action figure."
icon_state = "assistant"
/obj/item/toy/figure/atmos
name = "Atmospheric Technician action figure"
desc = "A \"Space Life\" brand Atmospheric Technician action figure."
icon_state = "atmos"
/obj/item/toy/figure/bartender
name = "Bartender action figure"
desc = "A \"Space Life\" brand Bartender action figure."
icon_state = "bartender"
/obj/item/toy/figure/borg
name = "Cyborg action figure"
desc = "A \"Space Life\" brand Cyborg action figure."
icon_state = "borg"
/obj/item/toy/figure/gardener
name = "Gardener action figure"
desc = "A \"Space Life\" brand Gardener action figure."
icon_state = "botanist"
/obj/item/toy/figure/captain
name = "Captain action figure"
desc = "A \"Space Life\" brand Captain action figure."
icon_state = "captain"
/obj/item/toy/figure/cargotech
name = "Cargo Technician action figure"
desc = "A \"Space Life\" brand Cargo Technician action figure."
icon_state = "cargotech"
/obj/item/toy/figure/ce
name = "Chief Engineer action figure"
desc = "A \"Space Life\" brand Chief Engineer action figure."
icon_state = "ce"
/obj/item/toy/figure/chaplain
name = "Chaplain action figure"
desc = "A \"Space Life\" brand Chaplain action figure."
icon_state = "chaplain"
/obj/item/toy/figure/chef
name = "Chef action figure"
desc = "A \"Space Life\" brand Chef action figure."
icon_state = "chef"
/obj/item/toy/figure/chemist
name = "Chemist action figure"
desc = "A \"Space Life\" brand Chemist action figure."
icon_state = "chemist"
/obj/item/toy/figure/clown
name = "Clown action figure"
desc = "A \"Space Life\" brand Clown action figure."
icon_state = "clown"
/obj/item/toy/figure/corgi
name = "Corgi action figure"
desc = "A \"Space Life\" brand Corgi action figure."
icon_state = "ian"
/obj/item/toy/figure/detective
name = "Detective action figure"
desc = "A \"Space Life\" brand Detective action figure."
icon_state = "detective"
/obj/item/toy/figure/dsquad
name = "Space Commando action figure"
desc = "A \"Space Life\" brand Space Commando action figure."
icon_state = "dsquad"
/obj/item/toy/figure/engineer
name = "Engineer action figure"
desc = "A \"Space Life\" brand Engineer action figure."
icon_state = "engineer"
/obj/item/toy/figure/geneticist
name = "Geneticist action figure"
desc = "A \"Space Life\" brand Geneticist action figure, which was recently dicontinued."
icon_state = "geneticist"
/obj/item/toy/figure/hop
name = "Head of Personel action figure"
desc = "A \"Space Life\" brand Head of Personel action figure."
icon_state = "hop"
/obj/item/toy/figure/hos
name = "Head of Security action figure"
desc = "A \"Space Life\" brand Head of Security action figure."
icon_state = "hos"
/obj/item/toy/figure/qm
name = "Quartermaster action figure"
desc = "A \"Space Life\" brand Quartermaster action figure."
icon_state = "qm"
/obj/item/toy/figure/janitor
name = "Janitor action figure"
desc = "A \"Space Life\" brand Janitor action figure."
icon_state = "janitor"
/obj/item/toy/figure/agent
name = "Internal Affairs Agent action figure"
desc = "A \"Space Life\" brand Internal Affairs Agent action figure."
icon_state = "agent"
/obj/item/toy/figure/librarian
name = "Librarian action figure"
desc = "A \"Space Life\" brand Librarian action figure."
icon_state = "librarian"
/obj/item/toy/figure/md
name = "Medical Doctor action figure"
desc = "A \"Space Life\" brand Medical Doctor action figure."
icon_state = "md"
/obj/item/toy/figure/mime
name = "Mime action figure"
desc = "A \"Space Life\" brand Mime action figure."
icon_state = "mime"
/obj/item/toy/figure/miner
name = "Shaft Miner action figure"
desc = "A \"Space Life\" brand Shaft Miner action figure."
icon_state = "miner"
/obj/item/toy/figure/ninja
name = "Space Ninja action figure"
desc = "A \"Space Life\" brand Space Ninja action figure."
icon_state = "ninja"
/obj/item/toy/figure/wizard
name = "Wizard action figure"
desc = "A \"Space Life\" brand Wizard action figure."
icon_state = "wizard"
/obj/item/toy/figure/rd
name = "Research Director action figure"
desc = "A \"Space Life\" brand Research Director action figure."
icon_state = "rd"
/obj/item/toy/figure/roboticist
name = "Roboticist action figure"
desc = "A \"Space Life\" brand Roboticist action figure."
icon_state = "roboticist"
/obj/item/toy/figure/scientist
name = "Scientist action figure"
desc = "A \"Space Life\" brand Scientist action figure."
icon_state = "scientist"
/obj/item/toy/figure/syndie
name = "Doom Operative action figure"
desc = "A \"Space Life\" brand Doom Operative action figure."
icon_state = "syndie"
/obj/item/toy/figure/secofficer
name = "Security Officer action figure"
desc = "A \"Space Life\" brand Security Officer action figure."
icon_state = "secofficer"
/obj/item/toy/figure/warden
name = "Warden action figure"
desc = "A \"Space Life\" brand Warden action figure."
icon_state = "warden"
/obj/item/toy/figure/psychologist
name = "Psychologist action figure"
desc = "A \"Space Life\" brand Psychologist action figure."
icon_state = "psychologist"
/obj/item/toy/figure/paramedic
name = "Paramedic action figure"
desc = "A \"Space Life\" brand Paramedic action figure."
icon_state = "paramedic"
/obj/item/toy/figure/ert
name = "Emergency Response Team Commander action figure"
desc = "A \"Space Life\" brand Emergency Response Team Commander action figure."
icon_state = "ert"
/obj/item/toy/katana
name = "replica katana"
desc = "Woefully underpowered in D20."
@@ -639,6 +858,106 @@
item_state = "egg3" // It's the green egg in items_left/righthand
w_class = 1
/*
* Plushies
*/
//Large plushies.
/obj/structure/plushie
name = "generic plush"
desc = "A very generic plushie. It seems to not want to exist."
icon = 'icons/obj/toy.dmi'
icon_state = "ianplushie"
anchored = 0
density = 1
var/phrase = "I don't want to exist anymore!"
/obj/structure/plushie/attack_hand(mob/user)
if(user.a_intent == "help")
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
else if (user.a_intent == "hurt")
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
else if (user.a_intent == "grab")
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
else
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
visible_message("[src] says, \"[phrase]\"")
/obj/structure/plushie/ian
name = "plush corgi"
desc = "A plushie of an adorable corgi! Don't you just want to hug it and squeeze it and call it \"Ian\"?"
icon_state = "ianplushie"
phrase = "Arf!"
/obj/structure/plushie/drone
name = "plush drone"
desc = "A plushie of a happy drone! It appears to be smiling, and has a small tag which reads \"N.D.V. Icarus Gift Shop\"."
icon_state = "droneplushie"
phrase = "Beep boop!"
/obj/structure/plushie/carp
name = "plush carp"
desc = "A plushie of an elated carp! Straight from the wilds of the Nyx frontier, now right here in your hands."
icon_state = "carpplushie"
phrase = "Glorf!"
/obj/structure/plushie/beepsky
name = "plush Officer Sweepsky"
desc = "A plushie of a popular industrious cleaning robot! If it could feel emotions, it would love you."
icon_state = "beepskyplushie"
phrase = "Ping!"
//Small plushies.
/obj/item/toy/plushie
name = "generic small plush"
desc = "A very generic small plushie. It seems to not want to exist."
icon = 'icons/obj/toy.dmi'
icon_state = "nymphplushie"
/obj/item/toy/plushie/attack_self(mob/user as mob)
if(user.a_intent == "help")
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
else if (user.a_intent == "hurt")
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
else if (user.a_intent == "grab")
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
else
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
/obj/item/toy/plushie/nymph
name = "diona nymph plush"
desc = "A plushie of an adorable diona nymph! While its level of self-awareness is still being debated, its level of cuteness is not."
icon_state = "nymphplushie"
/obj/item/toy/plushie/mouse
name = "mouse plush"
desc = "A plushie of a delightful mouse! What was once considered a vile rodent is now your very best friend."
icon_state = "mouseplushie"
/obj/item/toy/plushie/kitten
name = "kitten plush"
desc = "A plushie of a cute kitten! Watch as it purrs it's way right into your heart."
icon_state = "kittenplushie"
/obj/item/toy/plushie/lizard
name = "lizard plush"
desc = "A plushie of a scaly lizard! Very controversial, after being accused as \"racist\" by some Unathi."
icon_state = "lizardplushie"
/obj/item/toy/plushie/spider
name = "spider plush"
desc = "A plushie of a fuzzy spider! It has eight legs - all the better to hug you with."
icon_state = "spiderplushie"
//Toy cult sword
/obj/item/toy/cultsword
name = "foam sword"
desc = "An arcane weapon (made of foam) wielded by the followers of the hit Saturday morning cartoon \"King Nursee and the Acolytes of Heroism\"."
icon = 'icons/obj/weapons.dmi'
icon_state = "cultblade"
item_state = "cultblade"
w_class = 4
attack_verb = list("attacked", "slashed", "stabbed", "poked")
/* NYET.
/obj/item/weapon/toddler
@@ -79,8 +79,8 @@
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
spawn(0)
var/obj/structure/stool/bed/chair/C = null
if(istype(usr.buckled, /obj/structure/stool/bed/chair))
var/obj/structure/bed/chair/C = null
if(istype(usr.buckled, /obj/structure/bed/chair))
C = usr.buckled
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
@@ -250,7 +250,7 @@
/obj/item/weapon/storage/box/emps
name = "box of emp grenades"
desc = "A box with 5 emp grenades."
desc = "A box containing 5 military grade EMP grenades.<br> WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur."
icon_state = "flashbang"
New()
@@ -380,7 +380,7 @@
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
/obj/item/weapon/storage/box/sinpockets
name = "box of sin-pockets"
desc = "<B>Instructions:</B> <I>Crush bottom of package to initiate chemical heating. Wait for 20 seconds before consumption. Product will cool if not eaten within seven minutes.</I>"
@@ -4,7 +4,7 @@
if(!istype(M))
return ..()
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
return ..()
if(!istype(M, /mob/living/carbon/human))
+17 -5
View File
@@ -16,15 +16,27 @@
var/damtype = "brute"
var/force = 0
/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
return 1
if(usr.can_interact_with_interface(nano_host(), checkrange) != STATUS_INTERACTIVE)
return 1
add_fingerprint(usr)
return 0
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
var/obj/host = nano_host()
if(host.CanUseTopic(usr, href_list, custom_state) == STATUS_INTERACTIVE)
CouldUseTopic(usr)
return 0
CouldNotUseTopic(usr)
return 1
/obj/proc/CouldUseTopic(var/mob/user)
var/atom/host = nano_host()
host.add_fingerprint(user)
/obj/proc/CouldNotUseTopic(var/mob/user)
// Nada
/obj/item/proc/is_used_on(obj/O, mob/user)
+127
View File
@@ -113,3 +113,130 @@
prob(2);/obj/item/weapon/storage/belt/utility,\
prob(5);/obj/random/tool,\
prob(2);/obj/item/weapon/tape_roll)
/obj/random/medical
name = "Random Medicine"
desc = "This is a random medical item."
icon = 'icons/obj/items.dmi'
icon_state = "brutepack"
spawn_nothing_percentage = 25
item_to_spawn()
return pick(prob(4);/obj/item/stack/medical/bruise_pack,\
prob(4);/obj/item/stack/medical/ointment,\
prob(2);/obj/item/stack/medical/advanced/bruise_pack,\
prob(2);/obj/item/stack/medical/advanced/ointment,\
prob(1);/obj/item/stack/medical/splint,\
prob(2);/obj/item/bodybag,\
prob(1);/obj/item/bodybag/cryobag,\
prob(2);/obj/item/weapon/storage/pill_bottle/kelotane,\
prob(2);/obj/item/weapon/storage/pill_bottle/antitox,\
prob(2);/obj/item/weapon/storage/pill_bottle/tramadol,\
prob(2);/obj/item/weapon/reagent_containers/syringe/antitoxin,\
prob(1);/obj/item/weapon/reagent_containers/syringe/antiviral,\
prob(2);/obj/item/weapon/reagent_containers/syringe/inaprovaline,\
prob(1);/obj/item/stack/nanopaste)
/obj/random/firstaid
name = "Random First Aid Kit"
desc = "This is a random first aid kit."
icon = 'icons/obj/storage.dmi'
icon_state = "firstaid"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/firstaid/regular,\
prob(2);/obj/item/weapon/storage/firstaid/toxin,\
prob(2);/obj/item/weapon/storage/firstaid/o2,\
prob(1);/obj/item/weapon/storage/firstaid/adv,\
prob(2);/obj/item/weapon/storage/firstaid/fire)
/obj/random/contraband
name = "Random Illegal Item"
desc = "Hot Stuff."
icon = 'icons/obj/items.dmi'
icon_state = "purplecomb"
spawn_nothing_percentage = 50
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/pill_bottle/tramadol,\
prob(4);/obj/item/weapon/haircomb/fluff/cado_keppel_1,\
prob(2);/obj/item/weapon/storage/pill_bottle/happy,\
prob(2);/obj/item/weapon/storage/pill_bottle/zoom,\
prob(5);/obj/item/weapon/contraband/poster,\
prob(2);/obj/item/weapon/butterfly,\
prob(3);/obj/item/butterflyblade,\
prob(3);/obj/item/butterflyhandle,\
prob(3);/obj/item/weapon/wirerod,\
prob(1);/obj/item/weapon/butterfly/switchblade,\
prob(1);/obj/item/weapon/reagent_containers/syringe/drugs)
/obj/random/armory
name = "Random Armory Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "energykill100"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,\
prob(2);/obj/item/weapon/gun/energy/ionrifle,\
prob(2);/obj/item/weapon/gun/projectile/automatic/wt550,\
prob(1);/obj/item/weapon/gun/projectile/automatic/z8,\
prob(2);/obj/item/weapon/gun/energy/laser,\
prob(1);/obj/item/weapon/gun/energy/gun,\
prob(3);/obj/item/weapon/gun/projectile/sec,\
prob(2);/obj/item/weapon/gun/projectile/sec/wood,\
prob(3);/obj/item/weapon/gun/energy/taser,\
prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat)
/obj/random/ammo
name = "Random Ammunition"
desc = "This is random ammunition."
icon = 'icons/obj/ammo.dmi'
icon_state = "45-10"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/box/beanbags,\
prob(1);/obj/item/weapon/storage/box/shotgunammo,\
prob(2);/obj/item/weapon/storage/box/shotgunshells,\
prob(2);/obj/item/weapon/storage/box/stunshells,\
prob(1);/obj/item/ammo_magazine/c45m,\
prob(2);/obj/item/ammo_magazine/c45m/rubber,\
prob(2);/obj/item/ammo_magazine/c45m/flash,\
prob(1);/obj/item/ammo_magazine/mc9mmt,\
prob(3);/obj/item/ammo_magazine/mc9mmt/rubber,\
prob(2);/obj/item/ammo_magazine/a556)
/obj/random/armor
name = "Random Armor"
desc = "This is a random armor vest."
icon = 'icons/obj/clothing/suits.dmi'
icon_state = "kvest"
item_to_spawn()
return pick(prob(4);/obj/item/clothing/suit/storage/vest,\
prob(3);/obj/item/clothing/suit/storage/vest/officer,\
prob(3);/obj/item/clothing/suit/storage/vest/warden,\
prob(3);/obj/item/clothing/suit/storage/vest/hos,\
prob(2);/obj/item/clothing/suit/storage/vest/pcrc,\
prob(1);/obj/item/clothing/suit/storage/vest/detective,\
prob(2);/obj/item/clothing/suit/storage/vest/heavy,\
prob(2);/obj/item/clothing/suit/storage/vest/heavy/officer,\
prob(2);/obj/item/clothing/suit/storage/vest/heavy/warden,\
prob(2);/obj/item/clothing/suit/storage/vest/heavy/hos,\
prob(2);/obj/item/clothing/suit/storage/vest/heavy/pcrc)
/obj/random/plushie
name = "random plushie"
desc = "This is a random plushie."
icon = 'icons/obj/toy.dmi'
icon_state = "nymphplushie"
item_to_spawn()
return pick(/obj/structure/plushie/ian,\
/obj/structure/plushie/drone,\
/obj/structure/plushie/carp,\
/obj/structure/plushie/beepsky,\
/obj/item/toy/plushie/nymph,\
/obj/item/toy/plushie/mouse,\
/obj/item/toy/plushie/kitten,\
/obj/item/toy/plushie/lizard)
@@ -18,7 +18,7 @@
new /obj/item/clothing/suit/captunic/capjacket(src)
new /obj/item/clothing/head/helmet/cap(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/storage/vest(src)
new /obj/item/weapon/cartridge/captain(src)
new /obj/item/clothing/head/helmet/swat(src)
new /obj/item/clothing/shoes/brown(src)
@@ -47,7 +47,7 @@
New()
..()
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/storage/vest(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/weapon/cartridge/hop(src)
new /obj/item/device/radio/headset/heads/hop(src)
@@ -104,7 +104,7 @@
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/head/helmet/HoS(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/storage/vest/hos(src)
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
new /obj/item/clothing/under/rank/head_of_security/corp(src)
new /obj/item/clothing/suit/armor/hos/jensen(src)
@@ -144,12 +144,12 @@
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/suit/armor/vest/security(src)
new /obj/item/clothing/suit/storage/vest/warden(src)
new /obj/item/clothing/under/rank/warden(src)
new /obj/item/clothing/under/rank/warden/corp(src)
new /obj/item/clothing/suit/armor/vest/warden(src)
new /obj/item/clothing/head/helmet/warden(src)
// new /obj/item/weapon/cartridge/security(src)
new /obj/item/weapon/cartridge/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
@@ -160,6 +160,7 @@
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/clothing/head/beret/sec/warden(src)
new /obj/item/weapon/gun/projectile/shotgun/pump(src)
return
@@ -180,7 +181,7 @@
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/suit/armor/vest/security(src)
new /obj/item/clothing/suit/storage/vest/officer(src)
new /obj/item/clothing/head/helmet(src)
// new /obj/item/weapon/cartridge/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
@@ -196,6 +197,8 @@
new /obj/item/clothing/accessory/storage/black_vest(src)
new /obj/item/clothing/head/soft/sec/corp(src)
new /obj/item/clothing/under/rank/security/corp(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/weapon/gun/projectile/sec(src)
return
@@ -258,7 +261,7 @@
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/detective_scanner(src)
new /obj/item/clothing/suit/armor/det_suit(src)
new /obj/item/clothing/suit/storage/vest/detective(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/taperoll/police(src)
@@ -28,11 +28,15 @@
new /obj/item/weapon/tank/emergency_oxygen(src)
new /obj/item/clothing/mask/breath(src)
new /obj/item/clothing/mask/breath(src)
new /obj/item/clothing/suit/space/emergency(src)
new /obj/item/clothing/head/helmet/space/emergency(src)
if ("aid")
new /obj/item/weapon/tank/emergency_oxygen(src)
new /obj/item/weapon/storage/toolbox/emergency(src)
new /obj/item/clothing/mask/breath(src)
new /obj/item/weapon/storage/firstaid/o2(src)
new /obj/item/clothing/suit/space/emergency(src)
new /obj/item/clothing/head/helmet/space/emergency(src)
if ("tank")
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
new /obj/item/clothing/mask/breath(src)
@@ -43,6 +47,10 @@
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
new /obj/item/clothing/mask/breath(src)
new /obj/item/weapon/storage/firstaid/o2(src)
new /obj/item/clothing/suit/space/emergency(src)
new /obj/item/clothing/suit/space/emergency(src)
new /obj/item/clothing/head/helmet/space/emergency(src)
new /obj/item/clothing/head/helmet/space/emergency(src)
if ("nothing")
// doot
@@ -55,8 +55,8 @@
break
if(O.density || O.anchored || istype(O,/obj/structure/closet))
continue
if(istype(O, /obj/structure/stool/bed)) //This is only necessary because of rollerbeds and swivel chairs.
var/obj/structure/stool/bed/B = O
if(istype(O, /obj/structure/bed)) //This is only necessary because of rollerbeds and swivel chairs.
var/obj/structure/bed/B = O
if(B.buckled_mob)
continue
O.loc = src
@@ -341,8 +341,10 @@
/obj/structure/closet/crate/freezer/rations/New()
..()
new /obj/item/weapon/storage/box/donkpockets(src)
new /obj/item/weapon/storage/box/donkpockets(src)
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
/obj/structure/closet/crate/bin
name = "large bin"
@@ -1,4 +1,4 @@
/obj/structure/stool/bed/chair/e_chair
/obj/structure/bed/chair/e_chair
name = "electric chair"
desc = "Looks absolutely SHOCKING!"
icon_state = "echair0"
@@ -6,14 +6,14 @@
var/obj/item/assembly/shock_kit/part = null
var/last_time = 1.0
/obj/structure/stool/bed/chair/e_chair/New()
/obj/structure/bed/chair/e_chair/New()
..()
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
return
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(loc)
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
C.set_dir(dir)
part.loc = loc
@@ -23,7 +23,7 @@
return
return
/obj/structure/stool/bed/chair/e_chair/verb/toggle()
/obj/structure/bed/chair/e_chair/verb/toggle()
set name = "Toggle Electric Chair"
set category = "Object"
set src in oview(1)
@@ -37,13 +37,13 @@
usr << "<span class='notice'>You switch [on ? "on" : "off"] [src].</span>"
return
/obj/structure/stool/bed/chair/e_chair/rotate()
/obj/structure/bed/chair/e_chair/rotate()
..()
overlays.Cut()
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
return
/obj/structure/stool/bed/chair/e_chair/proc/shock()
/obj/structure/bed/chair/e_chair/proc/shock()
if(!on)
return
if(last_time + 50 > world.time)
+13 -13
View File
@@ -156,7 +156,7 @@
//old style retardo-cart
/obj/structure/stool/bed/chair/janicart
/obj/structure/bed/chair/janicart
name = "janicart"
icon = 'icons/obj/vehicles.dmi'
icon_state = "pussywagon"
@@ -169,12 +169,12 @@
var/callme = "pimpin' ride" //how do people refer to it?
/obj/structure/stool/bed/chair/janicart/New()
/obj/structure/bed/chair/janicart/New()
create_reagents(100)
update_layer()
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
/obj/structure/bed/chair/janicart/examine(mob/user)
if(!..(user, 1))
return
@@ -183,7 +183,7 @@
user << "\A [mybag] is hanging on the [callme]."
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user)
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/mop))
if(reagents.total_volume > 1)
reagents.trans_to(I, 2)
@@ -200,7 +200,7 @@
mybag = I
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
/obj/structure/bed/chair/janicart/attack_hand(mob/user)
if(mybag)
mybag.loc = get_turf(user)
user.put_in_hands(mybag)
@@ -209,7 +209,7 @@
..()
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
@@ -219,26 +219,26 @@
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
/obj/structure/stool/bed/chair/janicart/Move()
/obj/structure/bed/chair/janicart/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.loc = loc
/obj/structure/stool/bed/chair/janicart/post_buckle_mob(mob/living/M)
/obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M)
update_mob()
return ..()
/obj/structure/stool/bed/chair/janicart/update_layer()
/obj/structure/bed/chair/janicart/update_layer()
if(dir == SOUTH)
layer = FLY_LAYER
else
layer = OBJ_LAYER
/obj/structure/stool/bed/chair/janicart/unbuckle_mob()
/obj/structure/bed/chair/janicart/unbuckle_mob()
var/mob/living/M = ..()
if(M)
M.pixel_x = 0
@@ -246,7 +246,7 @@
return M
/obj/structure/stool/bed/chair/janicart/set_dir()
/obj/structure/bed/chair/janicart/set_dir()
..()
update_layer()
if(buckled_mob)
@@ -257,7 +257,7 @@
update_mob()
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
/obj/structure/bed/chair/janicart/proc/update_mob()
if(buckled_mob)
buckled_mob.set_dir(dir)
switch(dir)
@@ -275,7 +275,7 @@
buckled_mob.pixel_y = 7
/obj/structure/stool/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
/obj/structure/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
if(buckled_mob)
if(prob(85))
return buckled_mob.bullet_act(Proj)
@@ -1,14 +1,14 @@
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
#define NEST_RESIST_TIME 1200
/obj/structure/stool/bed/nest
/obj/structure/bed/nest
name = "alien nest"
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
icon = 'icons/mob/alien.dmi'
icon_state = "nest"
var/health = 100
/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/user as mob)
/obj/structure/bed/nest/user_unbuckle_mob(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
@@ -36,7 +36,7 @@
src.add_fingerprint(user)
return
/obj/structure/stool/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
/obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
return
@@ -68,7 +68,7 @@
src.add_fingerprint(user)
return
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/aforce = W.force
health = max(0, health - aforce)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
@@ -76,7 +76,7 @@
M.show_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
healthcheck()
/obj/structure/stool/bed/nest/proc/healthcheck()
/obj/structure/bed/nest/proc/healthcheck()
if(health <=0)
density = 0
del(src)
@@ -7,119 +7,63 @@
/*
* Beds
*/
/obj/structure/stool/bed
/obj/structure/bed
name = "bed"
desc = "This is used to lie in, sleep in or strap on."
icon = 'icons/obj/objects.dmi'
icon_state = "bed"
pressure_resistance = 15
anchored = 1
can_buckle = 1
buckle_lying = 1
//var/mob/living/buckled_mob
//var/movable = 0 // For mobility checks
/obj/structure/stool/bed/psych
/obj/structure/bed/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
/obj/structure/bed/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal(src.loc)
del(src)
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
else
..()
/obj/structure/bed/psych
name = "psychiatrists couch"
desc = "For prime comfort during psychiatric evaluations."
icon_state = "psychbed"
/obj/structure/stool/bed/alien
/obj/structure/bed/alien
name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
icon_state = "abed"
/*/obj/structure/stool/bed/Del()
unbuckle()
..()
return
/obj/structure/stool/bed/attack_hand(mob/user as mob)
manual_unbuckle(user)
return
/obj/structure/stool/bed/MouseDrop(atom/over_object)
return
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
buckle_mob(M, user)
return
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled
return
/obj/structure/stool/bed/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
var/M = buckled_mob
buckled_mob = null
afterbuckle(M)
return
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
"You were unbuckled from [src] by [user.name].",\
"You hear metal clanking")
else
buckled_mob.visible_message(\
"\blue [buckled_mob.name] unbuckled \himself!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
unbuckle()
src.add_fingerprint(user)
return 1
return 0
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
if (!ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
return
if (istype(M, /mob/living/carbon/slime))
user << "The [M] is too squishy to buckle in."
return
unbuckle()
if (M == usr)
M.visible_message(\
"\blue [M.name] buckles in!",\
"You buckle yourself to [src].",\
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] is buckled in to [src] by [user.name]!",\
"You are buckled in to [src] by [user.name].",\
"You hear metal clanking")
M.buckled = src
M.loc = src.loc
M.set_dir(src.dir)
M.update_canmove()
src.buckled_mob = M
src.add_fingerprint(user)
afterbuckle(M)
return*/
/*
* Roller beds
*/
/obj/structure/stool/bed/roller
/obj/structure/bed/roller
name = "roller bed"
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
anchored = 0
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/roller_holder))
if(buckled_mob)
user_unbuckle_mob(user)
@@ -139,7 +83,7 @@
w_class = 4.0 // Can't be put in backpacks. Oh well.
/obj/item/roller/attack_self(mob/user)
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
R.add_fingerprint(user)
del(src)
@@ -173,13 +117,13 @@
return
user << "\blue You deploy the roller bed."
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
R.add_fingerprint(user)
del(held)
held = null
/obj/structure/stool/bed/roller/Move()
/obj/structure/bed/roller/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
@@ -187,7 +131,7 @@
else
buckled_mob = null
/obj/structure/stool/bed/roller/post_buckle_mob(mob/living/M as mob)
/obj/structure/bed/roller/post_buckle_mob(mob/living/M as mob)
if(M == buckled_mob)
M.pixel_y = 6
M.old_y = 6
@@ -201,7 +145,7 @@
return ..()
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
..()
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
@@ -1,4 +1,4 @@
/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
/obj/structure/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
name = "chair"
desc = "You sit in this. Either by will or force."
icon_state = "chair"
@@ -6,13 +6,13 @@
var/propelled = 0 // Check for fire-extinguisher-driven chairs
/obj/structure/stool/bed/chair/New()
/obj/structure/bed/chair/New()
..()
spawn(3) //sorry. i don't think there's a better way to do this.
update_layer()
return
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/assembly/shock_kit))
var/obj/item/assembly/shock_kit/SK = W
@@ -20,7 +20,7 @@
user << "<span class='notice'>[SK] is not ready to be attached!</span>"
return
user.drop_item()
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
E.set_dir(dir)
E.part = SK
@@ -28,26 +28,26 @@
SK.master = E
del(src)
/obj/structure/stool/bed/chair/attack_tk(mob/user as mob)
/obj/structure/bed/chair/attack_tk(mob/user as mob)
if(buckled_mob)
..()
else
rotate()
return
/obj/structure/stool/bed/chair/proc/update_layer()
/obj/structure/bed/chair/proc/update_layer()
if(src.dir == NORTH)
src.layer = FLY_LAYER
else
src.layer = OBJ_LAYER
/obj/structure/stool/bed/chair/set_dir()
/obj/structure/bed/chair/set_dir()
..()
update_layer()
if(buckled_mob)
buckled_mob.set_dir(dir)
/obj/structure/stool/bed/chair/verb/rotate()
/obj/structure/bed/chair/verb/rotate()
set name = "Rotate Chair"
set category = "Object"
set src in oview(1)
@@ -67,17 +67,17 @@
return
// Chair types
/obj/structure/stool/bed/chair/wood/normal
/obj/structure/bed/chair/wood/normal
icon_state = "wooden_chair"
name = "wooden chair"
desc = "Old is never too old to not be in fashion."
/obj/structure/stool/bed/chair/wood/wings
/obj/structure/bed/chair/wood/wings
icon_state = "wooden_chair_wings"
name = "wooden chair"
desc = "Old is never too old to not be in fashion."
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/wood(src.loc)
@@ -85,45 +85,45 @@
else
..()
/obj/structure/stool/bed/chair/comfy
/obj/structure/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
icon_state = "comfychair"
color = rgb(255,255,255)
var/image/armrest = null
/obj/structure/stool/bed/chair/comfy/New()
/obj/structure/bed/chair/comfy/New()
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
armrest.layer = MOB_LAYER + 0.1
return ..()
/obj/structure/stool/bed/chair/comfy/post_buckle_mob()
/obj/structure/bed/chair/comfy/post_buckle_mob()
if(buckled_mob)
overlays += armrest
else
overlays -= armrest
/obj/structure/stool/bed/chair/comfy/brown
/obj/structure/bed/chair/comfy/brown
color = rgb(255,113,0)
/obj/structure/stool/bed/chair/comfy/beige
/obj/structure/bed/chair/comfy/beige
color = rgb(255,253,195)
/obj/structure/stool/bed/chair/comfy/teal
/obj/structure/bed/chair/comfy/teal
color = rgb(0,255,255)
/obj/structure/stool/bed/chair/office
/obj/structure/bed/chair/office
anchored = 0
buckle_movable = 1
/obj/structure/stool/bed/chair/comfy/black
/obj/structure/bed/chair/comfy/black
color = rgb(167,164,153)
/obj/structure/stool/bed/chair/comfy/lime
/obj/structure/bed/chair/comfy/lime
color = rgb(255,251,0)
/obj/structure/stool/bed/chair/office/Move()
/obj/structure/bed/chair/office/Move()
..()
if(buckled_mob)
var/mob/living/occupant = buckled_mob
@@ -138,7 +138,7 @@
else
unbuckle_mob()
/obj/structure/stool/bed/chair/office/Bump(atom/A)
/obj/structure/bed/chair/office/Bump(atom/A)
..()
if(!buckled_mob) return
@@ -163,8 +163,8 @@
victim.apply_damage(10, BRUTE, def_zone, blocked)
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/stool/bed/chair/office/light
/obj/structure/bed/chair/office/light
icon_state = "officechair_white"
/obj/structure/stool/bed/chair/office/dark
/obj/structure/bed/chair/office/dark
icon_state = "officechair_dark"
@@ -1,81 +1,11 @@
/obj/structure/stool
/obj/item/weapon/stool
name = "stool"
desc = "Apply butt."
icon = 'icons/obj/objects.dmi'
icon_state = "stool"
anchored = 1.0
pressure_resistance = 15
/obj/structure/stool/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
return
/obj/structure/stool/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal(src.loc)
del(src)
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
return
/obj/structure/stool/MouseDrop(atom/over_object)
if(istype(over_object, /mob/living/carbon/human) && type == /obj/structure/stool) //i am sorry for this, but the inheritance mess requires it
var/mob/living/carbon/human/H = over_object
if (H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
S.origin = src
src.loc = S
H.put_in_hands(S)
H.visible_message("\red [H] grabs [src] from the floor!", "\red You grab [src] from the floor!")
return
return ..()
/obj/item/weapon/stool
name = "stool"
desc = "Uh-hoh, bar is heating up."
icon = 'icons/obj/objects.dmi'
icon_state = "stool"
force = 10
throwforce = 10
w_class = 5.0
var/obj/structure/stool/origin = null
/obj/item/weapon/stool/proc/deploy(var/mob/user)
if(!origin)
del src
origin.loc = get_turf(src)
if(user)
user.u_equip(src)
user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.")
del src
/obj/item/weapon/stool/dropped(mob/user as mob)
..()
if(istype(loc,/turf/))
deploy(user)
/obj/item/weapon/stool/attack_self(mob/user as mob)
..()
deploy(user)
w_class = 5
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
@@ -89,3 +19,29 @@
T.apply_damage(20)
return
..()
/obj/item/weapon/stool/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
/obj/item/weapon/stool/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal(src.loc)
del(src)
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
..()
@@ -1,4 +1,4 @@
/obj/structure/stool/bed/chair/wheelchair
/obj/structure/bed/chair/wheelchair
name = "wheelchair"
desc = "You sit in this. Either by will or force."
icon_state = "wheelchair"
@@ -10,7 +10,7 @@
var/bloodiness
/obj/structure/stool/bed/chair/wheelchair/set_dir()
/obj/structure/bed/chair/wheelchair/set_dir()
..()
overlays = null
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
@@ -18,7 +18,7 @@
if(buckled_mob)
buckled_mob.set_dir(dir)
/obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction)
/obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction)
// Redundant check?
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
if(user==pulling)
@@ -79,7 +79,7 @@
create_track()
driving = 0
/obj/structure/stool/bed/chair/wheelchair/Move()
/obj/structure/bed/chair/wheelchair/Move()
..()
if(buckled_mob)
var/mob/living/occupant = buckled_mob
@@ -102,14 +102,14 @@
if (occupant && (src.loc != occupant.loc))
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
if (pulling)
MouseDrop(usr)
else
user_unbuckle_mob(user)
return
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
..()
if(over_object == usr && in_range(src, usr))
if(!ishuman(usr)) return
@@ -133,7 +133,7 @@
pulling = null
return
/obj/structure/stool/bed/chair/wheelchair/Bump(atom/A)
/obj/structure/bed/chair/wheelchair/Bump(atom/A)
..()
if(!buckled_mob) return
@@ -170,7 +170,7 @@
else
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/stool/bed/chair/wheelchair/proc/create_track()
/obj/structure/bed/chair/wheelchair/proc/create_track()
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
var/newdir = get_dir(get_step(loc, dir), loc)
if(newdir == dir)
@@ -184,7 +184,7 @@
B.set_dir(newdir)
bloodiness--
/obj/structure/stool/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
/obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
if(M == pulling)
pulling = null
usr.pulledby = null
+2 -2
View File
@@ -54,8 +54,8 @@ var/list/mechtoys = list(
if(istype(A) && A.checkpass(PASSGLASS))
return prob(60)
var/obj/structure/stool/bed/B = A
if (istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
var/obj/structure/bed/B = A
if (istype(A, /obj/structure/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
return 0
if(istype(A, /obj/vehicle)) //no vehicles
+4 -1
View File
@@ -519,7 +519,10 @@ turf/simulated/floor/proc/update_icon()
var/obj/item/stack/tile/T = C
if (T.get_amount() < 1)
return
floor_type = T.type
if(!T.build_type)
floor_type = T.type
else
floor_type = T.build_type
intact = 1
if(istype(T,/obj/item/stack/tile/light))
var/obj/item/stack/tile/light/L = T
+8 -3
View File
@@ -3,11 +3,13 @@
set desc = "Fires a laser bolt at your position. You should only do this as a(n) (a)ghost"
set category = "Fun"
var/turf/target = get_turf(src.mob)
admin_log_and_message_admins("has fired the Icarus point defense laser at [target.x]-[target.y]-[target.z]")
if(!src.holder)
src << "Only administrators may use this command."
return
Icarus_FireLaser(get_turf(src.mob))
Icarus_FireLaser(target)
/client/proc/FireCannons()
@@ -15,11 +17,13 @@
set desc = "Fires an explosive missile at your position. You should only do this as a(n) (a)ghost."
set category = "Fun"
var/turf/target = get_turf(src.mob)
admin_log_and_message_admins("has fired the Icarus main gun projectile at [target.x]-[target.y]-[target.z]")
if(!src.holder)
src << "Only administrators may use this command."
return
Icarus_FireCannon(get_turf(src.mob))
Icarus_FireCannon(target)
/client/proc/ChangeIcarusPosition()
@@ -27,6 +31,7 @@
set desc = "Lets you chose the position of the Icarus in regards to the map."
set category = "Fun"
admin_log_and_message_admins("is changing the Icarus position.")
if(!src.holder)
src << "Only administrators may use this command."
return
@@ -122,4 +127,4 @@ proc/Icarus_SetPosition(var/user)
if(!direction)
return
icarus_position = directions[direction]
icarus_position = directions[direction]
+2 -2
View File
@@ -40,7 +40,7 @@
return
/obj/item/assembly/shock_kit/receive_signal()
if(istype(loc, /obj/structure/stool/bed/chair/e_chair))
var/obj/structure/stool/bed/chair/e_chair/C = loc
if(istype(loc, /obj/structure/bed/chair/e_chair))
var/obj/structure/bed/chair/e_chair/C = loc
C.shock()
return
+16 -2
View File
@@ -416,11 +416,25 @@ var/global/list/gear_datums = list()
cost = 1
/datum/gear/armpit
display_name = "shoulder holster"
display_name = "holster, armpit"
path = /obj/item/clothing/accessory/holster/armpit
slot = slot_tie
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","Detective")
/datum/gear/hip
display_name = "holster, hip"
path = /obj/item/clothing/accessory/holster/hip
slot = slot_tie
cost = 2
allowed_roles = list("Captain", "Head of Personnel", "Security Officer", "Warden", "Head of Security", "Detective")
/datum/gear/waist
display_name = "holster, waist"
path = /obj/item/clothing/accessory/holster/waist
slot = slot_tie
cost = 2
allowed_roles = list("Captain", "Head of Personnel", "Security Officer", "Warden", "Head of Security", "Detective")
/datum/gear/tie_blue
display_name = "tie, blue"
+2 -2
View File
@@ -191,9 +191,11 @@
if(isnull(species) || !(species in playable_species))
species = "Human"
if(isnum(underwear))
var/list/undies = gender == MALE ? underwear_m : underwear_f
underwear = undies[undies[underwear]]
if(isnum(undershirt))
undershirt = undershirt_t[undershirt_t[undershirt]]
@@ -219,8 +221,6 @@
r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes))
g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes))
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear))
undershirt = sanitize_integer(undershirt, 1, undershirt_t.len, initial(undershirt))
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
b_type = sanitize_text(b_type, initial(b_type))
@@ -84,3 +84,18 @@
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
siemens_coefficient = 0.9
body_parts_covered = UPPER_TORSO|ARMS
//Orange emergency space suit
/obj/item/clothing/head/helmet/space/emergency
name = "Emergency Space Helmet"
icon_state = "emergencyhelm"
item_state = "emergencyhelm"
desc = "A simple helmet with a built in light, smells like mothballs."
/obj/item/clothing/suit/space/emergency
name = "Emergency Softsuit"
icon_state = "syndicate-orange"
item_state = "syndicate-orange"
desc = "A thin, ungainly softsuit colored in blaze orange for rescuers to easily locate, looks pretty fragile."
slowdown = 4
+101 -3
View File
@@ -197,7 +197,7 @@
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 20, bio = 0, rad = 0)
siemens_coefficient = 0.7
var/obj/item/clothing/accessory/holster/holster
/obj/item/clothing/suit/armor/tactical/New()
..()
holster = new(src)
@@ -212,7 +212,7 @@
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(!holster.holstered)
var/obj/item/W = usr.get_active_hand()
if(!istype(W, /obj/item))
@@ -220,7 +220,7 @@
return
holster.holster(W, usr)
else
holster.unholster(usr)
holster.unholster(usr)
//Non-hardsuit ERT armor.
/obj/item/clothing/suit/armor/vest/ert
@@ -252,3 +252,101 @@
name = "emergency response team medical armor"
desc = "A set of armor worn by medical members of the NanoTrasen Emergency Response Team. Has red and white highlights."
icon_state = "ertarmor_med"
//New Vests
/obj/item/clothing/suit/storage/vest
name = "armor vest"
desc = "A simple kevlar plate carrier."
icon_state = "kvest"
item_state = "kvest"
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
/obj/item/clothing/suit/storage/vest/officer
name = "officer armor vest"
desc = "A simple kevlar plate carrier beloning to Nanotrasen. This one has a security holobadge clipped to the chest."
icon_state = "officervest_nobadge"
item_state = "officervest_nobadge"
icon_badge = "officervest_badge"
icon_nobadge = "officervest_nobadge"
/obj/item/clothing/suit/storage/vest/warden
name = "warden armor vest"
desc = "A simple kevlar plate carrier belonging to Nanotrasen. This one has a silver badge clipped to the chest."
icon_state = "wardenvest_nobadge"
item_state = "wardenvest_nobadge"
icon_badge = "wardenvest_badge"
icon_nobadge = "wardenvest_nobadge"
/obj/item/clothing/suit/storage/vest/hos
name = "commander armor vest"
desc = "A simple kevlar plate carrier belonging to Nanotrasen. This one has a gold badge clipped to the chest."
icon_state = "hosvest_nobadge"
item_state = "hosvest_nobadge"
icon_badge = "hosvest_badge"
icon_nobadge = "hosvest_nobadge"
/obj/item/clothing/suit/storage/vest/pcrc
name = "PCRC armor vest"
desc = "A simple kevlar plate carrier belonging to Proxima Centauri Risk Control. This one has a PCRC crest clipped to the chest."
icon_state = "pcrcvest_nobadge"
item_state = "pcrcvest_nobadge"
icon_badge = "pcrcvest_badge"
icon_nobadge = "pcrcvest_nobadge"
/obj/item/clothing/suit/storage/vest/detective
name = "detective armor vest"
desc = "A simple kevlar plate carrier in a vintage brown, it has a badge clipped to the chest that reads, 'Private investigator'."
icon_state = "detectivevest_nobadge"
item_state = "detectivevest_nobadge"
icon_badge = "detectivevest_badge"
icon_nobadge = "detectivevest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy
name = "heavy armor vest"
desc = "A heavy kevlar plate carrier with webbing attached."
icon_state = "webvest"
item_state = "webvest"
armor = list(melee = 50, bullet = 40, laser = 50, energy = 25, bomb = 30, bio = 0, rad = 0)
slowdown = 1
/obj/item/clothing/suit/storage/vest/heavy/officer
name = "officer heavy armor vest"
desc = "A heavy kevlar plate carrier belonging to Nanotrasen with webbing attached. This one has a security holobadge clipped to the chest."
icon_state = "officerwebvest_nobadge"
item_state = "officerwebvest_nobadge"
icon_badge = "officerwebvest_badge"
icon_nobadge = "officerwebvest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy/warden
name = "warden heavy armor vest"
desc = "A heavy kevlar plate carrier belonging to Nanotrasen with webbing attached. This one has a silver badge clipped to the chest."
icon_state = "wardenwebvest_nobadge"
item_state = "wardenwebvest_nobadge"
icon_badge = "wardenwebvest_badge"
icon_nobadge = "wardenwebvest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy/hos
name = "commander heavy armor vest"
desc = "A heavy kevlar plate carrier belonging to Nanotrasen with webbing attached. This one has a gold badge clipped to the chest."
icon_state = "hoswebvest_nobadge"
item_state = "hoswebvest_nobadge"
icon_badge = "hoswebvest_badge"
icon_nobadge = "hoswebvest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy/pcrc
name = "PCRC heavy armor vest"
desc = "A heavy kevlar plate carrier belonging to Proxima Centauri Risk Control with webbing attached. This one has a PCRC crest clipped to the chest."
icon_state = "pcrcwebvest_nobadge"
item_state = "pcrcwebvest_nobadge"
icon_badge = "pcrcwebvest_badge"
icon_nobadge = "pcrcwebvest_nobadge"
/obj/item/clothing/suit/storage/vest/heavy/merc
name = "comfortable heavy armor vest"
desc = "A heavy kevlar plate carrier in a fetching tan. Fits pretty well."
icon_state = "mercwebvest"
item_state = "mercwebvest"
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0)
slowdown = 0
+33 -1
View File
@@ -48,4 +48,36 @@
else //in case some goofy admin switches icon states around without switching the icon_open or icon_closed
usr << "You attempt to button-up the velcro on your [src], before promptly realising how silly you are."
return
update_clothing_icon() //so our overlays update
update_clothing_icon() //so our overlays update
//New Vest 4 pocket storage and badge toggles, until suit accessories are a thing.
/obj/item/clothing/suit/storage/vest/heavy/New()
..()
pockets = new/obj/item/weapon/storage/internal(src)
pockets.storage_slots = 4
pockets.max_w_class = 2
pockets.max_combined_w_class = 8
/obj/item/clothing/suit/storage/vest
var/icon_badge
var/icon_nobadge
verb/toggle()
set name ="Adjust Badge"
set category = "Object"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(icon_state == icon_badge)
icon_state = icon_nobadge
usr << "You unclip the badge from the vest."
else if(icon_state == icon_nobadge)
icon_state = icon_badge
usr << "You clip the badge to the vest."
else
usr << "You can't find a badge for [src]."
return
update_clothing_icon()
@@ -30,12 +30,12 @@
else
if(user.a_intent == "hurt")
usr.visible_message(
"\red [user] draws \the [holstered], ready to shoot!</span>",
"\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'>[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)
@@ -103,13 +103,19 @@
H.unholster(usr)
/obj/item/clothing/accessory/holster/armpit
name = "shoulder holster"
name = "armpit 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"
name = "waist holster"
desc = "A handgun holster. Made of expensive leather."
icon_state = "holster"
item_color = "holster_low"
item_color = "holster_low"
/obj/item/clothing/accessory/holster/hip
name = "hip holster"
desc = "A handgun holster slung low on the hip, draw pardner!"
icon_state = "holster_hip"
item_color = "holster_hip"
+2 -2
View File
@@ -182,10 +182,10 @@
visible_message("[src] fades away as it shatters!")
del(src)
/obj/structure/stool/bed/chair/holochair/Del()
/obj/structure/bed/chair/holochair/Del()
..()
/obj/structure/stool/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
user << ("<span class='notice'>It's a holochair, you can't dismantle it!</span>")
return
+1 -1
View File
@@ -341,7 +341,7 @@
/mob/living/carbon/can_use_hands()
if(handcuffed)
return 0
if(buckled && ! istype(buckled, /obj/structure/stool/bed/chair)) // buckling does not restrict hands
if(buckled && ! istype(buckled, /obj/structure/bed/chair)) // buckling does not restrict hands
return 0
return 1
@@ -213,7 +213,7 @@
distance = 1
if (src.stat)
msg += "<span class='warning'>[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.</span>\n"
if((stat == 2 || src.health < config.health_threshold_crit) && distance <= 3)
if((stat == 2 || src.losebreath) && distance <= 3)
msg += "<span class='warning'>[t_He] does not appear to be breathing.</span>\n"
if(istype(usr, /mob/living/carbon/human) && !usr.stat && Adjacent(usr))
usr.visible_message("<b>[usr]</b> checks [src]'s pulse.", "You check [src]'s pulse.")
@@ -451,6 +451,7 @@
msg += "\n[t_He] is [pose]"
user << msg
..()
//Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records.
/proc/hasHUD(mob/M as mob, hudtype)
+10 -2
View File
@@ -696,6 +696,8 @@
number += 2
if(istype(src.head, /obj/item/clothing/head/helmet/space))
number += 2
if(istype(src.head, /obj/item/clothing/head/helmet/space/emergency))
number -= 2
if(istype(src.glasses, /obj/item/clothing/glasses/thermal))
number -= 1
if(istype(src.glasses, /obj/item/clothing/glasses/sunglasses))
@@ -1237,7 +1239,7 @@
// Might need re-wording.
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into.</span>"
/mob/living/carbon/human/print_flavor_text()
/mob/living/carbon/human/print_flavor_text(var/shrink = 1)
var/list/equipment = list(src.head,src.wear_mask,src.glasses,src.w_uniform,src.wear_suit,src.gloves,src.shoes)
var/head_exposed = 1
var/face_exposed = 1
@@ -1273,7 +1275,13 @@
if((T == "head" && head_exposed) || (T == "face" && face_exposed) || (T == "eyes" && eyes_exposed) || (T == "torso" && torso_exposed) || (T == "arms" && arms_exposed) || (T == "hands" && hands_exposed) || (T == "legs" && legs_exposed) || (T == "feet" && feet_exposed))
flavor_text += flavor_texts[T]
flavor_text += "\n\n"
return ..()
if(!shrink)
return flavor_text
else
return ..()
/mob/living/carbon/human/get_descriptions_fluff()
return print_flavor_text(0)
/mob/living/carbon/human/getDNA()
if(species.flags & NO_SCAN)
@@ -209,7 +209,7 @@
w_uniform.add_fingerprint(M)
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
if (istype(r_hand,/obj/item/weapon/gun) || istype(l_hand,/obj/item/weapon/gun))
if(istype(r_hand,/obj/item/weapon/gun) || istype(l_hand,/obj/item/weapon/gun))
var/obj/item/weapon/gun/W = null
var/chance = 0
@@ -231,9 +231,13 @@
var/randn = rand(1, 100)
if(!(species.flags & NO_SLIP) && randn <= 25)
apply_effect(3, WEAKEN, run_armor_check(affecting, "melee"))
var/armor_check = run_armor_check(affecting, "melee")
apply_effect(3, WEAKEN, armor_check)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[M] has pushed [src]!</B>")
if(armor_check < 2)
visible_message("<span class='danger'>[M] has pushed [src]!</span>")
else
visible_message("<span class='warning'>[M] attempted to push [src]!</span>")
return
var/talked = 0 // BubbleWrap
@@ -38,9 +38,9 @@ emp_act
return -1 // complete projectile permutation
//Shrapnel
if (P.can_embed())
if(P.can_embed())
var/armor = getarmor_organ(organ, "bullet")
if(P.embed && prob(20 + max(P.damage - armor, -10)))
if(prob(20 + max(P.damage - armor, -10)))
var/obj/item/weapon/shard/shrapnel/SP = new()
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
@@ -26,7 +26,7 @@
if(wear_suit)
tally += wear_suit.slowdown
if(istype(buckled, /obj/structure/stool/bed/chair/wheelchair))
if(istype(buckled, /obj/structure/bed/chair/wheelchair))
for(var/organ_name in list("l_hand","r_hand","l_arm","r_arm"))
var/datum/organ/external/E = get_organ(organ_name)
if(!E || (E.status & ORGAN_DESTROYED))
@@ -209,5 +209,5 @@
if("resin membrane")
new /obj/effect/alien/resin/membrane(loc)
if("resin nest")
new /obj/structure/stool/bed/nest(loc)
new /obj/structure/bed/nest(loc)
return
+19 -16
View File
@@ -172,6 +172,12 @@
// ++++ROCKDTBEN++++ MOB PROCS //END
/mob/living/get_descriptions_fluff()
if(flavor_text) //Get flavor text for the green text.
return flavor_text
else //No flavor text? Try for hardcoded fluff instead.
return ..()
/mob/proc/get_contents()
@@ -514,7 +520,7 @@
return
//resisting grabs (as if it helps anyone...)
if ((!( L.stat ) && L.canmove && !( L.restrained() )))
if ((!( L.stat ) && !( L.restrained() )))
var/resisting = 0
for(var/obj/O in L.requests)
L.requests.Remove(O)
@@ -522,23 +528,20 @@
resisting++
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
resisting++
if (G.state == 1)
del(G)
else
if (G.state == 2)
if (prob(25))
for(var/mob/O in viewers(L, null))
O.show_message(text("\red [] has broken free of []'s grip!", L, G.assailant), 1)
switch(G.state)
if(GRAB_PASSIVE)
del(G)
if(GRAB_AGGRESSIVE)
if(prob(60)) //same chance of breaking the grab as disarm
L.visible_message("<span class='warning'>[L] has broken free of [G.assailant]'s grip!</span>")
del(G)
if(GRAB_NECK)
//If the you move when grabbing someone then it's easier for them to break free. Same if the affected mob is immune to stun.
if (((world.time - G.assailant.l_move_time < 20 || !L.stunned) && prob(15)) || prob(3))
L.visible_message("<span class='warning'>[L] has broken free of [G.assailant]'s headlock!</span>")
del(G)
else
if (G.state == 3)
if (prob(5))
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red [] has broken free of []'s headlock!", L, G.assailant), 1)
del(G)
if(resisting)
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", L), 1)
L.visible_message("<span class='danger'>[L] resists!</span>")
//unbuckling yourself
@@ -3,6 +3,13 @@
real_name = "drone"
icon = 'icons/mob/robots.dmi'
icon_state = "repairbot"
descriptions = new/datum/descriptions("Drones are player-controlled synthetics which are lawed to maintain the station and not \
interact with anyone else, except for other drones. They hold a wide array of tools to build, repair, maintain, and clean. \
They fuction similarly to other synthetics, in that they require recharging regularly, have laws, and are resilient to many hazards, \
such as fire, radiation, vacuum, and more. Ghosts can join the round as a maintenance drone by using the appropriate verb in the 'ghost' tab. \
An inactive drone can be rebooted by swiping an ID card on it with engineering or robotics access.",\
,"An <u>Electromagnetic Sequencer</u> can be used to subvert the drone to your cause.")
//desc_fluff is already provided with flavor_text.
maxHealth = 35
health = 35
universal_speak = 0
@@ -16,14 +23,6 @@
integrated_light_power = 2
local_transmit = 1
// We need to keep track of a few module items so we don't need to do list operations
// every time we need them. These get set in New() after the module is chosen.
var/obj/item/stack/sheet/metal/cyborg/stack_metal = null
var/obj/item/stack/sheet/wood/cyborg/stack_wood = null
var/obj/item/stack/sheet/glass/cyborg/stack_glass = null
var/obj/item/stack/sheet/mineral/plastic/cyborg/stack_plastic = null
var/obj/item/weapon/matter_decompiler/decompiler = null
//Used for self-mailing.
var/mail_destination = ""
@@ -56,15 +55,6 @@
verbs -= /mob/living/silicon/robot/verb/Namepick
module = new /obj/item/weapon/robot_module/drone(src)
//Grab stacks.
stack_metal = locate(/obj/item/stack/sheet/metal/cyborg) in src.module
stack_wood = locate(/obj/item/stack/sheet/wood/cyborg) in src.module
stack_glass = locate(/obj/item/stack/sheet/glass/cyborg) in src.module
stack_plastic = locate(/obj/item/stack/sheet/mineral/plastic/cyborg) in src.module
//Grab decompiler.
decompiler = locate(/obj/item/weapon/matter_decompiler) in src.module
//Some tidying-up.
flavor_text = "It's a tiny little repair drone. The casing is stamped with an NT logo and the subscript: 'NanoTrasen Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
updateicon()
@@ -2,7 +2,7 @@
/mob/living/silicon/robot/drone/verb/set_mail_tag()
set name = "Set Mail Tag"
set desc = "Tag yourself for delivery through the disposals system."
set category = "Drone"
set category = "Robot Commands"
var/new_tag = input("Select the desired destination.", "Set Mail Tag", null) as null|anything in tagger_locations
@@ -57,7 +57,7 @@
set name = "Drop Item"
set desc = "Release an item from your magnetic gripper."
set category = "Drone"
set category = "Robot Commands"
if(!wrapped)
//There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z
@@ -151,12 +151,10 @@
icon_state = "decompiler"
//Metal, glass, wood, plastic.
var/list/stored_comms = list(
"metal" = 0,
"glass" = 0,
"wood" = 0,
"plastic" = 0
)
var/datum/matter_synth/metal = null
var/datum/matter_synth/glass = null
var/datum/matter_synth/wood = null
var/datum/matter_synth/plastic = null
/obj/item/weapon/matter_decompiler/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
return
@@ -178,10 +176,10 @@
src.loc.visible_message("\red [src.loc] sucks [M] into its decompiler. There's a horrible crunching noise.","\red It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises.")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
del(M)
stored_comms["wood"]++
stored_comms["wood"]++
stored_comms["plastic"]++
stored_comms["plastic"]++
if(wood)
wood.add_charge(2000)
if(plastic)
plastic.add_charge(2000)
return
else if(istype(M,/mob/living/silicon/robot/drone) && !M.client)
@@ -203,61 +201,66 @@
del(M)
new/obj/effect/decal/cleanable/blood/oil(get_turf(src))
stored_comms["metal"] += 15
stored_comms["glass"] += 15
stored_comms["wood"] += 5
stored_comms["plastic"] += 5
if(metal)
metal.add_charge(15000)
if(glass)
glass.add_charge(15000)
if(wood)
wood.add_charge(2000)
if(plastic)
plastic.add_charge(1000)
return
else
continue
for(var/obj/W in T)
//Different classes of items give different commodities.
if (istype(W,/obj/item/weapon/cigbutt))
stored_comms["plastic"]++
if(istype(W,/obj/item/weapon/cigbutt))
if(plastic)
plastic.add_charge(500)
else if(istype(W,/obj/effect/spider/spiderling))
stored_comms["wood"]++
stored_comms["wood"]++
stored_comms["plastic"]++
stored_comms["plastic"]++
if(wood)
wood.add_charge(2000)
if(plastic)
plastic.add_charge(2000)
else if(istype(W,/obj/item/weapon/light))
var/obj/item/weapon/light/L = W
if(L.status >= 2) //In before someone changes the inexplicably local defines. ~ Z
stored_comms["metal"]++
stored_comms["glass"]++
if(metal)
metal.add_charge(250)
if(glass)
glass.add_charge(250)
else
continue
else if(istype(W,/obj/effect/decal/remains/robot))
stored_comms["metal"]++
stored_comms["metal"]++
stored_comms["plastic"]++
stored_comms["plastic"]++
stored_comms["glass"]++
if(metal)
metal.add_charge(2000)
if(plastic)
plastic.add_charge(2000)
if(glass)
glass.add_charge(1000)
else if(istype(W,/obj/item/trash))
stored_comms["metal"]++
stored_comms["plastic"]++
stored_comms["plastic"]++
stored_comms["plastic"]++
if(metal)
metal.add_charge(1000)
if(plastic)
plastic.add_charge(3000)
else if(istype(W,/obj/effect/decal/cleanable/blood/gibs/robot))
stored_comms["metal"]++
stored_comms["metal"]++
stored_comms["glass"]++
stored_comms["glass"]++
if(metal)
metal.add_charge(2000)
if(glass)
glass.add_charge(2000)
else if(istype(W,/obj/item/ammo_casing))
stored_comms["metal"]++
if(metal)
metal.add_charge(1000)
else if(istype(W,/obj/item/weapon/shard/shrapnel))
stored_comms["metal"]++
stored_comms["metal"]++
stored_comms["metal"]++
if(metal)
metal.add_charge(1000)
else if(istype(W,/obj/item/weapon/shard))
stored_comms["glass"]++
stored_comms["glass"]++
stored_comms["glass"]++
if(glass)
glass.add_charge(1000)
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown))
stored_comms["wood"]++
stored_comms["wood"]++
stored_comms["wood"]++
stored_comms["wood"]++
if(wood)
wood.add_charge(4000)
else if(istype(W,/obj/item/pipe))
// This allows drones and engiborgs to clear pipe assemblies from floors.
else
@@ -325,39 +328,3 @@
dat += resources
src << browse(dat, "window=robotmod")
//Putting the decompiler here to avoid doing list checks every tick.
/mob/living/silicon/robot/drone/use_power()
..()
if(!src.has_power || !decompiler)
return
//The decompiler replenishes drone stores from hoovered-up junk each tick.
for(var/type in decompiler.stored_comms)
if(decompiler.stored_comms[type] > 0)
var/obj/item/stack/sheet/stack
switch(type)
if("metal")
if(!stack_metal)
stack_metal = new /obj/item/stack/sheet/metal/cyborg(src.module)
stack_metal.amount = 1
stack = stack_metal
if("glass")
if(!stack_glass)
stack_glass = new /obj/item/stack/sheet/glass/cyborg(src.module)
stack_glass.amount = 1
stack = stack_glass
if("wood")
if(!stack_wood)
stack_wood = new /obj/item/stack/sheet/wood/cyborg(src.module)
stack_wood.amount = 1
stack = stack_wood
if("plastic")
if(!stack_plastic)
stack_plastic = new /obj/item/stack/sheet/mineral/plastic/cyborg(src.module)
stack_plastic.amount = 1
stack = stack_plastic
stack.amount++
decompiler.stored_comms[type]--;
@@ -579,6 +579,9 @@ var/list/robot_verbs_default = list(
show_cell_power()
show_jetpack_pressure()
stat(null, text("Lights: [lights_on ? "ON" : "OFF"]"))
if(module)
for(var/datum/matter_synth/ms in module.synths)
stat("[ms.name]: [ms.energy]/[ms.max_energy]")
/mob/living/silicon/robot/restrained()
return 0
@@ -7,9 +7,9 @@
flags = CONDUCT
var/channels = list()
var/list/modules = list()
var/list/datum/matter_synth/synths = list()
var/obj/item/emag = null
var/obj/item/borg/upgrade/jetpack = null
var/list/stacktypes
/obj/item/weapon/robot_module/emp_act(severity)
if(modules)
@@ -17,40 +17,19 @@
O.emp_act(severity)
if(emag)
emag.emp_act(severity)
if(synths)
for(var/datum/matter_synth/S in synths)
S.emp_act(severity)
..()
return
/obj/item/weapon/robot_module/New()
..()
// Build initial inventory.
if(stacktypes && stacktypes.len)
for(var/stack_type in stacktypes)
var/obj/item/stack/new_stack = new stack_type (src)
new_stack.amount = stacktypes[stack_type]
modules |= new_stack
/obj/item/weapon/robot_module/proc/respawn_consumable(var/mob/living/silicon/robot/R, var/rate)
/obj/item/weapon/robot_module/proc/respawn_consumable(var/mob/living/silicon/robot/R)
if(!synths || !synths.len)
return
if(!stacktypes || !stacktypes.len) return
for(var/T in stacktypes)
var/obj/item/stack/S
for(var/obj/O in src.modules)
if(O.type == T)
S = O
break
if(!S)
src.modules -= null
S = new T(src)
src.modules |= S
S.amount = 1
if(!istype(S))
continue
if(S && S.amount < stacktypes[T])
S.amount++
for(var/datum/matter_synth/T in synths)
T.add_charge(T.recharge_rate * rate)
/obj/item/weapon/robot_module/proc/rebuild()//Rebuilds the list so it's possible to add/remove items from the module
var/list/temp_list = modules
@@ -84,10 +63,6 @@
/obj/item/weapon/robot_module/surgeon
name = "surgeon robot module"
stacktypes = list(
/obj/item/stack/medical/advanced/bruise_pack = 5,
/obj/item/stack/nanopaste = 5
)
/obj/item/weapon/robot_module/surgeon/New()
..()
@@ -104,26 +79,34 @@
src.modules += new /obj/item/weapon/circular_saw(src)
src.modules += new /obj/item/weapon/surgicaldrill(src)
src.modules += new /obj/item/weapon/extinguisher/mini(src)
src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src)
src.modules += new /obj/item/stack/nanopaste(src)
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
src.emag.reagents.add_reagent("pacid", 250)
src.emag.name = "Polyacid spray"
var/datum/matter_synth/medicine = new /datum/matter_synth/medicine(10000)
synths += medicine
var/obj/item/stack/nanopaste/N = new /obj/item/stack/nanopaste(src)
var/obj/item/stack/medical/advanced/bruise_pack/B = new /obj/item/stack/medical/advanced/bruise_pack(src)
N.uses_charge = 1
N.charge_costs = list(1000)
N.synths = list(medicine)
B.uses_charge = 1
B.charge_costs = list(1000)
B.synths = list(medicine)
src.modules += N
src.modules += B
return
/obj/item/weapon/robot_module/surgeon/respawn_consumable(var/mob/living/silicon/robot/R)
/obj/item/weapon/robot_module/surgeon/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
if(src.emag)
var/obj/item/weapon/reagent_containers/spray/PS = src.emag
PS.reagents.add_reagent("pacid", 2)
PS.reagents.add_reagent("pacid", 2 * amount)
..()
/obj/item/weapon/robot_module/crisis
name = "crisis robot module"
stacktypes = list(
/obj/item/stack/medical/ointment = 5,
/obj/item/stack/medical/bruise_pack = 5,
/obj/item/stack/medical/splint = 5
)
/obj/item/weapon/robot_module/crisis/New()
..()
@@ -132,9 +115,6 @@
src.modules += new /obj/item/device/healthanalyzer(src)
src.modules += new /obj/item/device/reagent_scanner/adv(src)
src.modules += new /obj/item/roller_holder(src)
src.modules += new /obj/item/stack/medical/ointment(src)
src.modules += new /obj/item/stack/medical/bruise_pack(src)
src.modules += new /obj/item/stack/medical/splint(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
@@ -143,9 +123,29 @@
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
src.emag.reagents.add_reagent("pacid", 250)
src.emag.name = "Polyacid spray"
var/datum/matter_synth/medicine = new /datum/matter_synth/medicine(15000)
synths += medicine
var/obj/item/stack/medical/ointment/O = new /obj/item/stack/medical/ointment(src)
var/obj/item/stack/medical/bruise_pack/B = new /obj/item/stack/medical/bruise_pack(src)
var/obj/item/stack/medical/splint/S = new /obj/item/stack/medical/splint(src)
O.uses_charge = 1
O.charge_costs = list(1000)
O.synths = list(medicine)
B.uses_charge = 1
B.charge_costs = list(1000)
B.synths = list(medicine)
S.uses_charge = 1
S.charge_costs = list(1000)
S.synths = list(medicine)
src.modules += O
src.modules += B
src.modules += S
return
/obj/item/weapon/robot_module/crisis/respawn_consumable(var/mob/living/silicon/robot/R)
/obj/item/weapon/robot_module/crisis/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/weapon/reagent_containers/syringe/S = locate() in src.modules
if(S.mode == 2)
@@ -156,20 +156,13 @@
if(src.emag)
var/obj/item/weapon/reagent_containers/spray/PS = src.emag
PS.reagents.add_reagent("pacid", 2)
PS.reagents.add_reagent("pacid", 2 * amount)
..()
/obj/item/weapon/robot_module/construction
name = "construction robot module"
stacktypes = list(
/obj/item/stack/sheet/metal = 50,
/obj/item/stack/sheet/plasteel = 10,
/obj/item/stack/sheet/glass/reinforced = 50,
/obj/item/stack/rods = 50
)
/obj/item/weapon/robot_module/construction/New()
..()
src.modules += new /obj/item/device/flash(src)
@@ -182,18 +175,32 @@
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
src.modules += new /obj/item/device/pipe_painter(src)
var/datum/matter_synth/metal = new /datum/matter_synth/metal()
var/datum/matter_synth/plasteel = new /datum/matter_synth/plasteel()
var/datum/matter_synth/glass = new /datum/matter_synth/glass()
synths += metal
synths += plasteel
synths += glass
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
M.synths = list(metal)
src.modules += M
var/obj/item/stack/rods/cyborg/R = new /obj/item/stack/rods/cyborg(src)
R.synths = list(metal)
src.modules += R
var/obj/item/stack/sheet/plasteel/cyborg/S = new /obj/item/stack/sheet/plasteel/cyborg(src)
S.synths = list(metal)
src.modules += S
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
RG.synths = list(metal, glass)
src.modules += R
/obj/item/weapon/robot_module/engineering
name = "engineering robot module"
stacktypes = list(
/obj/item/stack/sheet/metal = 50,
/obj/item/stack/sheet/glass = 50,
/obj/item/stack/sheet/glass/reinforced = 50,
/obj/item/stack/cable_coil/robot = 50,
/obj/item/stack/rods = 15,
/obj/item/stack/tile/plasteel = 15
)
/obj/item/weapon/robot_module/engineering/New()
..()
src.modules += new /obj/item/device/flash(src)
@@ -209,9 +216,45 @@
src.modules += new /obj/item/device/analyzer(src)
src.modules += new /obj/item/taperoll/engineering(src)
src.modules += new /obj/item/weapon/gripper(src)
src.modules += new /obj/item/weapon/matter_decompiler(src)
src.modules += new /obj/item/device/pipe_painter(src)
src.emag = new /obj/item/borg/stun(src)
var/datum/matter_synth/metal = new /datum/matter_synth/metal(40000)
var/datum/matter_synth/glass = new /datum/matter_synth/glass(40000)
var/datum/matter_synth/wire = new /datum/matter_synth/wire()
synths += metal
synths += glass
synths += wire
var/obj/item/weapon/matter_decompiler/MD = new /obj/item/weapon/matter_decompiler(src)
MD.metal = metal
MD.glass = glass
src.modules += MD
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
M.synths = list(metal)
src.modules += M
var/obj/item/stack/sheet/glass/cyborg/G = new /obj/item/stack/sheet/glass/cyborg(src)
G.synths = list(glass)
src.modules += G
var/obj/item/stack/rods/cyborg/R = new /obj/item/stack/rods/cyborg(src)
R.synths = list(metal)
src.modules += R
var/obj/item/stack/cable_coil/cyborg/C = new /obj/item/stack/cable_coil/cyborg(src)
C.synths = list(wire)
src.modules += C
var/obj/item/stack/tile/plasteel/cyborg/S = new /obj/item/stack/tile/plasteel/cyborg(src)
S.synths = list(metal)
src.modules += S
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
RG.synths = list(metal, glass)
src.modules += RG
return
/obj/item/weapon/robot_module/security
@@ -228,7 +271,7 @@
src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src)
return
/obj/item/weapon/robot_module/security/respawn_consumable(var/mob/living/silicon/robot/R)
/obj/item/weapon/robot_module/security/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/device/flash/F = locate() in src.modules
if(F.broken)
F.broken = 0
@@ -238,7 +281,7 @@
F.times_used--
var/obj/item/weapon/gun/energy/taser/mounted/cyborg/T = locate() in src.modules
if(T.power_supply.charge < T.power_supply.maxcharge)
T.power_supply.give(T.charge_cost)
T.power_supply.give(T.charge_cost * amount)
T.update_icon()
else
T.charge_tick = 0
@@ -258,12 +301,12 @@
src.emag.name = "Lube spray"
return
/obj/item/weapon/robot_module/janitor/respawn_consumable(var/mob/living/silicon/robot/R)
/obj/item/weapon/robot_module/janitor/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/device/lightreplacer/LR = locate() in src.modules
LR.Charge(R)
LR.Charge(R, amount)
if(src.emag)
var/obj/item/weapon/reagent_containers/spray/S = src.emag
S.reagents.add_reagent("lube", 2)
S.reagents.add_reagent("lube", 2 * amount)
/obj/item/weapon/robot_module/butler
name = "service robot module"
@@ -327,12 +370,12 @@
R.add_language("Tradeband", 1)
R.add_language("Gutter", 1)
/obj/item/weapon/robot_module/butler/respawn_consumable(var/mob/living/silicon/robot/R)
/obj/item/weapon/robot_module/butler/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/weapon/reagent_containers/food/condiment/enzyme/E = locate() in src.modules
E.reagents.add_reagent("enzyme", 2)
E.reagents.add_reagent("enzyme", 2 * amount)
if(src.emag)
var/obj/item/weapon/reagent_containers/food/drinks/cans/beer/B = src.emag
B.reagents.add_reagent("beer2", 2)
B.reagents.add_reagent("beer2", 2 * amount)
/obj/item/weapon/robot_module/miner
name = "miner robot module"
@@ -392,17 +435,6 @@
/obj/item/weapon/robot_module/drone
name = "drone module"
stacktypes = list(
/obj/item/stack/sheet/wood = 1,
/obj/item/stack/sheet/mineral/plastic = 1,
/obj/item/stack/sheet/glass/reinforced = 5,
/obj/item/stack/tile/wood = 5,
/obj/item/stack/rods = 15,
/obj/item/stack/tile/plasteel = 15,
/obj/item/stack/sheet/metal = 20,
/obj/item/stack/sheet/glass = 20,
/obj/item/stack/cable_coil/robot = 30
)
/obj/item/weapon/robot_module/drone/New()
..()
@@ -414,20 +446,73 @@
src.modules += new /obj/item/device/multitool(src)
src.modules += new /obj/item/device/lightreplacer(src)
src.modules += new /obj/item/weapon/gripper(src)
src.modules += new /obj/item/weapon/matter_decompiler(src)
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
src.emag.name = "Plasma Cutter"
var/datum/matter_synth/metal = new /datum/matter_synth/metal(25000)
var/datum/matter_synth/glass = new /datum/matter_synth/glass(25000)
var/datum/matter_synth/wood = new /datum/matter_synth/wood(2000)
var/datum/matter_synth/plastic = new /datum/matter_synth/plastic(1000)
var/datum/matter_synth/wire = new /datum/matter_synth/wire(30)
synths += metal
synths += glass
synths += wood
synths += plastic
synths += wire
var/obj/item/weapon/matter_decompiler/MD = new /obj/item/weapon/matter_decompiler(src)
MD.metal = metal
MD.glass = glass
MD.wood = wood
MD.plastic = plastic
src.modules += MD
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
M.synths = list(metal)
src.modules += M
var/obj/item/stack/sheet/glass/cyborg/G = new /obj/item/stack/sheet/glass/cyborg(src)
G.synths = list(glass)
src.modules += G
var/obj/item/stack/rods/cyborg/R = new /obj/item/stack/rods/cyborg(src)
R.synths = list(metal)
src.modules += R
var/obj/item/stack/cable_coil/cyborg/C = new /obj/item/stack/cable_coil/cyborg(src)
C.synths = list(wire)
src.modules += C
var/obj/item/stack/tile/plasteel/cyborg/S = new /obj/item/stack/tile/plasteel/cyborg(src)
S.synths = list(metal)
src.modules += S
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
RG.synths = list(metal, glass)
src.modules += RG
var/obj/item/stack/tile/wood/cyborg/WT = new /obj/item/stack/tile/wood/cyborg(src)
WT.synths = list(wood)
src.modules += WT
var/obj/item/stack/sheet/wood/cyborg/W = new /obj/item/stack/sheet/wood/cyborg(src)
W.synths = list(wood)
src.modules += W
var/obj/item/stack/sheet/mineral/plastic/cyborg/P = new /obj/item/stack/sheet/mineral/plastic/cyborg(src)
P.synths = list(plastic)
src.modules += P
/obj/item/weapon/robot_module/drone/add_languages(var/mob/living/silicon/robot/R)
return //not much ROM to spare in that tiny microprocessor!
/obj/item/weapon/robot_module/drone/respawn_consumable(var/mob/living/silicon/robot/R)
/obj/item/weapon/robot_module/drone/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/weapon/reagent_containers/spray/cleaner/C = locate() in src.modules
C.reagents.add_reagent("cleaner", 3)
C.reagents.add_reagent("cleaner", 3 * amount)
var/obj/item/device/lightreplacer/LR = locate() in src.modules
LR.Charge(R)
LR.Charge(R, amount)
..()
return
+17 -1
View File
@@ -834,6 +834,17 @@ note dizziness decrements automatically in the mob's Life() proc.
statpanel("Spells","[S.charge_counter]/[S.charge_max]",S)
if("holdervar")
statpanel("Spells","[S.holder_var_type] [S.holder_var_amount]",S)
if(statpanel("Examine"))
stat(null,"[description_holders["icon"]] <font size='5'>[description_holders["name"]]</font>") //The name, written in big letters.
stat(null,"[description_holders["desc"]]") //the default examine text.
if(description_holders["info"])
stat(null,"<font color='#084B8A'><b>[description_holders["info"]]</b></font>") //Blue, informative text.
if(description_holders["fluff"])
stat(null,"<font color='#298A08'><b>[description_holders["fluff"]]</b></font>") //Yellow, fluff-related text.
if(mind.special_role)
if(description_holders["antag"])
stat(null,"<font color='#8A0808'><b>[description_holders["antag"]]</b></font>") //Red, malicious antag-related text
@@ -868,7 +879,7 @@ note dizziness decrements automatically in the mob's Life() proc.
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
lying = 1
canmove = 0
else if( stunned )
else if(stunned)
canmove = 0
else if(captured)
anchored = 1
@@ -885,6 +896,11 @@ note dizziness decrements automatically in the mob's Life() proc.
else
density = 1
for(var/obj/item/weapon/grab/G in grabbed_by)
if(G.state >= GRAB_AGGRESSIVE)
canmove = 0
break
//Temporarily moved here from the various life() procs
//I'm fixing stuff incrementally so this will likely find a better home.
//It just makes sense for now. ~Carn
+6 -1
View File
@@ -121,7 +121,7 @@
var/m_int = null//Living
var/m_intent = "run"//Living
var/lastKnownIP = null
var/obj/structure/stool/bed/buckled = null//Living
var/obj/structure/bed/buckled = null//Living
var/obj/item/l_hand = null//Living
var/obj/item/r_hand = null//Living
var/obj/item/weapon/back = null//Human/Monkey
@@ -223,3 +223,8 @@
var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
var/list/active_genes=list()
//Examine tab vars
//These hold the descriptions and other info, to relay to the actual tab.
var/description_holders[0]
+51 -50
View File
@@ -35,6 +35,10 @@
hud.name = "reinforce grab"
hud.master = src
/obj/item/weapon/grab/Del()
//make sure the grabbed_by list doesn't fill up with nulls
if(affecting) affecting.grabbed_by -= src
..()
//Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code.
/obj/item/weapon/grab/proc/throw()
@@ -67,6 +71,7 @@
if(state <= GRAB_AGGRESSIVE)
allow_upgrade = 1
//disallow upgrading if we're grabbing more than one person
if((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab)))
var/obj/item/weapon/grab/G = assailant.l_hand
if(G.affecting != affecting)
@@ -76,31 +81,29 @@
if(G.affecting != affecting)
allow_upgrade = 0
if(state == GRAB_AGGRESSIVE)
var/h = affecting.hand
affecting.hand = 0
affecting.drop_item()
affecting.hand = 1
affecting.drop_item()
affecting.hand = h
affecting.drop_l_hand()
affecting.drop_r_hand()
//disallow upgrading past aggressive if we're being grabbed aggressively
for(var/obj/item/weapon/grab/G in affecting.grabbed_by)
if(G == src) continue
if(G.state == GRAB_AGGRESSIVE)
if(G.state >= GRAB_AGGRESSIVE)
allow_upgrade = 0
if(allow_upgrade)
hud.icon_state = "reinforce"
else
hud.icon_state = "!reinforce"
else
if(!affecting.buckled)
affecting.loc = assailant.loc
else if(!affecting.buckled)
affecting.loc = assailant.loc
if(state >= GRAB_NECK)
affecting.Stun(5) //It will hamper your voice, being choked and all.
affecting.Stun(1)
if(isliving(affecting))
var/mob/living/L = affecting
L.adjustOxyLoss(1)
if(state >= GRAB_KILL)
//affecting.apply_effect(STUTTER, 5) //would do this, but affecting isn't declared as mob/living for some stupid reason.
affecting.stuttering = max(affecting.stuttering, 5) //It will hamper your voice, being choked and all.
affecting.Weaken(5) //Should keep you down unless you get help.
affecting.losebreath = min(affecting.losebreath + 2, 3)
@@ -126,48 +129,46 @@
assailant.visible_message("<span class='warning'>[assailant] has grabbed [affecting] aggressively (now hands)!</span>")
state = GRAB_AGGRESSIVE
icon_state = "grabbed1"
else
if(state < GRAB_NECK)
if(isslime(affecting))
assailant << "<span class='notice'>You squeeze [affecting], but nothing interesting happens.</span>"
else if(state < GRAB_NECK)
if(isslime(affecting))
assailant << "<span class='notice'>You squeeze [affecting], but nothing interesting happens.</span>"
return
assailant.visible_message("<span class='warning'>[assailant] has reinforced \his grip on [affecting] (now neck)!</span>")
state = GRAB_NECK
icon_state = "grabbed+1"
if(!affecting.buckled)
affecting.loc = assailant.loc
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] grabbed the neck of [key_name(affecting)]")
hud.icon_state = "disarm/kill"
hud.name = "disarm/kill"
else if(state < GRAB_UPGRADING)
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill1"
state = GRAB_UPGRADING
if(do_after(assailant, UPGRADE_KILL_TIMER))
if(state == GRAB_KILL)
return
if(!affecting)
del(src)
return
if(!assailant.canmove || assailant.lying)
del(src)
return
state = GRAB_KILL
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
assailant.visible_message("<span class='warning'>[assailant] has reinforced \his grip on [affecting] (now neck)!</span>")
state = GRAB_NECK
icon_state = "grabbed+1"
if(!affecting.buckled)
affecting.loc = assailant.loc
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] grabbed the neck of [key_name(affecting)]")
hud.icon_state = "disarm/kill"
hud.name = "disarm/kill"
assailant.next_move = world.time + 10
affecting.losebreath += 1
else
if(state < GRAB_UPGRADING)
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill1"
state = GRAB_UPGRADING
if(do_after(assailant, UPGRADE_KILL_TIMER))
if(state == GRAB_KILL)
return
if(!affecting)
del(src)
return
if(!assailant.canmove || assailant.lying)
del(src)
return
state = GRAB_KILL
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
assailant.next_move = world.time + 10
affecting.losebreath += 1
else
assailant.visible_message("<span class='warning'>[assailant] was unable to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill"
state = GRAB_NECK
assailant.visible_message("<span class='warning'>[assailant] was unable to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill"
state = GRAB_NECK
//This is used to make sure the victim hasn't managed to yackety sax away before using the grab.
+12
View File
@@ -80,6 +80,18 @@
return 1
return 0
/mob/proc/isSilicon()
return 0
/mob/living/silicon/isSilicon()
return 1
/mob/proc/isAI()
return 0
/mob/living/silicon/ai/isAI()
return 1
/proc/ispAI(A)
if(istype(A, /mob/living/silicon/pai))
return 1
+8 -25
View File
@@ -284,9 +284,9 @@
if(mob.pulledby || mob.buckled) // Wheelchair driving!
if(istype(mob.loc, /turf/space))
return // No wheelchair driving in space
if(istype(mob.pulledby, /obj/structure/stool/bed/chair/wheelchair))
if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair))
return mob.pulledby.relaymove(mob, direct)
else if(istype(mob.buckled, /obj/structure/stool/bed/chair/wheelchair))
else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair))
if(ishuman(mob.buckled))
var/mob/living/carbon/human/driver = mob.buckled
var/datum/organ/external/l_hand = driver.get_organ("l_hand")
@@ -351,30 +351,13 @@
///Process_Grab()
///Called by client/Move()
///Checks to see if you are being grabbed and if so attemps to break it
///Checks to see if you are grabbing anything and if moving will affect your grab.
/client/proc/Process_Grab()
if(locate(/obj/item/weapon/grab, locate(/obj/item/weapon/grab, mob.grabbed_by.len)))
var/list/grabbing = list()
if(istype(mob.l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = mob.l_hand
grabbing += G.affecting
if(istype(mob.r_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = mob.r_hand
grabbing += G.affecting
for(var/obj/item/weapon/grab/G in mob.grabbed_by)
if((G.state == 1)&&(!grabbing.Find(G.assailant))) del(G)
if(G.state == 2)
move_delay = world.time + 10
if(!prob(25)) return 1
mob.visible_message("\red [mob] has broken free of [G.assailant]'s grip!")
del(G)
if(G.state == 3)
move_delay = world.time + 10
if(!prob(5)) return 1
mob.visible_message("\red [mob] has broken free of [G.assailant]'s headlock!")
del(G)
return 0
for(var/obj/item/weapon/grab/G in list(mob.l_hand, mob.r_hand))
if(G.state == GRAB_KILL) //no wandering across the station/asteroid while choking someone
mob.visible_message("<span class='warning'>[mob] lost \his tight grip on [G.affecting]'s neck!</span>")
G.hud.icon_state = "disarm/kill"
G.state = GRAB_NECK
///Process_Incorpmove
///Called by client/Move()
+1 -1
View File
@@ -352,7 +352,7 @@
character.lastarea = get_area(loc)
// Moving wheelchair if they have one
if(character.buckled && istype(character.buckled, /obj/structure/stool/bed/chair/wheelchair))
if(character.buckled && istype(character.buckled, /obj/structure/bed/chair/wheelchair))
character.buckled.loc = character.loc
character.buckled.set_dir(character.dir)
+7 -7
View File
@@ -1,5 +1,5 @@
// This file contains all Nano procs/definitions for external classes/objects
// This file contains all Nano procs/definitions for external classes/objects
/**
* Called when a Nano UI window is closed
* This is how Nano handles closed windows
@@ -15,7 +15,7 @@
if (istype(ui))
ui.close()
if(ui.ref)
var/href = "close=1"
src.Topic(href, params2list(href), ui.ref) // this will direct to the atom's Topic() proc via client.Topic()
@@ -31,14 +31,14 @@
* ui_interact is currently defined for /atom/movable
*
* @param user /mob The mob who is interacting with this ui
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
* @param force_open boolean Force the UI to (re)open, even if it's already open
*
* @return nothing
*/
/atom/movable/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/atom/movable/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nano_ui/master_ui = null, var/datum/topic_state/custom_state = null)
return
// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob
/mob/var/list/open_uis = list()
+118
View File
@@ -0,0 +1,118 @@
/atom/movable/proc/nano_host()
return src
/obj/nano_module/nano_host()
return loc
/atom/movable/proc/CanUseTopic(var/mob/user, href_list, var/datum/topic_state/custom_state)
return user.can_use_topic(nano_host(), custom_state)
/mob/proc/can_use_topic(var/mob/user, var/datum/topic_state/custom_state)
return STATUS_CLOSE // By default no mob can do anything with NanoUI
/mob/dead/observer/can_use_topic()
if(check_rights(R_ADMIN, 0))
return STATUS_INTERACTIVE // Admins are more equal
return STATUS_UPDATE // Ghosts can view updates
/mob/living/silicon/pai/can_use_topic(var/src_object)
if(src_object == src && !stat)
return STATUS_INTERACTIVE
else
return ..()
/mob/living/silicon/robot/can_use_topic(var/src_object, var/datum/topic_state/custom_state)
if(stat || !client)
return STATUS_CLOSE
if(lockcharge || stunned || weakened)
return STATUS_DISABLED
// robots can interact with things they can see within their view range
if(!(custom_state.flags & NANO_IGNORE_DISTANCE) && (src_object in view(src)))
return STATUS_INTERACTIVE // interactive (green visibility)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
/mob/living/silicon/robot/syndicate/can_use_topic(var/src_object)
. = ..()
if(. != STATUS_INTERACTIVE)
return
if(z in config.admin_levels) // Syndicate borgs can interact with everything on the admin level
return STATUS_INTERACTIVE
if(istype(get_area(src), /area/syndicate_station)) // If elsewhere, they can interact with everything on the syndicate shuttle
return STATUS_INTERACTIVE
if(istype(src_object, /obj/machinery)) // Otherwise they can only interact with emagged machinery
var/obj/machinery/Machine = src_object
if(Machine.emagged)
return STATUS_INTERACTIVE
return STATUS_UPDATE
/mob/living/silicon/ai/can_use_topic(var/src_object)
if(!client || check_unable(1))
return STATUS_CLOSE
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
// unless it's on the same level as the object it's interacting with.
var/turf/T = get_turf(src_object)
if(!T || !(z == T.z || (T.z in config.player_levels)))
return STATUS_CLOSE
// If an object is in view then we can interact with it
if(src_object in view(client.view, src))
return STATUS_INTERACTIVE
// If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view
if(is_in_chassis())
//stop AIs from leaving windows open and using then after they lose vision
//apc_override is needed here because AIs use their own APC when powerless
if(cameranet && !cameranet.checkTurfVis(get_turf(src_object)))
return apc_override ? STATUS_INTERACTIVE : STATUS_CLOSE
return STATUS_INTERACTIVE
return STATUS_CLOSE
/mob/living/proc/shared_living_nano_interaction(var/src_object)
if (src.stat != CONSCIOUS)
return STATUS_CLOSE // no updates, close the interface
else if (restrained() || lying || stat || stunned || weakened)
return STATUS_UPDATE // update only (orange visibility)
return STATUS_INTERACTIVE
/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object)
if(!isturf(src_object.loc))
if(src_object.loc == src) // Item in the inventory
return STATUS_INTERACTIVE
if(src.contents.Find(src_object.loc)) // A hidden uplink inside an item
return STATUS_INTERACTIVE
if (!(src_object in view(4, src))) // If the src object is not in visable, disable updates
return STATUS_CLOSE
var/dist = get_dist(src_object, src)
if (dist <= 1)
return STATUS_INTERACTIVE // interactive (green visibility)
else if (dist <= 2)
return STATUS_UPDATE // update only (orange visibility)
else if (dist <= 4)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
return STATUS_CLOSE
/mob/living/can_use_topic(var/src_object, var/datum/topic_state/custom_state)
. = shared_living_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE && !(custom_state.flags & NANO_IGNORE_DISTANCE))
. = shared_living_nano_distance(src_object)
if(STATUS_INTERACTIVE)
return STATUS_UPDATE
/mob/living/carbon/human/can_use_topic(var/src_object, var/datum/topic_state/custom_state)
. = shared_living_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE && !(custom_state.flags & NANO_IGNORE_DISTANCE))
. = shared_living_nano_distance(src_object)
if(. == STATUS_UPDATE && (TK in mutations)) // If we have telekinesis and remain close enough, allow interaction.
return STATUS_INTERACTIVE
/datum/topic_state
var/flags = 0
/datum/topic_state/proc/href_list(var/mob/user)
return list()
+2 -1
View File
@@ -186,7 +186,8 @@
return 0 // wasn't open
processing_uis.Remove(ui)
ui.user.open_uis.Remove(ui)
if(ui.user) // Sanity check in case a user has been deleted (say a blown up borg watching the alarm interface)
ui.user.open_uis.Remove(ui)
var/list/uis = open_uis[src_object_key][ui.ui_key]
uis.Remove(ui)
-11
View File
@@ -1,11 +0,0 @@
/atom/movable/proc/nano_host()
return src
/obj/nano_module/nano_host()
return loc
/atom/movable/proc/nano_can_update()
return 1
/obj/machinery/nano_can_update()
return !(stat & (NOPOWER|BROKEN))
+21 -118
View File
@@ -52,6 +52,11 @@ nanoui is used to open and update nano browser uis
// the current status/visibility of the ui
var/status = STATUS_INTERACTIVE
// Relationship between a master interface and its children. Used in update_status
var/datum/nanoui/master_ui
var/list/datum/nanoui/children = list()
var/datum/topic_state/custom_state = null
var/cached_data = null
/**
@@ -68,17 +73,22 @@ nanoui is used to open and update nano browser uis
*
* @return /nanoui new nanoui object
*/
/datum/nanoui/New(nuser, nsrc_object, nui_key, ntemplate_filename, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
/datum/nanoui/New(nuser, nsrc_object, nui_key, ntemplate_filename, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null, var/datum/nanoui/master_ui = null, var/datum/topic_state/custom_state = null)
user = nuser
src_object = nsrc_object
ui_key = nui_key
window_id = "[ui_key]\ref[src_object]"
src.master_ui = master_ui
if(master_ui)
master_ui.children += src
src.custom_state = custom_state ? custom_state : new/datum/topic_state()
// add the passed template filename as the "main" template, this is required
add_template("main", ntemplate_filename)
if (ntitle)
title = ntitle
title = sanitize(ntitle)
if (nwidth)
width = nwidth
if (nheight)
@@ -133,120 +143,13 @@ nanoui is used to open and update nano browser uis
*/
/datum/nanoui/proc/update_status(var/push_update = 0)
var/atom/movable/host = src_object.nano_host()
if(!host.nano_can_update())
close()
return
var/status = user.can_interact_with_interface(host.nano_host())
if(status == STATUS_CLOSE)
var/new_status = host.CanUseTopic(user, list(), custom_state)
if(master_ui)
new_status = min(new_status, master_ui.status)
if(new_status == STATUS_CLOSE)
close()
else
set_status(status, push_update)
/*
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)
return STATUS_CLOSE // By default no mob can do anything with NanoUI
/mob/dead/observer/can_interact_with_interface()
if(check_rights(R_ADMIN, 0))
return STATUS_INTERACTIVE // Admins are more equal
return STATUS_UPDATE // Ghosts can view updates
/mob/living/silicon/robot/can_interact_with_interface(var/src_object)
if(stat || !client)
return STATUS_CLOSE
if(lockcharge || stunned || weakened)
return STATUS_DISABLED
if (src_object in view(client.view, src)) // robots can see and interact with things they can see within their view range
return STATUS_INTERACTIVE // interactive (green visibility)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
/mob/living/silicon/robot/syndicate/can_interact_with_interface(var/src_object)
. = ..()
if(. != STATUS_INTERACTIVE)
return
if(z in config.admin_levels) // Syndicate borgs can interact with everything on the admin level
return STATUS_INTERACTIVE
if(istype(get_area(src), /area/syndicate_station)) // If elsewhere, they can interact with everything on the syndicate shuttle
return STATUS_INTERACTIVE
if(istype(src_object, /obj/machinery)) // Otherwise they can only interact with emagged machinery
var/obj/machinery/Machine = src_object
if(Machine.emagged)
return STATUS_INTERACTIVE
return STATUS_UPDATE
/mob/living/silicon/ai/can_interact_with_interface(var/src_object)
if(!client || check_unable(1))
return STATUS_CLOSE
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
// unless it's on the same level as the object it's interacting with.
var/turf/T = get_turf(src_object)
if(!T || !(z == T.z || (T.z in config.player_levels)))
return STATUS_CLOSE
// If an object is in view then we can interact with it
if(src_object in view(client.view, src))
return STATUS_INTERACTIVE
// If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view
if(is_in_chassis())
//stop AIs from leaving windows open and using then after they lose vision
//apc_override is needed here because AIs use their own APC when powerless
if(cameranet && !cameranet.checkTurfVis(get_turf(src_object)))
return apc_override ? STATUS_INTERACTIVE : STATUS_CLOSE
return STATUS_INTERACTIVE
return STATUS_CLOSE
/mob/living/proc/shared_living_nano_interaction(var/src_object)
if (src.stat != CONSCIOUS)
return STATUS_CLOSE // no updates, close the interface
else if (restrained() || lying || stat || stunned || weakened)
return STATUS_UPDATE // update only (orange visibility)
return STATUS_INTERACTIVE
/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object)
if(!isturf(src_object.loc))
if(src_object.loc == src) // Item in the inventory
return STATUS_INTERACTIVE
if(src.contents.Find(src_object.loc)) // A hidden uplink inside an item
return STATUS_INTERACTIVE
if (!(src_object in view(4, src))) // If the src object is not in visable, disable updates
return STATUS_CLOSE
var/dist = get_dist(src_object, src)
if (dist <= 1)
return STATUS_INTERACTIVE // interactive (green visibility)
else if (dist <= 2)
return STATUS_UPDATE // update only (orange visibility)
else if (dist <= 4)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
return STATUS_CLOSE
/mob/living/can_interact_with_interface(var/src_object, var/be_close = 1)
. = shared_living_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE && be_close)
. = shared_living_nano_distance(src_object)
if(STATUS_INTERACTIVE)
return STATUS_UPDATE
/mob/living/carbon/human/can_interact_with_interface(var/src_object, var/be_close = 1)
. = shared_living_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE && be_close)
. = shared_living_nano_distance(src_object)
if(. == STATUS_UPDATE && (TK in mutations)) // If we have telekinesis and remain close enough, allow interaction.
return STATUS_INTERACTIVE
set_status(new_status, push_update)
/**
* Set the ui to auto update (every master_controller tick)
@@ -489,7 +392,6 @@ nanoui is used to open and update nano browser uis
* @return nothing
*/
/datum/nanoui/proc/open()
var/window_size = ""
if (width && height)
window_size = "size=[width]x[height];"
@@ -509,6 +411,8 @@ nanoui is used to open and update nano browser uis
is_auto_updating = 0
nanomanager.ui_closed(src)
user << browse(null, "window=[window_id]")
for(var/datum/nanoui/child in children)
child.close()
/**
* Set the UI window to call the nanoclose verb when the window is closed
@@ -573,7 +477,7 @@ nanoui is used to open and update nano browser uis
set_map_z_level(text2num(href_list["mapZLevel"]))
map_update = 1
if ((src_object && src_object.Topic(href, href_list)) || map_update)
if ((src_object && src_object.Topic(href, href_list, 0, custom_state)) || map_update)
nanomanager.update_uis(src_object) // update all UIs attached to src_object
/**
@@ -600,5 +504,4 @@ nanoui is used to open and update nano browser uis
* @return nothing
*/
/datum/nanoui/proc/update(var/force_open = 0)
src_object.ui_interact(user, ui_key, src, force_open)
src_object.ui_interact(user, ui_key, src, force_open, master_ui, custom_state)
+1 -1
View File
@@ -112,7 +112,7 @@
stance_damage = 0
// Buckled to a bed/chair. Stance damage is forced to 0 since they're sitting on something solid
if (istype(buckled, /obj/structure/stool/bed))
if (istype(buckled, /obj/structure/bed))
return
for (var/organ in list("l_leg","l_foot","r_leg","r_foot"))
+18 -9
View File
@@ -482,8 +482,17 @@ obj/structure/cable/proc/cableColor(var/colorC)
item_state = "coil"
attack_verb = list("whipped", "lashed", "disciplined", "flogged")
/obj/item/stack/cable_coil/cyborg
name = "cable coil synthesizer"
desc = "A device that makes cable."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(1)
stacktype = /obj/item/stack/cable_coil
/obj/item/stack/cable_coil/suicide_act(mob/user)
if(locate(/obj/structure/stool) in user.loc)
if(locate(/obj/item/weapon/stool) in user.loc)
user.visible_message("<span class='suicide'>[user] is making a noose with the [src.name]! It looks like \he's trying to commit suicide.</span>")
else
user.visible_message("<span class='suicide'>[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>")
@@ -576,7 +585,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
usr << "\blue You cannot do that."
..()
/obj/item/stack/cable_coil/robot/verb/set_colour()
/obj/item/stack/cable_coil/cyborg/verb/set_colour()
set name = "Change Colour"
set category = "Object"
@@ -606,26 +615,26 @@ obj/structure/cable/proc/cableColor(var/colorC)
// - Cable coil : merge cables
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
..()
if( istype(W, /obj/item/weapon/wirecutters) && src.amount > 1)
src.amount--
if( istype(W, /obj/item/weapon/wirecutters) && src.get_amount() > 1)
src.use(1)
new/obj/item/stack/cable_coil(user.loc, 1,color)
user << "You cut a piece off the cable coil."
src.update_icon()
return
else if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(C.amount >= MAXCOIL)
if(C.get_amount() >= get_max_amount())
user << "The coil is too long, you cannot add any more cable to it."
return
if( (C.amount + src.amount <= MAXCOIL) )
if( (C.get_amount() + src.get_amount() <= get_max_amount()) )
user << "You join the cable coils together."
C.give(src.amount) // give it cable
src.use(src.amount) // make sure this one cleans up right
C.give(src.get_amount()) // give it cable
src.use(src.get_amount()) // make sure this one cleans up right
return
else
var/amt = MAXCOIL - C.amount
var/amt = get_max_amount() - C.get_amount()
user << "You transfer [amt] length\s of cable from one coil to the other."
C.give(amt)
src.use(amt)
+31 -2
View File
@@ -55,7 +55,7 @@
initial_ammo = 0
/obj/item/ammo_magazine/mc9mm/flash
ammo_type = /obj/item/ammo_casing/c9mmf
ammo_type = /obj/item/ammo_casing/c9mmf
/obj/item/ammo_magazine/c9mm
name = "ammunition Box (9mm)"
@@ -68,6 +68,22 @@
/obj/item/ammo_magazine/c9mm/empty
initial_ammo = 0
/obj/item/ammo_magazine/mc9mmt
name = "top mounted magazine (9mm)"
icon_state = "9mmt"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 20
multiple_sprites = 1
/obj/item/ammo_magazine/mc9mmt/empty
initial_ammo = 0
/obj/item/ammo_magazine/mc9mmt/rubber
name = "top mounted magazine (9mm rubber)"
ammo_type = /obj/item/ammo_casing/c9mmr
/obj/item/ammo_magazine/c45
name = "ammunition Box (.45)"
icon_state = "9mm"
@@ -92,6 +108,19 @@
/obj/item/ammo_magazine/a12mm/empty
initial_ammo = 0
/obj/item/ammo_magazine/a556
name = "magazine (5.56)"
icon_state = "5.56"
origin_tech = "combat=2"
mag_type = MAGAZINE
caliber = "a556"
ammo_type = /obj/item/ammo_casing/a556
max_ammo = 10
multiple_sprites = 1
/obj/item/ammo_magazine/a556/empty
initial_ammo = 0
/obj/item/ammo_magazine/a50
name = "magazine (.50)"
icon_state = "50ae"
@@ -168,4 +197,4 @@
ammo_type = "/obj/item/ammo_casing/a666"
max_ammo = 4
multiple_sprites = 1
*/
*/
+12 -2
View File
@@ -33,6 +33,11 @@
caliber = "9mm"
projectile_type = /obj/item/projectile/energy/flash
/obj/item/ammo_casing/c9mmr
desc = "A 9mm rubber bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/pistol/rubber
/obj/item/ammo_casing/c45
desc = "A .45 bullet casing."
@@ -84,7 +89,7 @@
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
matter = list("metal" = 500)
//Can stun in one hit if aimed at the head, but
//Can stun in one hit if aimed at the head, but
//is blocked by clothing that stops tasers and is vulnerable to EMP
/obj/item/ammo_casing/shotgun/stunshell
name = "stun shell"
@@ -113,12 +118,17 @@
/obj/item/ammo_casing/a145
name = "shell casing"
desc = "A 14.5mm AP shell."
desc = "A 14.5mm shell."
icon_state = "lcasing"
spent_icon = "lcasing-spent"
caliber = "14.5mm"
projectile_type = /obj/item/projectile/bullet/rifle/a145
/obj/item/ammo_casing/a556
desc = "A 5.56mm bullet casing."
caliber = "a556"
projectile_type = /obj/item/projectile/bullet/rifle/a556
/obj/item/ammo_casing/rocket
name = "rocket shell"
desc = "A high explosive designed to be fired from a launcher."
@@ -1,6 +1,6 @@
/obj/item/weapon/gun/energy/laser
name = "laser carbine"
desc = "A basic weapon designed to kill with concentrated energy bolts."
desc = "A common laser weapon, designed to kill with concentrated energy blasts."
icon_state = "laser"
item_state = "laser"
fire_sound = 'sound/weapons/Laser.ogg'
@@ -10,6 +10,8 @@
matter = list("metal" = 2000)
origin_tech = "combat=3;magnets=2"
projectile_type = /obj/item/projectile/beam
charge_cost = 75
fire_delay = 1
/obj/item/weapon/gun/energy/laser/mounted
self_recharge = 1
@@ -42,7 +44,7 @@ obj/item/weapon/gun/energy/laser/retro
item_state = "laser"
fire_sound = 'sound/weapons/lasercannonfire.ogg'
origin_tech = "combat=4;materials=3;powerstorage=3"
slot_flags = SLOT_BELT|SLOT_BACK
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/beam/heavylaser
charge_cost = 250
fire_delay = 20
@@ -50,7 +52,7 @@ obj/item/weapon/gun/energy/laser/retro
/obj/item/weapon/gun/energy/lasercannon/mounted
self_recharge = 1
use_external_power = 1
recharge_time = 25
recharge_time = 25
/obj/item/weapon/gun/energy/xray
name = "xray laser gun"
@@ -90,12 +92,12 @@ obj/item/weapon/gun/energy/laser/retro
name = "laser tag gun"
item_state = "laser"
desc = "Standard issue weapon of the Imperial Guard"
origin_tech = "combat=1;magnets=2"
origin_tech = "combat=1;magnets=2"
self_recharge = 1
matter = list("metal" = 2000)
fire_sound = 'sound/weapons/Laser.ogg'
projectile_type = /obj/item/projectile/beam/lastertag/blue
var/required_vest
var/required_vest
/obj/item/weapon/gun/energy/lasertag/special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
@@ -112,4 +114,4 @@ obj/item/weapon/gun/energy/laser/retro
/obj/item/weapon/gun/energy/lasertag/red
icon_state = "redtag"
projectile_type = /obj/item/projectile/beam/lastertag/red
required_vest = /obj/item/clothing/suit/redtag
required_vest = /obj/item/clothing/suit/redtag
+2 -2
View File
@@ -21,10 +21,10 @@
name = "stun revolver"
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
icon_state = "stunrevolver"
fire_sound = 'sound/weapons/Taser.ogg'
fire_sound = 'sound/weapons/Gunshot.ogg'
origin_tech = "combat=3;materials=3;powerstorage=2"
charge_cost = 125
projectile_type = /obj/item/projectile/beam/stun
projectile_type = /obj/item/projectile/energy/electrode/stunshot
cell_type = /obj/item/weapon/cell
@@ -1,6 +1,6 @@
/obj/item/weapon/syringe_cartridge
name = "syringe gun cartridge"
desc = "An impact-triggered compressed gas cartridge that can fitted to a syringe for rapid injection."
desc = "An impact-triggered compressed gas cartridge that can be fitted to a syringe for rapid injection."
icon = 'icons/obj/ammo.dmi'
icon_state = "syringe-cartridge"
var/icon_flight = "syringe-cartridge-flight" //so it doesn't look so weird when shot
@@ -25,6 +25,7 @@
user.remove_from_mob(syringe)
syringe.loc = src
sharp = 1
name = "syringe dart"
update_icon()
/obj/item/weapon/syringe_cartridge/attack_self(mob/user)
@@ -33,6 +34,7 @@
user.put_in_hands(syringe)
syringe = null
sharp = initial(sharp)
name = initial(name)
update_icon()
/obj/item/weapon/syringe_cartridge/proc/prime()
@@ -6,12 +6,12 @@
load_method = SPEEDLOADER //yup. until someone sprites a magazine for it.
max_shells = 22
caliber = "9mm"
origin_tech = "combat=4;materials=2"
origin_tech = "combat=4;materials=2"
slot_flags = SLOT_BELT
ammo_type = /obj/item/ammo_casing/c9mm
multi_aim = 1
fire_delay = 0
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "\improper Uzi"
desc = "A lightweight, fast firing gun, for when you want someone dead. Uses .45 rounds."
@@ -47,15 +47,59 @@
icon_state = "c20r"
return
/obj/item/weapon/gun/projectile/automatic/wt550
name = "\improper W-T 550 Saber"
desc = "A cheap, mass produced Ward-Takahashi PDW. Uses 9mm rounds."
icon_state = "wt550"
w_class = 3.0
caliber = "9mm"
origin_tech = "combat=5;materials=2"
slot_flags = SLOT_BELT
ammo_type = "/obj/item/ammo_casing/c9mmr"
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/mc9mmt/rubber
/obj/item/weapon/gun/projectile/automatic/wt550/update_icon()
..()
if(ammo_magazine)
icon_state = "wt550-[round(ammo_magazine.stored_ammo.len,4)]"
else
icon_state = "wt550"
return
/obj/item/weapon/gun/projectile/automatic/z8
name = "\improper Z8 Bulldog"
desc = "An older model bullpup carbine, made by the now defunct Zendai Foundries. Uses armor piercing 5.56mm rounds. Makes you feel like a space marine when you hold it."
icon_state = "carbine"
item_state = "shotgun"
w_class = 4
force = 10
caliber = "a556"
origin_tech = "combat=8;materials=3"
ammo_type = "/obj/item/ammo_casing/a556"
fire_sound = 'sound/weapons/Gunshot.ogg'
slot_flags = SLOT_BACK
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/a556
/obj/item/weapon/gun/projectile/automatic/z8/update_icon()
..()
if(ammo_magazine)
icon_state = "carbine-[round(ammo_magazine.stored_ammo.len,2)]"
else
icon_state = "carbine"
return
/obj/item/weapon/gun/projectile/automatic/sts35
name = "\improper STS-35 automatic rifle"
desc = "A durable, rugged looking automatic weapon of make popular on the frontier, despite it's bulk. Uses 7.62mm rounds. It is unmarked."
desc = "A durable, rugged looking automatic weapon of a make popular on the frontier. Uses 7.62mm rounds. It is unmarked."
icon_state = "assltrifle"
item_state = "shotgun"
w_class = 4
force = 10
caliber = "a762"
origin_tech = "combat=5;materials=1;syndicate=8"
origin_tech = "combat=6;materials=1;syndicate=4"
slot_flags = SLOT_BACK
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/c762
@@ -74,7 +118,7 @@
slot_flags = 0
max_shells = 50
caliber = "a762"
origin_tech = "combat=5;materials=1;syndicate=2"
origin_tech = "combat=6;materials=1;syndicate=2"
slot_flags = SLOT_BACK
ammo_type = "/obj/item/ammo_casing/a762"
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
@@ -34,6 +34,21 @@
M << "You name the gun [input]. Say hello to your new friend."
return 1
/obj/item/weapon/gun/projectile/sec
desc = "A Nanotrasen designed sidearm, found pretty much everywhere humans are. Uses less-than-lethal .45 rounds."
name = "\improper NT Mk58"
icon_state = "secguncomp"
magazine_type = /obj/item/ammo_magazine/c45m/rubber
caliber = ".45"
origin_tech = "combat=3;materials=2"
load_method = MAGAZINE
/obj/item/weapon/gun/projectile/sec/wood
desc = "A Nanotrasen designed sidearm, this one has a sweet wooden grip. Uses less-than-lethal .45 rounds."
name = "\improper Custom NT Mk58"
icon_state = "secgundark"
/obj/item/weapon/gun/projectile/silenced
name = "silenced pistol"
desc = "A small, quiet, easily concealable gun. Uses .45 rounds."
@@ -98,7 +113,7 @@
silenced = 0
origin_tech = "combat=2;materials=2;syndicate=2"
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/mc9mm
magazine_type = /obj/item/ammo_magazine/mc9mm
/obj/item/weapon/gun/projectile/pistol/flash
name = "\improper Stechtkin signal pistol"
@@ -11,33 +11,33 @@
caliber = "shotgun"
origin_tech = "combat=4;materials=2"
load_method = SINGLE_CASING
ammo_type = /obj/item/ammo_casing/shotgun/pellet
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
handle_casings = HOLD_CASINGS
var/recentpump = 0 // to prevent spammage
/obj/item/weapon/gun/projectile/shotgun/pump/consume_next_projectile()
if(chambered)
return chambered.BB
return null
return null
/obj/item/weapon/gun/projectile/shotgun/pump/attack_self(mob/living/user as mob)
if(world.time >= recentpump + 10)
pump(user)
pump(user)
recentpump = world.time
/obj/item/weapon/gun/projectile/shotgun/pump/proc/pump(mob/M as mob)
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
if(chambered)//We have a shell in the chamber
chambered.loc = get_turf(src)//Eject casing
chambered = null
if(loaded.len)
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
chambered = AC
update_icon()
update_icon()
/obj/item/weapon/gun/projectile/shotgun/pump/combat
name = "combat shotgun"
@@ -62,7 +62,7 @@
flags = CONDUCT
slot_flags = SLOT_BACK
caliber = "shotgun"
origin_tech = "combat=3;materials=1"
origin_tech = "combat=3;materials=1"
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
//this is largely hacky and bad :( -Pete
@@ -71,7 +71,7 @@
user << "<span class='notice'>You begin to shorten the barrel of \the [src].</span>"
if(loaded.len)
for(var/i in 1 to max_shells)
afterattack(user, user) //will this work? //it will. we call it twice, for twice the FUN
afterattack(user, user) //will this work? //it will. we call it twice, for twice the FUN
playsound(user, fire_sound, 50, 1)
user.visible_message("<span class='danger'>The shotgun goes off!</span>", "<span class='danger'>The shotgun goes off in your face!</span>")
return
@@ -1,6 +1,6 @@
/obj/item/weapon/gun/projectile/heavysniper
name = "\improper PTRS-7 rifle"
desc = "A portable anti-armour rifle fitted with a scope. Originally designed to used against armoured exosuits, it is capable of punching through non-reinforced walls with ease. Fires 14.5mm AP shells."
desc = "A portable anti-armour rifle fitted with a scope. Originally designed to used against armoured exosuits, it is capable of punching through non-reinforced walls with ease. Fires armor piercing 14.5mm shells."
icon_state = "heavysniper"
item_state = "shotgun"
w_class = 4
+7 -8
View File
@@ -66,14 +66,10 @@
return
//Checks if the projectile is eligible for embedding. Not that it necessarily will.
//Mainly used to ensure that projectiles won't embed if they are penetrating the mob.
/obj/item/projectile/proc/can_embed()
//embed must be enabled and damage type must be brute
if(!embed || damage_type != BRUTE)
return 0
//can't embed if the projectile is penetrating through the mob
if(penetrating > 0 && damage > 20 && prob(damage))
return 0
return 1
//return 1 if the projectile should be allowed to pass through after all, 0 if not.
@@ -167,9 +163,12 @@
target_mob.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src.type]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src.type]</b>"
msg_admin_attack("[firer] ([firer.ckey]) shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
else
else if(firer)
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src]</b>"
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
else
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src]</b>"
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target_mob.x];Y=[target_mob.y];Z=[target_mob.z]'>JMP</a>)") //BS12 EDIT ALG
//sometimes bullet_act() will want the projectile to continue flying
if (target_mob.bullet_act(src, def_zone) == -1)
@@ -206,9 +205,9 @@
for(var/mob/M in A)
attack_mob(M, distance)
//penetrating projectiles can pass through things that otherwise would not let them
//penetrating projectiles can pass through things that otherwise would not let them
if(!passthrough && penetrating > 0)
if(check_penetrate(A))
if(check_penetrate(A))
passthrough = 1
penetrating--
@@ -311,4 +310,4 @@
trace.firer = user
var/output = trace.process() //Test it!
del(trace) //No need for it anymore
return output //Send it back to the gun!
return output //Send it back to the gun!
+25 -7
View File
@@ -7,23 +7,37 @@
check_armour = "bullet"
embed = 1
sharp = 1
var/mob_passthrough_check = 0
/obj/item/projectile/bullet/on_hit(var/atom/target, var/blocked = 0)
if (..(target, blocked))
var/mob/living/L = target
shake_camera(L, 3, 2)
/obj/item/projectile/bullet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier)
if(penetrating > 0 && damage > 20 && prob(damage))
mob_passthrough_check = 1
else
mob_passthrough_check = 0
..()
/obj/item/projectile/bullet/can_embed()
//prevent embedding if the projectile is passing through the mob
if(mob_passthrough_check)
return 0
return ..()
/obj/item/projectile/bullet/check_penetrate(var/atom/A)
if(!A || !A.density) return 1 //if whatever it was got destroyed when we hit it, then I guess we can just keep going
if(!A || !A.density) return 1 //if whatever it was got destroyed when we hit it, then I guess we can just keep going
if(istype(A, /obj/mecha))
return 1 //mecha have their own penetration handling
if(ismob(A))
if(iscarbon(A))
//squishy mobs absorb KE
if(can_embed()) return 0
damage *= 0.7
if(!mob_passthrough_check)
return 0
if(iscarbon(A))
damage *= 0.7 //squishy mobs absorb KE
return 1
var/chance = 0
@@ -34,10 +48,10 @@
var/obj/machinery/door/D = A
chance = round(damage/D.maxhealth*100)
else if(istype(A, /obj/structure/girder) || istype(A, /obj/structure/cultgirder))
chance = 100
chance = 100
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
chance = 25
if(prob(chance))
if(A.opacity)
//display a message so that people on the other side aren't so confused
@@ -132,6 +146,10 @@
weaken = 3
penetrating = 5
/obj/item/projectile/bullet/rifle/a556
damage = 50
penetrating = 1
/* Miscellaneous */
/obj/item/projectile/bullet/suffocationbullet//How does this even work?
@@ -2995,3 +2995,38 @@
..()
reagents.add_reagent("nutriment", 3)
/obj/item/weapon/reagent_containers/food/snacks/liquidfood
name = "\improper LiquidFood Ration"
desc = "A prepackaged grey slurry of all the essential nutrients for a spacefarer on the go. Should this be crunchy?"
icon_state = "liquidfood"
trash = /obj/item/trash/liquidfood
filling_color = "#A8A8A8"
New()
..()
reagents.add_reagent("nutriment", 20)
reagents.add_reagent("iron", 3)
bitesize = 4
/obj/item/weapon/reagent_containers/food/snacks/tastybread
name = "Bread Tube"
desc = "Chewy...and surprisingly tasty."
icon_state = "tastybread"
filling_color = "#A66829"
New()
..()
reagents.add_reagent("nutriment", 12)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks
name = "\improper SkrellSnax"
desc = "Cured fungus shipped all the way from Jargon 4, almost like jerky! Almost."
icon_state = "skrellsnacks"
filling_color = "#A66829"
New()
..()
reagents.add_reagent("nutriment", 10)
bitesize = 3
@@ -238,3 +238,15 @@
New()
..()
reagents.add_reagent("virusfood", 1000)
/obj/structure/reagent_dispensers/acid
name = "Sulphuric Acid Dispenser"
desc = "A dispenser of acid for industrial processes."
icon = 'icons/obj/objects.dmi'
icon_state = "acidtank"
amount_per_transfer_from_this = 10
anchored = 1
New()
..()
reagents.add_reagent("sacid", 1000)
+1
View File
@@ -760,3 +760,4 @@ var/list/be_special_flags = list(
#define STATUS_CLOSE -1 // Close the interface
//General-purpose life speed define for plants.
#define HYDRO_SPEED_MULTIPLIER 1
#define NANO_IGNORE_DISTANCE 1
+13
View File
@@ -56,6 +56,19 @@ should be listed in the changelog upon commit though. Thanks. -->
<!-- DO NOT REMOVE, MOVE, OR COPY THIS COMMENT! THIS MUST BE THE LAST NON-EMPTY LINE BEFORE THE LOGS #ADDTOCHANGELOGMARKER# -->
<div class='commit sansserif'>
<h2 class='date'>18 February 2015</h2>
<h3 class='author'>PsiOmegaDelta updated:</h3>
<ul class='changes bgimages16'>
<li class='rscadd'>Synths now have timestamped radio and chat messages.</li>
<li class='rscadd'>New and updated uplink items.</li>
<li class='rscadd'>Multiple AIs can now share the same holopad.</li>
<li class='rscadd'>The AI now has built-in consoles, accessible from the subsystem tab.</li>
</ul>
</div>
<div class='commit sansserif'>
<h2 class='date'>16 February 2015</h2>
<h3 class='author'>RavingManiac updated:</h3>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

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