"}
\ No newline at end of file
diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm
index bf53df74ecf..b2455ab2aa4 100644
--- a/code/game/machinery/biogenerator.dm
+++ b/code/game/machinery/biogenerator.dm
@@ -134,7 +134,8 @@
dat += "
Error: No growns inside. Please put growns into reactor.
"
menustat = "menu"
if("nobeakerspace")
- dat += "
Not enough space left in container. Unable to create product.
"
+ // dat += "
Not enough space left in container. Unable to create product.
"
+ user << "Not enough space left in container. Unable to create product. Please empty container."
menustat = "menu"
if(beaker)
dat += "
Biomass: [points] units.
"
diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm
index ab9a848d2ac..5f57b20c53d 100644
--- a/code/game/machinery/bots/secbot.dm
+++ b/code/game/machinery/bots/secbot.dm
@@ -3,7 +3,7 @@
desc = "A little security robot. He looks less than thrilled."
icon = 'icons/obj/aibots.dmi'
icon_state = "secbot0"
- light_color = "#FF0000"
+ light_color = LIGHT_COLOR_PURE_RED
layer = 5.0
density = 0
anchored = 0
@@ -414,12 +414,12 @@ Auto Patrol: []"},
/obj/machinery/bot/secbot/proc/flashing_lights()
if(mode == BOT_HUNT)
switch(light_color)
- if("#FF0000")
- light_color = "#0000FF"
- if("#0000FF")
- light_color = "#FF0000"
+ if(LIGHT_COLOR_PURE_RED)
+ light_color = LIGHT_COLOR_PURE_BLUE
+ if(LIGHT_COLOR_PURE_BLUE)
+ light_color = LIGHT_COLOR_PURE_RED
else
- light_color = "#FF0000"
+ light_color = LIGHT_COLOR_PURE_RED
//Secbot Construction
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index ca74948ce0a..2ae38331a7b 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -24,7 +24,7 @@
var/speed_coeff
var/efficiency
- light_color = "#00FF00"
+ light_color = LIGHT_COLOR_PURE_GREEN
power_change()
..()
if(!(stat & (BROKEN|NOPOWER)))
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index edb61d5a6fa..0143d6e4eeb 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -9,7 +9,7 @@
var/damaged = 0
var/last_change = 0
- light_color = "#7BF9FF"
+ light_color = LIGHT_COLOR_CYAN
attack_ai(var/mob/user as mob)
diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm
index 367918883e2..ea74d862e95 100644
--- a/code/game/machinery/computer/Operating.dm
+++ b/code/game/machinery/computer/Operating.dm
@@ -9,7 +9,7 @@
var/mob/living/carbon/human/victim = null
var/obj/machinery/optable/table = null
- light_color = "#0000FF"
+ light_color = LIGHT_COLOR_PURE_BLUE
/obj/machinery/computer/operating/New()
..()
diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm
index f576ae8d1b8..417e781e640 100644
--- a/code/game/machinery/computer/aifixer.dm
+++ b/code/game/machinery/computer/aifixer.dm
@@ -7,7 +7,7 @@
var/mob/living/silicon/ai/occupant = null
var/active = 0
- light_color = "#CD00CD"
+ light_color = LIGHT_COLOR_PURPLE
/obj/machinery/computer/aifixer/New()
src.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm
index e59e5eec359..998d79b33ab 100644
--- a/code/game/machinery/computer/atmos_alert.dm
+++ b/code/game/machinery/computer/atmos_alert.dm
@@ -11,7 +11,7 @@
var/receive_frequency = 1437
var/datum/radio_frequency/radio_connection
- light_color = "#7BF9FF"
+ light_color = LIGHT_COLOR_CYAN
/obj/machinery/computer/atmos_alert/initialize()
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index 37d9c46773a..56cbdf8069c 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -232,6 +232,13 @@
build_path = "/obj/machinery/computer/telescience"
origin_tech = "programming=3;bluespace=2"
+/obj/item/weapon/circuitboard/atmos_automation
+ name = "Circuit board (Atmospherics Automation)"
+ build_path = "/obj/machinery/computer/general_air_control/atmos_automation"
+/obj/item/weapon/circuitboard/large_tank_control
+ name = "Circuit board (Atmospheric Tank Control)"
+ build_path = "/obj/machinery/computer/general_air_control/large_tank_control"
+
/obj/item/weapon/circuitboard/HONKputer
name = "Circuit board (HONKputer)"
build_path = "/obj/machinery/computer/HONKputer"
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index 7c8abadd7e9..33ac065926d 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -11,7 +11,7 @@ var/camera_cache_id = 1
var/obj/machinery/camera/current = null
var/list/network = list("")
var/last_pic = 1.0
- light_color = "#B40000"
+ light_color = LIGHT_COLOR_RED
var/mapping = 0
var/cache_id = 0
var/list/networks[0]
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 70e95c39a88..6f7c803c359 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -11,7 +11,7 @@
var/mode = 0.0
var/printing = null
- light_color = "#0099FF"
+ light_color = LIGHT_COLOR_LIGHTBLUE
proc/is_centcom()
return istype(src, /obj/machinery/computer/card/centcom)
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm
index f97aa4f3389..2fb6ddc6f9c 100644
--- a/code/game/machinery/computer/cloning.dm
+++ b/code/game/machinery/computer/cloning.dm
@@ -16,7 +16,7 @@
var/autoprocess = 0
var/data[0]
- light_color = "#315AB4"
+ light_color = LIGHT_COLOR_DARKBLUE
/obj/machinery/computer/cloning/New()
..()
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index fc082b5a0aa..f476181db78 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -58,7 +58,7 @@ var/shuttle_call/shuttle_calls[0]
var/datum/announcement/priority/crew_announcement = new
- light_color = "#0099FF"
+ light_color = LIGHT_COLOR_LIGHTBLUE
/obj/machinery/computer/communications/New()
..()
diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm
index 786c7dedaac..048aab3a39e 100644
--- a/code/game/machinery/computer/crew.dm
+++ b/code/game/machinery/computer/crew.dm
@@ -5,7 +5,7 @@
use_power = 1
idle_power_usage = 250
active_power_usage = 500
- light_color = "#315AB4"
+ light_color = LIGHT_COLOR_DARKBLUE
circuit = "/obj/item/weapon/circuitboard/crew"
var/obj/nano_module/crew_monitor/crew_monitor
diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm
index e5dde186881..f4eec63fc7a 100644
--- a/code/game/machinery/computer/honkputer.dm
+++ b/code/game/machinery/computer/honkputer.dm
@@ -3,7 +3,7 @@
desc = "A yellow computer used in case of critically low levels of HONK."
icon = 'icons/obj/machines/HONKputer.dmi'
icon_state = "honk"
- light_color = "#FF33CC"
+ light_color = LIGHT_COLOR_PINK
req_access = list(access_clown)
circuit = "/obj/item/weapon/circuitboard/HONKputer"
var/authenticated = 0
diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm
index 670dabcccc1..8137fd53a60 100644
--- a/code/game/machinery/computer/law.dm
+++ b/code/game/machinery/computer/law.dm
@@ -8,8 +8,8 @@
var/mob/living/silicon/ai/current = null
var/opened = 0
- light_color = "#FFFFFF"
- light_range_on = "2"
+ light_color = LIGHT_COLOR_WHITE
+ light_range_on = 2
verb/AccessInternals()
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index ec3460f2463..1b094542a42 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -16,7 +16,7 @@
var/temp = null
var/printing = null
- light_color = "#315AB4"
+ light_color = LIGHT_COLOR_DARKBLUE
/obj/machinery/computer/med_data/attack_ai(user as mob)
return src.attack_hand(user)
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index eca2511611c..caf0ead1a8b 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -8,7 +8,7 @@
name = "Message Monitor Console"
desc = "Used to Monitor the crew's messages, that are sent via PDA. Can also be used to view Request Console messages."
icon_state = "comm_logs"
- light_color = "#00b000"
+ light_color = LIGHT_COLOR_GREEN
var/hack_icon = "comm_logsc"
var/normal_icon = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/message_monitor"
@@ -34,7 +34,7 @@
var/customjob = "Admin"
var/custommessage = "This is a test, please ignore."
- light_color = "#50AB00"
+ light_color = LIGHT_COLOR_DARKGREEN
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/living/user as mob, params)
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index 2311203b0d4..e77c73758fd 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -4,7 +4,7 @@
name = "Pod Launch Control"
desc = "A controll for launching pods. Some people prefer firing Mechas."
icon_state = "computer_generic"
- light_color = "#00B000"
+ light_color = LIGHT_COLOR_GREEN
circuit = /obj/item/weapon/circuitboard/pod
var/id = 1.0
var/obj/machinery/mass_driver/connected = null
diff --git a/code/game/machinery/computer/pod_tracking_console.dm b/code/game/machinery/computer/pod_tracking_console.dm
index f80026b2b41..5de9643fd7d 100644
--- a/code/game/machinery/computer/pod_tracking_console.dm
+++ b/code/game/machinery/computer/pod_tracking_console.dm
@@ -2,7 +2,7 @@
name = "Pod Tracking Console"
icon = 'icons/obj/computer.dmi'
icon_state = "podtracking"
- light_color = "#C860C8"
+ light_color = LIGHT_COLOR_PURPLE
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/pod_locater"
diff --git a/code/game/machinery/computer/power.dm b/code/game/machinery/computer/power.dm
index 69c9b4a54e0..f713732ff69 100644
--- a/code/game/machinery/computer/power.dm
+++ b/code/game/machinery/computer/power.dm
@@ -11,7 +11,7 @@
idle_power_usage = 20
active_power_usage = 80
- light_color = "#FF9933"
+ light_color = LIGHT_COLOR_ORANGE
//fix for issue 521, by QualityVan.
//someone should really look into why circuits have a powernet var, it's several kinds of retarded.
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index e2347cce9eb..1e667aae3b3 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -14,7 +14,7 @@
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
var/obj/item/weapon/card/id/prisoner/inserted_id
- light_color = "#A91515"
+ light_color = LIGHT_COLOR_DARKRED
attack_ai(var/mob/user as mob)
diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm
index 2e163a037cf..a19bc96211d 100644
--- a/code/game/machinery/computer/prisonshuttle.dm
+++ b/code/game/machinery/computer/prisonshuttle.dm
@@ -14,7 +14,7 @@ var/prison_shuttle_timeleft = 0
name = "Prison Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
- light_color = "#00ffff"
+ light_color = LIGHT_COLOR_PURE_CYAN
req_access = list(access_security)
circuit = "/obj/item/weapon/circuitboard/prison_shuttle"
var/temp = null
diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm
index 8ecc35cdc70..fb9c89bbcae 100644
--- a/code/game/machinery/computer/robot.dm
+++ b/code/game/machinery/computer/robot.dm
@@ -10,7 +10,7 @@
circuit = /obj/item/weapon/circuitboard/robotics
var/temp = null
- light_color = "#CD00CD"
+ light_color = LIGHT_COLOR_PURPLE
/obj/machinery/computer/robotics/proc/can_control(var/mob/user, var/mob/living/silicon/robot/R)
if(!istype(R))
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 20e05123ef8..4432de9d1cf 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -22,7 +22,7 @@
var/sortBy = "name"
var/order = 1 // -1 = Descending - 1 = Ascending
- light_color = "#B40000"
+ light_color = LIGHT_COLOR_RED
/obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob, params)
diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm
index 74a0dab54e5..5af7663db5d 100644
--- a/code/game/machinery/computer/shuttle.dm
+++ b/code/game/machinery/computer/shuttle.dm
@@ -5,7 +5,7 @@
var/auth_need = 3.0
var/list/authorized = list( )
- light_color = "#7BF9FF"
+ light_color = LIGHT_COLOR_CYAN
attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob, params)
diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm
index 7430442ba5b..1717a25a92e 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -4,7 +4,7 @@
name = "Employment Records"
desc = "Used to view personnel's employment records"
icon_state = "medlaptop"
- light_color = "#00b000"
+ light_color = LIGHT_COLOR_GREEN
req_one_access = list(access_heads)
circuit = "/obj/item/weapon/circuitboard/skills"
var/obj/item/weapon/card/id/scan = null
diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm
index 3171da666c1..bc62e4eecd3 100644
--- a/code/game/machinery/computer/specops_shuttle.dm
+++ b/code/game/machinery/computer/specops_shuttle.dm
@@ -15,7 +15,7 @@ var/specops_shuttle_timeleft = 0
name = "Spec. Ops. Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
- light_color = "#00ffff"
+ light_color = LIGHT_COLOR_PURE_CYAN
req_access = list(access_cent_specops)
// req_access = list(ACCESS_CENT_SPECOPS)
var/temp = null
diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm
index 772fe446e4e..eb9709470c6 100644
--- a/code/game/machinery/computer/station_alert.dm
+++ b/code/game/machinery/computer/station_alert.dm
@@ -6,7 +6,7 @@
circuit = "/obj/item/weapon/circuitboard/stationalert"
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
- light_color = "#7BF9FF"
+ light_color = LIGHT_COLOR_CYAN
attack_ai(mob/user)
diff --git a/code/game/machinery/computer/store.dm b/code/game/machinery/computer/store.dm
index f110ca0dfd1..6578eaf8673 100644
--- a/code/game/machinery/computer/store.dm
+++ b/code/game/machinery/computer/store.dm
@@ -4,7 +4,7 @@
icon_state = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/merch"
- light_color = "#00CC00"
+ light_color = LIGHT_COLOR_GREEN
/obj/item/weapon/circuitboard/merch
name = "\improper Merchandise Computer Circuitboard"
diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm
index 7c2f3c3987d..45455b9c663 100644
--- a/code/game/machinery/computer/syndicate_specops_shuttle.dm
+++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm
@@ -14,7 +14,7 @@ var/syndicate_elite_shuttle_timeleft = 0
name = "Elite Syndicate Squad Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle"
- light_color = "#00ffff"
+ light_color = LIGHT_COLOR_PURE_CYAN
req_access = list(access_syndicate)
var/temp = null
var/hacked = 0
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index b89caed1dc3..ec0a06f969c 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -17,7 +17,7 @@
var/current_heat_capacity = 50
var/efficiency
- light_color = "#FFFFFF"
+ light_color = LIGHT_COLOR_WHITE
power_change()
..()
if(!(stat & (BROKEN|NOPOWER)))
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 04d83139453..30db6a7d225 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -307,6 +307,13 @@
W.loc = src
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
+ var/preserve = null
+ for(var/T in preserve_items)
+ if(istype(W,T))
+ preserve = 1
+ break
+ if(preserve) // Don't remove the contents of things that need preservation
+ continue
for(var/obj/item/O in W.contents)
if(istype(O,/obj/item/weapon/tank)) //Stop eating pockets, you fuck!
continue
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 2c0bd7a6ae9..7fbc689bbbb 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -239,7 +239,7 @@
sleep(5)
src.density = 0
sleep(5)
- src.layer = 2.7
+ src.layer = open_layer
update_icon()
set_opacity(0)
operating = 0
@@ -263,7 +263,7 @@
operating = 1
do_animate("closing")
- src.layer = 3.1
+ src.layer = closed_layer
sleep(5)
src.density = 1
sleep(5)
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index afe8fe92580..da899d48626 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -18,6 +18,7 @@
var/nextstate = null
var/logged_users
+ closed_layer = 3.11
/obj/machinery/door/firedoor/New()
. = ..()
diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm
index 7bbc05fb073..c829f3e01a6 100644
--- a/code/game/machinery/doors/poddoor.dm
+++ b/code/game/machinery/doors/poddoor.dm
@@ -19,6 +19,10 @@
name = "Large Pod Door"
icon = 'icons/obj/doors/1x3blast_vert.dmi'
+/obj/machinery/door/poddoor/two_tile_ver/
+ name = "Large Pod Door"
+ icon = 'icons/obj/doors/1x2blast_vert.dmi'
+
/obj/machinery/door/poddoor/Bumped(atom/AM)
if(!density)
return ..()
@@ -105,7 +109,7 @@
src.operating = 0
return
-/*
+/
/obj/machinery/door/poddoor/two_tile_hor/open()
if (src.operating == 1) //doors can still open when emag-disabled
return
@@ -115,16 +119,17 @@
src.operating = 1
flick("pdoorc0", src)
src.icon_state = "pdoor0"
- src.set_opacity(0)
- f1.set_opacity(0)
- f2.set_opacity(0)
-
sleep(10)
src.density = 0
- f1.density = 0
- f2.density = 0
+ src.set_opacity(0)
- update_nearby_tiles()
+ f1.density = 0
+ f1.set_opacity(0)
+ f2.density = 0
+ f2.set_opacity(0)
+
+ air_update_turf(1)
+ update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -139,21 +144,22 @@
src.operating = 1
flick("pdoorc1", src)
src.icon_state = "pdoor1"
-
src.density = 1
+
f1.density = 1
+ f1.set_opacity(1)
f2.density = 1
+ f2.set_opacity(1)
+
+ if (src.visible)
+ src.set_opacity(1)
+ air_update_turf(1)
+ update_freelok_sight()
sleep(10)
- src.set_opacity(initial(opacity))
- f1.set_opacity(initial(opacity))
- f2.set_opacity(initial(opacity))
-
- update_nearby_tiles()
-
src.operating = 0
return
-*/
+
/obj/machinery/door/poddoor/three_tile_hor/open()
if (src.operating == 1) //doors can still open when emag-disabled
return
@@ -265,7 +271,9 @@
sleep(10)
src.operating = 0
return
-/*
+
+
+
/obj/machinery/door/poddoor/two_tile_ver/open()
if (src.operating == 1) //doors can still open when emag-disabled
return
@@ -277,14 +285,15 @@
src.icon_state = "pdoor0"
sleep(10)
src.density = 0
- src.sd_set_opacity(0)
+ src.set_opacity(0)
f1.density = 0
- f1.sd_set_opacity(0)
+ f1.set_opacity(0)
f2.density = 0
- f2.sd_set_opacity(0)
+ f2.set_opacity(0)
- update_nearby_tiles()
+ air_update_turf(1)
+ update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -302,18 +311,18 @@
src.density = 1
f1.density = 1
- f1.sd_set_opacity(1)
+ f1.set_opacity(1)
f2.density = 1
- f2.sd_set_opacity(1)
+ f2.set_opacity(1)
if (src.visible)
- src.sd_set_opacity(1)
- update_nearby_tiles()
+ src.set_opacity(1)
+ air_update_turf(1)
+ update_freelok_sight()
sleep(10)
src.operating = 0
return
-*/
/obj/machinery/door/poddoor/three_tile_ver/open()
if (src.operating == 1) //doors can still open when emag-disabled
@@ -428,8 +437,6 @@
return
-/*
-
/obj/machinery/door/poddoor/two_tile_hor
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
@@ -438,11 +445,11 @@
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
- f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,EAST))
+ f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,EAST))
f1.density = density
f2.density = density
- f1.sd_set_opacity(opacity)
- f2.sd_set_opacity(opacity)
+ f1.set_opacity(opacity)
+ f2.set_opacity(opacity)
Destroy()
del f1
@@ -457,17 +464,17 @@
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
- f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,NORTH))
+ f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,NORTH))
f1.density = density
f2.density = density
- f1.sd_set_opacity(opacity)
- f2.sd_set_opacity(opacity)
+ f1.set_opacity(opacity)
+ f2.set_opacity(opacity)
Destroy()
del f1
del f2
..()
-*/
+
/obj/machinery/door/poddoor/three_tile_hor
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm
index b9ab86027ce..e815ffc3257 100644
--- a/code/game/machinery/kitchen/gibber.dm
+++ b/code/game/machinery/kitchen/gibber.dm
@@ -233,11 +233,11 @@
user << "Subject may not have abiotic items on."
return
- user.visible_message("\red [user] starts to put [victim] into the gibber!")
+ user.visible_message("[user] starts to put [victim] into the gibber!")
src.add_fingerprint(user)
if(do_after(user, 30) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
- user.visible_message("\red [user] stuffs [victim] into the gibber!")
+ user.visible_message("[user] stuffs [victim] into the gibber!")
if(victim.client)
victim.client.perspective = EYE_PERSPECTIVE
diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm
index 17b260747dd..1fba31f1da9 100644
--- a/code/game/machinery/kitchen/microwave.dm
+++ b/code/game/machinery/kitchen/microwave.dm
@@ -33,7 +33,11 @@
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/microwave)-/datum/recipe/microwave))
- available_recipes+= new type
+ var/datum/recipe/recipe = new type
+ if(recipe.result) // Ignore recipe subtypes that lack a result
+ available_recipes += recipe
+ else
+ del(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/microwave/recipe in available_recipes)
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index eac8e4d8121..367e31f7ac6 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -114,6 +114,7 @@ Class Procs:
var/area/myArea
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/use_log = list()
+ var/list/settagwhitelist = list()//WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST.
/obj/machinery/New()
addAtProcessing()
@@ -184,6 +185,119 @@ Class Procs:
use_power(active_power_usage,power_channel, 1)
return 1
+/obj/machinery/proc/multitool_topic(var/mob/user,var/list/href_list,var/obj/O)
+ if("set_id" in href_list)
+ if(!("id_tag" in vars))
+ warning("set_id: [type] has no id_tag var.")
+ var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src:id_tag) as null|text),1,MAX_MESSAGE_LEN)
+ if(newid)
+ src:id_tag = newid
+ return MT_UPDATE|MT_REINIT
+ if("set_freq" in href_list)
+ if(!("frequency" in vars))
+ warning("set_freq: [type] has no frequency var.")
+ return 0
+ var/newfreq=src:frequency
+ if(href_list["set_freq"]!="-1")
+ newfreq=text2num(href_list["set_freq"])
+ else
+ newfreq = input(usr, "Specify a new frequency (GHz). Decimals assigned automatically.", src, src:frequency) as null|num
+ if(newfreq)
+ if(findtext(num2text(newfreq), "."))
+ newfreq *= 10 // shift the decimal one place
+ if(newfreq < 10000)
+ src:frequency = newfreq
+ return MT_UPDATE|MT_REINIT
+ return 0
+
+/obj/machinery/proc/handle_multitool_topic(var/href, var/list/href_list, var/mob/user)
+ if(!allowed(user))//no, not even HREF exploits
+ return 0
+ var/obj/item/device/multitool/P = get_multitool(usr)
+ if(P && istype(P))
+ var/update_mt_menu=0
+ var/re_init=0
+ if("set_tag" in href_list)
+ if(!(href_list["set_tag"] in settagwhitelist))//I see you're trying Href exploits, I see you're failing, I SEE ADMIN WARNING. (seriously though, this is a powerfull HREF, I originally found this loophole, I'm not leaving it in on my PR)
+ message_admins("set_tag HREF (var attempted to edit: [href_list["set_tag"]]) exploit attempted by [key_name(user, user.client)] (?) on [src] ([x],[y],[z] - JMP)")
+ return 1
+ if(!(href_list["set_tag"] in vars))
+ usr << "Something went wrong: Unable to find [href_list["set_tag"]] in vars!"
+ return 1
+ var/current_tag = src.vars[href_list["set_tag"]]
+ var/newid = copytext(reject_bad_text(input(usr, "Specify the new value", src, current_tag) as null|text),1,MAX_MESSAGE_LEN)
+ if(newid)
+ vars[href_list["set_tag"]] = newid
+ re_init=1
+
+ if("unlink" in href_list)
+ var/idx = text2num(href_list["unlink"])
+ if (!idx)
+ return 1
+
+ var/obj/O = getLink(idx)
+ if(!O)
+ return 1
+ if(!canLink(O))
+ usr << "\red You can't link with that device."
+ return 1
+
+ if(unlinkFrom(usr, O))
+ usr << "\blue A green light flashes on \the [P], confirming the link was removed."
+ else
+ usr << "\red A red light flashes on \the [P]. It appears something went wrong when unlinking the two devices."
+ update_mt_menu=1
+
+ if("link" in href_list)
+ var/obj/O = P.buffer
+ if(!O)
+ return 1
+ if(!canLink(O,href_list))
+ usr << "\red You can't link with that device."
+ return 1
+ if (isLinkedWith(O))
+ usr << "\red A red light flashes on \the [P]. The two devices are already linked."
+ return 1
+
+ if(linkWith(usr, O, href_list))
+ usr << "\blue A green light flashes on \the [P], confirming the link was added."
+ else
+ usr << "\red A red light flashes on \the [P]. It appears something went wrong when linking the two devices."
+ update_mt_menu=1
+
+ if("buffer" in href_list)
+ P.buffer = src
+ usr << "\blue A green light flashes, and the device appears in the multitool buffer."
+ update_mt_menu=1
+
+ if("flush" in href_list)
+ usr << "\blue A green light flashes, and the device disappears from the multitool buffer."
+ P.buffer = null
+ update_mt_menu=1
+
+ var/ret = multitool_topic(usr,href_list,P.buffer)
+ if(ret == MT_ERROR)
+ return 1
+ if(ret & MT_UPDATE)
+ update_mt_menu=1
+ if(ret & MT_REINIT)
+ re_init=1
+
+ if(re_init)
+ initialize()
+ if(update_mt_menu)
+ //usr.set_machine(src)
+ update_multitool_menu(usr)
+ return 1
+
+/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state = default_state)
+ if(..())
+ return 1
+ handle_multitool_topic(href,href_list,usr)
+ add_fingerprint(usr)
+ return 0
+
+
/obj/machinery/CanUseTopic(var/mob/user, var/be_close)
if(!interact_offline && (stat & (NOPOWER|BROKEN)))
return STATUS_CLOSE
@@ -197,8 +311,8 @@ Class Procs:
/obj/machinery/CouldNotUseTopic(var/mob/user)
usr.unset_machine()
-////////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////////////////////////////
+
/obj/machinery/attack_ai(var/mob/user as mob)
if(isrobot(user))
// For some reason attack_robot doesn't work
@@ -354,7 +468,7 @@ Class Procs:
I.loc = loc
del(src)
return 1
-
+
/obj/machinery/proc/on_assess_perp(mob/living/carbon/human/perp)
return 0
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index f553034eb19..169641a452c 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -45,6 +45,12 @@ Buildable meters
#define PIPE_SUPPLY_CAP 37
#define PIPE_SCRUBBERS_CAP 38
+///// /vg/ ported stuff
+#define PIPE_INJECTOR 39
+#define PIPE_DVALVE 40
+#define PIPE_DP_VENT 41
+#define PIPE_PASV_VENT 42
+
/obj/item/pipe
name = "pipe"
desc = "A pipe"
@@ -103,6 +109,8 @@ Buildable meters
src.pipe_type = PIPE_MANIFOLD
else if(istype(make_from, /obj/machinery/atmospherics/unary/vent_pump))
src.pipe_type = PIPE_UVENT
+ else if(istype(make_from, /obj/machinery/atmospherics/valve/digital))
+ src.pipe_type = PIPE_DVALVE
else if(istype(make_from, /obj/machinery/atmospherics/valve))
src.pipe_type = PIPE_MVALVE
else if(istype(make_from, /obj/machinery/atmospherics/binary/pump))
@@ -147,6 +155,15 @@ Buildable meters
src.color = PIPE_COLOR_RED
else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
src.pipe_type = PIPE_CAP
+
+ else if(istype(make_from, /obj/machinery/atmospherics/unary/outlet_injector))
+ src.pipe_type = PIPE_INJECTOR
+ else if(istype(make_from, /obj/machinery/atmospherics/binary/dp_vent_pump))
+ src.pipe_type = PIPE_DP_VENT
+ else if(istype(make_from, /obj/machinery/atmospherics/pipe/vent))
+ src.pipe_type = PIPE_PASV_VENT
+
+
else if(istype(make_from, /obj/machinery/atmospherics/omni/mixer))
src.pipe_type = PIPE_OMNI_MIXER
else if(istype(make_from, /obj/machinery/atmospherics/omni/filter))
@@ -157,6 +174,7 @@ Buildable meters
else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/down))
src.pipe_type = PIPE_DOWN*/
///// Z-Level stuff
+
else
src.pipe_type = pipe_type
src.dir = dir
@@ -219,6 +237,11 @@ Buildable meters
"scrubbers 4-way manifold", \
"supply pipe cap", \
"scrubbers pipe cap", \
+ // /vg/ ported stuff
+ "air injector", \
+ "Digital Valve", \
+ "dual-port vent", \
+ "passive vent", \
)
name = nlist[pipe_type+1] + " fitting"
var/list/islist = list( \
@@ -264,11 +287,12 @@ Buildable meters
"manifold4w", \
"cap", \
"cap", \
- "cap", \
- "cap", \
- "cap", \
- "cap", \
- )
+ // /vg/ ported stuff
+ "injector", \
+ "dvalve", \
+ "dual-port vent", \
+ "passive vent", \
+ )
icon_state = islist[pipe_type + 1]
//called when a turf is attacked with a pipe item
@@ -286,7 +310,7 @@ Buildable meters
src.dir = turn(src.dir, -90)
- if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
+ if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE))
if(dir==2)
dir = 1
else if(dir==8)
@@ -301,7 +325,7 @@ Buildable meters
if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)) \
&& (src.dir in cardinal))
src.dir = src.dir|turn(src.dir, 90)
- else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
+ else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE))
if(dir==2)
dir = 1
else if(dir==8)
@@ -325,6 +349,9 @@ Buildable meters
PIPE_PUMP ,\
PIPE_VOLUME_PUMP ,\
PIPE_PASSIVE_GATE ,\
+ PIPE_MVALVE, \
+ PIPE_DVALVE, \
+ PIPE_DP_VENT, \
PIPE_MVALVE ,\
PIPE_SUPPLY_STRAIGHT, \
PIPE_SCRUBBERS_STRAIGHT, \
@@ -333,7 +360,7 @@ Buildable meters
return dir|flip
if(PIPE_SIMPLE_BENT, PIPE_INSULATED_BENT, PIPE_HE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT)
return dir //dir|acw
- if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE)
+ if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_PASV_VENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE, PIPE_INJECTOR)
return dir
if(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER)
return dir|flip|cw|acw
@@ -395,7 +422,7 @@ Buildable meters
return ..()
if (!isturf(src.loc))
return 1
- if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
+ if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE))
if(dir==2)
dir = 1
else if(dir==8)
@@ -1003,6 +1030,74 @@ Buildable meters
C.node.build_network()
machineReference = C
+ if(PIPE_INJECTOR) // air injector
+ var/obj/machinery/atmospherics/unary/outlet_injector/P = new( src.loc )
+ P.dir = dir
+ P.initialize_directions = get_pipe_dir()
+ if (pipename)
+ name = pipename
+ var/turf/T = loc
+ P.level = T.intact ? 2 : 1
+ P.initialize()
+ P.build_network()
+ if (P.node)
+ P.node.initialize()
+ P.node.build_network()
+ machineReference = P
+
+ if(PIPE_DVALVE)
+ var/obj/machinery/atmospherics/valve/digital/V = new( src.loc )
+ V.dir = dir
+ V.initialize_directions = pipe_dir
+ if (pipename)
+ V.name = pipename
+ var/turf/T = V.loc
+ V.level = T.intact ? 2 : 1
+ V.initialize()
+ V.build_network()
+ if (V.node1)
+// world << "[V.node1.name] is connected to valve, forcing it to update its nodes."
+ V.node1.initialize()
+ V.node1.build_network()
+ if (V.node2)
+// world << "[V.node2.name] is connected to valve, forcing it to update its nodes."
+ V.node2.initialize()
+ V.node2.build_network()
+ machineReference = V
+
+ if(PIPE_DP_VENT)
+ var/obj/machinery/atmospherics/binary/dp_vent_pump/P = new(src.loc)
+ P.dir = dir
+ P.initialize_directions = pipe_dir
+ if (pipename)
+ P.name = pipename
+ var/turf/T = P.loc
+ P.level = T.intact ? 2 : 1
+ P.initialize()
+ P.build_network()
+ if (P.node1)
+ P.node1.initialize()
+ P.node1.build_network()
+ if (P.node2)
+ P.node2.initialize()
+ P.node2.build_network()
+ machineReference = P
+
+ if(PIPE_PASV_VENT)
+ var/obj/machinery/atmospherics/pipe/vent/P = new(src.loc)
+ P.dir = dir
+ P.initialize_directions = get_pipe_dir()
+ if (pipename)
+ name = pipename
+ var/turf/T = loc
+ level = T.intact ? 2 : 1
+ initialize()
+ P.build_network()
+ if (P.node1)
+ P.node1.initialize()
+ P.node1.build_network()
+ machineReference = P
+
///// Z-Level stuff
/* if(PIPE_UP)
var/obj/machinery/atmospherics/pipe/zpipe/up/P = new(src.loc)
@@ -1029,10 +1124,6 @@ Buildable meters
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
- P.build_network()
- if (P.node1)
- P.node1.initialize()
- P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()*/
@@ -1090,6 +1181,23 @@ Buildable meters
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You have fastened the meter to the pipe"
del(src)
+
+/obj/item/pipe_gsensor
+ name = "gas sensor"
+ desc = "A sensor that can be hooked to a computer"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "gsensor0"
+ item_state = "buildpipe"
+ w_class = 4
+
+/obj/item/pipe_gsensor/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
+ ..()
+ if (!istype(W, /obj/item/weapon/wrench))
+ return ..()
+ new/obj/machinery/air_sensor( src.loc )
+ playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
+ user << "\blue You have fastened the gas sensor"
+ del(src)
//not sure why these are necessary
#undef PIPE_SIMPLE_STRAIGHT
#undef PIPE_SIMPLE_BENT
@@ -1120,4 +1228,8 @@ Buildable meters
#undef PIPE_SUPPLY_MANIFOLD
#undef PIPE_SCRUBBERS_MANIFOLD
#undef PIPE_UNIVERSAL
+#undef PIPE_INJECTOR
+#undef PIPE_DVALVE
+#undef PIPE_DP_VENT
+#undef PIPE_PASV_VENT
//#undef PIPE_MANIFOLD4W
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 959df353b38..d7b47e15aeb 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -19,6 +19,7 @@
Bent Pipe Manifold Manual Valve
+Digital Valve Pipe Cap 4-Way Manifold Manual T-Valve
@@ -43,8 +44,12 @@
Volume Pump Scrubber Meter
+Gas Sensor Gas Filter Gas Mixer
+Air Injector
+Dual-Port Vent Pump
+Passive Vent Heat exchange: Pipe Bent Pipe
@@ -56,6 +61,7 @@
"}
//What number the make points to is in the define # at the top of construction.dm in same folder
+//which for some reason couldn't just be left defined, so it could be used here, top kek
user << browse("[src][dat]", "window=pipedispenser")
onclose(user, "pipedispenser")
@@ -85,6 +91,12 @@
wait = 1
spawn(15)
wait = 0
+ if(href_list["makegsensor"])
+ if(!wait)
+ new /obj/item/pipe_gsensor(/*usr.loc*/ src.loc)
+ wait = 1
+ spawn(15)
+ wait = 0
return
/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index 713d326edc1..36b74f897a6 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -1,7 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/machinery/computer/telecomms
- light_color = "#50AB00"
+ light_color = LIGHT_COLOR_DARKGREEN
/obj/machinery/computer/telecomms/server
name = "Telecommunications Server Monitor"
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 98d7835bdb6..1fbfdb1c1fe 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -105,12 +105,19 @@
F.loc = src.loc
del(src)
+/obj/machinery/telecomms/proc/formatInput(var/label,var/varname, var/input)
+ var/value = vars[varname]
+ if(!value || value=="")
+ value="-----"
+ return "[label]:[value]"
/obj/machinery/telecomms/attack_ai(var/mob/user as mob)
attack_hand(user)
/obj/machinery/telecomms/attack_hand(var/mob/user as mob)
+ update_multitool_menu(user)
+/obj/machinery/telecomms/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
// You need a multitool to use this, or be silicon
if(!issilicon(user))
// istype returns false if the value is null
@@ -120,62 +127,62 @@
if(stat & (BROKEN|NOPOWER))
return
- var/obj/item/device/multitool/P = get_multitool(user)
-
- user.set_machine(src)
var/dat
- dat = "[src.name]
+ "}
+ // END AUTOFIX
- dat += ""
- temp = ""
- user << browse(dat, "window=tcommachine;size=520x500;can_resize=0")
- onclose(user, "dormitory")
+ return dat
+/obj/machinery/telecomms/canLink(var/obj/O)
+ return istype(O,/obj/machinery/telecomms)
+
+/obj/machinery/telecomms/isLinkedWith(var/obj/O)
+ return O != null && O in links
+
+/obj/machinery/telecomms/getLink(var/idx)
+ return (idx >= 1 && idx <= links.len) ? links[idx] : null
// Off-Site Relays
//
@@ -368,8 +375,8 @@
if(P)
if(P.buffer && P.buffer != src)
- if(!(src in P.buffer.links))
- P.buffer.links.Add(src)
+ if(!(src in P.buffer:links))
+ P.buffer:links.Add(src)
if(!(P.buffer in src.links))
src.links.Add(P.buffer)
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index fe8910962c4..0450905528f 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -36,7 +36,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/circuitboard = null // string pointing to a circuitboard type
var/hide = 0 // Is it a hidden machine?
var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to.
-
+ Mtoollink = 1
/obj/machinery/telecomms/proc/relay_information(datum/signal/signal, filter, copysig, amount = 20)
// relay signal to all linked machinery that are of type [filter]. If signal has been sent [amount] times, stop sending
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index d8bc0fb0972..1899ee09ac3 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -20,7 +20,7 @@
var/temp = "" // temporary feedback messages
circuit = "/obj/item/weapon/circuitboard/comm_monitor"
- light_color = "#50AB00"
+ light_color = LIGHT_COLOR_DARKGREEN
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index 58239808add..967cef6617c 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -14,7 +14,7 @@
var/storedcode = "" // code stored
- light_color = "#50AB00"
+ light_color = LIGHT_COLOR_DARKGREEN
req_access = list(access_tcomsat)
circuit = "/obj/item/weapon/circuitboard/comm_traffic"
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index e6bf09f19af..7b69d8fdee2 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -168,9 +168,7 @@
/obj/machinery/vending/RefreshParts() //Better would be to make constructable child
if(component_parts)
- build_inventory(products, start_empty = 1)
- build_inventory(contraband, 1, 1)
- build_inventory(premium, 0, 1, 1)
+ build_inventory()
for(var/obj/item/weapon/vending_refill/VR in component_parts)
refill_inventory(VR, product_records)
@@ -1017,7 +1015,7 @@
vend_delay = 15
vend_reply = "Have an enchanted evening!"
product_ads = "FJKLFJSD;AJKFLBJAKL;1234 LOONIES LOL!;>MFW;Kill them fuckers!;GET DAT FUKKEN DISK;HONK!;EI NATH;Destroy the station!;Admin conspiracies since forever!;Space-time bending hardware!"
- products = list(/obj/item/clothing/head/wizard = 1,/obj/item/clothing/suit/wizrobe = 1,/obj/item/clothing/head/wizard/red = 1,/obj/item/clothing/suit/wizrobe/red = 1,/obj/item/clothing/shoes/sandal = 1,/obj/item/weapon/staff = 2)
+ products = list(/obj/item/clothing/head/wizard = 1,/obj/item/clothing/suit/wizrobe = 1,/obj/item/clothing/head/wizard/red = 1,/obj/item/clothing/suit/wizrobe/red = 1,/obj/item/clothing/shoes/sandal = 1,/obj/item/weapon/twohanded/staff = 2)
/obj/machinery/vending/autodrobe
name = "\improper AutoDrobe"
@@ -1038,13 +1036,13 @@
/obj/item/clothing/under/pirate = 1,/obj/item/clothing/suit/pirate_brown = 1,/obj/item/clothing/suit/pirate_black =1,/obj/item/clothing/under/pirate_rags =1,/obj/item/clothing/head/pirate = 1,/obj/item/clothing/head/bandana = 1,
/obj/item/clothing/head/bandana = 1,/obj/item/clothing/under/soviet = 1,/obj/item/clothing/head/ushanka = 1,/obj/item/clothing/suit/imperium_monk = 1,
/obj/item/clothing/mask/gas/cyborg = 1,/obj/item/clothing/suit/holidaypriest = 1,/obj/item/clothing/head/wizard/marisa/fake = 1,
- /obj/item/clothing/suit/wizrobe/marisa/fake = 1,/obj/item/clothing/under/sundress = 1,/obj/item/clothing/head/witchwig = 1,/obj/item/weapon/staff/broom = 1,
- /obj/item/clothing/suit/wizrobe/fake = 1,/obj/item/clothing/head/wizard/fake = 1,/obj/item/weapon/staff = 3,/obj/item/clothing/mask/gas/sexyclown = 1,
+ /obj/item/clothing/suit/wizrobe/marisa/fake = 1,/obj/item/clothing/under/sundress = 1,/obj/item/clothing/head/witchwig = 1,/obj/item/weapon/twohanded/staff/broom = 1,
+ /obj/item/clothing/suit/wizrobe/fake = 1,/obj/item/clothing/head/wizard/fake = 1,/obj/item/weapon/twohanded/staff = 3,/obj/item/clothing/mask/gas/sexyclown = 1,
/obj/item/clothing/under/sexyclown = 1,/obj/item/clothing/mask/gas/sexymime = 1,/obj/item/clothing/under/sexymime = 1,/obj/item/clothing/suit/apron/overalls = 1,
/obj/item/clothing/head/rabbitears =1, /obj/item/clothing/head/sombrero = 1, /obj/item/clothing/suit/poncho = 1,
/obj/item/clothing/suit/poncho/green = 1, /obj/item/clothing/suit/poncho/red = 1, /obj/item/clothing/accessory/blue = 1, /obj/item/clothing/accessory/red = 1, /obj/item/clothing/accessory/black = 1, /obj/item/clothing/accessory/horrible = 1,
/obj/item/clothing/under/maid = 1, /obj/item/clothing/under/janimaid = 1, /obj/item/clothing/under/pants/camo = 1, /obj/item/clothing/mask/bandana = 1, /obj/item/clothing/mask/bandana/black = 1)
- contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1, /obj/item/clothing/mask/balaclava=1)
+ contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1, /obj/item/clothing/mask/balaclava=1, /obj/item/clothing/mask/horsehead = 2)
premium = list(/obj/item/clothing/suit/hgpirate = 1, /obj/item/clothing/head/hgpiratecap = 1, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1)
refill_canister = /obj/item/weapon/vending_refill/autodrobe
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index bfe5ade766a..dd13db06290 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -1080,16 +1080,4 @@
set_ready_state(0)
chassis.use_power(energy_drain)
do_after_cooldown()
- return 1
-
-/obj/item/weapon/paintkit //Please don't use this for anything, it's a base type for custom mech paintjobs.
- name = "mecha customisation kit"
- desc = "A generic kit containing all the needed tools and parts to turn a mech into another mech."
- icon = 'icons/obj/custom_items.dmi'
- icon_state = "royce_kit"
-
- var/new_name = "mech" //What is the variant called?
- var/new_desc = "A mech." //How is the new mech described?
- var/new_icon = "ripley" //What base icon will the new mech use?
- var/removable = null //Can the kit be removed?
- var/list/allowed_types = list() //Types of mech that the kit will work on.
\ No newline at end of file
+ return 1
\ No newline at end of file
diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm
index 5925d46fc61..2116c56faed 100644
--- a/code/game/mecha/mech_bay.dm
+++ b/code/game/mecha/mech_bay.dm
@@ -99,7 +99,7 @@
anchored = 1
icon = 'icons/obj/computer.dmi'
icon_state = "recharge_comp"
- light_color = "#a97faa"
+ light_color = LIGHT_COLOR_FADEDPURPLE
circuit = /obj/item/weapon/circuitboard/mech_bay_power_console
var/obj/machinery/mech_bay_recharge_port/recharge_port
diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm
index a56dc0db575..c4965210c95 100644
--- a/code/game/mecha/mecha_control_console.dm
+++ b/code/game/mecha/mecha_control_console.dm
@@ -2,7 +2,7 @@
name = "Exosuit Control"
icon = 'icons/obj/computer.dmi'
icon_state = "mecha"
- light_color = "#a97faa"
+ light_color = LIGHT_COLOR_FADEDPURPLE
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/mecha_control"
var/list/located = list()
diff --git a/code/game/mecha/paintkits.dm b/code/game/mecha/paintkits.dm
new file mode 100644
index 00000000000..872138c9b40
--- /dev/null
+++ b/code/game/mecha/paintkits.dm
@@ -0,0 +1,33 @@
+/obj/item/weapon/paintkit //Please don't use this for anything, it's a base type for custom mech paintjobs.
+ name = "mecha customisation kit"
+ desc = "A generic kit containing all the needed tools and parts to turn a mech into another mech."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "royce_kit"
+
+ var/new_name = "mech" //What is the variant called?
+ var/new_desc = "A mech." //How is the new mech described?
+ var/new_icon = "ripley" //What base icon will the new mech use?
+ var/removable = null //Can the kit be removed?
+ var/list/allowed_types = list() //Types of mech that the kit will work on.
+
+/obj/item/weapon/paintkit/titansfist
+ name = "Ripley customisation kit"
+ desc = "A kit containing all the needed tools and parts to turn an APLU Ripley into a Titan's Fist worker mech."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "royce_kit"
+
+ new_name = "APLU \"Titan's Fist\""
+ new_desc = "This ordinary mining Ripley has been customized to look like a unit of the Titans Fist."
+ new_icon = "titan"
+ allowed_types = list("ripley","firefighter")
+
+/obj/item/weapon/paintkit/mercenary
+ name = "Mercenary APLU kit"
+ desc = "A kit containing all the needed tools and parts to turn an APLU Ripley into an old Mercenaries APLU."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "sven_kit"
+
+ new_name = "APLU \"Strike the Earth!\""
+ new_desc = "Looks like an over worked, under maintained Ripley with some horrific damage."
+ new_icon = "earth"
+ allowed_types = list("ripley","firefighter")
\ No newline at end of file
diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm
index 2e00c5d99d8..5b13f3258dc 100644
--- a/code/game/objects/effects/landmarks.dm
+++ b/code/game/objects/effects/landmarks.dm
@@ -39,7 +39,7 @@
if("JoinLate")
latejoin += loc
del(src)
-
+
if("JoinLateGateway")
latejoin_gateway += loc
del(src)
@@ -47,7 +47,7 @@
if("JoinLateCryo")
latejoin_cryo += loc
del(src)
-
+
if("JoinLateCyborg")
latejoin_cyborg += loc
del(src)
@@ -90,7 +90,7 @@
if("carpspawn")
carplist += loc
-
+
if("voxstart")
raider_spawn += loc
@@ -252,13 +252,13 @@
/obj/effect/landmark/costume/cutewitch/New()
new /obj/item/clothing/under/sundress(src.loc)
new /obj/item/clothing/head/witchwig(src.loc)
- new /obj/item/weapon/staff/broom(src.loc)
+ new /obj/item/weapon/twohanded/staff/broom(src.loc)
del(src)
/obj/effect/landmark/costume/fakewizard/New()
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
new /obj/item/clothing/head/wizard/fake(src.loc)
- new /obj/item/weapon/staff/(src.loc)
+ new /obj/item/weapon/twohanded/staff/(src.loc)
del(src)
/obj/effect/landmark/costume/sexyclown/New()
diff --git a/code/game/objects/effects/sm_crystals.dm b/code/game/objects/effects/sm_crystals.dm
new file mode 100644
index 00000000000..d725b23d0bc
--- /dev/null
+++ b/code/game/objects/effects/sm_crystals.dm
@@ -0,0 +1,179 @@
+//separate dm since hydro is getting bloated already
+
+/obj/effect/supermatter_crystal
+ name = "supermatter growth"
+ anchored = 1
+ opacity = 0
+ density = 0
+ icon = 'icons/obj/lighting.dmi'
+ icon_state = "supermatter_crystalf"
+ layer = 2.1
+ light_color = "#8A8A00"
+
+ var/endurance = 100
+ var/delay = 1200
+ var/floor = 0
+ var/spreadChance = 10
+ var/spreadIntoAdjacentChance = 10
+ var/lastTick = 0
+ var/spreaded = 1
+ var/deleted = 0
+
+/obj/effect/supermatter_crystal/single
+ spreadChance = 0
+
+/obj/effect/supermatter_crystal/New()
+ ..()
+ light_color = "#8A8A00"
+
+ dir = CalcDir()
+
+ if(!floor)
+ switch(dir) //offset to make it be on the wall rather than on the floor
+ if(NORTH)
+ pixel_y = 32
+ if(SOUTH)
+ pixel_y = -32
+ if(EAST)
+ pixel_x = 32
+ if(WEST)
+ pixel_x = -32
+ icon_state = "supermatter_crystal"
+ else
+ if( prob( 10 )) // Only 10% of all floor crystals survive, so there's not a forest of 'em
+ icon_state = "supermatter_crystalf"
+ name = "supermatter crystal"
+ density = 1
+ else
+ deleted = 1
+ del( src )
+
+ processing_objects += src
+
+ set_light(3)
+ lastTick = world.timeofday
+
+/obj/effect/supermatter_crystal/Del()
+ if( !deleted )
+ visible_message("\red \The [src] shatters!")
+ new /obj/item/weapon/shard/supermatter( src.loc )
+
+ processing_objects -= src
+ ..()
+
+/obj/effect/supermatter_crystal/process()
+ if(!spreaded)
+ return
+
+ if(((world.timeofday - lastTick) > delay) || ((world.timeofday - lastTick) < 0))
+ lastTick = world.timeofday
+ spreaded = 0
+
+ for(var/mob/living/l in range( src, 2 ))
+ var/rads = 5
+ l.apply_effect(rads, IRRADIATE)
+
+ for(var/i=1,i<=3,i++)
+ if(prob(spreadChance))
+ var/list/possibleLocs = list()
+ var/spreadsIntoAdjacent = 0
+
+ if(prob(spreadIntoAdjacentChance))
+ spreadsIntoAdjacent = 1
+
+ for(var/turf/simulated/floor/floor in view(3,src))
+ if(spreadsIntoAdjacent || !locate(/obj/effect/supermatter_crystal) in view(1,floor))
+ possibleLocs += floor
+
+ if(!possibleLocs.len)
+ break
+
+ var/turf/newLoc = pick(possibleLocs)
+
+ var/crystalCount = 0 //hacky
+ var/placeCount = 1
+ for(var/obj/effect/supermatter_crystal/shroom in newLoc)
+ crystalCount++
+ for(var/wallDir in cardinal)
+ var/turf/isWall = get_step(newLoc,wallDir)
+ if(isWall.density)
+ placeCount++
+ if(crystalCount >= placeCount)
+ continue
+
+ var/obj/effect/supermatter_crystal/child = new /obj/effect/supermatter_crystal(newLoc)
+ if( child )
+ child.delay = delay
+ child.endurance = endurance
+
+ spreaded++
+
+/obj/effect/supermatter_crystal/proc/CalcDir(turf/location = loc)
+ for(var/wallDir in cardinal)
+ var/turf/newTurf = get_step(location,wallDir)
+ if(newTurf.density)
+ return wallDir
+
+/*
+ var/direction = 16
+
+ for(var/wallDir in cardinal)
+ var/turf/newTurf = get_step(location,wallDir)
+ if(newTurf.density)
+ direction |= wallDir
+
+ for(var/obj/effect/supermatter_crystal/crystal in location)
+ if(crystal == src)
+ continue
+ if(crystal.floor) //special
+ direction &= ~16
+ else
+ direction &= ~crystal.dir
+
+ var/list/dirList = list()
+
+ for(var/i=1,i<=16,i <<= 1)
+ if(direction & i)
+ dirList += i
+
+ if(dirList.len)
+ var/newDir = pick(dirList)
+ if(newDir == 16)
+ floor = 1
+ newDir = 1
+ return newDir
+*/
+ floor = 1
+ return 1
+
+/obj/effect/supermatter_crystal/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ ..()
+
+ endurance -= W.force
+
+ CheckEndurance()
+
+/obj/effect/supermatter_crystal/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
+ else
+ return
+
+/obj/effect/supermatter_crystal/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ if(exposed_temperature > 300)
+ endurance -= 5
+ CheckEndurance()
+
+/obj/effect/supermatter_crystal/proc/CheckEndurance()
+ if(endurance <= 0)
+ del(src)
\ No newline at end of file
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index a6879546e11..f73a366ea94 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -634,7 +634,7 @@
eyes.take_damage(rand(3,4), 1)
if(eyes.damage >= eyes.min_bruised_damage)
if(M.stat != 2)
- if(!(eyes & ORGAN_ROBOT) || !(eyes & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly
+ if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly
M << "\red Your eyes start to bleed profusely!"
if(prob(50))
if(M.stat != 2)
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 71731ca138d..91e264715b0 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -116,8 +116,8 @@
name = "flare"
desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
w_class = 2.0
- brightness_on = 7 // Pretty bright.
- light_color = "#e58775"
+ brightness_on = 8 // Made it brighter (from 7 to 8).
+ light_color = "#ff0000" // changed colour to a more brighter red.
icon_state = "flare"
item_state = "flare"
var/fuel = 0
@@ -223,7 +223,7 @@
"[user] blinks \the [src] at \the [A].")
if(ismob(A))
var/mob/M = A
- add_logs(user, M, "attacked", object="EMP-light")
+ add_logs(M, user, "attacked", object="EMP-light")
user << "\The [src] now has [emp_cur_charges] charge\s."
A.emp_act(1)
else
diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm
index 21bd2c49ddf..9c1072cfa65 100644
--- a/code/game/objects/items/devices/multitool.dm
+++ b/code/game/objects/items/devices/multitool.dm
@@ -18,7 +18,12 @@
m_amt = 50
g_amt = 20
origin_tech = "magnets=1;engineering=1"
- var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
+ var/obj/machinery/buffer // simple machine buffer for device linkage
+
+/obj/item/device/multitool/proc/IsBufferA(var/typepath)
+ if(!buffer)
+ return 0
+ return istype(buffer,typepath)
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index de473470896..019e5f02896 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -227,6 +227,8 @@ REAGENT SCANNER
for(var/name in H.organs_by_name)
var/obj/item/organ/external/e = H.organs_by_name[name]
+ if(!e)
+ continue
if(e.status & ORGAN_BROKEN)
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
break
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 32c04c5b6a7..f7e53bde3ab 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -126,7 +126,7 @@
if (R.one_per_turf && (locate(R.result_type) in usr.loc))
usr << "\red There is another [R.title] here!"
return
- if (R.on_floor && !istype(usr.loc, /turf/simulated/floor))
+ if (R.on_floor && !istype(usr.loc, /turf/simulated))
usr << "\red \The [R.title] must be constructed on the floor!"
return
if (R.time)
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 2bf38626404..db8945d9063 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -166,14 +166,6 @@
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
- if(istype(W,/obj/item/weapon/id_wallet))
- user << "You slip [src] into [W]."
- src.name = "[src.registered_name]'s [W.name] ([src.assignment])"
- src.desc = W.desc
- src.icon = W.icon
- src.icon_state = W.icon_state
- del(W)
- return
if(istype(W, /obj/item/weapon/id_decal/))
var/obj/item/weapon/id_decal/decal = W
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs.dm
similarity index 76%
rename from code/game/objects/items/weapons/cigs_lighters.dm
rename to code/game/objects/items/weapons/cigs.dm
index 1525681adc7..e6ca596f519 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs.dm
@@ -2,52 +2,14 @@
/*
CONTAINS:
-MATCHES
CIGARETTES
CIGARS
SMOKING PIPES
-CHEAP LIGHTERS
-ZIPPO
CIGARETTE PACKETS ARE IN FANCY.DM
+LIGHTERS ARE IN LIGHTERS.DM
*/
-///////////
-//MATCHES//
-///////////
-/obj/item/weapon/match
- name = "match"
- desc = "A simple match stick, used for lighting fine smokables."
- icon = 'icons/obj/cigarettes.dmi'
- icon_state = "match_unlit"
- var/lit = 0
- var/smoketime = 5
- w_class = 1.0
- origin_tech = "materials=1"
- attack_verb = list("burnt", "singed")
-
-/obj/item/weapon/match/process()
- var/turf/location = get_turf(src)
- smoketime--
- if(smoketime < 1)
- icon_state = "match_burnt"
- lit = -1
- processing_objects.Remove(src)
- return
- if(location)
- location.hotspot_expose(700, 5)
- return
-
-/obj/item/weapon/match/dropped(mob/user as mob)
- if(lit == 1)
- lit = -1
- damtype = "brute"
- icon_state = "match_burnt"
- item_state = "cigoff"
- name = "burnt match"
- desc = "A match. This one has seen better days."
- return ..()
-
//////////////////
//FINE SMOKABLES//
//////////////////
@@ -391,105 +353,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
smoketime = 800
chem_volume = 40
-
-
-/////////
-//ZIPPO//
-/////////
-/obj/item/weapon/lighter
- name = "cheap lighter"
- desc = "A cheap-as-free lighter."
- icon = 'icons/obj/items.dmi'
- icon_state = "lighter-g"
- item_state = "lighter-g"
- var/icon_on = "lighter-g-on"
- var/icon_off = "lighter-g"
- w_class = 1
- throwforce = 4
- flags = CONDUCT
- slot_flags = SLOT_BELT
- attack_verb = list("burnt", "singed")
- var/lit = 0
-
-/obj/item/weapon/lighter/zippo
- name = "Zippo lighter"
- desc = "The zippo."
- icon_state = "zippo"
- item_state = "zippo"
- icon_on = "zippoon"
- icon_off = "zippo"
-
-/obj/item/weapon/lighter/random
- New()
- var/color = pick("r","c","y","g")
- icon_on = "lighter-[color]-on"
- icon_off = "lighter-[color]"
- icon_state = icon_off
-
-/obj/item/weapon/lighter/attack_self(mob/living/user)
- if(user.r_hand == src || user.l_hand == src || isrobot(user))
- if(!lit)
- lit = 1
- w_class = 4
- icon_state = icon_on
- item_state = icon_on
- if(istype(src, /obj/item/weapon/lighter/zippo) )
- user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.")
- playsound(src.loc, 'sound/items/ZippoLight.ogg', 25, 1)
- else
- if(prob(75))
- user.visible_message("After a few attempts, [user] manages to light the [src].")
- else
- user << "You burn yourself while lighting the lighter."
- user.adjustFireLoss(5)
- user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.")
-
- set_light(2)
- processing_objects.Add(src)
- else
- lit = 0
- w_class = 1
- icon_state = icon_off
- item_state = icon_off
- if(istype(src, /obj/item/weapon/lighter/zippo) )
- user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.")
- playsound(src.loc, 'sound/items/ZippoClose.ogg', 25, 1)
- else
- user.visible_message("[user] quietly shuts off the [src].")
-
- set_light(0)
- processing_objects.Remove(src)
- else
- return ..()
- return
-
-
-/obj/item/weapon/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- if(!isliving(M))
- return
- M.IgniteMob()
- if(!istype(M, /mob))
- return
-
- if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
- var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
- if(M == user)
- cig.attackby(src, user)
- else
- if(istype(src, /obj/item/weapon/lighter/zippo))
- cig.light("[user] whips the [name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light \the [cig] with.")
- else
- cig.light("[user] holds the [name] out for [M], and lights the [cig.name].")
- else
- ..()
-
-/obj/item/weapon/lighter/process()
- var/turf/location = get_turf(src)
- if(location)
- location.hotspot_expose(700, 5)
- return
-
-
///////////
//ROLLING//
///////////
diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index 84dc2d0c8b7..0b27c34c607 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -27,6 +27,8 @@
return
if(istype(M, /mob/living/carbon/human) && M:species.bodyflags & FEET_NOSLIP)
return
+ if(M.flying)
+ return
M.stop_pulling()
M << "\blue You slipped on the [name]!"
@@ -42,6 +44,8 @@
var/mob/M = AM
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled)
return
+ if(M.flying)
+ return
M.stop_pulling()
M << "\blue You slipped on the [name]!"
@@ -57,7 +61,7 @@
user << "You need to take that [target.name] off before cleaning it."
else if(istype(target,/obj/effect/decal/cleanable))
user.visible_message("[user] begins to scrub \the [target.name] out with [src].")
- if(do_after(user, src.cleanspeed))
+ if(do_after(user, src.cleanspeed) && target)
user << "You scrub \the [target.name] out."
del(target)
else
diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm
index b0ef2bb03db..58ebf621f7d 100644
--- a/code/game/objects/items/weapons/defib.dm
+++ b/code/game/objects/items/weapons/defib.dm
@@ -325,7 +325,7 @@
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
- add_logs(user, M, "stunned", object="defibrillator")
+ add_logs(M, user, "stunned", object="defibrillator")
defib.deductcharge(revivecost)
cooldown = 1
busy = 0
@@ -379,7 +379,7 @@
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
defib.deductcharge(revivecost)
- add_logs(user, M, "revived", object="defibrillator")
+ add_logs(M, user, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.")
@@ -440,7 +440,7 @@
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
- add_logs(user, M, "stunned", object="defibrillator")
+ add_logs(M, user, "stunned", object="defibrillator")
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
@@ -490,7 +490,7 @@
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
- add_logs(user, M, "revived", object="defibrillator")
+ add_logs(M, user, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.")
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 1965473e717..c8d2c4c20da 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -76,7 +76,7 @@
loc = null
if (ismob(target))
- add_logs(user, target, "planted [name] on")
+ add_logs(target, user, "planted [name] on")
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
message_admins("[key_name(user, user.client)](?) planted C4 on [key_name(target)](?) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted C4 on [key_name(target)] with [timer] second fuse")
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index af8b8e2fe5f..70b2b5fe03e 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -24,13 +24,12 @@
/obj/item/weapon/flamethrower/Destroy()
if(weldtool)
- del(weldtool)
+ qdel(weldtool)
if(igniter)
- del(igniter)
+ qdel(igniter)
if(ptank)
- del(ptank)
+ qdel(ptank)
..()
- return
/obj/item/weapon/flamethrower/process()
@@ -60,8 +59,8 @@
item_state = "flamethrower_0"
return
-/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, proximity)
- if(!proximity) return
+/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
+ if(flag) return // too close
// Make sure our user is still holding us
if(user && user.get_active_hand() == src)
var/turf/target_turf = get_turf(target)
@@ -83,7 +82,7 @@
ptank.loc = T
ptank = null
new /obj/item/stack/rods(T)
- del(src)
+ qdel(src)
return
if(isscrewdriver(W) && igniter && !lit)
@@ -163,7 +162,6 @@
usr.set_machine(src)
if(href_list["light"])
if(!ptank) return
- if(ptank.air_contents.toxins < 1) return
if(!status) return
lit = !lit
if(lit)
@@ -184,22 +182,26 @@
update_icon()
return
+/obj/item/weapon/flamethrower/CheckParts()
+ weldtool = locate(/obj/item/weapon/weldingtool) in contents
+ igniter = locate(/obj/item/device/assembly/igniter) in contents
+ update_icon()
//Called from turf.dm turf/dblclick
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
if(!lit || operating) return
operating = 1
+ var/turf/previousturf = get_turf(src)
for(var/turf/simulated/T in turflist)
if(!T.air)
break
- if(!previousturf && length(turflist)>1)
- previousturf = get_turf(src)
+ if(T == previousturf)
continue //so we don't burn the tile we be standin on
- if(previousturf && LinkBlocked(previousturf, T))
+ if(!T.CanAtmosPass(previousturf))
break
ignite_turf(T)
sleep(1)
- previousturf = null
+ previousturf = T
operating = 0
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))
@@ -222,10 +224,16 @@
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
- weldtool = new /obj/item/weapon/weldingtool(src)
+ if(!weldtool)
+ weldtool = new /obj/item/weapon/weldingtool(src)
weldtool.status = 0
- igniter = new /obj/item/device/assembly/igniter(src)
+ if(!igniter)
+ igniter = new /obj/item/device/assembly/igniter(src)
igniter.secured = 0
status = 1
update_icon()
- return
\ No newline at end of file
+
+/obj/item/weapon/flamethrower/full/tank/New(var/loc)
+ ..()
+ ptank = new /obj/item/weapon/tank/plasma/full(src)
+ update_icon()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 6a7e86dfea0..329edef72f6 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -34,7 +34,7 @@
else
feedback_add_details("handcuffs","H")
- add_logs(user, C, "handcuffed")
+ add_logs(C, user, "handcuffed", src)
else
user << "You fail to handcuff [C]."
diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm
new file mode 100644
index 00000000000..04dccdc4da1
--- /dev/null
+++ b/code/game/objects/items/weapons/lighters.dm
@@ -0,0 +1,196 @@
+/////////
+//ZIPPO//
+/////////
+/obj/item/weapon/lighter
+ name = "cheap lighter"
+ desc = "A cheap-as-free lighter."
+ icon = 'icons/obj/items.dmi'
+ icon_state = "lighter-g"
+ item_state = "lighter-g"
+ var/icon_on = "lighter-g-on"
+ var/icon_off = "lighter-g"
+ w_class = 1
+ throwforce = 4
+ flags = CONDUCT
+ slot_flags = SLOT_BELT
+ attack_verb = list("burnt", "singed")
+ var/lit = 0
+
+/obj/item/weapon/lighter/zippo
+ name = "Zippo lighter"
+ desc = "The zippo."
+ icon_state = "zippo"
+ item_state = "zippo"
+ icon_on = "zippoon"
+ icon_off = "zippo"
+
+/obj/item/weapon/lighter/random
+ New()
+ var/color = pick("r","c","y","g")
+ icon_on = "lighter-[color]-on"
+ icon_off = "lighter-[color]"
+ icon_state = icon_off
+
+/obj/item/weapon/lighter/attack_self(mob/living/user)
+ if(user.r_hand == src || user.l_hand == src || isrobot(user))
+ if(!lit)
+ lit = 1
+ w_class = 4
+ icon_state = icon_on
+ item_state = icon_on
+ if(istype(src, /obj/item/weapon/lighter/zippo) )
+ user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.")
+ playsound(src.loc, 'sound/items/ZippoLight.ogg', 25, 1)
+ else
+ if(prob(75))
+ user.visible_message("After a few attempts, [user] manages to light the [src].")
+ else
+ user << "You burn yourself while lighting the lighter."
+ user.adjustFireLoss(5)
+ user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.")
+
+ set_light(2)
+ processing_objects.Add(src)
+ else
+ lit = 0
+ w_class = 1
+ icon_state = icon_off
+ item_state = icon_off
+ if(istype(src, /obj/item/weapon/lighter/zippo) )
+ user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.")
+ playsound(src.loc, 'sound/items/ZippoClose.ogg', 25, 1)
+ else
+ user.visible_message("[user] quietly shuts off the [src].")
+
+ set_light(0)
+ processing_objects.Remove(src)
+ else
+ return ..()
+ return
+
+
+/obj/item/weapon/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ if(!isliving(M))
+ return
+ M.IgniteMob()
+ if(!istype(M, /mob))
+ return
+
+ if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
+ var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
+ if(M == user)
+ cig.attackby(src, user)
+ else
+ if(istype(src, /obj/item/weapon/lighter/zippo))
+ cig.light("[user] whips the [name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light \the [cig] with.")
+ else
+ cig.light("[user] holds the [name] out for [M], and lights the [cig.name].")
+ else
+ ..()
+
+/obj/item/weapon/lighter/process()
+ var/turf/location = get_turf(src)
+ if(location)
+ location.hotspot_expose(700, 5)
+ return
+
+//EXTRA LIGHTERS
+/obj/item/weapon/lighter/zippo/fluff/li_matsuda_1 //mangled: Li Matsuda
+ name = "blue zippo lighter"
+ desc = "A zippo lighter made of some blue metal."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "bluezippo"
+ icon_on = "bluezippoon"
+ icon_off = "bluezippo"
+
+/obj/item/weapon/lighter/zippo/fluff/michael_guess_1 //Dragor23: Michael Guess
+ name = "engraved lighter"
+ desc = "A golden lighter, engraved with some ornaments and a G."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "guessip"
+ icon_on = "guessipon"
+ icon_off = "guessip"
+
+/obj/item/weapon/lighter/zippo/fluff/riley_rohtin_1 //rawrtaicho: Riley Rohtin
+ name = "Riley's black zippo"
+ desc = "A black zippo lighter, which holds some form of sentimental value."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "blackzippo"
+ icon_on = "blackzippoon"
+ icon_off = "blackzippo"
+
+/obj/item/weapon/lighter/zippo/fluff/fay_sullivan_1 //furohman: Fay Sullivan
+ name = "Graduation Lighter"
+ desc = "A silver engraved lighter with 41 on one side and Tharsis University on the other. The lid reads Fay Sullivan, Cybernetic Engineering, 2541"
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "gradzippo"
+ icon_on = "gradzippoon"
+ icon_off = "gradzippo"
+
+/obj/item/weapon/lighter/zippo/fluff/executivekill_1 //executivekill: Hunter Duke
+ name = "Gonzo Fist zippo"
+ desc = "A Zippo lighter with the iconic Gonzo Fist on a matte black finish."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "gonzozippo"
+ icon_on = "gonzozippoon"
+ icon_off = "gonzozippo"
+
+/obj/item/weapon/lighter/zippo/fluff/naples_1 //naples: Russell Vierson
+ name = "Engraved zippo"
+ desc = "A intricately engraved Zippo lighter."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "engravedzippo"
+ icon_on = "engravedzippoon"
+ icon_off = "engravedzippo"
+
+/obj/item/weapon/lighter/zippo/fluff/nt_rep
+ name = "gold engraved zippo"
+ desc = "An engraved golden Zippo lighter with the letters NT on it."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "zippo_nt_off"
+ icon_on = "zippo_nt_on"
+ icon_off = "zippo_nt_off"
+
+/obj/item/weapon/lighter/zippo/fluff/purple
+ name = "purple engraved zippo"
+ desc = "All craftsspacemanship is of the highest quality. It is encrusted with refined plasma sheets. On the item is an image of a dwarf and the words 'Strike the Earth!' etched onto the side."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "purple_zippo_off"
+ icon_on = "purple_zippo_on"
+ icon_off = "purple_zippo_off"
+
+///////////
+//MATCHES//
+///////////
+/obj/item/weapon/match
+ name = "match"
+ desc = "A simple match stick, used for lighting fine smokables."
+ icon = 'icons/obj/cigarettes.dmi'
+ icon_state = "match_unlit"
+ var/lit = 0
+ var/smoketime = 5
+ w_class = 1.0
+ origin_tech = "materials=1"
+ attack_verb = list("burnt", "singed")
+
+/obj/item/weapon/match/process()
+ var/turf/location = get_turf(src)
+ smoketime--
+ if(smoketime < 1)
+ icon_state = "match_burnt"
+ lit = -1
+ processing_objects.Remove(src)
+ return
+ if(location)
+ location.hotspot_expose(700, 5)
+ return
+
+/obj/item/weapon/match/dropped(mob/user as mob)
+ if(lit == 1)
+ lit = -1
+ damtype = "brute"
+ icon_state = "match_burnt"
+ item_state = "cigoff"
+ name = "burnt match"
+ desc = "A match. This one has seen better days."
+ return ..()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/sm_shard.dm b/code/game/objects/items/weapons/sm_shard.dm
new file mode 100644
index 00000000000..a4367cba413
--- /dev/null
+++ b/code/game/objects/items/weapons/sm_shard.dm
@@ -0,0 +1,103 @@
+
+/obj/item/weapon/shard/supermatter
+ name = "supermatter shard"
+ desc = "A shard of supermatter. Incredibly dangerous, though not large enough to go critical."
+ force = 10.0
+ throwforce = 20.0
+ icon_state = "supermatter"
+ sharp = 1
+ edge = 1
+ w_class = 2
+ flags = CONDUCT
+ light_color = "#8A8A00"
+ var/brightness = 2
+
+/obj/item/weapon/shard/supermatter/New()
+ src.icon_state = pick("supermatter")
+ switch(src.icon_state)
+ if("supermattersmall")
+ src.pixel_x = rand(-12, 12)
+ src.pixel_y = rand(-12, 12)
+ if("supermattermedium")
+ src.pixel_x = rand(-8, 8)
+ src.pixel_y = rand(-8, 8)
+ if("supermatterlarge")
+ src.pixel_x = rand(-5, 5)
+ src.pixel_y = rand(-5, 5)
+ else
+
+ set_light(brightness)
+
+/obj/item/weapon/shard/supermatter/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if( istype( W, /obj/item/weapon/tongs ))
+ var/obj/item/weapon/tongs/T = W
+ T.pick_up( src )
+ T.icon_state = "tongs_supermatter"
+ return
+
+ ..()
+
+/obj/item/weapon/shard/supermatter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
+ return ..()
+
+/obj/item/weapon/shard/supermatter/Crossed(AM as mob|obj)
+ if(ismob(AM))
+ var/mob/M = AM
+ M << "\red You step on \the [src]!"
+ playsound(src.loc, 'sound/effects/glass_step_sm.ogg', 70, 1) // not sure how to handle metal shards with sounds
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+
+ if(H.species.flags & IS_SYNTHETIC) //Thick skin.
+ return
+
+ if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
+ var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
+ if(affecting.status & ORGAN_ROBOT)
+ return
+ if(affecting.take_damage(5, 20))
+ H.UpdateDamageIcon()
+ H.updatehealth()
+ if(!(H.species && (H.species.flags & NO_PAIN)))
+ H.Weaken(3)
+ ..()
+
+
+/obj/item/weapon/shard/supermatter/attack_hand(var/mob/user)
+ if(!istype(user,/mob/living/carbon/human/nucleation))
+ user << pick( "\red You think twice before touching that without protection.",
+ "\red You don't want to touch that without some protection.",
+ "\red You probably should get something else to pick that up.",
+ "\red You aren't sure that's a good idea.",
+ "\red You aren't in the mood to get vaporized today.",
+ "\red You really don't feel like frying your hand off.",
+ "\red You assume that's a bad idea." )
+ return
+
+ ..()
+
+/obj/item/weapon/tongs
+ name = "tongs"
+ desc = "Tungsten-alloy tongs used for handling dangerous materials."
+ force = 7.0
+ throwforce = 12.0
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "tongs"
+ edge = 1
+ w_class = 2
+ flags = CONDUCT
+ var/obj/item/held = null // The item currently being held
+
+/obj/item/weapon/tongs/proc/pick_up( var/obj/item/I )
+ held = I
+ I.loc = src
+ playsound(loc, 'sound/effects/tong_pickup.ogg', 50, 1, -1)
+
+/obj/item/weapon/tongs/attack_self(var/mob/user as mob)
+ if( held )
+ var/turf/T = get_turf(user.loc)
+ held.loc = T
+ held = null
+ icon_state = initial(icon_state)
+ ..()
diff --git a/code/game/objects/items/weapons/staff.dm b/code/game/objects/items/weapons/staff.dm
index a97ae394244..021c3a7618f 100644
--- a/code/game/objects/items/weapons/staff.dm
+++ b/code/game/objects/items/weapons/staff.dm
@@ -1,4 +1,4 @@
-/obj/item/weapon/staff
+/obj/item/weapon/twohanded/staff
name = "wizards staff"
desc = "Apparently a staff used by the wizard."
icon = 'icons/obj/wizard.dmi'
@@ -11,13 +11,60 @@
flags = NOSHIELD
attack_verb = list("bludgeoned", "whacked", "disciplined")
-/obj/item/weapon/staff/broom
+/obj/item/weapon/twohanded/staff/broom
name = "broom"
desc = "Used for sweeping, and flying into the night while cackling. Black cat not included."
icon = 'icons/obj/wizard.dmi'
icon_state = "broom"
+ item_state = "broom0"
+ icon_override = 'icons/mob/in-hand/staff.dmi'
-/obj/item/weapon/staff/stick
+/obj/item/weapon/twohanded/staff/broom/attack_self(mob/user as mob)
+ ..()
+ item_state = "broom[wielded ? 1 : 0]"
+ force = wielded ? 5 : 3
+ attack_verb = wielded ? list("rammed into", "charged at") : list("bludgeoned", "whacked", "cleaned")
+ if(user)
+ user.update_inv_l_hand()
+ user.update_inv_r_hand()
+ if(user.mind in ticker.mode.wizards)
+ user.flying = wielded ? 1 : 0
+ if(wielded)
+ user << "You hold \the [src] between your legs."
+ user.say("QUID 'ITCH")
+ animate(user, pixel_y = pixel_y + 10 , time = 10, loop = 1, easing = SINE_EASING)
+ else
+ animate(user, pixel_y = pixel_y + 10 , time = 1, loop = 1)
+ animate(user, pixel_y = pixel_y, time = 10, loop = 1, easing = SINE_EASING)
+ animate(user)
+ if(user.lying)//aka. if they have just been stunned
+ user.pixel_y -= 6
+ else
+ if(wielded)
+ user << "You hold \the [src] between your legs."
+
+/obj/item/weapon/twohanded/staff/broom/attackby(var/obj/O, mob/user)
+ if(istype(O, /obj/item/clothing/mask/horsehead))
+ new/obj/item/weapon/twohanded/staff/broom/horsebroom(get_turf(src))
+ user.unEquip(O)
+ qdel(O)
+ qdel(src)
+ return
+ ..()
+
+/obj/item/weapon/twohanded/staff/broom/horsebroom
+ name = "broomstick horse"
+ desc = "Saddle up!"
+ icon = 'icons/obj/wizard.dmi'
+ icon_state = "horsebroom"
+ item_state = "horsebroom0"
+ icon_override = 'icons/mob/in-hand/staff.dmi'
+
+/obj/item/weapon/twohanded/staff/broom/horsebroom/attack_self(mob/user as mob)
+ ..()
+ item_state = "horsebroom[wielded ? 1 : 0]"
+
+/obj/item/weapon/twohanded/staff/stick
name = "stick"
desc = "A great tool to drag someone else's drinks across the bar."
icon = 'icons/obj/weapons.dmi'
diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm
deleted file mode 100644
index edb18ae8d58..00000000000
--- a/code/game/objects/items/weapons/surgery_tools.dm
+++ /dev/null
@@ -1,827 +0,0 @@
-/* Surgery Tools
- * Contains:
- * Retractor
- * Hemostat
- * Cautery
- * Surgical Drill
- * Scalpel
- * Circular Saw
- */
-
-/*
- * Retractor
- */
-/obj/item/weapon/retractor
- name = "retractor"
- desc = "Retracts stuff."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "retractor"
- m_amt = 6000
- g_amt = 3000
- flags = CONDUCT
- w_class = 2.0
- origin_tech = "materials=1;biotech=1"
-
-/*HAHA, SUCK IT, 2000 LINES OF SPAGHETTI CODE!
-
-NOW YOUR JOB IOS DONE BY ONLY 500 LINES OF SPAGHETTI CODE!
-
-LOOK FOR SURGERY.DM*/
-
-/*
-/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- if(!istype(M))
- return
-
- var/mob/living/carbon/human/H = M
- if(istype(H) && ( \
- (H.head && H.head.flags & HEADCOVERSEYES) || \
- (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
- (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- var/mob/living/carbon/monkey/Mo = M
- if(istype(Mo) && ( \
- (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N
- user << "\red You cannot locate any eyes on this creature!"
- return
-
- switch(M.eye_op_stage)
- if(1.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] is having his eyes retracted by [user].", 1)
- M << "\red [user] begins to seperate your eyes with [src]!"
- user << "\red You seperate [M]'s eyes with [src]!"
- else
- user.visible_message( \
- "\red [user] begins to have his eyes retracted.", \
- "\red You begin to pry open your eyes with [src]!" \
- )
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- if(affecting.take_damage(15))
- M:UpdateDamageIcon()
- M.updatehealth()
- else
- M.take_organ_damage(15)
-
- M:eye_op_stage = 2.0
-
- else if(user.zone_sel.selecting == "chest")
- switch(M:alien_op_stage)
- if(3.0)
- var/mob/living/carbon/human/H = M
- if(!istype(H))
- return ..()
-
- if(H.wear_suit || H.w_uniform)
- user << "\red You're going to need to remove that suit/jumpsuit first."
- return
-
- var/obj/item/alien_embryo/A = locate() in M.contents
- if(!A)
- return ..()
- user.visible_message("\red [user] begins to pull something out of [M]'s chest.", "\red You begin to pull the alien organism out of [M]'s chest.")
-
- spawn(20 + rand(0,50))
- if(!A || A.loc != M)
- return
-
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("chest")
- if(affecting.take_damage(30))
- M:UpdateDamageIcon()
- else
- M.take_organ_damage(30)
-
- if(A.stage > 3)
- var/chance = 15 + max(0, A.stage - 3) * 10
- if(prob(chance))
- A.AttemptGrow(0)
- M:alien_op_stage = 4.0
-
- if(M)
- user.visible_message("\red [user] pulls an alien organism out of [M]'s chest.", "\red You pull the alien organism out of [M]'s chest.")
- A.loc = M.loc //alien embryo handles cleanup
-
- else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
- return ..()
-
- return
-*/
-
-/*
- * Hemostat
- */
-/obj/item/weapon/hemostat
- name = "hemostat"
- desc = "You think you have seen this before."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "hemostat"
- m_amt = 5000
- g_amt = 2500
- flags = CONDUCT
- w_class = 2.0
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("attacked", "pinched")
-
-/*
-/obj/item/weapon/hemostat/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- if(!istype(M))
- return
-
- if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
- return ..()
-
- if(user.zone_sel.selecting == "groin")
- if(istype(M, /mob/living/carbon/human))
- switch(M:appendix_op_stage)
- if(1.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [user] is beginning to clamp bleeders in [M]'s abdomen cut open with [src].", 1)
- M << "\red [user] begins to clamp bleeders in your abdomen with [src]!"
- user << "\red You clamp bleeders in [M]'s abdomen with [src]!"
- M:appendix_op_stage = 2.0
- if(4.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [user] is removing [M]'s appendix with [src].", 1)
- M << "\red [user] begins to remove your appendix with [src]!"
- user << "\red You remove [M]'s appendix with [src]!"
- for(var/datum/disease/D in M.viruses)
- if(istype(D, /datum/disease/appendicitis))
- new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(M))
- M:appendix_op_stage = 5.0
- return
- new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(M))
- M:appendix_op_stage = 5.0
- return
-
- if (user.zone_sel.selecting == "eyes")
-
- var/mob/living/carbon/human/H = M
- if(istype(H) && ( \
- (H.head && H.head.flags & HEADCOVERSEYES) || \
- (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
- (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- var/mob/living/carbon/monkey/Mo = M
- if(istype(Mo) && ( \
- (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
- user << "\red You cannot locate any eyes on this creature!"
- return
-
- switch(M.eye_op_stage)
- if(2.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] is having his eyes mended by [user].", 1)
- M << "\red [user] begins to mend your eyes with [src]!"
- user << "\red You mend [M]'s eyes with [src]!"
- else
- user.visible_message( \
- "\red [user] begins to have his eyes mended.", \
- "\red You begin to mend your eyes with [src]!" \
- )
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- if(affecting.take_damage(15))
- M:UpdateDamageIcon()
- M.updatehealth()
- else
- M.take_organ_damage(15)
- M:eye_op_stage = 3.0
-
- else if(user.zone_sel.selecting == "chest")
- if(M:alien_op_stage == 2.0 || M:alien_op_stage == 3.0)
- var/mob/living/carbon/human/H = M
- if(!istype(H))
- return ..()
-
- if(H.wear_suit || H.w_uniform)
- user << "\red You're going to need to remove that suit/jumpsuit first."
- return
-
- user.visible_message("\red [user] begins to dig around in [M]'s chest.", "\red You begin to dig around in [M]'s chest.")
-
- spawn(20 + (M:alien_op_stage == 3 ? 0 : rand(0,50)))
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("chest")
- if(affecting.take_damage(30))
- M:UpdateDamageIcon()
- else
- M.take_organ_damage(30)
-
- var/obj/item/alien_embryo/A = locate() in M.contents
- if(A)
- var/dat = "\blue You found an unknown alien organism in [M]'s chest!"
- if(A.stage < 4)
- dat += " It's small and weak, barely the size of a foetus."
- if(A.stage > 3)
- dat += " It's grown quite large, and writhes slightly as you look at it."
- if(prob(10))
- A.AttemptGrow()
- user << dat
- M:alien_op_stage = 3.0
- else
- user << "\blue You find nothing of interest."
-
- else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
- return ..()
-
- return
-*/
-
-/*
- * Cautery
- */
-/obj/item/weapon/cautery
- name = "cautery"
- desc = "This stops bleeding."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "cautery"
- m_amt = 2500
- g_amt = 750
- flags = CONDUCT
- w_class = 2.0
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("burnt")
-
-/*
-/obj/item/weapon/cautery/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- if(!istype(M))
- return
-
- if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
- return ..()
-
- if(user.zone_sel.selecting == "groin")
- if(istype(M, /mob/living/carbon/human))
- switch(M:appendix_op_stage)
- if(5.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [user] is beginning to cauterize the incision in [M]'s abdomen with [src].", 1)
- M << "\red [user] begins to cauterize the incision in your abdomen with [src]!"
- user << "\red You cauterize the incision in [M]'s abdomen with [src]!"
- M:appendix_op_stage = 6.0
- for(var/datum/disease/appendicitis in M.viruses)
- appendicitis.cure()
- return
-
- if (user.zone_sel.selecting == "eyes")
-
- var/mob/living/carbon/human/H = M
- if(istype(H) && ( \
- (H.head && H.head.flags & HEADCOVERSEYES) || \
- (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
- (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- var/mob/living/carbon/monkey/Mo = M
- if(istype(Mo) && ( \
- (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
- user << "\red You cannot locate any eyes on this creature!"
- return
-
- switch(M.eye_op_stage)
- if(3.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] is having his eyes cauterized by [user].", 1)
- M << "\red [user] begins to cauterize your eyes!"
- user << "\red You cauterize [M]'s eyes with [src]!"
- else
- user.visible_message( \
- "\red [user] begins to have his eyes cauterized.", \
- "\red You begin to cauterize your eyes!" \
- )
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- if(affecting.take_damage(15))
- M:UpdateDamageIcon()
- M.updatehealth()
- else
- M.take_organ_damage(15)
- M.sdisabilities &= ~BLIND
- M.eye_stat = 0
- M:eye_op_stage = 0.0
-
- else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
- return ..()
-
- return
-*/
-
-/*
- * Surgical Drill
- */
-/obj/item/weapon/surgicaldrill
- name = "surgical drill"
- desc = "You can drill using this item. You dig?"
- icon = 'icons/obj/surgery.dmi'
- icon_state = "drill"
- hitsound = 'sound/weapons/circsawhit.ogg'
- m_amt = 10000
- g_amt = 6000
- flags = CONDUCT
- force = 15.0
- w_class = 2.0
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("drilled")
-
- suicide_act(mob/user)
- viewers(user) << pick("\red [user] is pressing the [src.name] to \his temple and activating it! It looks like \he's trying to commit suicide.", \
- "\red [user] is pressing [src.name] to \his chest and activating it! It looks like \he's trying to commit suicide.")
- return (BRUTELOSS)
-
-/*
- * Scalpel
- */
-/obj/item/weapon/scalpel
- name = "scalpel"
- desc = "Cut, cut, and once more cut."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "scalpel"
- flags = CONDUCT
- force = 10.0
- sharp = 1
- edge = 1
- w_class = 2.0
- throwforce = 5.0
- throw_speed = 3
- throw_range = 5
- m_amt = 4000
- g_amt = 1000
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
-
- suicide_act(mob/user)
- viewers(user) << pick("\red [user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.", \
- "\red [user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.", \
- "\red [user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.")
- return (BRUTELOSS)
-
-/*
-/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- if(!istype(M))
- return ..()
-
- //if(M.mutations & HUSK) return ..()
-
- if((CLUMSY in user.mutations) && prob(50))
- M = user
- return eyestab(M,user)
-
- if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
- return ..()
-
- src.add_fingerprint(user)
-
- if(user.zone_sel.selecting == "groin")
- if(istype(M, /mob/living/carbon/human))
- switch(M:appendix_op_stage)
- if(0.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] is beginning to have his abdomen cut open with [src] by [user].", 1)
- M << "\red [user] begins to cut open your abdomen with [src]!"
- user << "\red You cut [M]'s abdomen open with [src]!"
- M:appendix_op_stage = 1.0
- if(3.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] is beginning to have his appendix seperated with [src] by [user].", 1)
- M << "\red [user] begins to seperate your appendix with [src]!"
- user << "\red You seperate [M]'s appendix with [src]!"
- M:appendix_op_stage = 4.0
- return
-
- if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/slime))
-
- var/mob/living/carbon/human/H = M
- if(istype(H) && ( \
- (H.head && H.head.flags & HEADCOVERSEYES) || \
- (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
- (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- var/mob/living/carbon/monkey/Mo = M
- if(istype(Mo) && ( \
- (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- switch(M:brain_op_stage)
- if(0.0)
- if(istype(M, /mob/living/carbon/slime))
- if(M.stat == 2)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M.name] is beginning to have its flesh cut open with [src] by [user].", 1)
- M << "\red [user] begins to cut open your flesh with [src]!"
- user << "\red You cut [M]'s flesh open with [src]!"
- M:brain_op_stage = 1.0
-
- return
-
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] is beginning to have his head cut open with [src] by [user].", 1)
- M << "\red [user] begins to cut open your head with [src]!"
- user << "\red You cut [M]'s head open with [src]!"
- else
- user.visible_message( \
- "\red [user] begins to cut open his skull with [src]!", \
- "\red You begin to cut open your head with [src]!" \
- )
-
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- if(affecting.take_damage(15))
- M:UpdateDamageIcon()
- else
- M.take_organ_damage(15)
-
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- affecting.take_damage(7)
- else
- M.take_organ_damage(7)
-
- M.updatehealth()
- M:brain_op_stage = 1.0
-
- if(1)
- if(istype(M, /mob/living/carbon/slime))
- if(M.stat == 2)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M.name] is having its silky innards cut apart with [src] by [user].", 1)
- M << "\red [user] begins to cut apart your innards with [src]!"
- user << "\red You cut [M]'s silky innards apart with [src]!"
- M:brain_op_stage = 2.0
- return
- if(2.0)
- if(istype(M, /mob/living/carbon/slime))
- if(M.stat == 2)
- var/mob/living/carbon/slime/slime = M
- if(slime.cores > 0)
- if(istype(M, /mob/living/carbon/slime))
- user << "\red You attempt to remove [M]'s core, but [src] is ineffective!"
- return
-
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] is having his connections to the brain delicately severed with [src] by [user].", 1)
- M << "\red [user] begins to cut open your head with [src]!"
- user << "\red You cut [M]'s head open with [src]!"
- else
- user.visible_message( \
- "\red [user] begin to delicately remove the connections to his brain with [src]!", \
- "\red You begin to cut open your head with [src]!" \
- )
- if(M == user && prob(25))
- user << "\red You nick an artery!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- if(affecting.take_damage(75))
- M:UpdateDamageIcon()
- else
- M.take_organ_damage(75)
-
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- affecting.take_damage(7)
- else
- M.take_organ_damage(7)
-
- M.updatehealth()
- M:brain_op_stage = 3.0
- else
- ..()
- return
-
- else if(user.zone_sel.selecting == "eyes")
- user << "\blue So far so good."
-
- var/mob/living/carbon/human/H = M
- if(istype(H) && ( \
- (H.head && H.head.flags & HEADCOVERSEYES) || \
- (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
- (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- var/mob/living/carbon/monkey/Mo = M
- if(istype(Mo) && ( \
- (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N
- user << "\red You cannot locate any eyes on this creature!"
- return
-
- switch(M:eye_op_stage)
- if(0.0)
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] is beginning to have his eyes incised with [src] by [user].", 1)
- M << "\red [user] begins to cut open your eyes with [src]!"
- user << "\red You make an incision around [M]'s eyes with [src]!"
- else
- user.visible_message( \
- "\red [user] begins to cut around his eyes with [src]!", \
- "\red You begin to cut open your eyes with [src]!" \
- )
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- if(affecting.take_damage(15))
- M:UpdateDamageIcon()
- else
- M.take_organ_damage(15)
-
- user << "\blue So far so good before."
- M.updatehealth()
- M:eye_op_stage = 1.0
- user << "\blue So far so good after."
-
- else if(user.zone_sel.selecting == "chest")
- switch(M:alien_op_stage)
- if(0.0)
- var/mob/living/carbon/human/H = M
- if(!istype(H))
- return ..()
-
- if(H.wear_suit || H.w_uniform)
- user << "\red You're going to need to remove that suit/jumpsuit first."
- return
-
- user.visible_message("\red [user] begins to slice open [M]'s chest.", "\red You begin to slice open [M]'s chest.")
-
- spawn(rand(20,50))
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("chest")
- if(affecting.take_damage(15))
- M:UpdateDamageIcon()
- else
- M.take_organ_damage(15)
-
- M:alien_op_stage = 1.0
- user << "\blue So far so good."
-
- else
- return ..()
-/* wat
- else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
- return ..()*/
- return
-*/
-
-/*
- * Circular Saw
- */
-/obj/item/weapon/circular_saw
- name = "circular saw"
- desc = "For heavy duty cutting."
- icon = 'icons/obj/surgery.dmi'
- icon_state = "saw3"
- hitsound = 'sound/weapons/circsawhit.ogg'
- flags = CONDUCT
- force = 15.0
- w_class = 2.0
- throwforce = 9.0
- throw_speed = 3
- throw_range = 5
- m_amt = 10000
- g_amt = 6000
- origin_tech = "materials=1;biotech=1"
- attack_verb = list("attacked", "slashed", "sawed", "cut")
- sharp = 1
- edge = 1
-
-/*
-/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- if(!istype(M))
- return ..()
-
- if((CLUMSY in user.mutations) && prob(50))
- M = user
- return eyestab(M,user)
-
- if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
- return ..()
-
- src.add_fingerprint(user)
-
- if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/slime))
-
- var/mob/living/carbon/human/H = M
- if(istype(H) && ( \
- (H.head && H.head.flags & HEADCOVERSEYES) || \
- (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
- (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- var/mob/living/carbon/monkey/Mo = M
- if(istype(Mo) && ( \
- (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
- ))
- user << "\red You're going to need to remove that mask/helmet/glasses first."
- return
-
- switch(M:brain_op_stage)
- if(1.0)
- if(istype(M, /mob/living/carbon/slime))
- return
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] has his skull sawed open with [src] by [user].", 1)
- M << "\red [user] begins to saw open your head with [src]!"
- user << "\red You saw [M]'s head open with [src]!"
- else
- user.visible_message( \
- "\red [user] saws open his skull with [src]!", \
- "\red You begin to saw open your head with [src]!" \
- )
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- if(affecting.take_damage(40))
- M:UpdateDamageIcon()
- M.updatehealth()
- else
- M.take_organ_damage(40)
-
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("head")
- affecting.take_damage(7)
- else
- M.take_organ_damage(7)
-
- M.updatehealth()
- M:brain_op_stage = 2.0
-
- if(2.0)
- if(istype(M, /mob/living/carbon/slime))
- if(M.stat == 2)
- var/mob/living/carbon/slime/slime = M
- if(slime.cores > 0)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M.name] is having one of its cores sawed out with [src] by [user].", 1)
-
- slime.cores--
- M << "\red [user] begins to remove one of your cores with [src]! ([slime.cores] cores remaining)"
- user << "\red You cut one of [M]'s cores out with [src]! ([slime.cores] cores remaining)"
-
- new slime.coretype(M.loc)
-
- if(slime.cores <= 0)
- M.icon_state = "[slime.colour] baby slime dead-nocore"
-
- return
-
- if(3.0)
- /*if(M.mind && M.mind.changeling)
- user << "\red The neural tissue regrows before your eyes as you cut it."
- return*/
-
- if(M != user)
- for(var/mob/O in (viewers(M) - user - M))
- O.show_message("\red [M] has his spine's connection to the brain severed with [src] by [user].", 1)
- M << "\red [user] severs your brain's connection to the spine with [src]!"
- user << "\red You sever [M]'s brain's connection to the spine with [src]!"
- else
- user.visible_message( \
- "\red [user] severs his brain's connection to the spine with [src]!", \
- "\red You sever your brain's connection to the spine with [src]!" \
- )
-
- user.attack_log += "\[[time_stamp()]\] Debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
- M.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
-
- log_attack("[user.name] ([user.ckey]) debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
-
-
- var/obj/item/brain/B = new()
- M.put_in_hands(B)
- B.transfer_identity(M)
-
- M:brain_op_stage = 4.0
- M.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
-
- else
- ..()
- return
-
- else if(user.zone_sel.selecting == "chest")
- switch(M:alien_op_stage)
- if(1.0)
- var/mob/living/carbon/human/H = M
- if(!istype(H))
- return ..()
-
- if(H.wear_suit || H.w_uniform)
- user << "\red You're going to need to remove that suit/jumpsuit first."
- return
-
- user.visible_message("\red [user] begins to slice through the bone of [M]'s chest.", "\red You begin to slice through the bone of [M]'s chest.")
-
- spawn(20 + rand(0,50))
- if(M == user && prob(25))
- user << "\red You mess up!"
- if(istype(M, /mob/living/carbon/human))
- var/obj/item/organ/external/affecting = M:get_organ("chest")
- if(affecting.take_damage(15))
- M:UpdateDamageIcon()
- else
- M.take_organ_damage(15)
-
- M:alien_op_stage = 2.0
- user << "\blue So far so good."
-
- else
- return ..()
-/*
- else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
- return ..()
-*/
- return
-*/
-
-//misc, formerly from code/defines/weapons.dm
-/obj/item/weapon/bonegel
- name = "bone gel"
- icon = 'icons/obj/surgery.dmi'
- icon_state = "bone-gel"
- force = 0
- w_class = 2.0
- throwforce = 1.0
-
-/obj/item/weapon/FixOVein
- name = "FixOVein"
- icon = 'icons/obj/surgery.dmi'
- icon_state = "fixovein"
- force = 0
- throwforce = 1.0
- origin_tech = "materials=1;biotech=3"
- w_class = 2.0
- var/usage_amount = 10
-
-/obj/item/weapon/bonesetter
- name = "bone setter"
- icon = 'icons/obj/surgery.dmi'
- icon_state = "bone setter"
- force = 8.0
- throwforce = 9.0
- throw_speed = 3
- throw_range = 5
- w_class = 2.0
- attack_verb = list("attacked", "hit", "bludgeoned")
diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm
index 70f7a8235a4..6ed37dac59f 100644
--- a/code/game/objects/items/weapons/tanks/tank_types.dm
+++ b/code/game/objects/items/weapons/tanks/tank_types.dm
@@ -95,7 +95,6 @@
/obj/item/weapon/tank/plasma/New()
..()
-
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -110,6 +109,12 @@
F.ptank = src
user.unEquip(src)
src.loc = F
+ F.update_icon()
+ return
+
+/obj/item/weapon/tank/plasma/full/New()
+ ..()
+ src.air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/plasma/plasmaman
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 5f4cfbe49c9..6cb621d8cce 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -117,14 +117,15 @@
icon_state = "cutters-y"
item_state = "cutters_yellow"
-/obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
- if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable)))
- usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
- "You cut \the [C]'s restraints with \the [src]!",\
- "You hear cable being cut.")
- C.handcuffed = null
- C.update_inv_handcuffed()
- return
+/obj/item/weapon/wirecutters/attack(mob/living/carbon/human/C as mob, mob/user as mob)
+ if(C.handcuffed)
+ if(istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
+ usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
+ "You cut \the [C]'s restraints with \the [src]!",\
+ "You hear cable being cut.")
+ C.handcuffed = null
+ C.update_inv_handcuffed()
+ return
else
..()
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 168134c6591..31ff44b64f1 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -17,10 +17,12 @@
var/damtype = "brute"
var/force = 0
+ var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it
+
// What reagents should be logged when transferred TO this object?
// Reagent ID => friendly name
var/list/reagents_to_log=list()
-
+
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state = default_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
@@ -161,3 +163,85 @@
mo.show_message(rendered, 2)
*/
return
+
+/obj/proc/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
+ return "NO MULTITOOL_MENU!"
+
+/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/link/context)
+ return 0
+
+/obj/proc/unlinkFrom(var/mob/user, var/obj/buffer)
+ return 0
+
+/obj/proc/canLink(var/obj/O, var/link/context)
+ return 0
+
+/obj/proc/isLinkedWith(var/obj/O)
+ return 0
+
+/obj/proc/getLink(var/idx)
+ return null
+
+/obj/proc/linkMenu(var/obj/O)
+ var/dat=""
+ if(canLink(O, list()))
+ dat += " \[Link\] "
+ return dat
+
+/obj/proc/format_tag(var/label,var/varname, var/act="set_tag")
+ var/value = vars[varname]
+ if(!value || value=="")
+ value="-----"
+ return "[label]:[value]"
+
+
+/obj/proc/update_multitool_menu(mob/user as mob)
+ var/obj/item/device/multitool/P = get_multitool(user)
+
+ if(!istype(P))
+ return 0
+ var/dat = {"
+
+ [name] Configuration
+
+
+
+
[name]
+"}
+ if(allowed(user))//no, assistants, you're not ruining all vents on the station with just a multitool
+ dat += multitool_menu(user,P)
+ if(Mtoollink)
+ if(P)
+ if(P.buffer)
+ var/id = null
+ if(istype(P.buffer, /obj/machinery/telecomms))
+ id=P.buffer:id
+ else if("id_tag" in P.buffer.vars)
+ id=P.buffer:id_tag
+ dat += "
MULTITOOL BUFFER: [P.buffer] [id ? "([id])" : ""]"
+
+ dat += linkMenu(P.buffer)
+
+ if(P.buffer)
+ dat += "\[Flush\]"
+ dat += "
+ "}
+
+/obj/machinery/power/emitter/receive_signal(datum/signal/signal)
+ if(!signal.data["tag"] || (signal.data["tag"] != id_tag))
+ return 0
+
+ var/on=0
+ switch(signal.data["command"])
+ if("on")
+ on=1
+
+ if("off")
+ on=0
+
+ if("set")
+ on = signal.data["state"] > 0
+
+ if("toggle")
+ on = !active
+
+ if(anchored && state == 2 && on != active)
+ active=on
+ var/statestr=on?"on":"off"
+ // Spammy message_admins("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in [formatJumpTo(src)]",0,1)
+ log_game("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in ([x],[y],[z]) AAC prints: [list2text(signal.data["hiddenprints"])]")
+ investigate_log("turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) AAC prints: [list2text(signal.data["hiddenprints"])]","singulo")
+ update_icon()
/obj/machinery/power/emitter/Destroy()
msg_admin_attack("Emitter deleted at ([x],[y],[z] - JMP)",0,1)
@@ -145,6 +191,9 @@
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user, params)
+ if(istype(W, /obj/item/device/multitool))
+ update_multitool_menu(user)
+ return 1
if(istype(W, /obj/item/weapon/wrench))
if(active)
diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm
index e0064fec12e..594116bb805 100644
--- a/code/modules/reagents/Chemistry-Holder.dm
+++ b/code/modules/reagents/Chemistry-Holder.dm
@@ -488,7 +488,7 @@ datum
R.holder = src
R.volume = amount
// SetViruses(R, data) // Includes setting data
- R.data = data
+ if(data) R.data = data
//debug
//world << "Adding data"
//for(var/D in R.data)
diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/newchem/medicine.dm
index bac4521f8ed..a4f712ba524 100644
--- a/code/modules/reagents/newchem/medicine.dm
+++ b/code/modules/reagents/newchem/medicine.dm
@@ -106,7 +106,7 @@ datum/reagent/charcoal
id = "charcoal"
description = "Activated charcoal helps to absorb toxins."
reagent_state = LIQUID
- color = "#C8A5DC"
+ color = "#000000"
datum/reagent/charcoal/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm
index 8034ef5a956..22b2afbe0ca 100644
--- a/code/modules/reagents/reagent_containers/food/drinks.dm
+++ b/code/modules/reagents/reagent_containers/food/drinks.dm
@@ -372,3 +372,30 @@
desc = "A cup with the british flag emblazoned on it."
icon_state = "britcup"
volume = 30
+
+/obj/item/weapon/reagent_containers/food/drinks/flask/hand_made
+ name = "handmade flask"
+ desc = "A wooden flask with a silver lid and bottom. It has a matte, dark blue paint on it with the initials \"W.H.\" etched in black."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "williamhackett"
+
+/obj/item/weapon/reagent_containers/food/drinks/flask/thermos
+ name = "vintage thermos"
+ desc = "An older thermos with a faint shine."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "johann_erzatz_1"
+ volume = 50
+
+/obj/item/weapon/reagent_containers/food/drinks/flask/shiny
+ name = "shiny flask"
+ desc = "A shiny metal flask. It appears to have a Greek symbol inscribed on it."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "shinyflask"
+ volume = 50
+
+/obj/item/weapon/reagent_containers/food/drinks/flask/lithium
+ name = "Lithium Flask"
+ desc = "A flask with a Lithium Atom symbol on it."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "lithiumflask"
+ volume = 50
\ No newline at end of file
diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm
index 96b6797000d..87e413565a7 100644
--- a/code/modules/research/designs.dm
+++ b/code/modules/research/designs.dm
@@ -60,4 +60,3 @@ other types of metals and chemistry for reagents).
new_reliability = Clamp(new_reliability, reliability, 100)
reliability = new_reliability
return
-
\ No newline at end of file
diff --git a/code/modules/research/designs/comp_board_designs.dm b/code/modules/research/designs/comp_board_designs.dm
index cfbb5c8002f..cb1f976ea13 100644
--- a/code/modules/research/designs/comp_board_designs.dm
+++ b/code/modules/research/designs/comp_board_designs.dm
@@ -340,4 +340,31 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/teleporter
- category = list("Computer Boards")
\ No newline at end of file
+ category = list("Computer Boards")
+
+datum/design/GAC
+ name = "Circuit Design (General Air Control)"
+ desc = "Allows for the construction of circuit boards used to build a General Air Control Computer."
+ id = "GAC"
+ req_tech = list("programming" = 3, "magnets" = 2)
+ build_type = IMPRINTER
+ materials = list("$glass" = 1000, "sacid" = 20)
+ build_path = "/obj/item/weapon/circtuiboard/air_management"
+
+datum/design/tank_control
+ name = "Circuit Design (Large Tank Control)"
+ desc = "Allows for the construction of circuit boards used to build a Large Tank Control Computer."
+ id = "tankcontrol"
+ req_tech = list("programming" = 3, "magnets" = 2)
+ build_type = IMPRINTER
+ materials = list("$glass" = 1000, "sacid" = 20)
+ build_path = "/obj/item/weapon/circtuiboard/general_air_control/large_tank_control"
+
+datum/design/AAC
+ name = "Circuit Design (Atmospheric Automations Console)"
+ desc = "Allows for the construction of circuit boards used to build an Atmospheric Autmations Console."
+ id = "AAC"
+ req_tech = list("programming" = 4, "magnets" = 2)
+ build_type = IMPRINTER
+ materials = list("$glass" = 1000, "sacid" = 20)
+ build_path = "/obj/item/weapon/circtuiboard/general_air_control/atmos_automation"
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 02fc7f371f5..f9cb57a852d 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -34,7 +34,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole
name = "R&D Console"
icon_state = "rdcomp"
- light_color = "#a97faa"
+ light_color = LIGHT_COLOR_FADEDPURPLE
circuit = /obj/item/weapon/circuitboard/rdconsole
var/datum/research/files //Stores all the collected research data.
var/obj/item/weapon/disk/tech_disk/t_disk = null //Stores the technology disk.
diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm
index ac693cf293d..b8ef753c4ac 100644
--- a/code/modules/research/server.dm
+++ b/code/modules/research/server.dm
@@ -181,7 +181,7 @@
/obj/machinery/computer/rdservercontrol
name = "R&D Server Controller"
icon_state = "rdcomp"
- light_color = "#a96faa"
+ light_color = LIGHT_COLOR_FADEDPURPLE
circuit = /obj/item/weapon/circuitboard/rdservercontrol
var/screen = 0
var/obj/machinery/r_n_d/server/temp_server
diff --git a/code/modules/shuttles/whiteship.dm b/code/modules/shuttles/whiteship.dm
index 2a27c2d2c90..938f2926869 100644
--- a/code/modules/shuttles/whiteship.dm
+++ b/code/modules/shuttles/whiteship.dm
@@ -3,7 +3,7 @@
req_access = list()
shuttle_tag = "White Ship"
circuit = "/obj/item/weapon/circuitboard/white_ship"
- light_color = "#CC0000"
+ light_color = LIGHT_COLOR_DARKRED
/obj/machinery/computer/shuttle_control/multi/whiteship/attack_ai(user as mob)
user << "\red Access Denied."
diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm
index a1844d19760..7d8a81ad3ef 100644
--- a/code/modules/supermatter/supermatter.dm
+++ b/code/modules/supermatter/supermatter.dm
@@ -1,23 +1,35 @@
-#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more
-#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
-#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction
-#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
-#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
+#define NITROGEN_RETARDATION_FACTOR 0.15 //Higher == N2 slows reaction more
+#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
+#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction
+#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
+#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
+
+/*
+ How to tweak the SM
+
+ POWER_FACTOR directly controls how much power the SM puts out at a given level of excitation (power var). Making this lower means you have to work the SM harder to get the same amount of power.
+ CRITICAL_TEMPERATURE The temperature at which the SM starts taking damage.
+
+ CHARGING_FACTOR Controls how much emitter shots excite the SM.
+ DAMAGE_RATE_LIMIT Controls the maximum rate at which the SM will take damage due to high temperatures.
+*/
//Controls how much power is produced by each collector in range - this is the main parameter for tweaking SM balance, as it basically controls how the power variable relates to the rest of the game.
-#define POWER_FACTOR 0.35 //Obtained from testing. Aiming to make the ideal running output (600 kW) run the SM to ~85% of the safety level.
-
-#define CHARGING_FACTOR 0.55
-#define DAMAGE_RATE_LIMIT 5 //damage rate cap at power = 900, scales linearly with power
+#define POWER_FACTOR 1.0
+#define DECAY_FACTOR 700 //Affects how fast the supermatter power decays
+#define CRITICAL_TEMPERATURE 800 //K
+#define CHARGING_FACTOR 0.05
+#define DAMAGE_RATE_LIMIT 3 //damage rate cap at power = 300, scales linearly with power
//These would be what you would get at point blank, decreases with distance
#define DETONATION_RADS 200
#define DETONATION_HALLUCINATION 600
+#define TRANSFORM_DISTANCE_MOD 2 // Size/this is maximum distance from SM during burst for transformation to Nucleation
-#define WARNING_DELAY 30 //seconds between warnings.
+#define WARNING_DELAY 30 //seconds between warnings.
/obj/machinery/power/supermatter
name = "Supermatter"
@@ -35,6 +47,7 @@
var/damage = 0
var/damage_archived = 0
var/safe_alert = "Crystaline hyperstructure returning to safe operating levels."
+ var/safe_warned = 0
var/warning_point = 100
var/warning_alert = "Danger! Crystal hyperstructure instability!"
var/emergency_point = 700
@@ -47,15 +60,20 @@
var/grav_pulling = 0
var/pull_radius = 14
+ // Time in ticks between delamination ('exploding') and exploding (as in the actual boom)
+ var/pull_time = 100
+ var/explosion_power = 8
var/emergency_issued = 0
- var/explosion_power = 8
+ // Time in 1/10th of seconds since the last sent warning
+ var/lastwarning = 0
+
+ // This stops spawning redundand explosions. Also incidentally makes supermatter unexplodable if set to 1.
+ var/exploded = 0
- var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning
var/power = 0
-
- var/oxygen = 0 // Moving this up here for easier debugging.
+ var/oxygen = 0
//Temporary values so that we can optimize this
//How much the bullets damage should be multiplied by when it is added to the internal variables
@@ -67,21 +85,7 @@
var/obj/item/device/radio/radio
- shard //Small subtype, less efficient and more sensitive, but less boom.
- name = "Supermatter Shard"
- desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. \red You get headaches just from looking at it."
- icon_state = "darkmatter_shard"
- base_icon_state = "darkmatter_shard"
-
- warning_point = 50
- emergency_point = 500
- explosion_point = 900
-
- gasefficency = 0.125
-
- pull_radius = 5
- explosion_power = 3 //3,6,9,12? Or is that too small?
-
+ var/debug = 0
/obj/machinery/power/supermatter/New()
. = ..()
@@ -93,17 +97,46 @@
. = ..()
/obj/machinery/power/supermatter/proc/explode()
+ message_admins("Supermatter exploded at ([x],[y],[z] - JMP)",0,1)
+ log_game("Supermatter exploded at ([x],[y],[z])")
anchored = 1
grav_pulling = 1
- spawn(100)
- explosion(get_turf(src), explosion_power, explosion_power * 2, explosion_power * 3, explosion_power * 4, 1)
+ exploded = 1
+ spawn(pull_time)
+ var/turf/epicenter = get_turf(src)
+ explosion(epicenter, explosion_power, explosion_power*2, explosion_power*3, explosion_power*4, 1)
+ supermatter_delamination( epicenter, explosion_power*4, 1 )
del src
return
-//Changes color and luminosity of the light to these values if they were not already set
+//Changes color and light_range of the light to these values if they were not already set
/obj/machinery/power/supermatter/proc/shift_light(var/lum, var/clr)
- if(lum != light_range || clr != light_color)
- set_light(lum, l_color = clr)
+ if(light_color != clr)
+ light_color = clr
+ if(light_range != lum)
+ set_light(lum)
+
+/obj/machinery/power/supermatter/proc/announce_warning()
+ var/integrity = damage / explosion_point
+ integrity = round(100 - integrity * 100)
+ integrity = integrity < 0 ? 0 : integrity
+ var/alert_msg = " Integrity at [integrity]%"
+
+ if(damage > emergency_point)
+ alert_msg = emergency_alert + alert_msg
+ lastwarning = world.timeofday - WARNING_DELAY * 4
+ else if(damage >= damage_archived) // The damage is still going up
+ safe_warned = 0
+ alert_msg = warning_alert + alert_msg
+ lastwarning = world.timeofday
+ else if(!safe_warned)
+ safe_warned = 1 // We are safe, warn only once
+ alert_msg = safe_alert
+ lastwarning = world.timeofday
+ else
+ alert_msg = null
+ if(alert_msg)
+ radio.autosay(alert_msg, "Supermatter Monitor")
/obj/machinery/power/supermatter/process()
@@ -115,105 +148,85 @@
if(!istype(L)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
return //Yeah just stop.
- if(istype(L, /turf/space)) // Stop processing this stuff if we've been ejected.
- return
-
- if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
-
- shift_light(5, warning_color)
- if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY)
- var/stability = num2text(round((damage / explosion_point) * 100))
-
- if(damage > emergency_point)
- shift_light(7, emergency_color)
- radio.autosay(addtext(emergency_alert, " Instability: ",stability,"%"), "Supermatter Monitor")
- lastwarning = world.timeofday
-
- else if(damage >= damage_archived) // The damage is still going up
- radio.autosay(addtext(warning_alert," Instability: ",stability,"%"), "Supermatter Monitor")
- lastwarning = world.timeofday - 150
-
- else // Phew, we're safe
- radio.autosay(safe_alert, "Supermatter Monitor")
- lastwarning = world.timeofday
-
- if(damage > explosion_point)
- for(var/mob/living/mob in living_mob_list)
- if(loc.z == mob.loc.z)
- if(istype(mob, /mob/living/carbon/human))
- //Hilariously enough, running into a closet should make you get hit the hardest.
- var/mob/living/carbon/human/H = mob
- H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
- var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
- mob.apply_effect(rads, IRRADIATE)
-
+ if(damage > explosion_point)
+ if(!exploded)
+ if(!istype(L, /turf/space))
+ announce_warning()
explode()
+ else if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
+ shift_light(5, warning_color)
+ if(damage > emergency_point)
+ shift_light(7, emergency_color)
+ if(!istype(L, /turf/space) && (world.timeofday - lastwarning) >= WARNING_DELAY * 10)
+ announce_warning()
else
shift_light(4,initial(light_color))
if(grav_pulling)
supermatter_pull()
- //Ok, get the air from the turf
- var/datum/gas_mixture/env = L.return_air()
+ //Ok, get the air from the turf
+ var/datum/gas_mixture/removed = null
+ var/datum/gas_mixture/env = null
- //Remove gas from surrounding area
- var/datum/gas_mixture/removed = env.remove(gasefficency * env.total_moles())
+ //ensure that damage doesn't increase too quickly due to super high temperatures resulting from no coolant, for example. We dont want the SM exploding before anyone can react.
+ //We want the cap to scale linearly with power (and explosion_point). Let's aim for a cap of 5 at power = 300 (based on testing, equals roughly 5% per SM alert announcement).
+ var/damage_inc_limit = (power/300)*(explosion_point/1000)*DAMAGE_RATE_LIMIT
- if(!removed || !removed.total_moles())
- damage += max((power-1600)/10, 0)
- power = min(power, 1600)
- return 1
+ if(!istype(L, /turf/space))
+ env = L.return_air()
+ removed = env.remove(gasefficency * env.total_moles()) //Remove gas from surrounding area
- damage_archived = damage
- damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 )
- //Ok, 100% oxygen atmosphere = best reaction
- //Maxes out at 100% oxygen pressure
- oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
-
- var/temp_factor = 50
-
- if(oxygen > 0.8)
- // with a perfect gas mix, make the power less based on heat
- icon_state = "[base_icon_state]_glow"
+ if(!env || !removed || !removed.total_moles())
+ damage += max((power - 15*POWER_FACTOR)/10, 0)
+ else if (grav_pulling) //If supermatter is detonating, remove all air from the zone
+ env.remove(env.total_moles())
else
- // in normal mode, base the produced energy around the heat
- temp_factor = 30
- icon_state = base_icon_state
+ damage_archived = damage
- power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
+ damage = max( damage + min( ( (removed.temperature - CRITICAL_TEMPERATURE) / 150 ), damage_inc_limit ) , 0 )
+ //Ok, 100% oxygen atmosphere = best reaction
+ //Maxes out at 100% oxygen pressure
+ oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / removed.total_moles(), 1), 0)
- //We've generated power, now let's transfer it to the collectors for storing/usage
- transfer_energy()
+ //calculate power gain for oxygen reaction
+ var/temp_factor
+ var/equilibrium_power
+ if (oxygen > 0.8)
+ //If chain reacting at oxygen == 1, we want the power at 800 K to stabilize at a power level of 400
+ equilibrium_power = 400
+ icon_state = "[base_icon_state]_glow"
+ else
+ //If chain reacting at oxygen == 1, we want the power at 800 K to stabilize at a power level of 250
+ equilibrium_power = 250
+ icon_state = base_icon_state
- var/device_energy = power * REACTION_POWER_MODIFIER
+ temp_factor = ( (equilibrium_power/DECAY_FACTOR)**3 )/800
+ power = max( (removed.temperature * temp_factor) * oxygen + power, 0)
- //To figure out how much temperature to add each tick, consider that at one atmosphere's worth
- //of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
- //that the device energy is around 2140. At that stage, we don't want too much heat to be put out
- //Since the core is effectively "cold"
+ //We've generated power, now let's transfer it to the collectors for storing/usage
+ transfer_energy()
- //Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
- //is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
- removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER)
+ var/device_energy = power * REACTION_POWER_MODIFIER
- removed.temperature = max(0, min(removed.temperature, 2500))
- //Calculate how much gas to release
- removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
+ //Calculate how much gas to release
+ removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
- removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
+ removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
- env.merge(removed)
+ env.merge(removed)
- for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them.
+
+ for(var/mob/living/carbon/human/l in view(src, min(7, round(sqrt(power/6))))) // If they can see it without mesons on. Bad on them.
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
- l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1, get_dist(l, src)) ) ) )
+ l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) )
- for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
- var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) )
- l.apply_effect(irradiate=rads)
+ //adjusted range so that a power of 300 (pretty high) results in 8 tiles, roughly the distance from the core to the engine monitoring room.
+ for(var/mob/living/l in range(src, round(sqrt(power / 5))))
+ var/rads = (power / 10) * sqrt( 1 / get_dist(l, src) )
+ l.apply_effect(rads, IRRADIATE)
- power -= (power/500)**3
+ power -= (power/DECAY_FACTOR)**3 //energy losses due to radiation
return 1
@@ -225,17 +238,12 @@
// Then bring it inside to explode instantly upon landing on a valid turf.
- if(Proj.flag != "bullet")
- power += Proj.damage * config_bullet_energy * CHARGING_FACTOR
+ if(istype(Proj, /obj/item/projectile/beam))
+ power += Proj.damage * config_bullet_energy * CHARGING_FACTOR / POWER_FACTOR
else
damage += Proj.damage * config_bullet_energy
return 0
-
-/obj/machinery/power/supermatter/attack_paw(mob/user as mob)
- return attack_hand(user)
-
-
/obj/machinery/power/supermatter/attack_robot(mob/user as mob)
if(Adjacent(user))
return attack_hand(user)
@@ -247,6 +255,9 @@
user << "You attempt to interface with the control circuits but find they are not connected to your network. Maybe in a future firmware update."
/obj/machinery/power/supermatter/attack_hand(mob/user as mob)
+ if(istype(user,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
+ return
+
user.visible_message("\The [user] reaches out and touches \the [src], inducing a resonance... \his body starts to glow and bursts into flames before flashing into ash.",\
"You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"",\
"You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")
@@ -255,11 +266,13 @@
/obj/machinery/power/supermatter/proc/transfer_energy()
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
- if(get_dist(R, src) <= 15) // Better than using orange() every process
- R.receive_pulse(power * POWER_FACTOR)
+ var/distance = get_dist(R, src)
+ if(distance <= 15)
+ //for collectors using standard plasma tanks at 1013 kPa, the actual power generated will be this power*POWER_FACTOR*20*29 = power*POWER_FACTOR*580
+ R.receive_pulse(power * POWER_FACTOR * (min(3/distance, 1))**2)
return
-/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params)
+/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
user.visible_message("\The [user] touches \a [W] to \the [src] as a silence fills the room...",\
"You touch \the [W] to \the [src] when everything suddenly goes silent.\"\n\The [W] flashes into dust as you flinch away from \the [src].",\
"Everything suddenly goes silent.")
@@ -272,6 +285,8 @@
/obj/machinery/power/supermatter/Bumped(atom/AM as mob|obj)
if(istype(AM, /mob/living))
+ if(istype(AM,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
+ return
AM.visible_message("\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.",\
"You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"",\
"You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")
@@ -283,6 +298,9 @@
/obj/machinery/power/supermatter/proc/Consume(var/mob/living/user)
+ if(istype(user,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
+ return
+
if(istype(user))
user.dust()
power += 200
@@ -299,11 +317,10 @@
else
l.show_message("You hear an uneartly ringing and notice your skin is covered in fresh radiation burns.", 2)
var/rads = 500 * sqrt( 1 / (get_dist(l, src) + 1) )
- l.apply_effect(rads, IRRADIATE, 0) // Permit blocking
+ l.apply_effect(rads, IRRADIATE)
/obj/machinery/power/supermatter/proc/supermatter_pull()
-
//following is adapted from singulo code
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
@@ -335,4 +352,110 @@
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
- return
\ No newline at end of file
+ return
+
+
+proc/supermatter_delamination(var/turf/epicenter, var/size, var/transform_mobs = 0, var/adminlog = 1)
+ spawn(0)
+ var/start = world.timeofday
+ epicenter = get_turf(epicenter)
+ if(!epicenter) return
+
+ if(adminlog)
+ message_admins("Supermatter delamination with size ([size]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z] - JMP)")
+ log_game("Supermatter delamination with size ([size]) in area [epicenter.loc.name] ")
+
+ playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(size*2,1) )
+ playsound(epicenter, "explosion", 100, 1, round(size,1) )
+
+ if(defer_powernet_rebuild != 2)
+ defer_powernet_rebuild = 1
+
+ var/x = epicenter.x
+ var/y = epicenter.y
+ var/z = epicenter.z
+
+ epicenter.ChangeTurf( /turf/simulated/floor/plating/smatter )
+
+ for(var/mob/living/mob in orange( epicenter, size*2 )) // Irradiate area twice the size of the main blast
+ if(epicenter.z == mob.loc.z)
+ if( ishuman(mob) )
+ //Hilariously enough, running into a closet should make you get hit the hardest.
+ var/mob/living/carbon/human/H = mob
+ H.hallucination += max(50, min(size*10, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, epicenter) + 1)) ) )
+ var/rads = size*10 * sqrt( 1 / (get_dist(mob, epicenter) + 1) )
+ mob.apply_effect(rads, IRRADIATE)
+
+ for(var/i=0, i