Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bleeding-edge-freeze
@@ -158,51 +158,53 @@ connection
|
||||
if(!istype(zone_1) || !istype(zone_2))
|
||||
return
|
||||
|
||||
//Handle disconnection of indirectly or directly connected zones.
|
||||
if( (zone_1 in zone_2.connected_zones) || (zone_2 in zone_1.connected_zones) )
|
||||
if(indirect != CONNECTION_CLOSED)
|
||||
//Handle disconnection of indirectly or directly connected zones.
|
||||
if( (zone_1 in zone_2.connected_zones) || (zone_2 in zone_1.connected_zones) )
|
||||
|
||||
//If there are more than one connection, decrement the number of connections
|
||||
//Otherwise, remove all connections between the zones.
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
if(zone_1.connected_zones[zone_2] > 1)
|
||||
zone_1.connected_zones[zone_2]--
|
||||
else
|
||||
zone_1.connected_zones -= zone_2
|
||||
//remove the list if it is empty
|
||||
if(!zone_1.connected_zones.len)
|
||||
zone_1.connected_zones = null
|
||||
//If there are more than one connection, decrement the number of connections
|
||||
//Otherwise, remove all connections between the zones.
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
if(zone_1.connected_zones[zone_2] > 1)
|
||||
zone_1.connected_zones[zone_2]--
|
||||
else
|
||||
zone_1.connected_zones -= zone_2
|
||||
//remove the list if it is empty
|
||||
if(!zone_1.connected_zones.len)
|
||||
zone_1.connected_zones = null
|
||||
|
||||
//Then do the same for the other zone.
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
if(zone_2.connected_zones[zone_1] > 1)
|
||||
zone_2.connected_zones[zone_1]--
|
||||
else
|
||||
zone_2.connected_zones -= zone_1
|
||||
if(!zone_2.connected_zones.len)
|
||||
zone_2.connected_zones = null
|
||||
//Then do the same for the other zone.
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
if(zone_2.connected_zones[zone_1] > 1)
|
||||
zone_2.connected_zones[zone_1]--
|
||||
else
|
||||
zone_2.connected_zones -= zone_1
|
||||
if(!zone_2.connected_zones.len)
|
||||
zone_2.connected_zones = null
|
||||
|
||||
//Handle disconnection of closed zones.
|
||||
if( (zone_1 in zone_2.closed_connection_zones) || (zone_2 in zone_1.closed_connection_zones) )
|
||||
else
|
||||
//Handle disconnection of closed zones.
|
||||
if( (zone_1 in zone_2.closed_connection_zones) || (zone_2 in zone_1.closed_connection_zones) )
|
||||
|
||||
//If there are more than one connection, decrement the number of connections
|
||||
//Otherwise, remove all connections between the zones.
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
if(zone_1.closed_connection_zones[zone_2] > 1)
|
||||
zone_1.closed_connection_zones[zone_2]--
|
||||
else
|
||||
zone_1.closed_connection_zones -= zone_2
|
||||
//remove the list if it is empty
|
||||
if(!zone_1.closed_connection_zones.len)
|
||||
zone_1.closed_connection_zones = null
|
||||
//If there are more than one connection, decrement the number of connections
|
||||
//Otherwise, remove all connections between the zones.
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
if(zone_1.closed_connection_zones[zone_2] > 1)
|
||||
zone_1.closed_connection_zones[zone_2]--
|
||||
else
|
||||
zone_1.closed_connection_zones -= zone_2
|
||||
//remove the list if it is empty
|
||||
if(!zone_1.closed_connection_zones.len)
|
||||
zone_1.closed_connection_zones = null
|
||||
|
||||
//Then do the same for the other zone.
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
if(zone_2.closed_connection_zones[zone_1] > 1)
|
||||
zone_2.closed_connection_zones[zone_1]--
|
||||
else
|
||||
zone_2.closed_connection_zones -= zone_1
|
||||
if(!zone_2.closed_connection_zones.len)
|
||||
zone_2.closed_connection_zones = null
|
||||
//Then do the same for the other zone.
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
if(zone_2.closed_connection_zones[zone_1] > 1)
|
||||
zone_2.closed_connection_zones[zone_1]--
|
||||
else
|
||||
zone_2.closed_connection_zones -= zone_1
|
||||
if(!zone_2.closed_connection_zones.len)
|
||||
zone_2.closed_connection_zones = null
|
||||
|
||||
|
||||
proc/Cleanup()
|
||||
@@ -259,9 +261,8 @@ connection
|
||||
|
||||
//The door is instead closed.
|
||||
else if(indirect > CONNECTION_CLOSED)
|
||||
indirect = CONNECTION_CLOSED
|
||||
|
||||
DisconnectZones(A.zone, B.zone)
|
||||
indirect = CONNECTION_CLOSED
|
||||
ConnectZones(A.zone, B.zone)
|
||||
|
||||
//If I can no longer pass air, better delete
|
||||
@@ -381,7 +382,7 @@ connection
|
||||
//Handle diconnection and reconnection of zones.
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
|
||||
|
||||
#undef CONNECTION_DIRECT
|
||||
|
||||
@@ -10,6 +10,7 @@ datum/controller/vote
|
||||
var/list/voted = list()
|
||||
var/list/voting = list()
|
||||
var/list/current_votes = list()
|
||||
var/auto_muted = 0
|
||||
|
||||
New()
|
||||
if(vote != src)
|
||||
@@ -53,6 +54,14 @@ datum/controller/vote
|
||||
voting.Cut()
|
||||
current_votes.Cut()
|
||||
|
||||
if(auto_muted && !ooc_allowed)
|
||||
auto_muted = 0
|
||||
ooc_allowed = !( ooc_allowed )
|
||||
world << "<b>The OOC channel has been automatically enabled due to vote cancellation.</b>"
|
||||
log_admin("OOC was toggled automatically due to vote cancellation.")
|
||||
message_admins("OOC has been toggled on automatically.")
|
||||
|
||||
|
||||
proc/get_result()
|
||||
//get the highest number of votes
|
||||
var/greatest_votes = 0
|
||||
@@ -138,6 +147,12 @@ datum/controller/vote
|
||||
if("crew_transfer")
|
||||
if(. == "Initiate Crew Transfer")
|
||||
init_shift_change(null, 1)
|
||||
if(auto_muted && !ooc_allowed)
|
||||
auto_muted = 0
|
||||
ooc_allowed = !( ooc_allowed )
|
||||
world << "<b>The OOC channel has been automatically enabled due to vote end.</b>"
|
||||
log_admin("OOC was toggled automatically due to vote end.")
|
||||
message_admins("OOC has been toggled on automatically.")
|
||||
|
||||
|
||||
if(restart)
|
||||
@@ -210,6 +225,13 @@ datum/controller/vote
|
||||
if(mode == "gamemode" && going)
|
||||
going = 0
|
||||
world << "<font color='red'><b>Round start has been delayed.</b></font>"
|
||||
if(mode == "crew_transfer" && ooc_allowed)
|
||||
auto_muted = 1
|
||||
ooc_allowed = !( ooc_allowed )
|
||||
world << "<b>The OOC channel has been automatically disabled due to the crew transfer vote.</b>"
|
||||
log_admin("OOC was toggled automatically due to crew_transfer vote.")
|
||||
message_admins("OOC has been toggled off automatically.")
|
||||
|
||||
|
||||
time_remaining = round(config.vote_period/10)
|
||||
return 1
|
||||
|
||||
@@ -112,7 +112,8 @@
|
||||
|
||||
if (B)
|
||||
beaker.reagents.reagent_list |= B
|
||||
beaker.reagents.update_total()
|
||||
beaker.reagents.del_reagent("clonexadone") //Fix for infinite meat spawning when taking blood from human
|
||||
beaker.reagents.update_total() //to an IV drip full of clonex
|
||||
beaker.on_reagent_change()
|
||||
beaker.reagents.handle_reactions()
|
||||
update_icon()
|
||||
|
||||
@@ -571,6 +571,7 @@
|
||||
custom_action(step, atom/used_atom, mob/user)
|
||||
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
|
||||
holder.overlays += used_atom.icon_state+"+o"
|
||||
user.drop_item()
|
||||
del used_atom
|
||||
return 1
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/construction_time = 100
|
||||
var/list/construction_cost = list("metal"=20000,"glass"=5000)
|
||||
var/list/part = null
|
||||
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
|
||||
|
||||
/obj/item/robot_parts/l_arm
|
||||
name = "robot left arm"
|
||||
@@ -278,3 +279,13 @@
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/card/emag))
|
||||
if(sabotaged)
|
||||
user << "\red [src] is already sabotaged!"
|
||||
else
|
||||
user << "\red You slide [W] into the dataport on [src] and short out the safeties."
|
||||
sabotaged = 1
|
||||
return
|
||||
..()
|
||||
@@ -211,8 +211,14 @@
|
||||
orient2hud()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/emp_act(severity)
|
||||
/obj/item/clothing/suit/emp_act(severity)
|
||||
if(!istype(src.loc, /mob/living))
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/hear_talk(mob/M, var/msg)
|
||||
for (var/atom/A in src)
|
||||
if(istype(A,/obj/))
|
||||
var/obj/O = A
|
||||
O.hear_talk(M, msg)
|
||||
@@ -380,7 +380,7 @@
|
||||
u_equip(item)
|
||||
update_icons()
|
||||
|
||||
if (istype(usr, /mob/living/carbon/monkey)) //Check if a monkey is throwing. Modify/remove this line as required.
|
||||
if (istype(usr, /mob/living/carbon)) //Check if a carbon mob is throwing. Modify/remove this line as required.
|
||||
item.loc = src.loc
|
||||
if(src.client)
|
||||
src.client.screen -= item
|
||||
|
||||
@@ -161,6 +161,17 @@ emp_act
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(!(affecting.status & ORGAN_ROBOT))
|
||||
user << "\red That limb isn't robotic."
|
||||
return
|
||||
if(affecting.sabotaged)
|
||||
user << "\red [src]'s [affecting.display_name] is already sabotaged!"
|
||||
else
|
||||
user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.display_name] and short out the safeties."
|
||||
affecting.sabotaged = 1
|
||||
return
|
||||
|
||||
if(I.attack_verb.len)
|
||||
visible_message("\red <B>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!</B>")
|
||||
else
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
var/cavity = 0
|
||||
var/sabotaged = 0 //If a prosthetic limb is emagged, it will detonate when it fails.
|
||||
|
||||
var/obj/item/hidden = null
|
||||
var/list/implants = list()
|
||||
@@ -482,8 +483,8 @@
|
||||
owner.u_equip(owner.shoes)
|
||||
if(organ)
|
||||
destspawn = 1
|
||||
//Robotic limbs explode until specified otherwise
|
||||
if(status & ORGAN_ROBOT && !no_explode)
|
||||
//Robotic limbs explode if sabotaged.
|
||||
if(status & ORGAN_ROBOT && !no_explode && sabotaged)
|
||||
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
|
||||
"\red <b>Your [display_name] explodes!</b>",\
|
||||
"You hear an explosion followed by a scream!")
|
||||
@@ -494,10 +495,10 @@
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
else
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
|
||||
//Throw organs around
|
||||
var/lol = pick(cardinal)
|
||||
@@ -590,8 +591,8 @@
|
||||
name = "chest"
|
||||
icon_name = "torso"
|
||||
display_name = "chest"
|
||||
max_damage = 150
|
||||
min_broken_damage = 75
|
||||
max_damage = 75
|
||||
min_broken_damage = 40
|
||||
body_part = UPPER_TORSO
|
||||
|
||||
|
||||
@@ -599,24 +600,24 @@
|
||||
name = "groin"
|
||||
icon_name = "groin"
|
||||
display_name = "groin"
|
||||
max_damage = 115
|
||||
min_broken_damage = 70
|
||||
max_damage = 50
|
||||
min_broken_damage = 30
|
||||
body_part = LOWER_TORSO
|
||||
|
||||
/datum/organ/external/l_arm
|
||||
name = "l_arm"
|
||||
display_name = "left arm"
|
||||
icon_name = "l_arm"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
max_damage = 50
|
||||
min_broken_damage = 20
|
||||
body_part = ARM_LEFT
|
||||
|
||||
/datum/organ/external/l_leg
|
||||
name = "l_leg"
|
||||
display_name = "left leg"
|
||||
icon_name = "l_leg"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
max_damage = 50
|
||||
min_broken_damage = 20
|
||||
body_part = LEG_LEFT
|
||||
icon_position = LEFT
|
||||
|
||||
@@ -624,16 +625,16 @@
|
||||
name = "r_arm"
|
||||
display_name = "right arm"
|
||||
icon_name = "r_arm"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
max_damage = 50
|
||||
min_broken_damage = 20
|
||||
body_part = ARM_RIGHT
|
||||
|
||||
/datum/organ/external/r_leg
|
||||
name = "r_leg"
|
||||
display_name = "right leg"
|
||||
icon_name = "r_leg"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
max_damage = 50
|
||||
min_broken_damage = 20
|
||||
body_part = LEG_RIGHT
|
||||
icon_position = RIGHT
|
||||
|
||||
@@ -641,7 +642,7 @@
|
||||
name = "l_foot"
|
||||
display_name = "left foot"
|
||||
icon_name = "l_foot"
|
||||
max_damage = 40
|
||||
max_damage = 30
|
||||
min_broken_damage = 15
|
||||
body_part = FOOT_LEFT
|
||||
icon_position = LEFT
|
||||
@@ -650,7 +651,7 @@
|
||||
name = "r_foot"
|
||||
display_name = "right foot"
|
||||
icon_name = "r_foot"
|
||||
max_damage = 40
|
||||
max_damage = 30
|
||||
min_broken_damage = 15
|
||||
body_part = FOOT_RIGHT
|
||||
icon_position = RIGHT
|
||||
@@ -659,7 +660,7 @@
|
||||
name = "r_hand"
|
||||
display_name = "right hand"
|
||||
icon_name = "r_hand"
|
||||
max_damage = 40
|
||||
max_damage = 30
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_RIGHT
|
||||
|
||||
@@ -667,7 +668,7 @@
|
||||
name = "l_hand"
|
||||
display_name = "left hand"
|
||||
icon_name = "l_hand"
|
||||
max_damage = 40
|
||||
max_damage = 30
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_LEFT
|
||||
|
||||
|
||||
@@ -128,4 +128,279 @@
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(15)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.my_atom = src
|
||||
|
||||
/obj/item/weapon/dart_cartridge
|
||||
name = "dart cartridge"
|
||||
desc = "A rack of hollow darts."
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "darts-5"
|
||||
item_state = "rcdammo"
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
origin_tech = "materials=2"
|
||||
var/darts = 5
|
||||
|
||||
/obj/item/weapon/dart_cartridge/update_icon()
|
||||
if(!darts)
|
||||
icon_state = "darts-0"
|
||||
else if(darts > 5)
|
||||
icon_state = "darts-5"
|
||||
else
|
||||
icon_state = "darts-[darts]"
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/dartgun
|
||||
name = "dart gun"
|
||||
desc = "A small gas-powered dartgun, capable of delivering chemical cocktails swiftly across short distances."
|
||||
icon_state = "dartgun-empty"
|
||||
|
||||
var/list/beakers = list() //All containers inside the gun.
|
||||
var/list/mixing = list() //Containers being used for mixing.
|
||||
var/obj/item/weapon/dart_cartridge/cartridge = null //Container of darts.
|
||||
var/max_beakers = 3
|
||||
|
||||
/obj/item/weapon/gun/dartgun/update_icon()
|
||||
|
||||
if(!cartridge)
|
||||
icon_state = "dartgun-empty"
|
||||
return 1
|
||||
|
||||
if(!cartridge.darts)
|
||||
icon_state = "dartgun-0"
|
||||
else if(cartridge.darts > 5)
|
||||
icon_state = "dartgun-5"
|
||||
else
|
||||
icon_state = "dartgun-[cartridge.darts]"
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/dartgun/New()
|
||||
|
||||
if(beakers.len)
|
||||
return
|
||||
|
||||
// The dartgun has one beaker by default.
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B = new(src)
|
||||
beakers += B
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/examine()
|
||||
set src in view()
|
||||
update_icon()
|
||||
..()
|
||||
if (!(usr in view(2)) && usr!=src.loc)
|
||||
return
|
||||
if (beakers.len)
|
||||
usr << "\blue [src] contains:"
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers)
|
||||
if(B.reagents && B.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in B.reagents.reagent_list)
|
||||
usr << "\blue [R.volume] units of [R.name]"
|
||||
|
||||
/obj/item/weapon/gun/dartgun/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/dart_cartridge))
|
||||
|
||||
var/obj/item/weapon/dart_cartridge/D = I
|
||||
|
||||
if(!D.darts)
|
||||
user << "\blue [D] is empty."
|
||||
return 0
|
||||
|
||||
if(cartridge)
|
||||
if(cartridge.darts <= 0)
|
||||
src.remove_cartridge()
|
||||
else
|
||||
user << "\blue There's already a cartridge in [src]."
|
||||
return 0
|
||||
|
||||
user.drop_item()
|
||||
cartridge = D
|
||||
D.loc = src
|
||||
user << "\blue You slot [D] into [src]."
|
||||
update_icon()
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
if(beakers.len >= max_beakers)
|
||||
user << "\blue [src] already has [max_beakers] beakers in it - another one isn't going to fit!"
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B = I
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
beakers += B
|
||||
user << "\blue You slot [B] into [src]."
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/can_fire()
|
||||
if(!cartridge)
|
||||
return 0
|
||||
else
|
||||
return cartridge.darts
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/has_selected_beaker_reagents()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/remove_cartridge()
|
||||
if(cartridge)
|
||||
usr << "\blue You pop the cartridge out of [src]."
|
||||
var/obj/item/weapon/dart_cartridge/C = cartridge
|
||||
C.loc = get_turf(src)
|
||||
C.update_icon()
|
||||
cartridge = null
|
||||
src.update_icon()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/get_mixed_syringe()
|
||||
if (!cartridge)
|
||||
return 0
|
||||
if(!cartridge.darts)
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/reagent_containers/syringe/dart = new(src)
|
||||
|
||||
if(mixing.len)
|
||||
var/mix_amount = 10/mixing.len
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in mixing)
|
||||
B.reagents.trans_to(dart,mix_amount)
|
||||
|
||||
return dart
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/fire_dart(atom/target, mob/user)
|
||||
if (locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
else
|
||||
var/turf/trg = get_turf(target)
|
||||
var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = get_mixed_syringe()
|
||||
if(!S)
|
||||
user << "\red There are no darts in [src]!"
|
||||
return
|
||||
if(!S.reagents)
|
||||
user << "\red There are no reagents available!"
|
||||
return
|
||||
cartridge.darts--
|
||||
src.update_icon()
|
||||
S.reagents.trans_to(D, S.reagents.total_volume)
|
||||
del(S)
|
||||
D.icon_state = "syringeproj"
|
||||
D.name = "syringe"
|
||||
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
|
||||
|
||||
for(var/i=0, i<6, i++)
|
||||
if(!D) break
|
||||
if(D.loc == trg) break
|
||||
step_towards(D,trg)
|
||||
|
||||
if(D)
|
||||
for(var/mob/living/carbon/M in D.loc)
|
||||
if(!istype(M,/mob/living/carbon)) continue
|
||||
if(M == user) continue
|
||||
//Syringe gun attack logging by Yvarov
|
||||
var/R
|
||||
if(D.reagents)
|
||||
for(var/datum/reagent/A in D.reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
if (istype(M, /mob))
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
|
||||
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
|
||||
log_attack("<font color='red'>[user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R])</font>")
|
||||
|
||||
else
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
|
||||
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R])</font>")
|
||||
|
||||
if(D.reagents)
|
||||
D.reagents.trans_to(M, 15)
|
||||
M << "<span class='danger'>You feel a slight prick.</span>"
|
||||
|
||||
del(D)
|
||||
break
|
||||
if(D)
|
||||
for(var/atom/A in D.loc)
|
||||
if(A == user) continue
|
||||
if(A.density) del(D)
|
||||
|
||||
sleep(1)
|
||||
|
||||
if (D) spawn(10) del(D)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/dartgun/afterattack(obj/target, mob/user , flag)
|
||||
if(!isturf(target.loc) || target == user) return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/can_hit(var/mob/living/target as mob, var/mob/living/user as mob)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/dartgun/attack_self(user as mob)
|
||||
var/dat = "<b>[src] mixing control:</b><br><br>"
|
||||
|
||||
if (beakers.len)
|
||||
var/i = 1
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers)
|
||||
dat += "Beaker [i] contains: "
|
||||
if(B.reagents && B.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in B.reagents.reagent_list)
|
||||
dat += "<br> [R.volume] units of [R.name], "
|
||||
if (check_beaker_mixing(B))
|
||||
dat += text("<A href='?src=\ref[src];stop_mix=[i]'><font color='green'>Mixing</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];mix=[i]'><font color='red'>Not mixing</font></A> ")
|
||||
else
|
||||
dat += "nothing."
|
||||
dat += " \[<A href='?src=\ref[src];eject=[i]'>Eject</A>\]<br>"
|
||||
i++
|
||||
else
|
||||
dat += "There are no beakers inserted!<br><br>"
|
||||
|
||||
if(cartridge)
|
||||
if(cartridge.darts)
|
||||
dat += "The dart cartridge has [cartridge.darts] shots remaining."
|
||||
else
|
||||
dat += "<font color='red'>The dart cartridge is empty!</font>"
|
||||
dat += " \[<A href='?src=\ref[src];eject_cart=1'>Eject</A>\]"
|
||||
|
||||
user << browse("[dat]", "window=dartgun_mixing_window")
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/check_beaker_mixing(var/obj/item/B)
|
||||
if(!mixing || !beakers)
|
||||
return 0
|
||||
for(var/obj/item/M in mixing)
|
||||
if(M == B)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/dartgun/Topic(href, href_list)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["stop_mix"])
|
||||
var/index = text2num(href_list["stop_mix"])
|
||||
if(index <= beakers.len)
|
||||
for(var/obj/item/M in mixing)
|
||||
if(M == beakers[index])
|
||||
mixing -= M
|
||||
break
|
||||
else if (href_list["mix"])
|
||||
var/index = text2num(href_list["mix"])
|
||||
if(index <= beakers.len)
|
||||
mixing += beakers[index]
|
||||
else if (href_list["eject"])
|
||||
var/index = text2num(href_list["eject"])
|
||||
if(index <= beakers.len)
|
||||
if(beakers[index])
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B = beakers[index]
|
||||
usr << "You remove [B] from [src]."
|
||||
mixing -= B
|
||||
beakers -= B
|
||||
B.loc = get_turf(src)
|
||||
else if (href_list["eject_cart"])
|
||||
remove_cartridge()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/dartgun/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
if(cartridge)
|
||||
spawn(0) fire_dart(target,user)
|
||||
else
|
||||
usr << "\red [src] is empty."
|
||||
@@ -190,7 +190,16 @@
|
||||
max_duration = 160
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target_zone != "chest" && target_zone != "groin" && target_zone != "head"
|
||||
if (target_zone == "eyes") //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
if (affected.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
return target_zone != "chest" && target_zone != "groin" && target_zone != "head"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -203,11 +212,11 @@
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] cuts off [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You cut off [target]'s [affected.display_name] with \the [tool].")
|
||||
affected.droplimb(1,1)
|
||||
affected.droplimb(1,0)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, sawwing through the bone in [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, sawwing through the bone in [target]'s [affected.display_name] with \the [tool]!")
|
||||
affected.createwound(CUT, 30)
|
||||
affected.fracture()
|
||||
affected.fracture()
|
||||
@@ -144,10 +144,15 @@
|
||||
"You start attaching [tool] where [target]'s [affected.display_name] used to be.")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/robot_parts/L = tool
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has attached [tool] where [target]'s [affected.display_name] used to be.", \
|
||||
"\blue You have attached [tool] where [target]'s [affected.display_name] used to be.")
|
||||
affected.robotize()
|
||||
if(L.sabotaged)
|
||||
affected.sabotaged = 1
|
||||
else
|
||||
affected.sabotaged = 0
|
||||
target.update_body()
|
||||
target.updatehealth()
|
||||
target.UpdateDamageIcon()
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 38 KiB |