Fixes conflicts, conflicts.

This commit is contained in:
Mieszko Jędrzejczak
2016-07-10 12:45:36 +02:00
957 changed files with 9560 additions and 8815 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || M.buckled_mob || buckled_mob || (buckle_requires_restraints && !M.restrained()) || M == src)
return 0
if (isslime(M) || isAI(M))
if(isslime(M) || isAI(M))
if(M == usr)
to_chat(M, "<span class='warning'>You are unable to buckle yourself to the [src]!</span>")
else
+2 -2
View File
@@ -179,7 +179,7 @@
/obj/structure/alien/weeds/Destroy()
var/turf/T = loc
for (var/obj/structure/alien/weeds/W in range(1,T))
for(var/obj/structure/alien/weeds/W in range(1,T))
W.updateWeedOverlays()
linked_node = null
return ..()
@@ -267,7 +267,7 @@
/obj/structure/alien/weeds/proc/fullUpdateWeedOverlays()
for (var/obj/structure/alien/weeds/W in range(1,src))
for(var/obj/structure/alien/weeds/W in range(1,src))
W.updateWeedOverlays()
//Weed nodes
@@ -30,7 +30,7 @@ var/global/list/image/splatter_cache=list()
if(src.loc && isturf(src.loc))
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
if(B != src)
if (B.blood_DNA)
if(B.blood_DNA)
blood_DNA |= B.blood_DNA.Copy()
qdel(B)
spawn(DRYING_TIME * (amount+1))
@@ -41,7 +41,7 @@ var/global/list/image/splatter_cache=list()
color = basecolor
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
if (!istype(perp))
if(!istype(perp))
return
if(amount < 1)
return
@@ -68,7 +68,7 @@ var/global/list/image/splatter_cache=list()
S.overlays += S.blood_overlay
S.blood_DNA |= blood_DNA.Copy()
else if (hasfeet)//Or feet
else if(hasfeet)//Or feet
perp.feet_blood_color = basecolor
perp.track_blood = max(amount,perp.track_blood)
if(!perp.feet_blood_DNA)
@@ -86,14 +86,14 @@ var/global/list/image/splatter_cache=list()
/obj/effect/decal/cleanable/blood/attack_hand(mob/living/carbon/human/user)
..()
if (amount && istype(user))
if(amount && istype(user))
add_fingerprint(user)
if (user.gloves)
if(user.gloves)
return
var/taken = rand(1,amount)
amount -= taken
to_chat(user, "<span class='notice'>You get some of \the [src] on your hands.</span>")
if (!user.blood_DNA)
if(!user.blood_DNA)
user.blood_DNA = list()
user.blood_DNA |= blood_DNA.Copy()
user.bloody_hands += taken
@@ -199,9 +199,9 @@ var/global/list/image/splatter_cache=list()
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions)
set waitfor = 0
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3)
if (i > 0)
if(i > 0)
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
b.basecolor = src.basecolor
b.update_icon()
@@ -209,7 +209,7 @@ var/global/list/image/splatter_cache=list()
var/datum/disease/ND = D.Copy(1)
b.viruses += ND
ND.holder = b
if (step_to(src, get_step(src, direction), 0))
if(step_to(src, get_step(src, direction), 0))
break
@@ -15,17 +15,17 @@
/obj/effect/decal/cleanable/blood/gibs/robot/streak(var/list/directions)
spawn (0)
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3)
if (i > 0)
if (prob(40))
if(i > 0)
if(prob(40))
var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc)
streak.update_icon()
else if (prob(10))
else if(prob(10))
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
if (step_to(src, get_step(src, direction), 0))
if(step_to(src, get_step(src, direction), 0))
break
/obj/effect/decal/cleanable/blood/gibs/robot/limb
@@ -5,7 +5,7 @@
var/noclear = 0 //if it has this, don't delete it when its' scooped up
/obj/effect/decal/cleanable/New()
if (random_icon_states && length(src.random_icon_states) > 0)
if(random_icon_states && length(src.random_icon_states) > 0)
src.icon_state = pick(src.random_icon_states)
create_reagents(100)
..()
+36 -36
View File
@@ -56,7 +56,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
/obj/effect/effect/water/New()
..()
//var/turf/T = src.loc
//if (istype(T, /turf))
//if(istype(T, /turf))
// T.firelevel = 0 //TODO: FIX
spawn( 70 )
delete()
@@ -65,9 +65,9 @@ would spawn and follow the beaker, even if it is carried or thrown.
/obj/effect/effect/water/Move(turf/newloc)
//var/turf/T = src.loc
//if (istype(T, /turf))
//if(istype(T, /turf))
// T.firelevel = 0 //TODO: FIX
if (--src.life < 1)
if(--src.life < 1)
//SN src = null
delete()
if(newloc.density)
@@ -177,21 +177,21 @@ steam.start() -- spawns the effect
..()
playsound(src.loc, "sparks", 100, 1)
var/turf/T = loc
if (istype(T, /turf))
if(istype(T, /turf))
T.hotspot_expose(1000, 100)
spawn (100)
qdel(src)
/obj/effect/effect/sparks/Destroy()
var/turf/T = src.loc
if (istype(T, /turf))
if(istype(T, /turf))
T.hotspot_expose(1000,100)
return ..()
/obj/effect/effect/sparks/Move()
..()
var/turf/T = src.loc
if (istype(T, /turf))
if(istype(T, /turf))
T.hotspot_expose(1000,100)
return
@@ -325,11 +325,11 @@ steam.start() -- spawns the effect
/obj/effect/effect/bad_smoke/Move()
..()
for(var/mob/living/carbon/M in get_turf(src))
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
if(M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
else
M.drop_item()
M.adjustOxyLoss(1)
if (M.coughedtime != 1)
if(M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn ( 20 )
@@ -348,12 +348,12 @@ steam.start() -- spawns the effect
/obj/effect/effect/bad_smoke/Crossed(mob/living/carbon/M as mob )
..()
if(istype(M, /mob/living/carbon))
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
if(M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
return
else
M.drop_item()
M.adjustOxyLoss(1)
if (M.coughedtime != 1)
if(M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn ( 20 )
@@ -579,12 +579,12 @@ steam.start() -- spawns the effect
/obj/effect/effect/sleep_smoke/Move()
..()
for(var/mob/living/carbon/M in get_turf(src))
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
// if (M.wear_suit, /obj/item/clothing/suit/wizrobe && (M.hat, /obj/item/clothing/head/wizard) && (M.shoes, /obj/item/clothing/shoes/sandal)) // I'll work on it later
if(M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
// if(M.wear_suit, /obj/item/clothing/suit/wizrobe && (M.hat, /obj/item/clothing/head/wizard) && (M.shoes, /obj/item/clothing/shoes/sandal)) // I'll work on it later
else
M.drop_item()
M:sleeping += 5
if (M.coughedtime != 1)
if(M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn(20)
@@ -595,13 +595,13 @@ steam.start() -- spawns the effect
/obj/effect/effect/sleep_smoke/Crossed(mob/living/carbon/M as mob )
..()
if(istype(M, /mob/living/carbon))
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
// if (M.wear_suit, /obj/item/clothing/suit/wizrobe && (M.hat, /obj/item/clothing/head/wizard) && (M.shoes, /obj/item/clothing/shoes/sandal)) // Work on it later
if(M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
// if(M.wear_suit, /obj/item/clothing/suit/wizrobe && (M.hat, /obj/item/clothing/head/wizard) && (M.shoes, /obj/item/clothing/shoes/sandal)) // Work on it later
return
else
M.drop_item()
M:sleeping += 5
if (M.coughedtime != 1)
if(M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn(20)
@@ -671,10 +671,10 @@ steam.start() -- spawns the effect
/obj/effect/effect/mustard_gas/Move()
..()
for(var/mob/living/carbon/human/R in get_turf(src))
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & AIRTIGHT) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
if(R.internal != null && usr.wear_mask && (R.wear_mask.flags & AIRTIGHT) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
else
R.burn_skin(0.75)
if (R.coughedtime != 1)
if(R.coughedtime != 1)
R.coughedtime = 1
R.emote("gasp")
spawn (20)
@@ -684,11 +684,11 @@ steam.start() -- spawns the effect
/obj/effect/effect/mustard_gas/Crossed(mob/living/carbon/human/R as mob )
..()
if (istype(R, /mob/living/carbon/human))
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & AIRTIGHT) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
if(istype(R, /mob/living/carbon/human))
if(R.internal != null && usr.wear_mask && (R.wear_mask.flags & AIRTIGHT) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
return
R.burn_skin(0.75)
if (R.coughedtime != 1)
if(R.coughedtime != 1)
R.coughedtime = 1
R.emote("gasp")
spawn (20)
@@ -997,7 +997,7 @@ steam.start() -- spawns the effect
if(metal)
return
if (istype(AM, /mob/living/carbon))
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
if(M.slip("foam", 5, 2))
if(reagents)
@@ -1109,7 +1109,7 @@ steam.start() -- spawns the effect
/obj/structure/foamedmetal/attack_hand(var/mob/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if ((HULK in user.mutations) || (prob(75 - metal*25)))
if((HULK in user.mutations) || (prob(75 - metal*25)))
user.visible_message("<span class='warning'>[user] smashes through \the [src].</span>", "<span class='notice'>You smash through \the [src].</span>")
qdel(src)
else
@@ -1118,7 +1118,7 @@ steam.start() -- spawns the effect
/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if (istype(I, /obj/item/weapon/grab))
if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
G.affecting.loc = src.loc
user.visible_message("<span class='warning'>[G.assailant] smashes [G.affecting] through the foamed metal wall.</span>")
@@ -1171,7 +1171,7 @@ steam.start() -- spawns the effect
return
start()
if (amount <= 2)
if(amount <= 2)
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(2, 1, location)
s.start()
@@ -1179,7 +1179,7 @@ steam.start() -- spawns the effect
for(var/mob/M in viewers(5, location))
to_chat(M, "\red The solution violently explodes.")
for(var/mob/M in viewers(1, location))
if (prob (50 * amount))
if(prob (50 * amount))
to_chat(M, "\red The explosion knocks you down.")
M.Weaken(rand(1,5))
return
@@ -1190,16 +1190,16 @@ steam.start() -- spawns the effect
var/flash = -1
// Clamp all values to MAX_EXPLOSION_RANGE
if (round(amount/12) > 0)
if(round(amount/12) > 0)
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
if (round(amount/6) > 0)
if(round(amount/6) > 0)
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
if (round(amount/3) > 0)
if(round(amount/3) > 0)
light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3))
if (flash && flashing_factor)
if(flash && flashing_factor)
flash += (round(amount/4) * flashing_factor)
for(var/mob/M in viewers(8, location))
@@ -1211,11 +1211,11 @@ steam.start() -- spawns the effect
if(holder)
var/dmglevel = 4
if (round(amount/8) > 0)
if(round(amount/8) > 0)
dmglevel = 1
else if (round(amount/4) > 0)
else if(round(amount/4) > 0)
dmglevel = 2
else if (round(amount/2) > 0)
else if(round(amount/2) > 0)
dmglevel = 3
if(dmglevel<4) holder.ex_act(dmglevel)
@@ -1243,7 +1243,7 @@ steam.start() -- spawns the effect
src.icon = I
playsound(src.loc, "sparks", 100, 1)
var/turf/T = src.loc
if (istype(T, /turf))
if(istype(T, /turf))
T.hotspot_expose(3000,100)
spawn (100)
qdel(src)
@@ -1251,14 +1251,14 @@ steam.start() -- spawns the effect
/obj/effect/sparkles/Destroy()
var/turf/T = src.loc
if (istype(T, /turf))
if(istype(T, /turf))
T.hotspot_expose(3000,100)
return ..()
/obj/effect/sparkles/Move()
..()
var/turf/T = src.loc
if (istype(T, /turf))
if(istype(T, /turf))
T.hotspot_expose(3000,100)
return
+2 -2
View File
@@ -146,11 +146,11 @@
qdel(src)
return
if(2.0)
if (prob(50))
if(prob(50))
qdel(src)
return
if(3.0)
if (prob(5))
if(prob(5))
qdel(src)
return
else
+2 -2
View File
@@ -175,7 +175,7 @@
new /obj/item/clothing/gloves/color/white(src.loc)
new /obj/item/clothing/shoes/white(src.loc)
new /obj/item/clothing/under/scratch(src.loc)
if (prob(30))
if(prob(30))
new /obj/item/clothing/head/cueball(src.loc)
qdel(src)
@@ -227,7 +227,7 @@
/obj/effect/landmark/costume/imperium_monk/New()
new /obj/item/clothing/suit/imperium_monk(src.loc)
if (prob(25))
if(prob(25))
new /obj/item/clothing/mask/gas/cyborg(src.loc)
qdel(src)
+2 -2
View File
@@ -40,10 +40,10 @@
return
if(M.anchored&&istype(M, /obj/mecha))
return
if (!( target ))
if(!( target ))
qdel(src)
return
if (istype(M, /atom/movable))
if(istype(M, /atom/movable))
if(prob(failchance)) //oh dear a problem, put em in deep space
src.icon_state = "portal1"
do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0)
@@ -38,19 +38,19 @@
var/obj/item/device/assembly/S
switch (src.btype)
switch(src.btype)
// radio
if (0)
if(0)
S = new/obj/item/device/assembly/signaler(V)
// proximity
if (1)
if(1)
S = new/obj/item/device/assembly/prox_sensor(V)
// timer
if (2)
if(2)
S = new/obj/item/device/assembly/timer(V)
+90 -58
View File
@@ -58,65 +58,97 @@
//maintcentral: 2 items, 2 spots 0 extra (08/08/2014)
//port: 5 items, 5 spots 0 extra (08/08/2014)
loot = list(
/obj/item/bodybag = 1,
/obj/item/clothing/glasses/meson = 2,
/obj/item/clothing/glasses/sunglasses = 1,
/obj/item/clothing/gloves/color/yellow/fake = 1,
/obj/item/clothing/head/hardhat = 1,
/obj/item/clothing/head/hardhat/red = 1,
/obj/item/clothing/head/that{throwforce = 1; throwing = 1} = 1,
/obj/item/clothing/head/ushanka = 1,
/obj/item/clothing/head/welding = 1,
/obj/item/clothing/mask/gas = 15,
/obj/item/clothing/suit/storage/hazardvest = 1,
/obj/item/clothing/under/rank/vice = 1,
/obj/item/device/assembly/prox_sensor = 4,
/obj/item/device/assembly/timer = 3,
/obj/item/device/flashlight = 4,
/obj/item/device/flashlight/pen = 1,
/obj/item/device/multitool = 2,
/obj/item/device/radio/off = 2,
/obj/item/device/t_scanner = 6,
/obj/item/stack/cable_coil = 4,
/obj/item/stack/cable_coil{amount = 5} = 6,
/obj/item/stack/medical/advanced/bruise_pack = 1,
/obj/item/stack/rods{amount = 10} = 9,
/obj/item/stack/rods{amount = 23} = 1,
/obj/item/stack/rods{amount = 50} = 1,
/obj/item/stack/sheet/cardboard = 2,
/obj/item/stack/sheet/metal{amount = 20} = 1,
/obj/item/stack/sheet/mineral/plasma{layer = 2.9} = 1,
/obj/item/stack/sheet/rglass = 1,
/obj/item/weapon/book/manual/engineering_construction = 1,
/obj/item/weapon/book/manual/engineering_hacking = 1,
/obj/item/clothing/head/cone = 1,
/obj/item/weapon/coin/silver = 1,
/obj/item/weapon/coin/twoheaded = 1,
/obj/item/weapon/contraband/poster = 1,
/obj/item/weapon/crowbar = 1,
/obj/item/weapon/crowbar/red = 1,
/obj/item/weapon/extinguisher = 11,
/obj/item/bodybag = 10,
/obj/item/clothing/glasses/meson = 20,
/obj/item/clothing/glasses/sunglasses = 10,
/obj/item/clothing/gloves/color/yellow/fake = 15,
/obj/item/clothing/gloves/color/fyellow = 10,
/obj/item/clothing/gloves/color/yellow = 5,
/obj/item/clothing/gloves/color/black = 20,
/obj/item/clothing/head/hardhat = 10,
/obj/item/clothing/head/hardhat/red = 10,
/obj/item/clothing/head/that{throwforce = 1; throwing = 1} = 10,
/obj/item/clothing/head/ushanka = 10,
/obj/item/clothing/head/welding = 10,
/obj/item/clothing/mask/gas = 10,
/obj/item/clothing/suit/storage/hazardvest = 10,
/obj/item/clothing/under/rank/vice = 10,
/obj/item/device/assembly/prox_sensor = 40,
/obj/item/device/assembly/timer = 30,
/obj/item/device/flashlight = 40,
/obj/item/device/flashlight/pen = 10,
/obj/item/device/multitool = 20,
/obj/item/device/radio/off = 20,
/obj/item/device/t_scanner = 60,
/obj/item/stack/cable_coil = 40,
/obj/item/stack/cable_coil{amount = 5} = 60,
/obj/item/stack/medical/advanced/bruise_pack = 10,
/obj/item/stack/rods{amount = 10} = 80,
/obj/item/stack/rods{amount = 23} = 20,
/obj/item/stack/rods{amount = 50} = 10,
/obj/item/stack/sheet/cardboard = 20,
/obj/item/stack/sheet/metal{amount = 20} = 10,
/obj/item/stack/sheet/mineral/plasma{layer = 2.9} = 10,
/obj/item/stack/sheet/rglass = 10,
/obj/item/weapon/book/manual/engineering_construction = 10,
/obj/item/weapon/book/manual/engineering_hacking = 10,
/obj/item/clothing/head/cone = 10,
/obj/item/weapon/coin/silver = 10,
/obj/item/weapon/coin/twoheaded = 10,
/obj/item/weapon/contraband/poster = 10,
/obj/item/weapon/crowbar = 10,
/obj/item/weapon/crowbar/red = 10,
/obj/item/weapon/extinguisher = 90,
//obj/item/weapon/gun/projectile/revolver/russian = 1, //disabled until lootdrop is a proper world proc.
/obj/item/weapon/hand_labeler = 1,
/obj/item/weapon/paper/crumpled = 1,
/obj/item/weapon/pen = 1,
/obj/item/weapon/plantspray/pests = 1,
/obj/item/weapon/stock_parts/cell = 3,
/obj/item/weapon/storage/belt/utility = 2,
/obj/item/weapon/storage/box = 2,
/obj/item/weapon/storage/box/cups = 1,
/obj/item/weapon/storage/box/donkpockets = 1,
/obj/item/weapon/storage/box/lights/mixed = 3,
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco = 1,
/obj/item/weapon/storage/toolbox/mechanical = 1,
/obj/item/weapon/screwdriver = 3,
/obj/item/weapon/tank/emergency_oxygen = 2,
/obj/item/weapon/vending_refill/cola = 1,
/obj/item/weapon/weldingtool = 3,
/obj/item/weapon/wirecutters = 1,
/obj/item/weapon/wrench = 4,
/obj/item/weapon/relic = 3,
"" = 11
/obj/item/weapon/hand_labeler = 10,
/obj/item/weapon/paper/crumpled = 10,
/obj/item/weapon/pen = 10,
/obj/item/weapon/minihoe = 10,
/obj/item/weapon/plantspray/pests = 10,
/obj/item/weapon/stock_parts/cell = 30,
/obj/item/weapon/storage/belt/utility = 20,
/obj/item/weapon/storage/box = 20,
/obj/item/weapon/storage/box/cups = 10,
/obj/item/weapon/storage/box/donkpockets = 10,
/obj/item/weapon/storage/box/lights/mixed = 30,
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco = 10,
/obj/item/weapon/storage/toolbox/mechanical = 10,
/obj/item/weapon/screwdriver = 30,
/obj/item/weapon/tank/emergency_oxygen = 20,
/obj/item/weapon/tank/emergency_oxygen/engi = 10,
/obj/item/weapon/vending_refill/cola = 10,
/obj/item/weapon/weldingtool = 30,
/obj/item/weapon/wirecutters = 10,
/obj/item/weapon/wrench = 40,
/obj/item/weapon/relic = 35,
/obj/item/clothing/shoes/brown = 30,
/obj/item/seeds/ambrosiadeusseed = 10,
/obj/item/seeds/ambrosiavulgarisseed = 20,
/obj/item/clothing/under/color/black = 30,
/obj/item/stack/tape_roll = 10,
////////////////CONTRABAND STUFF//////////////////
/obj/item/weapon/grenade/clown_grenade = 3,
/obj/item/seeds/ambrosiavulgarisseed/cruciatus = 3,
/obj/item/weapon/gun/projectile/automatic/pistol/empty = 1,
/obj/item/ammo_box/magazine/m10mm = 4,
/obj/item/weapon/soap/syndie = 7,
/obj/item/weapon/gun/syringe/syndicate = 2,
/obj/item/weapon/suppressor = 4,
/obj/item/clothing/under/chameleon = 2,
/obj/item/weapon/stamp/chameleon = 2,
/obj/item/clothing/shoes/syndigaloshes = 5,
/obj/item/clothing/mask/gas/voice = 2,
/obj/item/weapon/dnascrambler = 1,
/obj/item/weapon/storage/backpack/satchel_flat = 2,
/obj/item/weapon/storage/toolbox/syndicate = 2,
/obj/item/weapon/storage/backpack/duffel/syndie/surgery_fake = 2,
/obj/item/weapon/storage/belt/military = 2,
/obj/item/weapon/storage/box/syndie_kit/space = 2,
/obj/item/device/multitool/ai_detect = 2,
/obj/item/weapon/implanter/storage = 1,
/obj/item/toy/cards/deck/syndicate = 2,
/obj/item/weapon/storage/secure/briefcase/syndie = 2,
"" = 90
)
/obj/effect/spawner/lootdrop/trade_sol_rare
+2 -2
View File
@@ -13,10 +13,10 @@
if(1.0)
qdel(src)
if(2.0)
if (prob(50))
if(prob(50))
qdel(src)
if(3.0)
if (prob(5))
if(prob(5))
qdel(src)
return
+2 -2
View File
@@ -222,10 +222,10 @@
if(dist < dev)
T.color = "red"
T.maptext = "Dev"
else if (dist < heavy)
else if(dist < heavy)
T.color = "yellow"
T.maptext = "Heavy"
else if (dist < light)
else if(dist < light)
T.color = "blue"
T.maptext = "Light"
else
+23 -17
View File
@@ -57,6 +57,9 @@
var/flags_size = 0 //flag, primarily used for clothing to determine if a fatty can wear something or not.
var/block_chance = 0
var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom
/* Species-specific sprites, concept stolen from Paradise//vg/.
ex:
sprite_sheets = list(
@@ -90,11 +93,11 @@
qdel(src)
return
if(2.0)
if (prob(50))
if(prob(50))
qdel(src)
return
if(3.0)
if (prob(5))
if(prob(5))
qdel(src)
return
else
@@ -169,11 +172,11 @@
/obj/item/attack_hand(mob/user as mob)
if (!user) return 0
if (hasorgans(user))
if(!user) return 0
if(hasorgans(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
if(user.hand)
temp = H.organs_by_name["l_hand"]
if(!temp)
to_chat(user, "<span class='warning'>You try to use your hand, but it's missing!</span>")
@@ -182,13 +185,13 @@
to_chat(user, "<span class='warning'>You try to move your [temp.name], but cannot!</span>")
return 0
if (istype(src.loc, /obj/item/weapon/storage))
if(istype(src.loc, /obj/item/weapon/storage))
//If the item is in a storage item, take it out
var/obj/item/weapon/storage/S = src.loc
S.remove_from_storage(src)
src.throwing = 0
if (loc == user)
if(loc == user)
if(!user.unEquip(src))
return 0
@@ -213,13 +216,13 @@
to_chat(user, "Your claws aren't capable of such fine manipulation.")
return
if (istype(src.loc, /obj/item/weapon/storage))
if(istype(src.loc, /obj/item/weapon/storage))
for(var/mob/M in range(1, src.loc))
if (M.s_active == src.loc)
if (M.client)
if(M.s_active == src.loc)
if(M.client)
M.client.screen -= src
src.throwing = 0
if (src.loc == user)
if(src.loc == user)
if(!user.unEquip(src))
return
else
@@ -242,7 +245,7 @@
attack_hand(A)
/obj/item/attack_ai(mob/user as mob)
if (istype(src.loc, /obj/item/weapon/robot_module))
if(istype(src.loc, /obj/item/weapon/robot_module))
//If the item is part of a cyborg module, equip it
if(!isrobot(user)) return
var/mob/living/silicon/robot/R = user
@@ -282,6 +285,12 @@
return
/obj/item/proc/hit_reaction(mob/living/carbon/human/owner, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(prob(final_block_chance))
owner.visible_message("<span class='danger'>[owner] blocks [attack_text] with [src]!</span>")
return 1
return 0
/obj/item/proc/talk_into(mob/M as mob, var/text, var/channel=null)
return
@@ -374,9 +383,6 @@
/obj/item/proc/ui_action_click()
attack_self(usr)
/obj/item/proc/IsShield()
return 0
/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit
return 0
@@ -441,7 +447,7 @@
M.eye_blurry += 10
M.Paralyse(1)
M.Weaken(2)
if (eyes.damage >= eyes.min_broken_damage)
if(eyes.damage >= eyes.min_broken_damage)
if(M.stat != 2)
to_chat(M, "<span class='danger'>You go blind!</span>")
var/obj/item/organ/external/affecting = H.get_organ("head")
@@ -462,7 +468,7 @@
/obj/item/add_blood(mob/living/carbon/human/M as mob)
if (!..())
if(!..())
return 0
if(istype(src, /obj/item/weapon/melee/energy))
+14 -14
View File
@@ -15,59 +15,59 @@
return
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (health < 1)
if(health < 1)
return
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
if (contents.len >= max_butts)
if(istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
if(contents.len >= max_butts)
to_chat(user, "This ashtray is full.")
return
user.unEquip(W)
W.loc = src
if (istype(W,/obj/item/clothing/mask/cigarette))
if(istype(W,/obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/cig = W
if (cig.lit == 1)
if(cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
processing_objects.Remove(cig)
var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt)
qdel(cig)
else if (cig.lit == 0)
else if(cig.lit == 0)
to_chat(user, "You place [cig] in [src] without even smoking it. Why would you do that?")
src.visible_message("[user] places [W] in [src].")
user.update_inv_l_hand()
user.update_inv_r_hand()
add_fingerprint(user)
if (contents.len == max_butts)
if(contents.len == max_butts)
icon_state = icon_full
desc = empty_desc + " It's stuffed full."
else if (contents.len > max_butts/2)
else if(contents.len > max_butts/2)
icon_state = icon_half
desc = empty_desc + " It's half-filled."
else
health = max(0,health - W.force)
to_chat(user, "You hit [src] with [W].")
if (health < 1)
if(health < 1)
die()
return
/obj/item/ashtray/throw_impact(atom/hit_atom)
if (health > 0)
if(health > 0)
health = max(0,health - 3)
if (health < 1)
if(health < 1)
die()
return
if (contents.len)
if(contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
for(var/obj/item/clothing/mask/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_empty
return ..()
/obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
for(var/obj/item/clothing/mask/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_broken
+19 -19
View File
@@ -153,7 +153,7 @@
/obj/item/areaeditor/proc/get_area_type(var/area/A = get_area())
if (istype(A,/area/space))
if(istype(A,/area/space))
return AREA_SPACE
var/list/SPECIALS = list(
/area/shuttle,
@@ -167,8 +167,8 @@
/area/prison
// /area/derelict //commented out, all hail derelict-rebuilders!
)
for (var/type in SPECIALS)
if ( istype(A,type) )
for(var/type in SPECIALS)
if( istype(A,type) )
return AREA_SPECIAL
return AREA_STATION
@@ -229,7 +229,7 @@
/obj/item/areaeditor/proc/set_area_machinery_title(var/area/A,var/title,var/oldtitle)
if (!oldtitle) // or replacetext goes to infinite loop
if(!oldtitle) // or replacetext goes to infinite loop
return
for(var/obj/machinery/alarm/M in A)
M.name = replacetext(M.name,oldtitle,title)
@@ -244,28 +244,28 @@
//TODO: much much more. Unnamed airlocks, cameras, etc.
/obj/item/areaeditor/proc/check_tile_is_border(var/turf/T2,var/dir)
if (istype(T2, /turf/space))
if(istype(T2, /turf/space))
return BORDER_SPACE //omg hull breach we all going to die here
if (istype(T2, /turf/simulated/shuttle))
if(istype(T2, /turf/simulated/shuttle))
return BORDER_SPACE
if (get_area_type(T2.loc)!=AREA_SPACE)
if(get_area_type(T2.loc)!=AREA_SPACE)
return BORDER_BETWEEN
if (istype(T2, /turf/simulated/wall))
if(istype(T2, /turf/simulated/wall))
return BORDER_2NDTILE
if (!istype(T2, /turf/simulated))
if(!istype(T2, /turf/simulated))
return BORDER_BETWEEN
for (var/obj/structure/window/W in T2)
for(var/obj/structure/window/W in T2)
if(turn(dir,180) == W.dir)
return BORDER_BETWEEN
if (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST))
if(W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST))
return BORDER_2NDTILE
for(var/obj/machinery/door/window/D in T2)
if(turn(dir,180) == D.dir)
return BORDER_BETWEEN
if (locate(/obj/machinery/door) in T2)
if(locate(/obj/machinery/door) in T2)
return BORDER_2NDTILE
if (locate(/obj/structure/falsewall) in T2)
if(locate(/obj/structure/falsewall) in T2)
return BORDER_2NDTILE
return BORDER_NONE
@@ -275,23 +275,23 @@
var/list/turf/found = new
var/list/turf/pending = list(first)
while(pending.len)
if (found.len+pending.len > 300)
if(found.len+pending.len > 300)
return ROOM_ERR_TOOLARGE
var/turf/T = pending[1] //why byond havent list::pop()?
pending -= T
for (var/dir in cardinal)
for(var/dir in cardinal)
var/skip = 0
for (var/obj/structure/window/W in T)
for(var/obj/structure/window/W in T)
if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
skip = 1; break
if (skip) continue
if(skip) continue
for(var/obj/machinery/door/window/D in T)
if(dir == D.dir)
skip = 1; break
if (skip) continue
if(skip) continue
var/turf/NT = get_step(T,dir)
if (!isturf(NT) || (NT in found) || (NT in pending))
if(!isturf(NT) || (NT in found) || (NT in pending))
continue
switch(check_tile_is_border(NT,dir))
+4 -4
View File
@@ -41,14 +41,14 @@
attackby(W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/pen))
if(istype(W, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if (user.get_active_hand() != W)
if(user.get_active_hand() != W)
return
if (!in_range(src, user) && src.loc != user)
if(!in_range(src, user) && src.loc != user)
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if (t)
if(t)
src.name = "body bag - "
src.name += t
src.overlays += image(src.icon, "bodybag_label")
+1 -1
View File
@@ -8,7 +8,7 @@ obj/item/changestone/attack_hand(var/mob/user as mob)
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(!H.gloves)
if (H.gender == FEMALE)
if(H.gender == FEMALE)
H.change_gender(MALE)
else
H.change_gender(FEMALE)
+3 -3
View File
@@ -72,7 +72,7 @@
temp = pick(graffiti)
else
temp = href_list["type"]
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
return
drawtype = temp
update_window(usr)
@@ -160,7 +160,7 @@
..()
/obj/item/toy/crayon/mime/Topic(href,href_list)
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
return
if(href_list["color"])
if(colour != "#FFFFFF")
@@ -188,7 +188,7 @@
if(href_list["color"])
var/temp = input(usr, "Please select colour.", "Crayon colour") as color
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
return
colour = temp
update_window(usr)
+6 -6
View File
@@ -26,7 +26,7 @@
var/mob/living/silicon/ai/AI = locate(/mob/living/silicon/ai) in src //AI is inside.
if(AI)
name = "intelliCard - [AI.name]"
if (AI.stat == DEAD)
if(AI.stat == DEAD)
icon_state = "aicard-404"
else
icon_state = "aicard-full"
@@ -60,7 +60,7 @@
data["has_laws"] = laws.len
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
ui.set_initial_data(data)
ui.open()
@@ -77,25 +77,25 @@
var/user = usr
if (href_list["wipe"])
if(href_list["wipe"])
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
if(confirm == "Yes" && (CanUseTopic(user, state) == STATUS_INTERACTIVE))
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].")
flush = 1
AI.suiciding = 1
to_chat(AI, "Your core files are being wiped!")
while (AI && AI.stat != DEAD)
while(AI && AI.stat != DEAD)
AI.adjustOxyLoss(2)
AI.updatehealth()
sleep(10)
flush = 0
if (href_list["radio"])
if(href_list["radio"])
AI.aiRadio.disabledAi = text2num(href_list["radio"])
to_chat(AI, "<span class='warning'>Your Subspace Transceiver has been [AI.aiRadio.disabledAi ? "disabled" : "enabled"]!</span>")
to_chat(user, "<span class='notice'>You [AI.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver.</span>")
if (href_list["wireless"])
if(href_list["wireless"])
AI.control_disabled = text2num(href_list["wireless"])
to_chat(AI, "<span class='warning'>Your wireless interface has been [AI.control_disabled ? "disabled" : "enabled"]!</span>")
to_chat(user, "<span class='notice'>You [AI.control_disabled ? "disable" : "enable"] the AI's wireless interface.</span>")
@@ -55,7 +55,7 @@
interact(user)
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
if (user.stat || loc != user || !user.canmove || user.eye_blind || !current)
if(user.stat || loc != user || !user.canmove || user.eye_blind || !current)
user.reset_view(null)
user.unset_machine()
return null
@@ -267,7 +267,7 @@ obj/item/device/flashlight/lamp/bananalamp
/obj/item/device/flashlight/emp/afterattack(atom/A as mob|obj, mob/user, proximity)
if(!proximity) return
if (emp_cur_charges > 0)
if(emp_cur_charges > 0)
emp_cur_charges -= 1
A.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].", \
"<span class='userdanger'>[user] blinks \the [src] at \the [A].")
@@ -71,10 +71,10 @@
/obj/item/device/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user, var/params)
if( !(user in (viewers(7,target))) )
return
if (!diode)
if(!diode)
to_chat(user, "<span class='notice'>You point [src] at [target], but nothing happens!</span>")
return
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(ishuman(user))
+2 -2
View File
@@ -12,7 +12,7 @@
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
if (user.client)
if(user.client)
if(user.client.prefs.muted & MUTE_IC)
to_chat(src, "\red You cannot speak in IC (muted).")
return
@@ -39,7 +39,7 @@
if(!message)
return
message = capitalize(message)
if ((src.loc == user && usr.stat == 0))
if((src.loc == user && usr.stat == 0))
if(emagged)
if(insults)
saymsg(user, pick(insultmsg))
+6 -6
View File
@@ -18,7 +18,7 @@
if(!proximity)
return
if (!target_species)
if(!target_species)
return //it shouldn't be null, okay?
if(!parts)
@@ -28,18 +28,18 @@
return
var/allowed = 0
for (var/permitted_type in permitted_types)
for(var/permitted_type in permitted_types)
if(istype(O, permitted_type))
allowed = 1
var/obj/item/clothing/I = O
if (!istype(I) || !allowed)
if(!istype(I) || !allowed)
to_chat(user, "<span class='notice'>[src] is unable to modify that.</span>")
return
var/excluding = ("exclude" in I.species_restricted)
var/in_list = (target_species in I.species_restricted)
if (excluding ^ in_list)
if(excluding ^ in_list)
to_chat(user, "<span class='notice'>[I] is already modified.</span>")
return
@@ -53,9 +53,9 @@
I.refit_for_species(target_species)
if (istype(I, /obj/item/clothing/head/helmet))
if(istype(I, /obj/item/clothing/head/helmet))
parts &= ~MODKIT_HELMET
if (istype(I, /obj/item/clothing/suit))
if(istype(I, /obj/item/clothing/suit))
parts &= ~MODKIT_SUIT
if(!parts)
+2 -2
View File
@@ -30,7 +30,7 @@
return ..()
/obj/item/device/paicard/attack_self(mob/user)
if (!in_range(src, user))
if(!in_range(src, user))
return
user.set_machine(src)
var/dat = {"
@@ -320,7 +320,7 @@
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2)
/obj/item/device/paicard/emp_act(severity)
@@ -19,7 +19,7 @@
var/obj/machinery/atmospherics/pipe/P = A
var/turf/T = P.loc
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
if(P.level < 2 && T.level==1 && isturf(T) && T.intact)
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return
+1 -1
View File
@@ -49,7 +49,7 @@
to_chat(user, "Device must be placed over an exposed cable to attach to it.")
return
else
if (mode == 2)
if(mode == 2)
processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
processing_power_items.Remove(src)
anchored = 0
@@ -35,11 +35,11 @@
set category = "Object"
set src in usr
if (usr.stat || usr.restrained())
if(usr.stat || usr.restrained())
return
code = t
if (isnull(code))
if(isnull(code))
code = initial(code)
src.add_fingerprint(usr)
return
@@ -51,11 +51,11 @@
to_chat(user, radio_desc)
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
if (channel == "special")
if (translate_binary)
if(channel == "special")
if(translate_binary)
var/datum/language/binary = all_languages["Robot Talk"]
binary.broadcast(M, message)
if (translate_hive)
if(translate_hive)
var/datum/language/hivemind = all_languages["Hivemind"]
hivemind.broadcast(M, message)
return null
@@ -306,13 +306,13 @@
var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level)
if (disabledAi)
if(disabledAi)
return -1 //Transciever Disabled.
return ..(freq, level, 1)
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
if(!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return
if(istype(W, /obj/item/weapon/screwdriver))
@@ -395,7 +395,7 @@
src.syndie = 1
for (var/ch_name in channels)
for(var/ch_name in channels)
if(!radio_controller)
src.name = "broken radio headset"
return
@@ -120,13 +120,13 @@
attack_self(user)
/obj/item/device/radio/intercom/receive_range(freq, level)
if (!on)
if(!on)
return -1
if(!(0 in level))
var/turf/position = get_turf(src)
if(isnull(position) || !(position.z in level))
return -1
if (!src.listening)
if(!src.listening)
return -1
if(freq in ANTAG_FREQS)
if(!(src.syndie))
+44 -44
View File
@@ -77,7 +77,7 @@ var/global/list/default_medbay_channels = list(
wires = null
if(radio_controller)
radio_controller.remove_object(src, frequency)
for (var/ch_name in channels)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
patch_link = null
return ..()
@@ -88,7 +88,7 @@ var/global/list/default_medbay_channels = list(
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
set_frequency(frequency)
for (var/ch_name in channels)
for(var/ch_name in channels)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
/obj/item/device/radio/attack_ghost(mob/user)
@@ -177,7 +177,7 @@ var/global/list/default_medbay_channels = list(
return can_admin_interact()
/obj/item/device/radio/proc/text_wires()
if (b_stat)
if(b_stat)
return wires.GetInteractWindow()
return
@@ -194,31 +194,31 @@ var/global/list/default_medbay_channels = list(
if(is_special)
return 0
if (href_list["track"])
if(href_list["track"])
var/mob/target = locate(href_list["track"])
var/mob/living/silicon/ai/A = locate(href_list["track2"])
if(A && target)
A.ai_actual_track(target)
. = 1
else if (href_list["freq"])
else if(href_list["freq"])
var/new_frequency = (frequency + text2num(href_list["freq"]))
if ((new_frequency < PUBLIC_LOW_FREQ || new_frequency > PUBLIC_HIGH_FREQ))
if((new_frequency < PUBLIC_LOW_FREQ || new_frequency > PUBLIC_HIGH_FREQ))
new_frequency = sanitize_frequency(new_frequency)
set_frequency(new_frequency)
if(hidden_uplink)
if(hidden_uplink.check_trigger(usr, frequency, traitor_frequency))
usr << browse(null, "window=radio")
. = 1
else if (href_list["talk"])
else if(href_list["talk"])
ToggleBroadcast()
. = 1
else if(href_list["listen"])
var/chan_name = href_list["ch_name"]
if (!chan_name)
if(!chan_name)
ToggleReception()
else
if (channels[chan_name] & FREQ_LISTENING)
if(channels[chan_name] & FREQ_LISTENING)
channels[chan_name] &= ~FREQ_LISTENING
else
channels[chan_name] |= FREQ_LISTENING
@@ -237,16 +237,16 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels, var/role = "Unknown") //BS12 EDIT
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if (channel == "department")
if(channel == "department")
// to_chat(world, "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\"")
channel = channels[1]
connection = secure_radio_connections[channel]
else
connection = radio_connection
channel = null
if (!istype(connection))
if(!istype(connection))
return
if (!connection)
if(!connection)
return
var/mob/living/automatedannouncer/A = new /mob/living/automatedannouncer(src)
A.name = from
@@ -288,10 +288,10 @@ var/global/list/default_medbay_channels = list(
// Otherwise, if a channel is specified, look for it.
if(channels && channels.len > 0)
if (message_mode == "department") // Department radio shortcut
if(message_mode == "department") // Department radio shortcut
message_mode = channels[1]
if (channels[message_mode]) // only broadcast if the channel is set on
if(channels[message_mode]) // only broadcast if the channel is set on
return secure_radio_connections[message_mode]
// If we were to send to a channel we don't have, drop it.
@@ -323,9 +323,9 @@ var/global/list/default_medbay_channels = list(
//#### Grab the connection datum ####//
var/datum/radio_frequency/connection = handle_message_mode(M, message, channel)
if (!istype(connection))
if(!istype(connection))
return 0
if (!connection)
if(!connection)
return 0
var/turf/position = get_turf(src)
@@ -344,24 +344,24 @@ var/global/list/default_medbay_channels = list(
var/jobname // the mob's "job"
// --- Human: use their actual job ---
if (ishuman(M))
if(ishuman(M))
var/mob/living/carbon/human/H = M
jobname = H.get_assignment()
// --- Carbon Nonhuman ---
else if (iscarbon(M)) // Nonhuman carbon mob
else if(iscarbon(M)) // Nonhuman carbon mob
jobname = "No id"
// --- AI ---
else if (isAI(M))
else if(isAI(M))
jobname = "AI"
// --- Cyborg ---
else if (isrobot(M))
else if(isrobot(M))
jobname = "Cyborg"
// --- Personal AI (pAI) ---
else if (istype(M, /mob/living/silicon/pai))
else if(istype(M, /mob/living/silicon/pai))
jobname = "Personal AI"
// --- Unidentifiable mob ---
@@ -372,7 +372,7 @@ var/global/list/default_medbay_channels = list(
// --- Modifications to the mob's identity ---
// The mob is disguising their identity:
if (ishuman(M) && M.GetVoice() != real_name)
if(ishuman(M) && M.GetVoice() != real_name)
displayname = M.GetVoice()
jobname = "Unknown"
voicemask = 1
@@ -500,7 +500,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
if (broadcasting)
if(broadcasting)
if(get_dist(src, M) <= canhear_range)
talk_into(M, msg,null,verb,speaking)
@@ -508,7 +508,7 @@ var/global/list/default_medbay_channels = list(
/*
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
if ((R.frequency == frequency && message))
if((R.frequency == frequency && message))
return 1
else if
@@ -523,7 +523,7 @@ var/global/list/default_medbay_channels = list(
// what the range is in which mobs will hear the radio
// returns: -1 if can't receive, range otherwise
if (!wires || wires.IsIndexCut(WIRE_RECEIVE))
if(!wires || wires.IsIndexCut(WIRE_RECEIVE))
return -1
if(!listening)
return -1
@@ -534,20 +534,20 @@ var/global/list/default_medbay_channels = list(
if(freq in ANTAG_FREQS)
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
return -1
if (!on)
if(!on)
return -1
if (!freq) //recieved on main frequency
if (!listening)
if(!freq) //recieved on main frequency
if(!listening)
return -1
else
var/accept = (freq==frequency && listening)
if (!accept)
for (var/ch_name in channels)
if(!accept)
for(var/ch_name in channels)
var/datum/radio_frequency/RF = secure_radio_connections[ch_name]
if (RF.frequency==freq && (channels[ch_name]&FREQ_LISTENING))
if(RF.frequency==freq && (channels[ch_name]&FREQ_LISTENING))
accept = 1
break
if (!accept)
if(!accept)
return -1
return canhear_range
@@ -560,8 +560,8 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/examine(mob/user, var/distance = -1)
. = ..(user, distance)
if ((in_range(src, user) || loc == user))
if (b_stat)
if((in_range(src, user) || loc == user))
if(b_stat)
user.show_message("\blue \the [src] can be attached and modified!")
else
user.show_message("\blue \the [src] can not be modified or attached!")
@@ -570,11 +570,11 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) ))
if(!( istype(W, /obj/item/weapon/screwdriver) ))
return
b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
if (b_stat)
if(b_stat)
user.show_message("\blue The radio can now be attached and modified!")
else
user.show_message("\blue The radio can no longer be modified or attached!")
@@ -587,7 +587,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/emp_act(severity)
broadcasting = 0
listening = 0
for (var/ch_name in channels)
for(var/ch_name in channels)
channels[ch_name] = 0
..()
@@ -633,7 +633,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/borg/talk_into()
. = ..()
if (isrobot(src.loc))
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
var/datum/robot_component/C = R.components["radio"]
R.use_power(C.energy_consumption)
@@ -641,7 +641,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
// ..()
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
if(!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return
if(istype(W, /obj/item/weapon/screwdriver))
@@ -701,7 +701,7 @@ var/global/list/default_medbay_channels = list(
src.syndie = 1
for (var/ch_name in src.channels)
for(var/ch_name in src.channels)
if(!radio_controller)
sleep(30) // Waiting for the radio_controller to be created.
if(!radio_controller)
@@ -715,7 +715,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/borg/Topic(href, href_list)
if(..())
return 1
if (href_list["mode"])
if(href_list["mode"])
var/enable_subspace_transmission = text2num(href_list["mode"])
if(enable_subspace_transmission != subspace_transmission)
subspace_transmission = !subspace_transmission
@@ -729,7 +729,7 @@ var/global/list/default_medbay_channels = list(
else
recalculateChannels()
. = 1
if (href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio.
if(href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio.
var/do_shut_up = text2num(href_list["shutup"])
if(do_shut_up != shut_up)
shut_up = !shut_up
@@ -778,12 +778,12 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/proc/config(op)
if(radio_controller)
for (var/ch_name in channels)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections = new
channels = op
if(radio_controller)
for (var/ch_name in op)
for(var/ch_name in op)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return
+34 -28
View File
@@ -127,7 +127,7 @@ REAGENT SCANNER
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
if (( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
to_chat(user, text("\red You try to analyze the floor's vitals!"))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1)
@@ -138,7 +138,7 @@ REAGENT SCANNER
return
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.","<span class='notice'> You have analyzed [M]'s vitals.")
if (!istype(M,/mob/living/carbon/human) || M.isSynthetic())
if(!istype(M,/mob/living/carbon/human) || M.isSynthetic())
//these sensors are designed for organic life
user.show_message("\blue Analyzing Results for ERROR:\n\t Overall Status: ERROR")
user.show_message("\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>", 1)
@@ -184,7 +184,7 @@ REAGENT SCANNER
if(M.status_flags & FAKEDEATH)
OX = fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal"
user.show_message("[OX] | [TX] | [BU] | [BR]")
if (istype(M, /mob/living/carbon))
if(istype(M, /mob/living/carbon))
if(upgraded)
chemscan(user, M)
for(var/datum/disease/D in M.viruses)
@@ -192,15 +192,15 @@ REAGENT SCANNER
to_chat(user, "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
if(M.getStaminaLoss())
user.show_message("<span class='info'>Subject appears to be suffering from fatigue.</span>")
if (M.getCloneLoss())
if(M.getCloneLoss())
user.show_message("<span class='warning'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
if (M.has_brain_worms())
if(M.has_brain_worms())
user.show_message("\red Subject suffering from aberrant brain activity. Recommend further scanning.")
else if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && !M.get_int_organ(/obj/item/organ/internal/brain))
else if(M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && !M.get_int_organ(/obj/item/organ/internal/brain))
user.show_message("\red Subject is brain dead.")
else if (M.getBrainLoss() >= 60)
else if(M.getBrainLoss() >= 60)
user.show_message("\red Severe brain damage detected. Subject likely to have mental retardation.")
else if (M.getBrainLoss() >= 10)
else if(M.getBrainLoss() >= 10)
user.show_message("\red Significant brain damage detected. Subject may have had a concussion.")
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -226,7 +226,7 @@ REAGENT SCANNER
for(var/datum/wound/W in e.wounds) if(W.internal)
user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1)
break
if(M:vessel)
if(H.vessel)
var/blood_volume = round(M:vessel.get_reagent_amount("blood"))
var/blood_percent = blood_volume / 560
blood_percent *= 100
@@ -246,7 +246,14 @@ REAGENT SCANNER
if(implant_detect)
user.show_message("<span class='notice'>Detected cybernetic modifications:</span>")
user.show_message("<span class='notice'>[implant_detect]</span>")
if(H.gene_stability < 40)
user.show_message("<span class='userdanger'>Subject's genes are quickly breaking down!</span>")
else if(H.gene_stability < 70)
user.show_message("<span class='danger'>Subject's genes are showing signs of spontenous breakdown.</span>")
else if(H.gene_stability < 85)
user.show_message("<span class='warning'>Subject's genes are showing minor signs of instability.</span>")
else
user.show_message("<span class='notice'>Subject's genes are stable.</span>")
src.add_fingerprint(user)
return
@@ -255,7 +262,7 @@ REAGENT SCANNER
set category = "Object"
mode = !mode
switch (mode)
switch(mode)
if(1)
to_chat(usr, "The scanner now shows specific limb damage.")
if(0)
@@ -302,11 +309,11 @@ REAGENT SCANNER
/obj/item/device/analyzer/attack_self(mob/user as mob)
if (user.stat)
if(user.stat)
return
var/turf/location = user.loc
if (!( istype(location, /turf) ))
if(!( istype(location, /turf) ))
return
var/datum/gas_mixture/environment = location.return_air()
@@ -381,12 +388,12 @@ REAGENT SCANNER
icon_state = initial(icon_state)
/obj/item/device/mass_spectrometer/attack_self(mob/user as mob)
if (user.stat)
if(user.stat)
return
if (crit_fail)
if(crit_fail)
to_chat(user, "<span class='warning'>This device has critically failed and is no longer functional!</span>")
return
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(reagents.total_volume)
@@ -441,14 +448,14 @@ REAGENT SCANNER
var/recent_fail = 0
/obj/item/device/reagent_scanner/afterattack(obj/O, mob/user as mob)
if (user.stat)
if(user.stat)
return
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(!istype(O))
return
if (crit_fail)
if(crit_fail)
to_chat(user, "<span class='warning'>This device has critically failed and is no longer functional!</span>")
return
@@ -456,7 +463,7 @@ REAGENT SCANNER
var/dat = ""
if(O.reagents.reagent_list.len > 0)
var/one_percent = O.reagents.total_volume / 100
for (var/datum/reagent/R in O.reagents.reagent_list)
for(var/datum/reagent/R in O.reagents.reagent_list)
if(prob(reliability))
dat += "<br>[TAB]<span class='notice'>[R][details ? ": [R.volume / one_percent]%" : ""]</span>"
recent_fail = 0
@@ -494,24 +501,24 @@ REAGENT SCANNER
materials = list(MAT_METAL=30, MAT_GLASS=20)
/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
if (!isslime(M))
if(!isslime(M))
user.show_message("<span class='warning'>This device can only scan slimes!</span>", 1)
return
var/mob/living/carbon/slime/T = M
user.show_message("Slime scan results:", 1)
user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby"), 1)
user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition()), 1)
if (T.nutrition < T.get_starve_nutrition())
if(T.nutrition < T.get_starve_nutrition())
user.show_message("<span class='warning'>Warning: slime is starving!</span>", 1)
else if (T.nutrition < T.get_hunger_nutrition())
else if(T.nutrition < T.get_hunger_nutrition())
user.show_message("<span class='warning'>Warning: slime is hungry</span>", 1)
user.show_message("Electric change strength: [T.powerlevel]", 1)
user.show_message("Health: [T.health]", 1)
if (T.slime_mutation[4] == T.colour)
if(T.slime_mutation[4] == T.colour)
user.show_message("This slime does not evolve any further.", 1)
else
if (T.slime_mutation[3] == T.slime_mutation[4])
if (T.slime_mutation[2] == T.slime_mutation[1])
if(T.slime_mutation[3] == T.slime_mutation[4])
if(T.slime_mutation[2] == T.slime_mutation[1])
user.show_message("Possible mutation: [T.slime_mutation[3]]", 1)
user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting", 1)
else
@@ -520,7 +527,6 @@ REAGENT SCANNER
else
user.show_message("Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]", 1)
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting", 1)
if (T.cores > 1)
if(T.cores > 1)
user.show_message("Anomalious slime core amount detected", 1)
user.show_message("Growth progress: [T.amount_grown]/10", 1)
@@ -88,7 +88,7 @@
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
@@ -101,9 +101,9 @@
/obj/item/device/transfer_valve/Topic(href, href_list)
..()
if ( usr.stat || usr.restrained() )
if( usr.stat || usr.restrained() )
return 0
if (src.loc != usr)
if(src.loc != usr)
return 0
if(tank_one && href_list["tankone"])
split_gases()
@@ -162,7 +162,7 @@
tank_two.air_contents.merge(temp)
/obj/item/device/transfer_valve/proc/split_gases()
if (!valve_open || !tank_one || !tank_two)
if(!valve_open || !tank_one || !tank_two)
return
var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume
var/datum/gas_mixture/temp
@@ -194,7 +194,7 @@
log_game("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]")
merge_gases()
spawn(20) // In case one tank bursts
for (var/i=0,i<5,i++)
for(var/i=0,i<5,i++)
src.update_icon()
sleep(10)
src.update_icon()
+4 -4
View File
@@ -202,7 +202,7 @@ var/list/world_uplinks = list()
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = inventory_state)
@@ -218,14 +218,14 @@ var/list/world_uplinks = list()
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
if(usr.stat || usr.restrained())
return 1
if (!( istype(usr, /mob/living/carbon/human)))
if(!( istype(usr, /mob/living/carbon/human)))
return 1
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
if((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.set_machine(src)
if(..(href, href_list))
return 1
+1 -1
View File
@@ -10,7 +10,7 @@
var/emagged = 0
/obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
if (spamcheck)
if(spamcheck)
return
if(emagged)
@@ -9,11 +9,11 @@
if(..())
var/turf/turf_loc = get_turf(user)
var/area/area_loc = turf_loc.loc
if (area_loc.get_apc())
if(area_loc.get_apc())
to_chat(user, "<span class='rose'>This area already has an APC.</span>")
return //only one APC per area
for(var/obj/machinery/power/terminal/T in turf_loc)
if (T.master)
if(T.master)
to_chat(user, "<span class='rose'>There is another network terminal here.</span>")
return
else
@@ -6,7 +6,7 @@
/obj/item/mounted/frame/attackby(obj/item/weapon/W, mob/user)
..()
if (istype(W, /obj/item/weapon/wrench) && sheets_refunded)
if(istype(W, /obj/item/weapon/wrench) && sheets_refunded)
//new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(get_turf(src))
M.amount = sheets_refunded
@@ -16,10 +16,10 @@
if(..()) //if we pass the parent tests
var/turf/turf_loc = get_turf(user)
if (src.mount_reqs.Find("simfloor") && !istype(turf_loc, /turf/simulated/floor))
if(src.mount_reqs.Find("simfloor") && !istype(turf_loc, /turf/simulated/floor))
to_chat(user, "<span class='rose'>[src] cannot be placed on this spot.</span>")
return
if (src.mount_reqs.Find("nospace"))
if(src.mount_reqs.Find("nospace"))
var/area/my_area = turf_loc.loc
if(!istype(my_area) || (my_area.requires_power == 0 || istype(my_area,/area/space)))
to_chat(user, "<span class='rose'>[src] cannot be placed in this area.</span>")
@@ -11,7 +11,7 @@
playsound(get_turf(src), 'sound/machines/click.ogg', 75, 1)
var/constrdir = user.dir
var/constrloc = get_turf(user)
if (!do_after(user, 30, target = src))
if(!do_after(user, 30, target = src))
return
var/obj/machinery/light_construct/newlight
switch(fixture_type)
@@ -18,9 +18,9 @@
/obj/item/mounted/proc/try_build(turf/on_wall, mob/user, proximity_flag) //checks
if(!on_wall || !user)
return
if (proximity_flag != 1) //if we aren't next to the wall
if(proximity_flag != 1) //if we aren't next to the wall
return
if (!( get_dir(on_wall,user) in cardinal))
if(!( get_dir(on_wall,user) in cardinal))
to_chat(user, "<span class='rose'>You need to be standing next to a wall to place \the [src].</span>")
return
@@ -10,10 +10,10 @@
if(..())
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
if(!istype(loc, /turf/simulated/floor))
to_chat(usr, "<span class='alert'>Newscaster cannot be placed on this spot.</span>")
return
if (A.requires_power == 0 || A.name == "Space")
if(A.requires_power == 0 || A.name == "Space")
to_chat(usr, "<span class='alert'>Newscaster cannot be placed in this area.</span>")
return
+10 -10
View File
@@ -77,7 +77,7 @@ var/list/tape_roll_applications = list()
var/turf/cur = start
var/dir
if (start.x == end.x)
if(start.x == end.x)
var/d = end.y-start.y
if(d) d = d/abs(d)
end = get_turf(locate(end.x,end.y+d,end.z))
@@ -89,10 +89,10 @@ var/list/tape_roll_applications = list()
dir = "h"
var/can_place = 1
while (cur!=end && can_place)
while(cur!=end && can_place)
if(cur.density == 1)
can_place = 0
else if (istype(cur, /turf/space))
else if(istype(cur, /turf/space))
can_place = 0
else
for(var/obj/O in cur)
@@ -100,13 +100,13 @@ var/list/tape_roll_applications = list()
can_place = 0
break
cur = get_step_towards(cur,end)
if (!can_place)
if(!can_place)
to_chat(usr, "\blue You can't run \the [src] through that!")
return
cur = start
var/tapetest = 0
while (cur!=end)
while(cur!=end)
for(var/obj/item/tape/Ptest in cur)
if(Ptest.icon_state == "[Ptest.icon_base]_[dir]")
tapetest = 1
@@ -119,7 +119,7 @@ var/list/tape_roll_applications = list()
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
if (!proximity)
if(!proximity)
return
if(istype(A, /obj/machinery/door/airlock))
@@ -130,7 +130,7 @@ var/list/tape_roll_applications = list()
P.layer = 3.2
to_chat(user, "\blue You finish placing the [src].")
if (istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
if(istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
var/turf/F = A
var/direction = user.loc == F ? user.dir : turn(user.dir, 180)
var/icon/hazard_overlay = hazard_overlays["[direction]"]
@@ -151,7 +151,7 @@ var/list/tape_roll_applications = list()
if(!density) return 1
if(air_group || (height==0)) return 1
if ((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing == 1) )
if((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing == 1) )
return 1
else if(ismob(mover) && allowed(mover))
return 1
@@ -162,7 +162,7 @@ var/list/tape_roll_applications = list()
breaktape(W, user)
/obj/item/tape/attack_hand(mob/user as mob)
if (user.a_intent == I_HELP && src.allowed(user))
if(user.a_intent == I_HELP && src.allowed(user))
user.visible_message("<span class=notice>[user] lifts [src], allowing passage.</span>", "<span class=notice>You lift [src], allowing passage.</span>")
src.density = 0
spawn(200)
@@ -193,7 +193,7 @@ var/list/tape_roll_applications = list()
var/turf/cur = get_step(src,dir[i])
while(N != 1)
N = 1
for (var/obj/item/tape/P in cur)
for(var/obj/item/tape/P in cur)
if(P.icon_state == icon_dir)
N = 0
qdel(P)
+1 -1
View File
@@ -17,7 +17,7 @@
user.do_attack_animation(M)
M.Weaken(5)
if (M.stuttering < 5)
if(M.stuttering < 5)
M.stuttering = 5
M.Stun(5)
+2 -2
View File
@@ -120,7 +120,7 @@
B.loc = get_turf(src)
to_chat(user, "You armed the robot frame")
W:use(1)
if (user.get_inactive_hand()==src)
if(user.get_inactive_hand()==src)
user.unEquip(src)
user.put_in_inactive_hand(B)
qdel(src)
@@ -174,7 +174,7 @@
else
to_chat(user, "\blue You need to attach a flash to it first!")
if (istype(W, /obj/item/device/multitool))
if(istype(W, /obj/item/device/multitool))
if(check_completion())
Interact(user)
else
+2 -2
View File
@@ -33,7 +33,7 @@
attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/weldingtool))
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
overlays.Cut()
@@ -95,7 +95,7 @@
hp -= Proj.damage
if(hp <= 0)
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
if((O.client && !( O.blinded )))
to_chat(O, "\red [src] breaks into tiny pieces and collapses!")
qdel(src)
+18 -18
View File
@@ -11,16 +11,16 @@
var/heal_burn = 0
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
if (!istype(M))
if(!istype(M))
to_chat(user, "<span class='danger'>\The [src] cannot be applied to [M]!</span>")
return 1
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='danger'>You don't have the dexterity to do this!</span>")
return 1
if (istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -57,7 +57,7 @@
if(..())
return 1
if (istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -66,13 +66,13 @@
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been bandaged.")
return 1
else
for (var/datum/wound/W in affecting.wounds)
if (W.internal)
for(var/datum/wound/W in affecting.wounds)
if(W.internal)
continue
if (W.current_stage <= W.max_bleeding_stage)
if(W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] bandages \the [W.desc] on [M]'s [affecting.name].", \
"\blue You bandage \the [W.desc] on [M]'s [affecting.name]." )
else if (istype(W,/datum/wound/bruise))
else if(istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places a bruise patch over \the [W.desc] on [M]'s [affecting.name].", \
"\blue You place a bruise patch over \the [W.desc] on [M]'s [affecting.name]." )
else
@@ -98,7 +98,7 @@
if(..())
return 1
if (istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -144,7 +144,7 @@
if(..())
return 1
if (istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -156,20 +156,20 @@
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been treated.")
return 1
else
for (var/datum/wound/W in affecting.wounds)
if (W.internal)
for(var/datum/wound/W in affecting.wounds)
if(W.internal)
continue
if (W.current_stage <= W.max_bleeding_stage)
if(W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] cleans \the [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.", \
"\blue You clean and seal \the [W.desc] on [M]'s [affecting.name]." )
//H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise))
else if(istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places a medicine patch over \the [W.desc] on [M]'s [affecting.name].", \
"\blue You place a medicine patch over \the [W.desc] on [M]'s [affecting.name]." )
else
user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].", \
"\blue You smear some bioglue over [W.desc] on [M]'s [affecting.name]." )
if (bandaged)
if(bandaged)
affecting.heal_damage(heal_brute,0)
use(1)
else
@@ -188,7 +188,7 @@
if(..())
return 1
if (istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -232,7 +232,7 @@
affecting.status &= ~ORGAN_SPLINTED
to_chat(user, "<span class='notice'>You remove the splint from [M]'s [limb].")
return
if (M != user)
if(M != user)
user.visible_message("\red [user] starts to apply \the [src] to [M]'s [limb].", "\red You start to apply \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
else
if((!user.hand && affecting.limb_name in list("r_arm", "r_hand")) || (user.hand && affecting.limb_name in list("l_arm", "l_hand")))
@@ -240,7 +240,7 @@
return
user.visible_message("\red [user] starts to apply \the [src] to their [limb].", "\red You start to apply \the [src] to your [limb].", "\red You hear something being wrapped.")
if(do_after(user, 50, target = M))
if (M != user)
if(M != user)
user.visible_message("\red [user] finishes applying \the [src] to [M]'s [limb].", "\red You finish applying \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
else
if(prob(25))
+5 -5
View File
@@ -9,11 +9,11 @@
/obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob)
if (!istype(M) || !istype(user))
if(!istype(M) || !istype(user))
return 0
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
if(istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
if (R.getBruteLoss() || R.getFireLoss() )
if(R.getBruteLoss() || R.getFireLoss() )
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
@@ -23,11 +23,11 @@
else
to_chat(user, "<span class='notice'>All [R]'s systems are nominal.</span>")
if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs
if(istype(M,/mob/living/carbon/human)) //Repairing robolimbs
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
if (S && (S.status & ORGAN_ROBOT))
if(S && (S.status & ORGAN_ROBOT))
if(S.get_damage())
S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
+5 -5
View File
@@ -31,7 +31,7 @@
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/weldingtool))
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 2)
@@ -51,7 +51,7 @@
var/replace = user.get_inactive_hand() == src
use(2)
if (get_amount() <= 0 && replace)
if(get_amount() <= 0 && replace)
user.unEquip(src, 1)
if(new_item)
user.put_in_hands(new_item)
@@ -64,9 +64,9 @@
if(!istype(user.loc,/turf)) return 0
if (locate(/obj/structure/grille, usr.loc))
if(locate(/obj/structure/grille, usr.loc))
for(var/obj/structure/grille/G in usr.loc)
if (G.destroyed)
if(G.destroyed)
G.health = 10
G.density = 1
G.destroyed = 0
@@ -80,7 +80,7 @@
return
to_chat(usr, "\blue Assembling grille...")
if (!do_after(usr, 10, target = user))
if(!do_after(usr, 10, target = user))
return
var /obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
@@ -50,7 +50,7 @@
src = null
var/replace = (user.get_inactive_hand()==G)
G.use(1)
if (!G && !RG && replace)
if(!G && !RG && replace)
user.put_in_hands(RG)
else
return ..()
@@ -70,7 +70,7 @@
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
for(var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
to_chat(user, "<span class='danger'>There are too many windows in this location.</span>")
@@ -173,7 +173,7 @@
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
for(var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
to_chat(user, "<span class='danger'>There are too many windows in this location.</span>")
@@ -282,7 +282,7 @@
src = null
var/replace = (user.get_inactive_hand()==G)
G.use(1)
if (!G && !RG && replace)
if(!G && !RG && replace)
user.put_in_hands(RG)
else
return ..()
@@ -301,7 +301,7 @@
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
for(var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
to_chat(user, "<span class='danger'>There are too many windows in this location.</span>")
@@ -373,7 +373,7 @@
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
for(var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
to_chat(user, "<span class='danger'>There are too many windows in this location.</span>")
@@ -15,11 +15,11 @@
// item/attackby() properly, making this unnecessary
/*/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/storage/bag/sheetsnatcher))
if(istype(W, /obj/item/weapon/storage/bag/sheetsnatcher))
var/obj/item/weapon/storage/bag/sheetsnatcher/S = W
if(!S.mode)
S.add(src,user)
else
for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
for(var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
S.add(stack,user)
..()*/
+49 -49
View File
@@ -17,12 +17,12 @@
/obj/item/stack/New(var/loc, var/amount=null)
..()
if (amount!=null) //Allow for stacks with the amount=0
if(amount!=null) //Allow for stacks with the amount=0
src.amount=amount
return
/obj/item/stack/Destroy()
if (usr && usr.machine==src)
if(usr && usr.machine==src)
usr << browse(null, "window=stack")
return ..()
@@ -35,62 +35,62 @@
list_recipes(user)
/obj/item/stack/proc/list_recipes(mob/user as mob, recipes_sublist)
if (!recipes)
if(!recipes)
return
if (!src || amount<=0)
if(!src || amount<=0)
user << browse(null, "window=stack")
user.set_machine(src) //for correct work of onclose
var/list/recipe_list = recipes
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
if(recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
recipe_list = srl.recipes
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.amount)
for(var/i=1;i<=recipe_list.len,i++)
var/E = recipe_list[i]
if (isnull(E))
if(isnull(E))
t1 += "<hr>"
continue
if (i>1 && !isnull(recipe_list[i-1]))
if(i>1 && !isnull(recipe_list[i-1]))
t1+="<br>"
if (istype(E, /datum/stack_recipe_list))
if(istype(E, /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = E
if (src.amount >= srl.req_amount)
if(src.amount >= srl.req_amount)
t1 += "<a href='?src=\ref[src];sublist=[i]'>[srl.title] ([srl.req_amount] [src.singular_name]\s)</a>"
else
t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)<br>"
if (istype(E, /datum/stack_recipe))
if(istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
var/max_multiplier = round(src.amount / R.req_amount)
var/title as text
var/can_build = 1
can_build = can_build && (max_multiplier>0)
/*
if (R.one_per_turf)
if(R.one_per_turf)
can_build = can_build && !(locate(R.result_type) in usr.loc)
if (R.on_floor)
if(R.on_floor)
can_build = can_build && istype(usr.loc, /turf/simulated/floor)
*/
if (R.res_amount>1)
if(R.res_amount>1)
title+= "[R.res_amount]x [R.title]\s"
else
title+= "[R.title]"
title+= " ([R.req_amount] [src.singular_name]\s)"
if (can_build)
if(can_build)
t1 += text("<A href='?src=\ref[src];sublist=[recipes_sublist];make=[i]'>[title]</A> ")
else
t1 += text("[]", title)
continue
if (R.max_res_amount>1 && max_multiplier>1)
if(R.max_res_amount>1 && max_multiplier>1)
max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount))
t1 += " |"
var/list/multipliers = list(5,10,25)
for (var/n in multipliers)
if (max_multiplier>=n)
for(var/n in multipliers)
if(max_multiplier>=n)
t1 += " <A href='?src=\ref[src];make=[i];multiplier=[n]'>[n*R.res_amount]x</A>"
if (!(max_multiplier in multipliers))
if(!(max_multiplier in multipliers))
t1 += " <A href='?src=\ref[src];make=[i];multiplier=[max_multiplier]'>[max_multiplier*R.res_amount]x</A>"
t1 += "</TT></body></HTML>"
@@ -100,71 +100,71 @@
/obj/item/stack/Topic(href, href_list)
..()
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
return
if (href_list["sublist"] && !href_list["make"])
if(href_list["sublist"] && !href_list["make"])
list_recipes(usr, text2num(href_list["sublist"]))
if (href_list["make"])
if (src.amount < 1) del(src) //Never should happen
if(href_list["make"])
if(src.amount < 1) del(src) //Never should happen
var/list/recipes_list = recipes
if (href_list["sublist"])
if(href_list["sublist"])
var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])]
recipes_list = srl.recipes
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
if (src.amount < R.req_amount*multiplier)
if (R.req_amount*multiplier>1)
if(!multiplier) multiplier = 1
if(src.amount < R.req_amount*multiplier)
if(R.req_amount*multiplier>1)
to_chat(usr, "\red You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!")
else
to_chat(usr, "\red You haven't got enough [src] to build \the [R.title]!")
return
if (R.one_per_turf && (locate(R.result_type) in usr.loc))
if(R.one_per_turf && (locate(R.result_type) in usr.loc))
to_chat(usr, "\red There is another [R.title] here!")
return
if (R.on_floor && !istype(usr.loc, /turf/simulated))
if(R.on_floor && !istype(usr.loc, /turf/simulated))
to_chat(usr, "\red \The [R.title] must be constructed on the floor!")
return
if (R.time)
if(R.time)
to_chat(usr, "\blue Building [R.title] ...")
if (!do_after(usr, R.time, target = usr))
if(!do_after(usr, R.time, target = usr))
return
if (src.amount < R.req_amount*multiplier)
if(src.amount < R.req_amount*multiplier)
return
var/atom/O = new R.result_type( usr.loc )
O.dir = usr.dir
if (R.max_res_amount>1)
if(R.max_res_amount>1)
var/obj/item/stack/new_item = O
new_item.amount = R.res_amount*multiplier
//new_item.add_to_stacks(usr)
src.amount-=R.req_amount*multiplier
if (src.amount < 1) // Just in case a stack's amount ends up fractional somehow
if(src.amount < 1) // Just in case a stack's amount ends up fractional somehow
var/oldsrc = src
src = null //dont kill proc after del()
usr.unEquip(oldsrc, 1)
del(oldsrc) // Not qdel, because qdel'd stacks act strange for cyborgs
if (istype(O,/obj/item))
if(istype(O,/obj/item))
usr.put_in_hands(O)
O.add_fingerprint(usr)
//BubbleWrap - so newly formed boxes are empty
if ( istype(O, /obj/item/weapon/storage) )
for (var/obj/item/I in O)
if( istype(O, /obj/item/weapon/storage) )
for(var/obj/item/I in O)
del(I)
//BubbleWrap END
if (src && usr.machine==src) //do not reopen closed window
if(src && usr.machine==src) //do not reopen closed window
spawn( 0 )
src.interact(usr)
return
return
/obj/item/stack/proc/use(var/used)
if (amount < used)
if(amount < used)
return 0
amount -= used
if (amount < 1) // Just in case a stack's amount ends up fractional somehow
if(amount < 1) // Just in case a stack's amount ends up fractional somehow
if(usr)
usr.unEquip(src, 1)
spawn()
@@ -175,12 +175,12 @@
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
var/obj/item/stack/oldsrc = src
src = null
for (var/obj/item/stack/item in usr.loc)
if (item==oldsrc)
for(var/obj/item/stack/item in usr.loc)
if(item==oldsrc)
continue
if (!istype(item, oldsrc.type))
if(!istype(item, oldsrc.type))
continue
if (item.amount>=item.max_amount)
if(item.amount>=item.max_amount)
continue
oldsrc.attackby(item, usr)
to_chat(usr, "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s.")
@@ -204,7 +204,7 @@
return F
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
if(user.get_inactive_hand() == src)
var/obj/item/stack/F = split(user, 1)
user.put_in_hands(F)
if(src && usr.machine == src)
@@ -215,12 +215,12 @@
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if (istype(W, src.type))
if(istype(W, src.type))
var/obj/item/stack/S = W
if (S.amount >= max_amount)
if(S.amount >= max_amount)
return 1
var/to_transfer as num
if (user.get_inactive_hand()==src)
if(user.get_inactive_hand()==src)
var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num
if(!desired)
return
@@ -229,10 +229,10 @@
else
to_transfer = min(src.amount, S.max_amount-S.amount)
S.amount+=to_transfer
if (S && usr.machine==S)
if(S && usr.machine==S)
spawn(0) S.interact(usr)
src.use(to_transfer)
if (src && usr.machine==src)
if(src && usr.machine==src)
spawn(0) src.interact(usr)
S.update_icon()
else return ..()
+7 -8
View File
@@ -47,7 +47,7 @@
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(!proximity) return
if (istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1)
if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1)
A.reagents.trans_to(src, 10)
to_chat(user, "<span class='notice'>You fill the balloon with the contents of [A].</span>")
desc = "A translucent balloon with some form of liquid sloshing around in it."
@@ -141,12 +141,11 @@
item_state = "sword0"
var/active = 0.0
w_class = 2.0
flags = NOSHIELD
attack_verb = list("attacked", "struck", "hit")
/obj/item/toy/sword/attack_self(mob/user as mob)
active = !(active)
if (active)
if(active)
to_chat(user, "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>")
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
icon_state = "swordblue"
@@ -199,7 +198,7 @@
origin_tech = null
attack_verb = list("attacked", "struck", "hit")
/obj/item/weapon/twohanded/dualsaber/toy/IsShield()
/obj/item/weapon/twohanded/dualsaber/toy/hit_reaction()
return 0
/obj/item/weapon/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles
@@ -575,7 +574,7 @@ obj/item/toy/cards/cardhand/Topic(href, href_list)
var/mob/living/carbon/human/cardUser = usr
var/O = src
if(href_list["pick"])
if (cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
var/choice = href_list["pick"]
var/obj/item/toy/cards/singlecard/C = new/obj/item/toy/cards/singlecard(cardUser.loc)
currenthand -= choice
@@ -664,7 +663,7 @@ obj/item/toy/cards/singlecard/verb/Flip()
return
if(!flipped)
flipped = 1
if (cardname)
if(cardname)
icon_state = "sc_[cardname]_[deckstyle]"
name = cardname
else
@@ -769,7 +768,7 @@ obj/item/toy/cards/deck/syndicate/black
var/cooldown = 0
/obj/item/toy/nuke/attack_self(mob/user)
if (cooldown < world.time)
if(cooldown < world.time)
cooldown = world.time + 1800 //3 minutes
user.visible_message("<span class='warning'>[user] presses a button on [src]</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='notice'>You hear the click of a button.</span>")
spawn(5) //gia said so
@@ -1102,7 +1101,7 @@ obj/item/toy/cards/deck/syndicate/black
var/cooldown = 0
/obj/item/toy/redbutton/attack_self(mob/user)
if (cooldown < world.time)
if(cooldown < world.time)
cooldown = (world.time + 300) // Sets cooldown at 30 seconds
user.visible_message("<span class='warning'>[user] presses the big red button.</span>", "<span class='notice'>You press the button, it plays a loud noise!</span>", "<span class='notice'>The button clicks loudly.</span>")
playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, 0)
+11 -11
View File
@@ -23,7 +23,7 @@ AI MODULES
var/datum/ai_laws/laws = null
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C)
if (istype(C, /obj/machinery/computer/aiupload))
if(istype(C, /obj/machinery/computer/aiupload))
var/obj/machinery/computer/aiupload/comp = C
if(comp.stat & NOPOWER)
to_chat(usr, "<span class='warning'>The upload computer has no power!</span>")
@@ -31,13 +31,13 @@ AI MODULES
if(comp.stat & BROKEN)
to_chat(usr, "<span class='warning'>The upload computer is broken!</span>")
return
if (!comp.current)
if(!comp.current)
to_chat(usr, "<span class='warning'>You haven't selected an AI to transmit laws to!</span>")
return
if (comp.current.stat == DEAD || comp.current.control_disabled == 1)
if(comp.current.stat == DEAD || comp.current.control_disabled == 1)
to_chat(usr, "<span class='warning'>Upload failed. No signal is being detected from the AI.</span>")
else if (comp.current.see_in_dark == 0)
else if(comp.current.see_in_dark == 0)
to_chat(usr, "<span class='warning'>Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.</span>")
else
src.transmitInstructions(comp.current, usr)
@@ -49,7 +49,7 @@ AI MODULES
R.show_laws()
to_chat(usr, "<span class='notice'>Upload complete. The AI's laws have been modified.</span>")
else if (istype(C, /obj/machinery/computer/borgupload))
else if(istype(C, /obj/machinery/computer/borgupload))
var/obj/machinery/computer/borgupload/comp = C
if(comp.stat & NOPOWER)
to_chat(usr, "<span class='warning'>The upload computer has no power!</span>")
@@ -57,13 +57,13 @@ AI MODULES
if(comp.stat & BROKEN)
to_chat(usr, "<span class='warning'>The upload computer is broken!</span>")
return
if (!comp.current)
if(!comp.current)
to_chat(usr, "<span class='warning'>You haven't selected a robot to transmit laws to!</span>")
return
if (comp.current.stat == DEAD || comp.current.emagged)
if(comp.current.stat == DEAD || comp.current.emagged)
to_chat(usr, "<span class='warning'>Upload failed. No signal is being detected from the robot.</span>")
else if (comp.current.connected_ai)
else if(comp.current.connected_ai)
to_chat(usr, "<span class='warning'>Upload failed. The robot is slaved to an AI.</span>")
else
src.transmitInstructions(comp.current, usr)
@@ -138,7 +138,7 @@ AI MODULES
/obj/item/weapon/aiModule/oneCrewMember/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is crew."
if (!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
if(!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
to_chat(target, law)
target.set_zeroth_law(law)
lawchanges.Add("The law specified [targetName]")
@@ -236,7 +236,7 @@ AI MODULES
/obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
log_law_changes(target, sender)
if (!is_special_character(target))
if(!is_special_character(target))
target.set_zeroth_law("")
target.laws.clear_supplied_laws()
target.laws.clear_ion_laws()
@@ -252,7 +252,7 @@ AI MODULES
/obj/item/weapon/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
if (!is_special_character(target))
if(!is_special_character(target))
target.set_zeroth_law("")
to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.")
target.clear_supplied_laws()
+5 -5
View File
@@ -101,7 +101,7 @@ RCD
data["door_accesses"] = door_accesses_list
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state)
ui.set_initial_data(data)
ui.open()
@@ -130,20 +130,20 @@ RCD
menu = text2num(href_list["menu"])
. = 1
if (href_list["login"])
if(href_list["login"])
if(istype(usr,/mob/living/silicon))
locked = 0
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/device/pda))
if(istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
var/obj/item/weapon/card/id/ID = I
if (istype(ID) && ID && check_access(ID))
if(istype(ID) && ID && check_access(ID))
locked = 0
. = 1
if (href_list["logout"])
if(href_list["logout"])
locked = 1
. = 1
+45 -45
View File
@@ -21,8 +21,8 @@ RSF
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if (istype(W, /obj/item/weapon/rcd_ammo))
if ((matter + 10) > 30)
if(istype(W, /obj/item/weapon/rcd_ammo))
if((matter + 10) > 30)
to_chat(user, "The RSF cant hold any more matter.")
return
qdel(W)
@@ -34,27 +34,27 @@ RSF
/obj/item/weapon/rsf/attack_self(mob/user as mob)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if (mode == 1)
if(mode == 1)
mode = 2
to_chat(user, "Changed dispensing mode to 'Drinking Glass'")
return
if (mode == 2)
if(mode == 2)
mode = 3
to_chat(user, "Changed dispensing mode to 'Paper'")
return
if (mode == 3)
if(mode == 3)
mode = 4
to_chat(user, "Changed dispensing mode to 'Pen'")
return
if (mode == 4)
if(mode == 4)
mode = 5
to_chat(user, "Changed dispensing mode to 'Dice Pack'")
return
if (mode == 5)
if(mode == 5)
mode = 6
to_chat(user, "Changed dispensing mode to 'Cigarette'")
return
if (mode == 6)
if(mode == 6)
mode = 1
to_chat(user, "Changed dispensing mode to 'Dosh'")
return
@@ -62,15 +62,15 @@ RSF
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if (!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
return
if (istype(A, /obj/structure/table) && mode == 1)
if (istype(A, /obj/structure/table) && matter >= 1)
if(istype(A, /obj/structure/table) && mode == 1)
if(istype(A, /obj/structure/table) && matter >= 1)
to_chat(user, "Dispensing Dosh...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A.loc )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
else
@@ -79,12 +79,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 1)
if (istype(A, /turf/simulated/floor) && matter >= 1)
else if(istype(A, /turf/simulated/floor) && mode == 1)
if(istype(A, /turf/simulated/floor) && matter >= 1)
to_chat(user, "Dispensing Dosh...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
else
@@ -93,12 +93,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 2)
if (istype(A, /obj/structure/table) && matter >= 1)
else if(istype(A, /obj/structure/table) && mode == 2)
if(istype(A, /obj/structure/table) && matter >= 1)
to_chat(user, "Dispensing Drinking Glass...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A.loc )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
@@ -107,12 +107,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 2)
if (istype(A, /turf/simulated/floor) && matter >= 1)
else if(istype(A, /turf/simulated/floor) && mode == 2)
if(istype(A, /turf/simulated/floor) && matter >= 1)
to_chat(user, "Dispensing Drinking Glass...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
@@ -121,12 +121,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 3)
if (istype(A, /obj/structure/table) && matter >= 1)
else if(istype(A, /obj/structure/table) && mode == 3)
if(istype(A, /obj/structure/table) && matter >= 1)
to_chat(user, "Dispensing Paper Sheet...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A.loc )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
@@ -135,12 +135,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 3)
if (istype(A, /turf/simulated/floor) && matter >= 1)
else if(istype(A, /turf/simulated/floor) && mode == 3)
if(istype(A, /turf/simulated/floor) && matter >= 1)
to_chat(user, "Dispensing Paper Sheet...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
@@ -149,12 +149,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 4)
if (istype(A, /obj/structure/table) && matter >= 1)
else if(istype(A, /obj/structure/table) && mode == 4)
if(istype(A, /obj/structure/table) && matter >= 1)
to_chat(user, "Dispensing Pen...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A.loc )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
@@ -163,12 +163,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 4)
if (istype(A, /turf/simulated/floor) && matter >= 1)
else if(istype(A, /turf/simulated/floor) && mode == 4)
if(istype(A, /turf/simulated/floor) && matter >= 1)
to_chat(user, "Dispensing Pen...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
@@ -177,12 +177,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 5)
if (istype(A, /obj/structure/table) && matter >= 1)
else if(istype(A, /obj/structure/table) && mode == 5)
if(istype(A, /obj/structure/table) && matter >= 1)
to_chat(user, "Dispensing Dice Pack...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/pill_bottle/dice( A.loc )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
else
@@ -191,12 +191,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 5)
if (istype(A, /turf/simulated/floor) && matter >= 1)
else if(istype(A, /turf/simulated/floor) && mode == 5)
if(istype(A, /turf/simulated/floor) && matter >= 1)
to_chat(user, "Dispensing Dice Pack...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/pill_bottle/dice( A )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
else
@@ -205,12 +205,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 6)
if (istype(A, /obj/structure/table) && matter >= 1)
else if(istype(A, /obj/structure/table) && mode == 6)
if(istype(A, /obj/structure/table) && matter >= 1)
to_chat(user, "Dispensing Cigarette...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A.loc )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
@@ -219,12 +219,12 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 6)
if (istype(A, /turf/simulated/floor) && matter >= 1)
else if(istype(A, /turf/simulated/floor) && mode == 6)
if(istype(A, /turf/simulated/floor) && matter >= 1)
to_chat(user, "Dispensing Cigarette...")
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A )
if (isrobot(user))
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
@@ -14,7 +14,6 @@
throw_range = 5
w_class = 2
w_class_on = 2
flags = NOSHIELD
attack_verb = list("attacked", "slashed", "gored", "sliced", "torn", "ripped", "butchered", "cut")
attack_verb_on = list()
+44 -43
View File
@@ -34,7 +34,7 @@
set category = "Object"
set src in usr
if (t)
if(t)
src.name = text("Data Disk- '[]'", t)
else
src.name = "Data Disk"
@@ -103,8 +103,6 @@
var/sex
var/age
var/photo
var/icon/front
var/icon/side
var/dat
var/stamped = 0
@@ -124,12 +122,12 @@
to_chat(user, "<span class='warning'>It is too far away.</span>")
if(guest_pass)
to_chat(user, "<span class='notice'>There is a guest pass attached to this ID card</span>")
if (world.time < guest_pass.expiration_time)
if(world.time < guest_pass.expiration_time)
to_chat(user, "<span class='notice'>It expires at [worldtime2text(guest_pass.expiration_time)].</span>")
else
to_chat(user, "<span class='warning'>It expired at [worldtime2text(guest_pass.expiration_time)].</span>")
to_chat(user, "<span class='notice'>It grants access to following areas:</span>")
for (var/A in guest_pass.temp_access)
for(var/A in guest_pass.temp_access)
to_chat(user, "<span class='notice'>[get_access_desc(A)].</span>")
to_chat(user, "<span class='notice'>Issuing reason: [guest_pass.reason].</span>")
@@ -137,12 +135,6 @@
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper)
assets.send(user)
if(!front)
front = new(photo, dir = SOUTH)
if(!side)
side = new(photo, dir = WEST)
user << browse_rsc(front, "front.png")
user << browse_rsc(side, "side.png")
var/datum/browser/popup = new(user, "idcard", name, 600, 400)
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
@@ -170,16 +162,22 @@
dna_hash = H.dna.unique_enzymes
fingerprint_hash = md5(H.dna.uni_identity)
dat = ("<table><tr><td>")
dat += text("Name: []</A><BR>", registered_name)
dat += text("Sex: []</A><BR>\n", sex)
dat += text("Age: []</A><BR>\n", age)
dat += text("Rank: []</A><BR>\n", assignment)
dat += text("Fingerprint: []</A><BR>\n", fingerprint_hash)
dat += text("Blood Type: []<BR>\n", blood_type)
dat += text("DNA Hash: []<BR><BR>\n", dna_hash)
dat +="<td align = center valign = top>Photo:<br><img src=front.png height=80 width=80 border=4> \
<img src=side.png height=80 width=80 border=4></td></tr></table>"
RebuildHTML()
/obj/item/weapon/card/id/proc/RebuildHTML()
var/photo_front = "'data:image/png;base64,[icon2base64(icon(photo, dir = SOUTH))]'"
var/photo_side = "'data:image/png;base64,[icon2base64(icon(photo, dir = WEST))]'"
dat = {"<table><tr><td>
Name: [registered_name]</A><BR>
Sex: [sex]</A><BR>
Age: [age]</A><BR>
Rank: [assignment]</A><BR>
Fingerprint: [fingerprint_hash]</A><BR>
Blood Type: [blood_type]<BR>
DNA Hash: [dna_hash]<BR><BR>
<td align = center valign = top>Photo:<br><img src=[photo_front] height=80 width=80 border=4>
<img src=[photo_side] height=80 width=80 border=4></td></tr></table>"}
/obj/item/weapon/card/id/GetAccess()
if(!guest_pass)
@@ -292,27 +290,22 @@
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over \the [I], copying its access.</span>")
src.access |= I.access //Don't copy access if user isn't an antag -- to prevent metagaming
/obj/item/weapon/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H, var/side=0)//get_id_photo wouldn't work correctly
/obj/item/weapon/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H)//get_id_photo wouldn't work correctly
if(!istype(H))
return
var/storedDir = H.dir //don't want to lose track of this
var/icon/faked
if(!side)
if(!H.equip_to_slot_if_possible(src, slot_l_store, 0, 1))
to_chat(H, "<span class='warning'>You need to empty your pockets before taking the ID picture.</span>")
return
var/icon/faked = new()
if(!H.equip_to_slot_if_possible(src, slot_l_store, 0, 1))
to_chat(H, "<span class='warning'>You need to empty your pockets before taking the ID picture.</span>")
return
if(side)
H.dir = WEST //ensure the icon is actually the proper direction before copying it
faked = getFlatIcon(H)
H.dir = storedDir //reset the user back to their original direction, not even noticable they changed
H.equip_to_slot_if_possible(src, slot_l_hand, 0, 1)
else
H.dir = SOUTH
faked = getFlatIcon(H)
H.dir = storedDir
H.dir = WEST //ensure the icon is actually the proper direction before copying it
faked.Insert(getFlatIcon(H), dir = WEST)
H.dir = SOUTH
faked.Insert(getFlatIcon(H), dir = SOUTH)
H.dir = storedDir
H.equip_to_slot_if_possible(src, slot_l_hand, 0, 1)
return faked
@@ -349,16 +342,17 @@
src.registered_name = new_name
UpdateName()
to_chat(user, "<span class='notice'>Name changed to [new_name].</span>")
RebuildHTML()
if("Photo")
if(!Adjacent(user))
return
photo = fake_id_photo(user)
var/icon/photoside = fake_id_photo(user,1)
front = new(photo)
side = new(photoside)
if(photo && photoside)
to_chat(user, "<span class='notice'>Photo changed.</span>")
var/icon/newphoto = fake_id_photo(user)
if(!newphoto)
return
photo = newphoto
to_chat(user, "<span class='notice'>Photo changed.</span>")
RebuildHTML()
if("Appearance")
var/list/appearances = list(
@@ -403,6 +397,7 @@
return
src.sex = new_sex
to_chat(user, "<span class='notice'>Sex changed to [new_sex].</span>")
RebuildHTML()
if("Age")
var/new_age = sanitize(stripped_input(user,"What age would you like to put on this card?","Agent Card Age","21", MAX_MESSAGE_LEN))
@@ -410,6 +405,7 @@
return
src.age = new_age
to_chat(user, "<span class='notice'>Age changed to [new_age].</span>")
RebuildHTML()
if("Occupation")
var/new_job = sanitize(stripped_input(user,"What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN))
@@ -418,6 +414,7 @@
src.assignment = new_job
to_chat(user, "<span class='notice'>Occupation changed to [new_job].</span>")
UpdateName()
RebuildHTML()
if("Money Account")
var/new_account = input(user,"What money account would you like to link to this card?","Agent Card Account",12345) as num
@@ -438,6 +435,7 @@
return
src.blood_type = new_blood_type
to_chat(user, "<span class='notice'>Blood type changed to [new_blood_type].</span>")
RebuildHTML()
if("DNA Hash")
var/default = "\[UNSET\]"
@@ -451,6 +449,7 @@
return
src.dna_hash = new_dna_hash
to_chat(user, "<span class='notice'>DNA hash changed to [new_dna_hash].</span>")
RebuildHTML()
if("Fingerprint Hash")
var/default = "\[UNSET\]"
@@ -464,6 +463,7 @@
return
src.fingerprint_hash = new_fingerprint_hash
to_chat(user, "<span class='notice'>Fingerprint hash changed to [new_fingerprint_hash].</span>")
RebuildHTML()
if("Reset Card")
name = initial(name)
@@ -480,6 +480,7 @@
registered_user = null
to_chat(user, "<span class='notice'>All information has been deleted from \the [src].</span>")
RebuildHTML()
else
..()
@@ -21,7 +21,7 @@
throw_range = 20
/obj/item/weapon/bananapeel/Crossed(AM as mob|obj)
if (istype(AM, /mob/living/carbon))
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
M.slip("banana peel", 4, 2)
@@ -29,7 +29,7 @@
* Soap
*/
/obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
if (istype(AM, /mob/living/carbon))
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
M.slip("soap", 4, 2)
+1 -1
View File
@@ -294,7 +294,7 @@
return unwield()
/obj/item/weapon/twohanded/shockpaddles/proc/check_defib_exists(mainunit, var/mob/living/carbon/human/M, var/obj/O)
if (!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
if(!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
M.unEquip(O)
qdel(O)
return 0
@@ -73,12 +73,12 @@
if(!(NOCLONE in M.mutations) && !(H && (H.species.flags & NO_DNA))) // prevents drained people from having their DNA changed
var/prev_ue = M.dna.unique_enzymes
// UI in syringe.
if (buf.types & DNA2_BUF_UI)
if (!block) //isolated block?
if(buf.types & DNA2_BUF_UI)
if(!block) //isolated block?
M.dna.UI = buf.dna.UI.Copy()
M.dna.UpdateUI()
M.UpdateAppearance()
if (buf.types & DNA2_BUF_UE) //unique enzymes? yes
if(buf.types & DNA2_BUF_UE) //unique enzymes? yes
M.real_name = buf.dna.real_name
M.name = buf.dna.real_name
@@ -87,13 +87,13 @@
else
M.dna.SetUIValue(block,src.GetValue())
M.UpdateAppearance()
if (buf.types & DNA2_BUF_SE)
if (!block) //isolated block?
if(buf.types & DNA2_BUF_SE)
if(!block) //isolated block?
M.dna.SE = buf.dna.SE.Copy()
M.dna.UpdateSE()
else
M.dna.SetSEValue(block,src.GetValue())
domutcheck(M, null, block!=null)
domutcheck(M, null, 0)
M.update_mutations()
if(H)
H.sync_organ_dna(assimilate = 0, old_ue = prev_ue)
@@ -110,7 +110,7 @@
if(H.species.flags & NO_DNA)
return 0
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
return 0
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
@@ -27,7 +27,7 @@
src.injected(user,user)
else
user.visible_message("\red <b>[user.name] is trying to inject [M.name] with [src]!</b>")
if (do_mob(user,M,30))
if(do_mob(user,M,30))
user.visible_message("\red <b>[user.name] injects [M.name] with [src].</b>")
src.injected(M, user)
else
@@ -74,9 +74,9 @@
/obj/item/weapon/c4/afterattack(atom/target as obj|turf, mob/user as mob, flag)
if (!flag)
if(!flag)
return
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/item/clothing/accessory/storage) || istype(target, /obj/item/clothing/under))
if(ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/item/clothing/accessory/storage) || istype(target, /obj/item/clothing/under))
return
to_chat(user, "Planting explosives...")
@@ -85,7 +85,7 @@
src.target = target
loc = null
if (ismob(target))
if(ismob(target))
add_logs(target, user, "planted [name] on")
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
message_admins("[key_name_admin(user)] planted [src.name] on [key_name_admin(target)] with [timer] second fuse",0,1)
@@ -110,13 +110,13 @@
explosion(location, -1, -1, 4, 4)
if(target)
if (istype(target, /turf/simulated/wall))
if(istype(target, /turf/simulated/wall))
var/turf/simulated/wall/W = target
W.dismantle_wall(1)
else
target.ex_act(1)
if (isobj(target))
if (target)
if(isobj(target))
if(target)
qdel(target)
qdel(src)
@@ -83,12 +83,12 @@
var/Refill = AttemptRefill(target, user)
if(Refill)
return
if (!safety)
if (src.reagents.total_volume < 1)
if(!safety)
if(src.reagents.total_volume < 1)
to_chat(usr, "<span class='danger'>\The [src] is empty.</span>")
return
if (world.time < src.last_use + 20)
if(world.time < src.last_use + 20)
return
src.last_use = world.time
+2 -2
View File
@@ -7,7 +7,7 @@ obj/item/weapon/firework
obj/item/weapon/firework/attackby(obj/item/weapon/W,mob/user, params)
if(litzor)
return
if (istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
if(istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
for(var/mob/M in viewers(user))
to_chat(M, "[user] lits \the [src]")
litzor = 1
@@ -29,7 +29,7 @@ obj/item/weapon/sparkler
obj/item/weapon/sparkler/attackby(obj/item/weapon/W,mob/user, params)
if(litzor)
return
if (istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
if(istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
for(var/mob/M in viewers(user))
to_chat(M, "[user] lits \the [src]")
litzor = 1
@@ -191,10 +191,10 @@
return
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target)
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05)
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.05)
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
target.assume_air(air_transfer)
//Burn it based on transfered gas
@@ -218,4 +218,12 @@
/obj/item/weapon/flamethrower/full/tank/New(var/loc)
..()
ptank = new /obj/item/weapon/tank/plasma/full(src)
update_icon()
update_icon()
/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(ptank && damage && attack_type == PROJECTILE_ATTACK && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
var/target_turf = get_turf(owner)
ignite_turf(target_turf, 100)
qdel(ptank)
return 1 //It hit the flamethrower, not them
@@ -39,14 +39,14 @@
return
/obj/effect/spresent/relaymove(mob/user as mob)
if (user.stat)
if(user.stat)
return
to_chat(user, "\blue You cant move.")
/obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if (!istype(W, /obj/item/weapon/wirecutters))
if(!istype(W, /obj/item/weapon/wirecutters))
to_chat(user, "\blue I need wirecutters for that.")
return
@@ -54,7 +54,7 @@
for(var/mob/M in src) //Should only be one but whatever.
M.loc = src.loc
if (M.client)
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
@@ -102,6 +102,11 @@
spawn(det_time)
prime()
/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(damage && attack_type == PROJECTILE_ATTACK && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
prime()
return 1 //It hit the grenade, not them
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
if(istype(I,/obj/item/weapon/hand_labeler))
@@ -53,11 +53,11 @@
M.Weaken(max(10/distance, 3))
M.ear_damage += rand(0, 5)
M.ear_deaf = max(M.ear_deaf,15)
if (M.ear_damage >= 15)
if(M.ear_damage >= 15)
to_chat(M, "<span class='warning'>Your ears start to ring badly!</span>")
if(prob(M.ear_damage - 10 + 5))
to_chat(M, "<span class='warning'>You can't hear anything!</span>")
M.disabilities |= DEAF
else
if (M.ear_damage >= 5)
if(M.ear_damage >= 5)
to_chat(M, "<span class='warning'>Your ears start to ring!</span>")
@@ -28,8 +28,8 @@
/*/obj/item/weapon/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if(istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if(istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if((user.get_active_hand() == src) && (!active) && (clown_check(user)) && target.loc != src.loc)
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
active = 1
@@ -83,16 +83,16 @@
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/screwdriver))
switch(det_time)
if ("1")
if("1")
det_time = 10
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
if ("10")
if("10")
det_time = 30
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
if ("30")
if("30")
det_time = 50
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
if ("50")
if("50")
det_time = 1
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
add_fingerprint(user)
+1 -1
View File
@@ -97,7 +97,7 @@
..()
if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
if (R.use(1))
if(R.use(1))
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
if(!remove_item_from_storage(user))
user.unEquip(src)
@@ -76,9 +76,7 @@
w_class = 5
force = 5
slot_flags = SLOT_BACK
/obj/item/weapon/nullrod/staff/IsShield()
return 1
block_chance = 50
/obj/item/weapon/nullrod/staff/blue
name = "blue holy staff"
@@ -92,16 +90,16 @@
desc = "A weapon fit for a crusade!"
w_class = 4
slot_flags = SLOT_BACK|SLOT_BELT
block_chance = 30
sharp = 1
edge = 1
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/nullrod/claymore/IsShield()
if(prob(30))
return 1
else
return 0
/obj/item/weapon/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight
return ..()
/obj/item/weapon/nullrod/claymore/darkblade
icon_state = "cultblade"
@@ -333,6 +331,7 @@
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, now used to harass the clown."
w_class = 4
force = 15
block_chance = 40
slot_flags = SLOT_BACK
sharp = 0
edge = 0
@@ -342,12 +341,6 @@
icon_state = "bostaff0"
item_state = "bostaff0"
/obj/item/weapon/nullrod/claymore/bostaff/IsShield()
if(prob(40))
return 1
else
return 0
/obj/item/weapon/nullrod/tribal_knife
icon_state = "crysknife"
item_state = "crysknife"
@@ -41,7 +41,7 @@
if(!cause || !imp_in) return 0
var/mob/living/carbon/R = imp_in
var/injectamount = null
if (cause == "action_button")
if(cause == "action_button")
injectamount = reagents.total_volume
else
injectamount = cause
@@ -33,7 +33,7 @@
/obj/item/weapon/implant/death_alarm/activate(var/cause)
var/mob/M = imp_in
var/area/t = get_area(M)
switch (cause)
switch(cause)
if("death")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
@@ -43,7 +43,7 @@
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm")
qdel(a)
qdel(src)
if ("emp")
if("emp")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
var/name = prob(50) ? t.name : pick(teleportlocs)
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm")
@@ -56,7 +56,7 @@
uses = 2
/obj/item/weapon/implant/emp/activate()
if (src.uses < 1) return 0
if(src.uses < 1) return 0
src.uses--
empulse(imp_in, 3, 5)
@@ -94,7 +94,7 @@
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
if (src.occupant.client)
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
@@ -125,7 +125,7 @@
/obj/machinery/implantchair/implant(mob/M)
if (!istype(M, /mob/living/carbon))
if(!istype(M, /mob/living/carbon))
return
if(!implant_list.len) return
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
@@ -32,7 +32,7 @@
if(T && (M == user || do_after(user, 50, target = M)))
if(user && M && (get_turf(M) == T) && src && imp)
if(imp.implant(M, user))
if (M == user)
if(M == user)
to_chat(user, "<span class='notice'>You implant yourself.</span>")
else
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
@@ -55,7 +55,7 @@
set name = "Remove Implant"
set src in usr
if (usr.stat || usr.restrained())
if(usr.stat || usr.restrained())
return
dropcase(usr)
@@ -70,7 +70,7 @@
add_fingerprint(user)
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (case)
if(case)
if(case.imp)
if(istype(case.imp, /obj/item/weapon/implant))
dat += "<A href='byond://?src=\ref[src];removecase=1'>Remove Case</A><HR>"
@@ -96,7 +96,7 @@
return 1
var/mob/living/user = usr
if (href_list["tracking_id"])
if(href_list["tracking_id"])
if(case && case.imp)
var/obj/item/weapon/implant/tracking/T = case.imp
T.id += text2num(href_list["tracking_id"])
+2 -2
View File
@@ -30,7 +30,7 @@
var/max_contents = 1
/obj/item/weapon/kitchen/utensil/New()
if (prob(60))
if(prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
@@ -48,7 +48,7 @@
else
return ..()
if (contents.len)
if(contents.len)
var/obj/item/weapon/reagent_containers/food/snacks/toEat = contents[1]
if(istype(toEat))
if(M.eat(toEat, user))
+4 -4
View File
@@ -169,9 +169,9 @@
H.Stun(2)
H.drop_item(src)
return
if (!thrown_from && usr) //if something hasn't set it already (like a mech does when it launches)
if(!thrown_from && usr) //if something hasn't set it already (like a mech does when it launches)
thrown_from = usr //then the user must have thrown it
if (!istype(thrown_from, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas))
if(!istype(thrown_from, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas))
playsound(src, throw_sound, 20, 1) //because mechs play the sound anyways
var/turf/target = get_turf(A)
var/atom/movable/adjtarget = new /atom/movable
@@ -179,12 +179,12 @@
var/yadjust = 0
var/scaler = 0 //used to changed the normalised vector to the proper size
scaler = throw_range / max(abs(target.x - src.x), abs(target.y - src.y)) //whichever is larger magnitude is what we normalise to
if (target.x - src.x != 0) //just to avoid fucking with math for no reason
if(target.x - src.x != 0) //just to avoid fucking with math for no reason
xadjust = round((target.x - src.x) * scaler) //normalised vector is now scaled up to throw_range
adjtarget.x = src.x + xadjust //the new target at max range
else
adjtarget.x = src.x
if (target.y - src.y != 0)
if(target.y - src.y != 0)
yadjust = round((target.y - src.y) * scaler)
adjtarget.y = src.y + yadjust
else
@@ -19,7 +19,7 @@
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_organ_damage(5,5)
active = !active
if (active)
if(active)
force = force_on
throwforce = throwforce_on
hitsound = 'sound/weapons/blade1.ogg'
@@ -62,7 +62,7 @@
w_class = 3
w_class_on = 5
hitsound = "swing_hit"
flags = CONDUCT | NOSHIELD
flags = CONDUCT
armour_penetration = 100
origin_tech = "combat=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
@@ -83,9 +83,9 @@
throw_speed = 3
throw_range = 5
hitsound = "swing_hit"
flags = NOSHIELD
armour_penetration = 35
origin_tech = "magnets=3;syndicate=4"
block_chance = 50
sharp = 1
edge = 1
var/hacked = 0
@@ -95,9 +95,9 @@
if(item_color == null)
item_color = pick("red", "blue", "green", "purple")
/obj/item/weapon/melee/energy/sword/IsShield()
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return 1
return ..()
return 0
/obj/item/weapon/melee/energy/sword/cyborg
@@ -133,7 +133,7 @@
..()
item_color = null
/obj/item/weapon/melee/energy/sword/cyborg/saw/IsShield()
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction()
return 0
/obj/item/weapon/melee/energy/sword/saber
@@ -206,7 +206,6 @@
throw_speed = 3
throw_range = 1
w_class = 4//So you can't hide it in your pocket or some such.
flags = NOSHIELD
armour_penetration = 50
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/datum/effect/system/spark_spread/spark_system
+1 -1
View File
@@ -117,7 +117,7 @@ var/global/list/cached_icons = list()
attack_self(mob/user as mob)
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white")
if ((user.get_active_hand() != src || user.stat || user.restrained()))
if((user.get_active_hand() != src || user.stat || user.restrained()))
return
switch(t1)
if("red")
+1 -1
View File
@@ -118,7 +118,7 @@
H.losebreath += 10 //30 Oxy damage over time
H.apply_damage(18, BRUTE, "head", sharp =1, edge =1, used_weapon = "scissors")
var/turf/location = get_turf(H)
if (istype(location, /turf/simulated))
if(istype(location, /turf/simulated))
location.add_blood(H)
H.bloody_hands(H)
H.bloody_body(H)
+6 -6
View File
@@ -29,15 +29,15 @@
/obj/item/weapon/teleportation_scroll/Topic(href, href_list)
..()
if (usr.stat || usr.restrained() || src.loc != usr)
if(usr.stat || usr.restrained() || src.loc != usr)
return
var/mob/living/carbon/human/H = usr
if (!( istype(H, /mob/living/carbon/human)))
if(!( istype(H, /mob/living/carbon/human)))
return 1
if ((usr == src.loc || (in_range(src, usr) && istype(src.loc, /turf))))
if((usr == src.loc || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if (href_list["spell_teleport"])
if (src.uses >= 1)
if(href_list["spell_teleport"])
if(src.uses >= 1)
teleportscroll(H)
attack_self(H)
return
@@ -49,7 +49,7 @@
A = input(user, "Area to jump to", "BOOYEA", A) in teleportlocs
var/area/thearea = teleportlocs[A]
if (user.stat || user.restrained())
if(user.stat || user.restrained())
return
if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf)))))
return
+1 -1
View File
@@ -53,7 +53,7 @@
/obj/item/weapon/shard/Crossed(AM as mob|obj)
if(isliving(AM))
var/mob/living/M = AM
if (M.incorporeal_move || M.flying)//you are incorporal or flying..no shard stepping!
if(M.incorporeal_move || M.flying)//you are incorporal or flying..no shard stepping!
return
to_chat(M, "\red <B>You step on \the [src]!</B>")
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
+12 -12
View File
@@ -1,5 +1,6 @@
/obj/item/weapon/shield
name = "shield"
block_chance = 50
/obj/item/weapon/shield/riot
name = "riot shield"
@@ -17,8 +18,10 @@
attack_verb = list("shoved", "bashed")
var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/shield/riot/IsShield()
return 1
/obj/item/weapon/shield/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(attack_type == THROWN_PROJECTILE_ATTACK)
final_block_chance += 30
return ..()
/obj/item/weapon/shield/riot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/melee/baton))
@@ -41,12 +44,7 @@
icon_state = "buckler"
item_state = "buckler"
materials = list()
/obj/item/weapon/shield/riot/buckler/IsShield()
if(prob(60))
return 1
else
return 0
block_chance = 30
/obj/item/weapon/shield/energy
name = "energy combat shield"
@@ -62,8 +60,8 @@
attack_verb = list("shoved", "bashed")
var/active = 0
/obj/item/weapon/shield/energy/IsShield()
return (active)
/obj/item/weapon/shield/energy/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
return 0
/obj/item/weapon/shield/energy/IsReflect()
return (active)
@@ -109,8 +107,10 @@
w_class = 3
var/active = 0
/obj/item/weapon/shield/riot/tele/IsShield()
return (active)
/obj/item/weapon/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return ..()
return 0
/obj/item/weapon/shield/riot/tele/attack_self(mob/living/user)
active = !active
+1 -1
View File
@@ -35,7 +35,7 @@
to_chat(user, "<span class='notice'>You 'clean' \the [target.name].</span>")
if(istype(target, /turf/simulated))
new /obj/effect/decal/cleanable/blood/gibs/cleangibs(target)
else if (istype(target,/mob/living/carbon))
else if(istype(target,/mob/living/carbon))
for(var/obj/item/carried_item in target.contents)
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
carried_item.add_blood(target)//Oh yes, there will be blood...
+1 -3
View File
@@ -8,7 +8,6 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
flags = NOSHIELD
armour_penetration = 100
attack_verb = list("bludgeoned", "whacked", "disciplined")
@@ -73,5 +72,4 @@
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
flags = NOSHIELD
w_class = 2.0
@@ -73,7 +73,7 @@
..()
/obj/item/weapon/storage/toolbox/green/memetic/proc/consume(mob/M)
if (!M)
if(!M)
return
hunger = 0
hunger_message_level = 0
@@ -63,13 +63,13 @@
. = ..()
proc/failcheck(mob/user as mob)
if (prob(src.reliability)) return 1 //No failure
if (prob(src.reliability))
if(prob(src.reliability)) return 1 //No failure
if(prob(src.reliability))
to_chat(user, "\red The Bluespace portal resists your attempt to add another item.")//light failure
else
to_chat(user, "\red The Bluespace generator malfunctions!")
for (var/obj/O in src.contents) //it broke, delete what was in it
for(var/obj/O in src.contents) //it broke, delete what was in it
qdel(O)
crit_fail = 1
icon_state = "brokenpack"
@@ -322,6 +322,25 @@
new /obj/item/clothing/mask/muzzle(src)
new /obj/item/device/mmi/syndie(src)
/obj/item/weapon/storage/backpack/duffel/syndie/surgery_fake //for maint spawns
name = "surgery dufflebag"
desc = "A suspicious looking dufflebag for holding surgery tools."
icon_state = "duffel-syndimed"
item_state = "duffle-syndimed"
/obj/item/weapon/storage/backpack/duffel/syndie/surgery_fake/New()
..()
new /obj/item/weapon/scalpel(src)
new /obj/item/weapon/hemostat(src)
new /obj/item/weapon/retractor(src)
new /obj/item/weapon/cautery(src)
new /obj/item/weapon/bonegel(src)
new /obj/item/weapon/bonesetter(src)
new /obj/item/weapon/FixOVein(src)
if(prob(50))
new /obj/item/weapon/circular_saw(src)
new /obj/item/weapon/surgicaldrill(src)
/obj/item/weapon/storage/backpack/duffel/captain
name = "captain's duffelbag"
desc = "A duffelbag designed to hold large quantities of condoms."
@@ -198,7 +198,7 @@
new /obj/item/seeds/grassseed(O.loc, O)
for(var/mob/M in range(1))
if (M.s_active == src)
if(M.s_active == src)
src.close(M)
@@ -263,7 +263,7 @@
if(!inserted || !S.amount)
usr.unEquip(S)
usr.update_icons() //update our overlays
if (usr.client && usr.s_active != src)
if(usr.client && usr.s_active != src)
usr.client.screen -= S
S.dropped(usr)
if(!S.amount)
@@ -296,7 +296,7 @@
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (adjusted_contents > 7)
if(adjusted_contents > 7)
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num, col_count, numbered_contents)
return
@@ -432,17 +432,17 @@
/obj/item/weapon/storage/bag/tray/cyborg
/obj/item/weapon/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob)
if ( isturf(target) || istype(target,/obj/structure/table) )
if( isturf(target) || istype(target,/obj/structure/table) )
var foundtable = istype(target,/obj/structure/table/)
if ( !foundtable ) //it must be a turf!
if( !foundtable ) //it must be a turf!
for(var/obj/structure/table/T in target)
foundtable = 1
break
var turf/dropspot
if ( !foundtable ) // don't unload things onto walls or other silly places.
if( !foundtable ) // don't unload things onto walls or other silly places.
dropspot = user.loc
else if ( isturf(target) ) // they clicked on a turf with a table in it
else if( isturf(target) ) // they clicked on a turf with a table in it
dropspot = target
else // they clicked on a table
dropspot = target.loc
@@ -462,8 +462,8 @@
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
if ( droppedSomething )
if ( foundtable )
if( droppedSomething )
if( foundtable )
user.visible_message("\blue [user] unloads their service tray.")
else
user.visible_message("\blue [user] drops all the items on their tray.")
+12 -12
View File
@@ -26,7 +26,7 @@
if(!istype(over_object, /obj/screen))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if (!M.restrained() && !M.stat && can_use())
if(!M.restrained() && !M.stat && can_use())
switch(over_object.name)
if("r_hand")
M.unEquip(src)
@@ -443,13 +443,13 @@
can_hold = list()
proc/failcheck(mob/user as mob)
if (prob(src.reliability)) return 1 //No failure
if (prob(src.reliability))
if(prob(src.reliability)) return 1 //No failure
if(prob(src.reliability))
to_chat(user, "\red The Bluespace portal resists your attempt to add another item.")//light failure
else
to_chat(user, "\red The Bluespace generator malfunctions!")
for (var/obj/O in src.contents) //it broke, delete what was in it
for(var/obj/O in src.contents) //it broke, delete what was in it
qdel(O)
crit_fail = 1
return 0
@@ -519,9 +519,9 @@
// As a last resort, the belt can be used as a plastic explosive with a fixed timer (15 seconds). Naturally, you'll lose all your gear...
// Of course, it could be worse. It could spawn a singularity!
/obj/item/weapon/storage/belt/bluespace/owlman/afterattack(atom/target as obj|turf, mob/user as mob, flag)
if (!flag)
if(!flag)
return
if (istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/structure/table) || istype(target, /obj/structure/closet))
if(istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/structure/table) || istype(target, /obj/structure/closet))
return
to_chat(user, "Planting explosives...")
user.visible_message("[user.name] is fiddling with their toolbelt.")
@@ -536,8 +536,8 @@
target = target
loc = null
var/location
if (isturf(target)) location = target
if (ismob(target))
if(isturf(target)) location = target
if(ismob(target))
target:attack_log += "\[[time_stamp()]\]<font color='orange'> Had the [name] planted on them by [user.real_name] ([user.ckey])</font>"
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2")
@@ -547,12 +547,12 @@
if(ismob(target) || isobj(target))
location = target.loc // These things can move
explosion(location, -1, -1, 2, 3)
if (istype(target, /turf/simulated/wall)) target:dismantle_wall(1)
if(istype(target, /turf/simulated/wall)) target:dismantle_wall(1)
else target.ex_act(1)
if (isobj(target))
if (target)
if(isobj(target))
if(target)
qdel(target)
if (src)
if(src)
qdel(src)
*/
@@ -52,7 +52,7 @@
else
M.LAssailant = user
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
to_chat(user, "\red You don't have the dexterity to do this!")
return
if(!chaplain)
@@ -60,7 +60,7 @@
user.take_organ_damage(0,10)
return
if ((CLUMSY in user.mutations) && prob(50))
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "\red The [src] slips out of your hand and hits your head.")
user.take_organ_damage(10)
user.Paralyse(20)
@@ -69,12 +69,12 @@
// if(..() == BLOCKED)
// return
if (M.stat !=2)
if(M.stat !=2)
/*if((M.mind in ticker.mode.cult) && (prob(20)))
to_chat(M, "\red The power of [src.deity_name] clears your mind of heresy!")
to_chat(user, "\red You see how [M]'s eyes become clear, the cult no longer holds control over him!")
ticker.mode.remove_cultist(M.mind)*/
if ((istype(M, /mob/living/carbon/human) && prob(60)))
if((istype(M, /mob/living/carbon/human) && prob(60)))
bless(M)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] heals [] with the power of [src.deity_name]!</B>", user, M), 1)
@@ -96,7 +96,7 @@
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity)
return
if (istype(A, /turf/simulated/floor))
if(istype(A, /turf/simulated/floor))
to_chat(user, "<span class='notice'>You hit the floor with the bible.</span>")
if(user.mind && (user.mind.assigned_role == "Chaplain"))
call(/obj/effect/rune/proc/revealrunes)(src)
@@ -603,7 +603,7 @@
icon_state = "syringe"
New()
..()
for (var/i; i < storage_slots; i++)
for(var/i; i < storage_slots; i++)
new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src)
/obj/item/weapon/storage/box/autoinjector/utility
@@ -355,7 +355,7 @@
var/total_contents = src.contents.len - itemremoved
src.icon_state = "vialbox[total_contents]"
src.overlays.Cut()
if (!broken)
if(!broken)
overlays += image(icon, src, "led[locked]")
if(locked)
overlays += image(icon, src, "cover")
@@ -31,7 +31,7 @@
New()
..()
if (empty) return
if(empty) return
icon_state = pick("ointment","firefirstaid")
@@ -53,7 +53,7 @@
New()
..()
if (empty) return
if(empty) return
new /obj/item/weapon/reagent_containers/food/pill/patch/styptic( src )
new /obj/item/weapon/reagent_containers/food/pill/patch/styptic( src )
new /obj/item/weapon/reagent_containers/food/pill/salicylic( src )
@@ -71,7 +71,7 @@
New()
..()
if (empty) return
if(empty) return
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
@@ -95,7 +95,7 @@
New()
..()
if (empty) return
if(empty) return
new /obj/item/weapon/reagent_containers/food/pill/salbutamol( src )
new /obj/item/weapon/reagent_containers/food/pill/salbutamol( src )
new /obj/item/weapon/reagent_containers/food/pill/salbutamol( src )
@@ -114,7 +114,7 @@
New()
..()
if (empty) return
if(empty) return
icon_state = pick("brute","brute2")
@@ -138,7 +138,7 @@
/obj/item/weapon/storage/firstaid/adv/New()
..()
if (empty) return
if(empty) return
new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
@@ -164,7 +164,7 @@
/obj/item/weapon/storage/firstaid/tactical/New()
..()
if (empty) return
if(empty) return
new /obj/item/clothing/accessory/stethoscope( src )
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
new /obj/item/weapon/reagent_containers/hypospray/combat(src)
@@ -223,11 +223,11 @@
base_name = name
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
if (ishuman(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
if(ishuman(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
if(!( istype(over_object, /obj/screen) ))
return ..()
if ((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/))
if((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/))
switch(over_object.name)
if("r_hand")
M.unEquip(src)
@@ -238,7 +238,7 @@
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
if(usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
@@ -30,24 +30,24 @@
//returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of
//doing it without the ability to call another proc's parent, really.
/obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj)
if (ishuman(user)) //so monkeys can take off their backpacks -- Urist
if(ishuman(user)) //so monkeys can take off their backpacks -- Urist
if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
if(istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
return 0
if(over_object == user && Adjacent(user)) // this must come before the screen objects only block
src.open(user)
return 0
if (!( istype(over_object, /obj/screen) ))
if(!( istype(over_object, /obj/screen) ))
return 1
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
//there's got to be a better way of doing this...
if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
if(!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
return 0
if (!( user.restrained() ) && !( user.stat ))
if(!( user.restrained() ) && !( user.stat ))
switch(over_object.name)
if("r_hand")
user.unEquip(master_item)
@@ -76,12 +76,12 @@
return 0
src.add_fingerprint(user)
if (master_item.loc == user)
if(master_item.loc == user)
src.open(user)
return 0
for(var/mob/M in range(1, master_item.loc))
if (M.s_active == src)
if(M.s_active == src)
src.close(M)
return 1
@@ -18,7 +18,7 @@
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/id))
if(istype(W, /obj/item/weapon/card/id))
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
@@ -33,19 +33,19 @@
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(locked)
if ((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
if((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
emag_act(user, W)
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20, target = src))
if(istype(W, /obj/item/weapon/screwdriver))
if(do_after(user, 20, target = src))
src.open =! src.open
user.show_message(text("\blue You [] the service panel.", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
if((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
user.show_message(text("\red Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
if (do_after(usr, 100, target = src))
if (prob(40))
if(do_after(usr, 100, target = src))
if(prob(40))
src.l_setshort = 1
src.l_set = 0
user.show_message(text("\red Internal memory reset. Please give it a few seconds to reinitialize."), 1)
@@ -85,7 +85,7 @@
MouseDrop(over_object, src_location, over_location)
if (locked)
if(locked)
src.add_fingerprint(usr)
return
..()
@@ -95,28 +95,28 @@
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
if((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if (src.emagged)
if(src.emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if (src.l_setshort)
if(src.l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", src.code)
if (!src.locked)
if(!src.locked)
message = "*****"
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
user << browse(dat, "window=caselock;size=300x280")
Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
if((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
return
if (href_list["type"])
if (href_list["type"] == "E")
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
if(href_list["type"])
if(href_list["type"] == "E")
if((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
src.l_code = src.code
src.l_set = 1
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
else if((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
src.locked = 0
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_opened)
@@ -124,18 +124,18 @@
else
src.code = "ERROR"
else
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
if((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
src.locked = 1
src.overlays = null
src.code = null
src.close(usr)
else
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
if(length(src.code) > 5)
src.code = "ERROR"
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
if((M.client && M.machine == src))
src.attack_self(M)
return
return
@@ -176,17 +176,17 @@
new /obj/item/weapon/pen(src)
attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
if((src.loc == user) && (src.locked == 1))
to_chat(usr, "\red [src] is locked and cannot be opened!")
else if ((src.loc == user) && (!src.locked))
else if((src.loc == user) && (!src.locked))
playsound(src.loc, "rustle", 50, 1, -5)
if (user.s_active)
if(user.s_active)
user.s_active.close(user) //Close and re-open
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
if(M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
@@ -26,10 +26,10 @@
var/use_sound = "rustle" //sound played when used. null for no sound.
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
if (ishuman(usr)) //so monkeys can take off their backpacks -- Urist
if(ishuman(usr)) //so monkeys can take off their backpacks -- Urist
var/mob/M = usr
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
@@ -39,12 +39,12 @@
show_to(M)
return
if ((istype(over_object, /obj/structure/table) || istype(over_object, /turf/simulated/floor)) \
if((istype(over_object, /obj/structure/table) || istype(over_object, /turf/simulated/floor)) \
&& contents.len && loc == usr && !usr.stat && !usr.restrained() && usr.canmove && over_object.Adjacent(usr) \
&& !istype(src, /obj/item/weapon/storage/lockbox))
var/turf/T = get_turf(over_object)
if (istype(over_object, /turf/simulated/floor))
if (get_turf(usr) != T)
if(istype(over_object, /turf/simulated/floor))
if(get_turf(usr) != T)
return // Can only empty containers onto the floor under you
if("Yes" != alert(usr,"Empty \the [src] onto \the [T]?","Confirm","Yes","No"))
return
@@ -59,12 +59,12 @@
update_icon() // For content-sensitive icons
return
if (!( istype(over_object, /obj/screen) ))
if(!( istype(over_object, /obj/screen) ))
return ..()
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
if(!(src.loc == usr) || (src.loc && src.loc.loc == usr))
return
playsound(src.loc, "rustle", 50, 1, -5)
if (!( M.restrained() ) && !( M.stat ))
if(!( M.restrained() ) && !( M.stat ))
switch(over_object.name)
if("r_hand")
if(!M.unEquip(src))
@@ -77,7 +77,7 @@
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
if(usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
@@ -94,7 +94,7 @@
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
if(istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
for(var/obj/item/weapon/folder/F in src)
L += F.contents
@@ -128,11 +128,11 @@
return
/obj/item/weapon/storage/proc/open(mob/user as mob)
if (src.use_sound)
if(src.use_sound)
playsound(src.loc, src.use_sound, 50, 1, -5)
orient2hud(user)
if (user.s_active)
if(user.s_active)
user.s_active.close(user)
show_to(user)
@@ -153,7 +153,7 @@
O.layer = 20
O.plane = HUD_PLANE
cx++
if (cx > mx)
if(cx > mx)
cx = tx
cy--
src.closer.screen_loc = "[mx+1],[my]"
@@ -173,7 +173,7 @@
ND.sample_object.layer = 20
ND.sample_object.plane = HUD_PLANE
cx++
if (cx > (4+cols))
if(cx > (4+cols))
cx = 4
cy--
else
@@ -184,7 +184,7 @@
O.layer = 20
O.plane = HUD_PLANE
cx++
if (cx > (4+cols))
if(cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = "[4+cols+1]:16,2:16"
@@ -224,7 +224,7 @@
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (adjusted_contents > 7)
if(adjusted_contents > 7)
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num, col_count, numbered_contents)
return
@@ -249,7 +249,7 @@
break
if(!ok)
if(!stop_messages)
if (istype(W, /obj/item/weapon/hand_labeler))
if(istype(W, /obj/item/weapon/hand_labeler))
return 0
to_chat(usr, "<span class='notice'>[src] cannot hold [W].</span>")
return 0
@@ -260,7 +260,7 @@
to_chat(usr, "<span class='notice'>[src] cannot hold [W].</span>")
return 0
if (W.w_class > max_w_class)
if(W.w_class > max_w_class)
if(!stop_messages)
to_chat(usr, "<span class='notice'>[W] is too big for this [src].</span>")
return 0
@@ -301,18 +301,18 @@
W.loc = src
W.on_enter_storage(src)
if(usr)
if (usr.client && usr.s_active != src)
if(usr.client && usr.s_active != src)
usr.client.screen -= W
W.dropped(usr)
add_fingerprint(usr)
if(!prevent_warning && !istype(W, /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow))
for(var/mob/M in viewers(usr, null))
if (M == usr)
if(M == usr)
to_chat(usr, "<span class='notice'>You put the [W] into [src].</span>")
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
else if(M in range(1)) //If someone is standing close enough, they can tell what it is...
M.show_message("<span class='notice'>[usr] puts [W] into [src].</span>")
else if (W && W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance...
else if(W && W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance...
M.show_message("<span class='notice'>[usr] puts [W] into [src].</span>")
src.orient2hud(usr)
@@ -331,8 +331,8 @@
F.update_icon(1)
for(var/mob/M in range(1, src.loc))
if (M.s_active == src)
if (M.client)
if(M.s_active == src)
if(M.client)
M.client.screen -= W
if(new_location)
@@ -392,14 +392,14 @@
return
src.orient2hud(user)
if (src.loc == user)
if (user.s_active)
if(src.loc == user)
if(user.s_active)
user.s_active.close(user)
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
if(M.s_active == src)
src.close(M)
src.add_fingerprint(user)
return
@@ -409,7 +409,7 @@
set category = "Object"
collection_mode = !collection_mode
switch (collection_mode)
switch(collection_mode)
if(1)
to_chat(usr, "[src] now picks up all items in a tile at once.")
if(0)
@@ -488,19 +488,19 @@
return
//Otherwise we'll try to fold it.
if ( contents.len )
if( contents.len )
return
if ( !ispath(src.foldable) )
if( !ispath(src.foldable) )
return
var/found = 0
// Close any open UI windows first
for(var/mob/M in range(1))
if (M.s_active == src)
if(M.s_active == src)
src.close(M)
if ( M == user )
if( M == user )
found = 1
if ( !found ) // User is too far away
if( !found ) // User is too far away
return
// Now make the cardboard
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
@@ -514,14 +514,14 @@
var/depth = 0
var/atom/cur_atom = src
while (cur_atom && !(cur_atom in container.contents))
if (isarea(cur_atom))
while(cur_atom && !(cur_atom in container.contents))
if(isarea(cur_atom))
return -1
if (istype(cur_atom.loc, /obj/item/weapon/storage))
if(istype(cur_atom.loc, /obj/item/weapon/storage))
depth++
cur_atom = cur_atom.loc
if (!cur_atom)
if(!cur_atom)
return -1 //inside something with a null loc.
return depth
@@ -532,14 +532,14 @@
var/depth = 0
var/atom/cur_atom = src
while (cur_atom && !isturf(cur_atom))
if (isarea(cur_atom))
while(cur_atom && !isturf(cur_atom))
if(isarea(cur_atom))
return -1
if (istype(cur_atom.loc, /obj/item/weapon/storage))
if(istype(cur_atom.loc, /obj/item/weapon/storage))
depth++
cur_atom = cur_atom.loc
if (!cur_atom)
if(!cur_atom)
return -1 //inside something with a null loc.
return depth
@@ -17,7 +17,7 @@
New()
..()
if (src.type == /obj/item/weapon/storage/toolbox)
if(src.type == /obj/item/weapon/storage/toolbox)
to_chat(world, "BAD: [src] ([src.type]) spawned at [src.x] [src.y] [src.z]")
qdel(src)

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