mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge branch 'master' into vg-parallax
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -31,11 +31,13 @@
|
||||
var/resintype = null
|
||||
smooth = SMOOTH_TRUE
|
||||
|
||||
|
||||
/obj/structure/alien/resin/New(location)
|
||||
..()
|
||||
/obj/structure/alien/resin/initialize()
|
||||
air_update_turf(1)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/alien/resin/Destroy()
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/alien/resin/Move()
|
||||
var/turf/T = loc
|
||||
@@ -179,7 +181,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 +269,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
|
||||
|
||||
@@ -158,6 +158,7 @@ var/global/list/PDA_Manifest = list()
|
||||
var/name = sanitize(t.fields["name"])
|
||||
var/rank = sanitize(t.fields["rank"])
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
|
||||
var/isactive = t.fields["p_stat"]
|
||||
var/department = 0
|
||||
var/depthead = 0 // Department Heads will be placed at the top of their lists.
|
||||
@@ -165,44 +166,44 @@ var/global/list/PDA_Manifest = list()
|
||||
heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
depthead = 1
|
||||
if(rank=="Captain" && heads.len != 1)
|
||||
heads.Swap(1,heads.len)
|
||||
if(rank == "Captain" && heads.len != 1)
|
||||
heads.Swap(1, heads.len)
|
||||
|
||||
if(real_rank in security_positions)
|
||||
sec[++sec.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sec.len != 1)
|
||||
sec.Swap(1,sec.len)
|
||||
sec.Swap(1, sec.len)
|
||||
|
||||
if(real_rank in engineering_positions)
|
||||
eng[++eng.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && eng.len != 1)
|
||||
eng.Swap(1,eng.len)
|
||||
eng.Swap(1, eng.len)
|
||||
|
||||
if(real_rank in medical_positions)
|
||||
med[++med.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && med.len != 1)
|
||||
med.Swap(1,med.len)
|
||||
med.Swap(1, med.len)
|
||||
|
||||
if(real_rank in science_positions)
|
||||
sci[++sci.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sci.len != 1)
|
||||
sci.Swap(1,sci.len)
|
||||
sci.Swap(1, sci.len)
|
||||
|
||||
if(real_rank in service_positions)
|
||||
ser[++ser.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && ser.len != 1)
|
||||
ser.Swap(1,ser.len)
|
||||
ser.Swap(1, ser.len)
|
||||
|
||||
if(real_rank in supply_positions)
|
||||
sup[++sup.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sup.len != 1)
|
||||
sup.Swap(1,sup.len)
|
||||
sup.Swap(1, sup.len)
|
||||
|
||||
if(real_rank in nonhuman_positions)
|
||||
bot[++bot.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
|
||||
@@ -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)
|
||||
..()
|
||||
|
||||
@@ -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 )
|
||||
@@ -515,7 +515,7 @@ steam.start() -- spawns the effect
|
||||
chemholder.reagents.reaction(A)
|
||||
if(iscarbon(A))
|
||||
var/mob/living/carbon/C = A
|
||||
if(!(C.wear_mask && (C.internals != null || C.wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)))
|
||||
if(C.can_breathe_gas())
|
||||
chemholder.reagents.copy_to(C, chemholder.reagents.total_volume)
|
||||
if(istype(A, /obj/machinery/portable_atmospherics/hydroponics))
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/tray = A
|
||||
@@ -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)
|
||||
@@ -1075,7 +1075,7 @@ steam.start() -- spawns the effect
|
||||
desc = "A lightweight foamed metal wall."
|
||||
var/metal = MFOAM_ALUMINUM
|
||||
|
||||
/obj/structure/foamedmetal/New()
|
||||
/obj/structure/foamedmetal/initialize()
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/obj/effect/landmark/New()
|
||||
|
||||
..()
|
||||
tag = text("landmark*[]", name)
|
||||
set_tag()
|
||||
invisibility = 101
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
@@ -105,18 +105,19 @@
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/obj/effect/landmark/proc/set_tag()
|
||||
tag = text("landmark*[]", name)
|
||||
|
||||
|
||||
/obj/effect/landmark/start
|
||||
name = "start"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
anchored = 1.0
|
||||
|
||||
/obj/effect/landmark/start/New()
|
||||
..()
|
||||
/obj/effect/landmark/start/set_tag()
|
||||
tag = "start*[name]"
|
||||
invisibility = 101
|
||||
|
||||
return 1
|
||||
|
||||
//Costume spawner landmarks
|
||||
|
||||
@@ -175,7 +176,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 +228,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)
|
||||
|
||||
@@ -260,4 +261,4 @@
|
||||
/obj/effect/landmark/costume/sexymime/New()
|
||||
new /obj/item/clothing/mask/gas/sexymime(src.loc)
|
||||
new /obj/item/clothing/under/sexymime(src.loc)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -58,65 +58,106 @@
|
||||
//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/bruise_pack/advanced = 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/crate_spawner // for ruins
|
||||
name = "lootcrate spawner"
|
||||
lootdoubles = 0
|
||||
|
||||
loot = list(
|
||||
/obj/structure/closet/crate/secure/loot = 20,
|
||||
"" = 80,
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/trade_sol_rare
|
||||
|
||||
@@ -5,10 +5,15 @@
|
||||
var/useFull = 0
|
||||
var/useGrille = 1
|
||||
var/windowtospawn = /obj/structure/window/basic
|
||||
anchored = 1 // No sliding out while you prime
|
||||
|
||||
/obj/effect/spawner/window/New()
|
||||
/obj/effect/spawner/window/initialize()
|
||||
spawn(0)
|
||||
for(var/obj/structure/grille/G in get_turf(src)) qdel(G) //just in case mappers don't know what they are doing
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/structure/grille/G in get_turf(src))
|
||||
// Complain noisily
|
||||
log_debug("Extra grille on turf: ([T.x],[T.y],[T.z])")
|
||||
qdel(G) //just in case mappers don't know what they are doing
|
||||
|
||||
if(!useFull)
|
||||
for(var/cdir in cardinal)
|
||||
@@ -30,7 +35,8 @@
|
||||
spawn(10)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/spawner/window/reinforced
|
||||
name = "reinforced window spawner"
|
||||
icon_state = "rwindow_spawner"
|
||||
windowtospawn = /obj/structure/window/reinforced
|
||||
windowtospawn = /obj/structure/window/reinforced
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+56
-33
@@ -1,3 +1,5 @@
|
||||
var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.dmi', "icon_state" = "fire")
|
||||
|
||||
/obj/item
|
||||
name = "item"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
@@ -17,7 +19,7 @@
|
||||
var/r_speed = 1.0
|
||||
var/health = null
|
||||
var/hitsound = null
|
||||
var/w_class = 3.0
|
||||
var/w_class = 3
|
||||
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
|
||||
pass_flags = PASSTABLE
|
||||
pressure_resistance = 3
|
||||
@@ -29,10 +31,8 @@
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
|
||||
|
||||
//If this is set, The item will make an action button on the player's HUD when picked up.
|
||||
var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button.
|
||||
var/action_button_custom_type = null
|
||||
var/datum/action/item_action/action = null
|
||||
var/list/actions = list() //list of /datum/action's that this item has.
|
||||
var/list/actions_types = list() //list of paths of action datums to give to the item on New().
|
||||
|
||||
var/list/materials = list()
|
||||
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
|
||||
@@ -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(
|
||||
@@ -69,10 +72,17 @@
|
||||
var/sprite_sheets_obj = null //Used to override hardcoded clothing inventory object dmis in human clothing proc.
|
||||
var/list/species_fit = null //This object has a different appearance when worn by these species
|
||||
|
||||
/obj/item/New()
|
||||
..()
|
||||
for(var/path in actions_types)
|
||||
new path(src)
|
||||
|
||||
/obj/item/Destroy()
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.unEquip(src, 1)
|
||||
for(var/X in actions)
|
||||
qdel(X)
|
||||
return ..()
|
||||
|
||||
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
|
||||
@@ -90,11 +100,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 +179,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 +192,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 +223,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,12 +252,14 @@
|
||||
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
|
||||
if(!isrobot(user))
|
||||
return
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.activate_module(src)
|
||||
R.hud_used.update_robot_modules_display()
|
||||
if(!R.low_power_mode) //can't equip modules with an empty cell.
|
||||
R.activate_module(src)
|
||||
R.hud_used.update_robot_modules_display()
|
||||
|
||||
// Due to storage type consolidation this should get used more now.
|
||||
// I have cleaned it up a little, but it could probably use more. -Sayu
|
||||
@@ -282,14 +294,22 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/proc/talk_into(mob/M as mob, var/text, var/channel=null)
|
||||
/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, var/text, var/channel=null)
|
||||
return
|
||||
|
||||
/obj/item/proc/moved(mob/user as mob, old_loc as turf)
|
||||
/obj/item/proc/moved(mob/user, old_loc)
|
||||
return
|
||||
|
||||
/obj/item/proc/dropped(mob/user as mob)
|
||||
..()
|
||||
/obj/item/proc/dropped(mob/user)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(user)
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
@@ -313,7 +333,13 @@
|
||||
// for items that can be placed in multiple slots
|
||||
// note this isn't called during the initial dressing of a player
|
||||
/obj/item/proc/equipped(var/mob/user, var/slot)
|
||||
return
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user)
|
||||
return 1
|
||||
|
||||
//returns 1 if the item is equipped by a mob, 0 otherwise.
|
||||
//This might need some error trapping, not sure if get_equipped_items() is safe for non-human mobs.
|
||||
@@ -368,14 +394,11 @@
|
||||
return
|
||||
|
||||
|
||||
//This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'icon_action_button' to the icon_state of the image of the button in screen1_action.dmi
|
||||
//This proc is executed when someone clicks the on-screen UI button.
|
||||
//The default action is attack_self().
|
||||
//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob.
|
||||
/obj/item/proc/ui_action_click()
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/proc/IsShield()
|
||||
return 0
|
||||
/obj/item/proc/ui_action_click(mob/user, actiontype)
|
||||
attack_self(user)
|
||||
|
||||
/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 +464,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 +485,7 @@
|
||||
|
||||
|
||||
/obj/item/add_blood(mob/living/carbon/human/M as mob)
|
||||
if (!..())
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(istype(src, /obj/item/weapon/melee/energy))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
desc = "A folded bag designed for the storage and transportation of cadavers."
|
||||
icon = 'icons/obj/bodybag.dmi'
|
||||
icon_state = "bodybag_folded"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
|
||||
attack_self(mob/user)
|
||||
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
desc = "A colourful crayon. Looks tasty. Mmmm..."
|
||||
icon = 'icons/obj/crayons.dmi'
|
||||
icon_state = "crayonred"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
slot_flags = SLOT_BELT | SLOT_EARS
|
||||
attack_verb = list("attacked", "coloured")
|
||||
var/colour = "#FF0000" //RGB
|
||||
@@ -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)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "aicard" // aicard-full
|
||||
item_state = "electronic"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
slot_flags = SLOT_BELT
|
||||
flags = NOBLUDGEON
|
||||
var/flush = null
|
||||
@@ -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>")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
icon = 'icons/obj/autopsy_scanner.dmi'
|
||||
icon_state = ""
|
||||
flags = CONDUCT
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
var/list/datum/autopsy_data_scanner/wdata = list()
|
||||
var/list/datum/autopsy_data_scanner/chemtraces = list()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
throwforce = 5.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
origin_tech = "syndicate=4;magnets=4"
|
||||
var/can_use = 1
|
||||
var/obj/effect/dummy/chameleon/active_dummy = null
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
icon_state = "hacktool-g"
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
action_button_name = "Flashlight"
|
||||
actions_types = list(/datum/action/item_action/toggle_light)
|
||||
var/on = 0
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
return 0
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -68,7 +71,7 @@
|
||||
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
|
||||
|
||||
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
|
||||
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
|
||||
if(M.stat == DEAD || M.disabilities & BLIND) //mob is dead or fully blind
|
||||
to_chat(user, "<span class='notice'>[M] pupils does not react to the light!</span>")
|
||||
else if(XRAY in M.mutations) //mob has X-RAY vision
|
||||
to_chat(user, "<span class='notice'>[M] pupils give an eerie glow!</span>")
|
||||
@@ -148,7 +151,7 @@ obj/item/device/flashlight/lamp/bananalamp
|
||||
/obj/item/device/flashlight/flare
|
||||
name = "flare"
|
||||
desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
brightness_on = 8 // Made it brighter (from 7 to 8).
|
||||
light_color = "#ff0000" // changed colour to a more brighter red.
|
||||
icon_state = "flare"
|
||||
@@ -267,7 +270,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].")
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/obj/item/device/guitar/Topic(href, href_list)
|
||||
song.Topic(href, href_list)
|
||||
|
||||
/datum/table_recipe/guitar
|
||||
/datum/crafting_recipe/guitar
|
||||
name = "Guitar"
|
||||
result = /obj/item/device/guitar
|
||||
reqs = list(/obj/item/stack/sheet/wood = 5,
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A device used to project your voice. Loudly."
|
||||
icon_state = "megaphone"
|
||||
item_state = "radio"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
flags = CONDUCT
|
||||
|
||||
var/spamcheck = 0
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
icon_state = "multitool"
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "pai"
|
||||
item_state = "electronic"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "programming=2"
|
||||
var/request_cooldown = 5 // five seconds
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
desc = "A nulling power sink which drains energy from electrical systems."
|
||||
icon_state = "powersink0"
|
||||
item_state = "electronic"
|
||||
w_class = 4.0
|
||||
w_class = 4
|
||||
flags = CONDUCT
|
||||
throwforce = 5
|
||||
throw_speed = 1
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
frequency = 1449
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 5.0
|
||||
w_class = 5
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
|
||||
var/code = 2
|
||||
|
||||
|
||||
@@ -51,14 +51,16 @@
|
||||
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)
|
||||
return RADIO_CONNECTION_NON_SUBSPACE
|
||||
if(translate_hive)
|
||||
var/datum/language/hivemind = all_languages["Hivemind"]
|
||||
hivemind.broadcast(M, message)
|
||||
return null
|
||||
return RADIO_CONNECTION_NON_SUBSPACE
|
||||
return RADIO_CONNECTION_FAIL
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -209,21 +211,7 @@
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
ks2type = /obj/item/device/encryptionkey/heads/hop
|
||||
/*
|
||||
/obj/item/device/radio/headset/headset_mine
|
||||
name = "mining radio headset"
|
||||
desc = "Headset used by miners. How useless."
|
||||
icon_state = "mine_headset"
|
||||
item_state = "headset"
|
||||
ks2type = /obj/item/device/encryptionkey/headset_mine
|
||||
|
||||
/obj/item/device/radio/headset/heads/qm
|
||||
name = "quartermaster's headset"
|
||||
desc = "The headset of the man who control your toiletpaper supply."
|
||||
icon_state = "cargo_headset"
|
||||
item_state = "headset"
|
||||
ks2type = /obj/item/device/encryptionkey/heads/qm
|
||||
*/
|
||||
/obj/item/device/radio/headset/headset_cargo
|
||||
name = "supply radio headset"
|
||||
desc = "A headset used by the cargo department."
|
||||
@@ -231,6 +219,11 @@
|
||||
item_state = "headset"
|
||||
ks2type = /obj/item/device/encryptionkey/headset_cargo
|
||||
|
||||
/obj/item/device/radio/headset/headset_cargo/mining
|
||||
name = "mining radio headset"
|
||||
desc = "Headset used by shaft miners."
|
||||
icon_state = "mine_headset"
|
||||
|
||||
/obj/item/device/radio/headset/headset_service
|
||||
name = "service radio headset"
|
||||
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean."
|
||||
@@ -306,13 +299,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 +388,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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Talk through this."
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = 4.0
|
||||
w_class = 4
|
||||
canhear_range = 2
|
||||
flags = CONDUCT
|
||||
var/number = 0
|
||||
@@ -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))
|
||||
@@ -232,7 +232,7 @@
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
icon_state = "door_electronics"
|
||||
desc = "Looks like a circuit. Probably is."
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
|
||||
/obj/item/device/radio/intercom/locked
|
||||
|
||||
@@ -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,19 +288,21 @@ 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.
|
||||
return null
|
||||
return RADIO_CONNECTION_FAIL
|
||||
|
||||
/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel, var/verb = "says", var/datum/language/speaking = null)
|
||||
if(!on) return 0 // the device has to be on
|
||||
if(!on)
|
||||
return 0 // the device has to be on
|
||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||
if(!M || !message) return 0
|
||||
if(!M || !message)
|
||||
return 0
|
||||
|
||||
// Uncommenting this. To the above comment:
|
||||
// The permacell radios aren't suppose to be able to transmit, this isn't a bug and this "fix" is just making radio wires useless. -Giacom
|
||||
@@ -322,12 +324,17 @@ 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))
|
||||
return 0
|
||||
if (!connection)
|
||||
var/message_mode = handle_message_mode(M, message, channel)
|
||||
switch(message_mode) //special cases
|
||||
if(RADIO_CONNECTION_FAIL)
|
||||
return 0
|
||||
if(RADIO_CONNECTION_NON_SUBSPACE)
|
||||
return 1
|
||||
|
||||
if(!istype(message_mode, /datum/radio_frequency)) //if not a special case, it should be returning a radio connection
|
||||
return 0
|
||||
|
||||
var/datum/radio_frequency/connection = message_mode
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
//#### Tagging the signal with all appropriate identity values ####//
|
||||
@@ -344,24 +351,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 +379,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 +507,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 +515,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 +530,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 +541,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 +567,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 +577,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 +594,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
|
||||
..()
|
||||
|
||||
@@ -631,17 +638,10 @@ var/global/list/default_medbay_channels = list(
|
||||
..()
|
||||
set_frequency(DTH_FREQ)
|
||||
|
||||
/obj/item/device/radio/borg/talk_into()
|
||||
. = ..()
|
||||
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)
|
||||
|
||||
/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
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ REAGENT SCANNER
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
materials = list(MAT_METAL=200)
|
||||
@@ -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)
|
||||
@@ -136,9 +136,9 @@ REAGENT SCANNER
|
||||
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
user.show_message("\blue Body Temperature: ???", 1)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.","<span class='notice'> You have analyzed [M]'s vitals.")
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>","<span class='notice'> You have analyzed [M]'s vitals.</span>")
|
||||
|
||||
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,9 +226,10 @@ 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)
|
||||
var/blood_volume = round(M:vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
if(H.vessel)
|
||||
var/blood_type = H.get_blood_name()
|
||||
var/blood_volume = round(H.vessel.get_reagent_amount(blood_type))
|
||||
var/blood_percent = blood_volume / BLOOD_VOLUME_NORMAL
|
||||
blood_percent *= 100
|
||||
if(blood_volume <= 500)
|
||||
user.show_message("\red <b>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl")
|
||||
@@ -236,6 +237,9 @@ REAGENT SCANNER
|
||||
user.show_message("\red <b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl")
|
||||
else
|
||||
user.show_message("\blue Blood Level Normal: [blood_percent]% [blood_volume]cl")
|
||||
if(H.species.exotic_blood)
|
||||
user.show_message("<span class='warning'>Subject possesses exotic blood.</span>")
|
||||
user.show_message("<span class='warning'>Exotic blood type: [blood_type].</span>")
|
||||
if(H.heart_attack && H.stat != DEAD)
|
||||
user.show_message("<span class='userdanger'>Subject suffering from heart attack: Apply defibrillator immediately.</span>")
|
||||
user.show_message("\blue Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font>")
|
||||
@@ -246,7 +250,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 +266,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)
|
||||
@@ -283,7 +294,7 @@ REAGENT SCANNER
|
||||
name = "Health Analyzer Upgrade"
|
||||
icon_state = "healthupgrade"
|
||||
desc = "An upgrade unit that can be installed on a health analyzer for expanded functionality."
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
origin_tech = "magnets=2;biotech=2"
|
||||
|
||||
/obj/item/device/analyzer
|
||||
@@ -291,7 +302,7 @@ REAGENT SCANNER
|
||||
name = "analyzer"
|
||||
icon_state = "atmos"
|
||||
item_state = "analyzer"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
@@ -302,11 +313,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()
|
||||
@@ -357,7 +368,7 @@ REAGENT SCANNER
|
||||
name = "mass-spectrometer"
|
||||
icon_state = "spectrometer"
|
||||
item_state = "analyzer"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
flags = CONDUCT | OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 5
|
||||
@@ -381,12 +392,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)
|
||||
@@ -429,7 +440,7 @@ REAGENT SCANNER
|
||||
desc = "A hand-held reagent scanner which identifies chemical agents."
|
||||
icon_state = "spectrometer"
|
||||
item_state = "analyzer"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 5
|
||||
@@ -441,14 +452,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 +467,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
|
||||
@@ -486,7 +497,7 @@ REAGENT SCANNER
|
||||
icon_state = "adv_spectrometer_s"
|
||||
item_state = "analyzer"
|
||||
origin_tech = "biotech=1"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
flags = CONDUCT
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
@@ -494,24 +505,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 +531,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)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A miniature machine that tracks suit sensors across the station."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "scanner"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "biotech=3;materials=3;magnets=3"
|
||||
var/datum/nano_module/crew_monitor/crew_monitor
|
||||
|
||||
@@ -19,7 +19,7 @@ effective or pretty fucking useless.
|
||||
desc = "A strange device with twin antennas."
|
||||
icon_state = "batterer"
|
||||
throwforce = 5
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
flags = CONDUCT
|
||||
@@ -79,7 +79,7 @@ effective or pretty fucking useless.
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=400)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
desc = "Used by obese officers to save their breath for running."
|
||||
icon_state = "voice0"
|
||||
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
flags = CONDUCT
|
||||
|
||||
var/spamcheck = 0
|
||||
var/emagged = 0
|
||||
|
||||
/obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
|
||||
if (spamcheck)
|
||||
if(spamcheck)
|
||||
return
|
||||
|
||||
if(emagged)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "docs_generic"
|
||||
item_state = "paper"
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
throw_range = 1
|
||||
throw_speed = 1
|
||||
layer = 4
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/flag
|
||||
icon = 'icons/obj/flag.dmi'
|
||||
w_class = 4.0
|
||||
w_class = 4
|
||||
var/lit = 0
|
||||
var/burntime = 30
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
item_state = "beachball"
|
||||
density = 0
|
||||
anchored = 0
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
force = 0.0
|
||||
throwforce = 0.0
|
||||
throw_speed = 1
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "tape roll"
|
||||
icon = 'icons/policetape.dmi'
|
||||
icon_state = "rollstart"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
var/turf/start
|
||||
var/turf/end
|
||||
var/tape_type = /obj/item/tape
|
||||
@@ -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)
|
||||
|
||||
@@ -7,28 +7,26 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "elecarm"
|
||||
var/charge_cost = 30
|
||||
|
||||
/obj/item/borg/stun/attack(mob/M, mob/living/silicon/robot/user)
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R && R.cell && R.cell.charge > 0)
|
||||
R.cell.use(charge_cost)
|
||||
else
|
||||
|
||||
/obj/item/borg/stun/attack(mob/living/M, mob/living/silicon/robot/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.check_shields(0, "[M]'s [name]", src, MELEE_ATTACK))
|
||||
playsound(M, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
return 0
|
||||
|
||||
if(!user.cell.use(charge_cost))
|
||||
return
|
||||
|
||||
user.do_attack_animation(M)
|
||||
M.Weaken(5)
|
||||
if (M.stuttering < 5)
|
||||
M.stuttering = 5
|
||||
M.apply_effect(STUTTER, 5)
|
||||
M.Stun(5)
|
||||
|
||||
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has prodded you with [src].</span>")
|
||||
"<span class='userdanger'>[user] has prodded you with [src]!</span>")
|
||||
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
add_logs(M, user, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
|
||||
|
||||
|
||||
@@ -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,59 +2,71 @@
|
||||
// Contains various borg upgrades.
|
||||
|
||||
/obj/item/borg/upgrade
|
||||
name = "A borg upgrade module."
|
||||
name = "borg upgrade module."
|
||||
desc = "Protected by FRM."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "cyborg_upgrade"
|
||||
var/locked = 0
|
||||
var/require_module = 0
|
||||
var/installed = 0
|
||||
var/require_module = 0
|
||||
var/module_type = null
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
|
||||
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R)
|
||||
if(R.stat == DEAD)
|
||||
to_chat(usr, "\red The [src] will not function on a deceased robot.")
|
||||
to_chat(usr, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
|
||||
return 1
|
||||
if(module_type && !istype(R.module, module_type))
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(usr, "There's no mounting point for the module!")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/reset
|
||||
name = "robotic module reset board"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the robot."
|
||||
name = "cyborg module reset board"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/reset/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
/obj/item/borg/upgrade/reset/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
R.notify_ai(2)
|
||||
|
||||
R.uneq_all()
|
||||
R.hands.icon_state = "nomod"
|
||||
R.icon_state = "robot"
|
||||
qdel(R.module)
|
||||
R.module = null
|
||||
R.camera.network.Remove(list("Engineering","Medical","Mining Outpost"))
|
||||
|
||||
R.camera.network.Remove(list("Engineering", "Medical", "Mining Outpost"))
|
||||
R.rename_character(R.real_name, R.get_default_name("Default"))
|
||||
R.status_flags |= CANPUSH
|
||||
R.languages = list()
|
||||
R.speech_synthesizer_langs = list()
|
||||
R.notify_ai(2)
|
||||
R.jetpackoverlay = 0
|
||||
|
||||
R.update_icons()
|
||||
R.update_headlamp()
|
||||
|
||||
R.speed = 0 // Remove upgrades.
|
||||
R.ionpulse = 0
|
||||
R.magpulse = 0
|
||||
R.add_language("Robot Talk", 1)
|
||||
|
||||
R.status_flags |= CANPUSH
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/rename
|
||||
name = "robot reclassification board"
|
||||
name = "cyborg reclassification board"
|
||||
desc = "Used to rename a cyborg."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
var/heldname = "default name"
|
||||
|
||||
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
|
||||
heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
|
||||
/obj/item/borg/upgrade/rename/attack_self(mob/user)
|
||||
heldname = stripped_input(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN)
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
if(..())
|
||||
return
|
||||
R.notify_ai(3, R.name, heldname)
|
||||
R.name = heldname
|
||||
R.custom_name = heldname
|
||||
@@ -63,14 +75,13 @@
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/restart
|
||||
name = "robot emergency restart module"
|
||||
desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online."
|
||||
name = "cyborg emergency reboot module"
|
||||
desc = "Used to force a reboot of a disabled-but-repaired cyborg, bringing it back online."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/restart/action(var/mob/living/silicon/robot/R)
|
||||
/obj/item/borg/upgrade/restart/action(mob/living/silicon/robot/R)
|
||||
if(R.health < 0)
|
||||
to_chat(usr, "You have to repair the robot before using this module!")
|
||||
to_chat(usr, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
|
||||
return 0
|
||||
|
||||
if(!R.key)
|
||||
@@ -82,6 +93,7 @@
|
||||
dead_mob_list -= R //please never forget this ever kthx
|
||||
living_mob_list += R
|
||||
R.notify_ai(1)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -92,126 +104,228 @@
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
if(..())
|
||||
return
|
||||
if(R.speed < 0)
|
||||
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
|
||||
to_chat(usr, "<span class='notice'>There's no room for another VTEC unit!</span>")
|
||||
return
|
||||
|
||||
if(R.speed == -1)
|
||||
return 0
|
||||
R.speed = -1 // Gotta go fast.
|
||||
|
||||
R.speed--
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler
|
||||
name = "robotic Rapid Disabler Cooling Module"
|
||||
name = "cyborg rapid disabler cooling module"
|
||||
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = /obj/item/weapon/robot_module/security
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
if(!istype(R.module, /obj/item/weapon/robot_module/security))
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(usr, "There's no mounting point for the module!")
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/gun/energy/disabler/cyborg/T = locate() in R.module
|
||||
var/obj/item/weapon/gun/energy/disabler/cyborg/T = locate() in R.module.modules
|
||||
if(!T)
|
||||
T = locate() in R.module.contents
|
||||
if(!T)
|
||||
T = locate() in R.module.modules
|
||||
if(!T)
|
||||
to_chat(usr, "This robot has had its disabler removed!")
|
||||
return 0
|
||||
|
||||
to_chat(usr, "<span class='notice'>There's no disabler in this unit!</span>")
|
||||
return
|
||||
if(T.charge_delay <= 2)
|
||||
to_chat(R, "Maximum cooling achieved for this hardpoint!")
|
||||
to_chat(usr, "There's no room for another cooling unit!")
|
||||
return 0
|
||||
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
|
||||
to_chat(usr, "<span class='notice'>There's no room for another cooling unit!</span>")
|
||||
return
|
||||
|
||||
else
|
||||
T.charge_delay = max(2 , T.charge_delay - 4)
|
||||
T.charge_delay = max(2 , T.charge_delay - 4)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/jetpack
|
||||
name = "mining robot jetpack"
|
||||
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
|
||||
/obj/item/borg/upgrade/thrusters
|
||||
name = "ion thruster upgrade"
|
||||
desc = "A energy-operated thruster system for cyborgs."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/jetpack/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
/obj/item/borg/upgrade/thrusters/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(!istype(R.module, /obj/item/weapon/robot_module/miner))
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(usr, "There's no mounting point for the module!")
|
||||
return 0
|
||||
else
|
||||
R.module.modules += new/obj/item/weapon/tank/jetpack/carbondioxide
|
||||
for(var/obj/item/weapon/tank/jetpack/carbondioxide in R.module.modules)
|
||||
R.internals = src
|
||||
R.jetpackoverlay = 1
|
||||
R.update_icons()
|
||||
return 1
|
||||
if(R.ionpulse)
|
||||
to_chat(usr, "<span class='notice'>This unit already has ion thrusters installed!</span>")
|
||||
return
|
||||
|
||||
R.ionpulse = 1
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/ddrill
|
||||
name = "mining cyborg diamond drill"
|
||||
desc = "A diamond drill replacement for the mining module's standard drill."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = /obj/item/weapon/robot_module/miner
|
||||
|
||||
/obj/item/borg/upgrade/ddrill/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(!istype(R.module, /obj/item/weapon/robot_module/miner))
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(usr, "There's no mounting point for the module!")
|
||||
return 0
|
||||
else
|
||||
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in R.module.modules)
|
||||
R.module.modules -= D
|
||||
qdel(D)
|
||||
for(var/obj/item/weapon/shovel/S in R.module.modules)
|
||||
R.module.modules -= S
|
||||
qdel(S)
|
||||
R.module.modules += new /obj/item/weapon/pickaxe/drill/cyborg/diamond(R.module)
|
||||
R.module.rebuild()
|
||||
return 1
|
||||
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in R.module.modules)
|
||||
qdel(D)
|
||||
for(var/obj/item/weapon/shovel/S in R.module.modules)
|
||||
qdel(S)
|
||||
|
||||
R.module.modules += new /obj/item/weapon/pickaxe/drill/cyborg/diamond(R.module)
|
||||
R.module.rebuild()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/soh
|
||||
name = "mining cyborg satchel of holding"
|
||||
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = /obj/item/weapon/robot_module/miner
|
||||
|
||||
/obj/item/borg/upgrade/soh/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(!istype(R.module, /obj/item/weapon/robot_module/miner))
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(usr, "There's no mounting point for the module!")
|
||||
return 0
|
||||
else
|
||||
for(var/obj/item/weapon/storage/bag/ore/cyborg/S in R.module.modules)
|
||||
R.module.modules -= S
|
||||
qdel(S)
|
||||
R.module.modules += new /obj/item/weapon/storage/bag/ore/holding/cyborg(R.module)
|
||||
R.module.rebuild()
|
||||
return 1
|
||||
for(var/obj/item/weapon/storage/bag/ore/cyborg/S in R.module.modules)
|
||||
qdel(S)
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/
|
||||
name = "Illegal Equipment Module"
|
||||
desc = "Unlocks the hidden, deadlier functions of a robot"
|
||||
R.module.modules += new /obj/item/weapon/storage/bag/ore/holding(R.module)
|
||||
R.module.rebuild()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/hyperka
|
||||
name = "mining cyborg hyper-kinetic accelerator"
|
||||
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = /obj/item/weapon/robot_module/miner
|
||||
|
||||
/obj/item/borg/upgrade/hyperka/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg/H in R.module.modules)
|
||||
qdel(H)
|
||||
|
||||
R.module.modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/hyper/cyborg(R.module)
|
||||
R.module.rebuild()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/syndicate
|
||||
name = "illegal equipment module"
|
||||
desc = "Unlocks the hidden, deadlier functions of a cyborg"
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(R.emagged == 1)
|
||||
return 0
|
||||
if(R.emagged)
|
||||
return
|
||||
|
||||
R.emagged = 1
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair
|
||||
name = "self-repair module"
|
||||
desc = "This module will repair the cyborg over time."
|
||||
icon_state = "cyborg_upgrade5"
|
||||
require_module = 1
|
||||
var/repair_amount = -1
|
||||
var/repair_tick = 1
|
||||
var/msg_cooldown = 0
|
||||
var/on = 0
|
||||
var/powercost = 10
|
||||
var/mob/living/silicon/robot/cyborg
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
|
||||
if(U)
|
||||
to_chat(usr, "<span class='warning'>This unit is already equipped with a self-repair module.</span>")
|
||||
return 0
|
||||
|
||||
cyborg = R
|
||||
icon_state = "selfrepair_off"
|
||||
var/datum/action/A = new /datum/action/item_action/toggle(src)
|
||||
A.Grant(R)
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/Destroy()
|
||||
cyborg = null
|
||||
processing_objects -= src
|
||||
on = 0
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/ui_action_click()
|
||||
on = !on
|
||||
if(on)
|
||||
to_chat(cyborg, "<span class='notice'>You activate the self-repair module.</span>")
|
||||
processing_objects |= src
|
||||
else
|
||||
to_chat(cyborg, "<span class='notice'>You deactivate the self-repair module.</span>")
|
||||
processing_objects -= src
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/update_icon()
|
||||
if(cyborg)
|
||||
icon_state = "selfrepair_[on ? "on" : "off"]"
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
else
|
||||
icon_state = "cyborg_upgrade5"
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/proc/deactivate()
|
||||
processing_objects -= src
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
if(!repair_tick)
|
||||
repair_tick = 1
|
||||
return
|
||||
|
||||
if(cyborg && (cyborg.stat != DEAD) && on)
|
||||
if(!cyborg.cell)
|
||||
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please, insert the power cell.</span>")
|
||||
deactivate()
|
||||
return
|
||||
|
||||
if(cyborg.cell.charge < powercost * 2)
|
||||
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please recharge.</span>")
|
||||
deactivate()
|
||||
return
|
||||
|
||||
if(cyborg.health < cyborg.maxHealth)
|
||||
if(cyborg.health < 0)
|
||||
repair_amount = -2.5
|
||||
powercost = 30
|
||||
else
|
||||
repair_amount = -1
|
||||
powercost = 10
|
||||
cyborg.adjustBruteLoss(repair_amount)
|
||||
cyborg.adjustFireLoss(repair_amount)
|
||||
cyborg.updatehealth()
|
||||
cyborg.cell.use(powercost)
|
||||
else
|
||||
cyborg.cell.use(5)
|
||||
repair_tick = 0
|
||||
|
||||
if((world.time - 2000) > msg_cooldown )
|
||||
var/msgmode = "standby"
|
||||
if(cyborg.health < 0)
|
||||
msgmode = "critical"
|
||||
else if(cyborg.health < cyborg.maxHealth)
|
||||
msgmode = "normal"
|
||||
to_chat(cyborg, "<span class='notice'>Self-repair is active in <span class='boldnotice'>[msgmode]</span> mode.</span>")
|
||||
msg_cooldown = world.time
|
||||
else
|
||||
deactivate()
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -5,22 +5,22 @@
|
||||
amount = 5
|
||||
max_amount = 5
|
||||
w_class = 1
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/heal_brute = 0
|
||||
var/heal_burn = 0
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if (!istype(M))
|
||||
to_chat(user, "<span class='danger'>\The [src] cannot be applied to [M]!</span>")
|
||||
/obj/item/stack/medical/attack(mob/living/carbon/M, mob/user)
|
||||
if(!istype(M))
|
||||
to_chat(user, "<span class='danger'>[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)
|
||||
|
||||
@@ -40,12 +40,15 @@
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
user.visible_message("<span class='notice'>[M] has been applied with [src] by [user].</span>","<span class='notice'>You apply \the [src] to [M].</span>")
|
||||
M.heal_organ_damage(heal_brute/2, heal_burn/2)
|
||||
user.visible_message("<span class='notice'>[M] has been applied with [src] by [user].</span>", \
|
||||
"<span class='notice'>You apply [src] to [M].</span>")
|
||||
use(1)
|
||||
|
||||
M.updatehealth()
|
||||
|
||||
//Bruise Packs//
|
||||
|
||||
/obj/item/stack/medical/bruise_pack
|
||||
name = "roll of gauze"
|
||||
singular_name = "gauze length"
|
||||
@@ -53,37 +56,52 @@
|
||||
icon_state = "gauze"
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M, mob/user)
|
||||
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)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(!affecting.bandage())
|
||||
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been bandaged.")
|
||||
var/bandaged = affecting.bandage()
|
||||
var/disinfected = affecting.disinfect()
|
||||
|
||||
if(!(bandaged || disinfected))
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
|
||||
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)
|
||||
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))
|
||||
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]." )
|
||||
if(W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message("<span class='notice'>[user] bandages \the [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You bandage \the [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
else if(istype(W,/datum/wound/bruise))
|
||||
user.visible_message("<span class='notice'>[user] places a bruise patch over \the [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You place a bruise patch over \the [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
else
|
||||
user.visible_message( "\blue [user] places a bandaid over \the [W.desc] on [M]'s [affecting.name].", \
|
||||
"\blue You place a bandaid over \the [W.desc] on [M]'s [affecting.name]." )
|
||||
|
||||
affecting.heal_damage(src.heal_brute, src.heal_burn, 0)
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>[user] places a bandaid over \the [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You place a bandaid over \the [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
if(bandaged)
|
||||
affecting.heal_damage(heal_brute, heal_burn)
|
||||
use(1)
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
use(1)
|
||||
to_chat(user, "<span class='notice'>[affecting] is cut open, you'll need more than a bandage!</span>")
|
||||
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/advanced
|
||||
name = "advanced trauma kit"
|
||||
singular_name = "advanced trauma kit"
|
||||
desc = "An advanced trauma kit for severe injuries."
|
||||
icon_state = "traumakit"
|
||||
heal_brute = 12
|
||||
|
||||
|
||||
|
||||
//Ointment//
|
||||
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
name = "ointment"
|
||||
@@ -91,28 +109,40 @@
|
||||
gender = PLURAL
|
||||
singular_name = "ointment"
|
||||
icon_state = "ointment"
|
||||
heal_burn = 1
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
/obj/item/stack/medical/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
/obj/item/stack/medical/ointment/attack(mob/living/carbon/M, mob/user)
|
||||
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)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(!affecting.salve())
|
||||
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been salved.")
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message( "\blue [user] salves the wounds on [M]'s [affecting.name].", \
|
||||
"\blue You salve the wounds on [M]'s [affecting.name]." )
|
||||
affecting.heal_damage(src.heal_brute, src.heal_burn, 0)
|
||||
user.visible_message("<span class='notice'>[user] salves the wounds on [M]'s [affecting.name].", \
|
||||
"<span class='notice'>You salve the wounds on [M]'s [affecting.name].</span>" )
|
||||
affecting.heal_damage(heal_brute, heal_burn)
|
||||
use(1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than some ointment!</span>")
|
||||
to_chat(user, "<span class='notice'>[affecting] is cut open, you'll need more than some ointment!</span>")
|
||||
|
||||
|
||||
/obj/item/stack/medical/ointment/advanced
|
||||
name = "advanced burn kit"
|
||||
singular_name = "advanced burn kit"
|
||||
desc = "An advanced treatment kit for severe burns."
|
||||
icon_state = "burnkit"
|
||||
heal_burn = 12
|
||||
|
||||
|
||||
|
||||
//Medical Herbs//
|
||||
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/comfrey
|
||||
name = "\improper Comfrey leaf"
|
||||
@@ -123,6 +153,7 @@
|
||||
color = "#378C61"
|
||||
heal_brute = 7
|
||||
|
||||
|
||||
/obj/item/stack/medical/ointment/aloe
|
||||
name = "\improper Aloe Vera leaf"
|
||||
singular_name = "Aloe Vera leaf"
|
||||
@@ -132,77 +163,10 @@
|
||||
color = "#4CC5C7"
|
||||
heal_burn = 7
|
||||
|
||||
/obj/item/stack/medical/advanced/bruise_pack
|
||||
name = "advanced trauma kit"
|
||||
singular_name = "advanced trauma kit"
|
||||
desc = "An advanced trauma kit for severe injuries."
|
||||
icon_state = "traumakit"
|
||||
heal_brute = 12
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
/obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
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)
|
||||
|
||||
if(affecting.open == 0)
|
||||
var/bandaged = affecting.bandage()
|
||||
var/disinfected = affecting.disinfect()
|
||||
|
||||
if(!(bandaged || disinfected))
|
||||
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)
|
||||
continue
|
||||
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))
|
||||
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)
|
||||
affecting.heal_damage(heal_brute,0)
|
||||
use(1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
|
||||
/obj/item/stack/medical/advanced/ointment
|
||||
name = "advanced burn kit"
|
||||
singular_name = "advanced burn kit"
|
||||
desc = "An advanced treatment kit for severe burns."
|
||||
icon_state = "burnkit"
|
||||
heal_burn = 12
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
|
||||
/obj/item/stack/medical/advanced/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(..())
|
||||
return 1
|
||||
//Splits//
|
||||
|
||||
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)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(!affecting.salve())
|
||||
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been salved.")
|
||||
return 1
|
||||
else
|
||||
user.visible_message( "\blue [user] covers the wounds on [M]'s [affecting.name] with regenerative membrane.", \
|
||||
"\blue You cover the wounds on [M]'s [affecting.name] with regenerative membrane." )
|
||||
affecting.heal_damage(0,heal_burn)
|
||||
use(1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
|
||||
/obj/item/stack/medical/splint
|
||||
name = "medical splints"
|
||||
@@ -211,11 +175,7 @@
|
||||
amount = 5
|
||||
max_amount = 5
|
||||
|
||||
/obj/item/stack/medical/splint/single
|
||||
amount = 1
|
||||
|
||||
|
||||
/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
/obj/item/stack/medical/splint/attack(mob/living/carbon/M, mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
@@ -224,30 +184,39 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
if(!(affecting.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")))
|
||||
to_chat(user, "\red You can't apply a splint there!")
|
||||
to_chat(user, "<span class='danger'>You can't apply a splint there!</span>")
|
||||
return
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
to_chat(user, "\red [M]'s [limb] is already splinted!")
|
||||
to_chat(user, "<span class='danger'>[M]'s [limb] is already splinted!</span>")
|
||||
if(alert(user, "Would you like to remove the splint from [M]'s [limb]?", "Removing.", "Yes", "No") == "Yes")
|
||||
affecting.status &= ~ORGAN_SPLINTED
|
||||
to_chat(user, "<span class='notice'>You remove the splint from [M]'s [limb].")
|
||||
to_chat(user, "<span class='notice'>You remove the splint from [M]'s [limb].</span>")
|
||||
return
|
||||
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.")
|
||||
if(M != user)
|
||||
user.visible_message("<span class='notice'>[user] starts to apply [src] to [M]'s [limb].</span>", \
|
||||
"<span class='notice'>You start to apply [src] to [M]'s [limb].</span>", \
|
||||
"<span class='notice'>You hear something being wrapped.</span>")
|
||||
else
|
||||
if((!user.hand && affecting.limb_name in list("r_arm", "r_hand")) || (user.hand && affecting.limb_name in list("l_arm", "l_hand")))
|
||||
to_chat(user, "\red You can't apply a splint to the arm you're using!")
|
||||
to_chat(user, "<span class='danger'>You can't apply a splint to the arm you're using!</span>")
|
||||
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.")
|
||||
user.visible_message("<span class='notice'>[user] starts to apply [src] to their [limb].</span>", \
|
||||
"<span class='notice'>You start to apply [src] to your [limb].</span>", \
|
||||
"<span class='notice'>You hear something being wrapped.</span>")
|
||||
if(do_after(user, 50, target = M))
|
||||
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.")
|
||||
if(M != user)
|
||||
user.visible_message("<span class='notice'>[user] finishes applying [src] to [M]'s [limb].</span>", \
|
||||
"<span class='notice'>You finish applying [src] to [M]'s [limb].</span>", \
|
||||
"<span class='notice'>You hear something being wrapped.</span>")
|
||||
else
|
||||
if(prob(25))
|
||||
user.visible_message("\red [user] successfully applies \the [src] to their [limb].", "\red You successfully apply \the [src] to your [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='notice'>[user] successfully applies [src] to their [limb].</span>", \
|
||||
"<span class='notice'>You successfully apply [src] to your [limb].</span>", \
|
||||
"<span class='notice'>You hear something being wrapped.</span>")
|
||||
else
|
||||
user.visible_message("\red [user] fumbles \the [src].", "\red You fumble \the [src].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='warning'>[user] fumbles [src].</span>",
|
||||
"<span class='warning'>You fumble [src].</span>",
|
||||
"<span class='warning'>You hear something being wrapped.</span>")
|
||||
return
|
||||
affecting.status |= ORGAN_SPLINTED
|
||||
use(1)
|
||||
return
|
||||
@@ -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,7 +5,7 @@
|
||||
icon_state = "rods"
|
||||
item_state = "rods"
|
||||
flags = CONDUCT
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
force = 9.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 3
|
||||
@@ -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>")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
singular_name = "wired glass floor tile"
|
||||
desc = "A glass tile, which is wired, somehow."
|
||||
icon_state = "glass_wire"
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
force = 3.0
|
||||
throwforce = 5.0
|
||||
throw_speed = 5
|
||||
|
||||
@@ -72,7 +72,7 @@ var/global/list/datum/stack_recipe/mime_recipes = list ( \
|
||||
/obj/item/stack/sheet/mineral
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
|
||||
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
|
||||
new/datum/stack_recipe("folder", /obj/item/weapon/folder), \
|
||||
new/datum/stack_recipe("cardboard tube", /obj/item/weapon/c_tube), \
|
||||
new/datum/stack_recipe("large box", /obj/structure/closet/cardboard, 4), \
|
||||
new/datum/stack_recipe("cardboard box", /obj/structure/closet/cardboard, 4), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/stack/sheet
|
||||
name = "sheet"
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
force = 5
|
||||
throwforce = 5
|
||||
max_amount = 50
|
||||
@@ -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)
|
||||
..()*/
|
||||
@@ -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,136 +35,137 @@
|
||||
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)
|
||||
var/t1 = "Amount Left: [amount]<br>"
|
||||
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>"
|
||||
user << browse(t1, "window=stack")
|
||||
var/datum/browser/popup = new(user, "stack", name, 400, 400)
|
||||
popup.set_content(t1)
|
||||
popup.open(0)
|
||||
onclose(user, "stack")
|
||||
return
|
||||
|
||||
/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 +176,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 +205,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 +216,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 +230,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 ..()
|
||||
|
||||
@@ -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."
|
||||
@@ -109,7 +109,7 @@
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "syndballoon"
|
||||
item_state = "syndballoon"
|
||||
w_class = 4.0
|
||||
w_class = 4
|
||||
|
||||
/*
|
||||
* Fake telebeacon
|
||||
@@ -140,13 +140,12 @@
|
||||
icon_state = "sword0"
|
||||
item_state = "sword0"
|
||||
var/active = 0.0
|
||||
w_class = 2.0
|
||||
flags = NOSHIELD
|
||||
w_class = 2
|
||||
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
|
||||
@@ -417,7 +416,7 @@ obj/item/toy/cards/deck
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
deckstyle = "nanotrasen"
|
||||
icon_state = "deck_nanotrasen_full"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
var/cooldown = 0
|
||||
var/list/cards = list()
|
||||
|
||||
@@ -547,7 +546,7 @@ obj/item/toy/cards/cardhand
|
||||
desc = "A number of cards not in a deck, customarily held in ones hand."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "nanotrasen_hand2"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
var/list/currenthand = list()
|
||||
var/choice = null
|
||||
|
||||
@@ -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
|
||||
@@ -640,7 +639,7 @@ obj/item/toy/cards/singlecard
|
||||
desc = "a card"
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "singlecard_nanotrasen_down"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
var/cardname = null
|
||||
var/flipped = 0
|
||||
pixel_x = -5
|
||||
@@ -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
|
||||
@@ -765,11 +764,11 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
desc = "A plastic model of a Nuclear Fission Explosive."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "nuketoyidle"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
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
|
||||
@@ -841,7 +840,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
name = "toddler"
|
||||
desc = "This baby looks almost real. Wait, did it just burp?"
|
||||
force = 5
|
||||
w_class = 4.0
|
||||
w_class = 4
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
|
||||
@@ -864,7 +863,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
desc = "Relive the excitement of a meteor shower! SweetMeat-eor. Co is not responsible for any injuries, headaches or hearing loss caused by Mini-Meteor"
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "minimeteor"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
|
||||
/obj/item/toy/minimeteor/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
@@ -1098,11 +1097,11 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
desc = "A big, plastic red button. Reads 'From HonkCo Pranks?' on the back."
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "bigred"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
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)
|
||||
@@ -1123,7 +1122,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
desc = "A little toy model AI core with real law announcing action!"
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "AI"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/AI/attack_self(mob/user)
|
||||
@@ -1142,7 +1141,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
desc = "An action figure modeled after 'The Owl', defender of justice."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "owlprize"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/owl/attack_self(mob/user)
|
||||
@@ -1161,7 +1160,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
desc = "An action figure modeled after 'The Griffin', criminal mastermind."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "griffinprize"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/griffin/attack_self(mob/user)
|
||||
@@ -1255,7 +1254,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "minigibber"
|
||||
attack_verb = list("grinded", "gibbed")
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
var/cooldown = 0
|
||||
var/obj/stored_minature = null
|
||||
|
||||
@@ -1327,7 +1326,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=2000)
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
throwforce = 5
|
||||
throw_speed = 4
|
||||
throw_range = 5
|
||||
@@ -1373,7 +1372,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
is_empty = 1
|
||||
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
|
||||
user.visible_message("<span class='danger'>The [src] goes off!</span>")
|
||||
M.apply_damage(200, "brute", "head", used_weapon = "Self-inflicted gunshot would to the head.", sharp=1)
|
||||
M.apply_damage(200, BRUTE, "head", sharp =1, used_weapon = "Self-inflicted gunshot would to the head.")
|
||||
M.death()
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] lowers the [src] from their head.</span>")
|
||||
|
||||
@@ -4,88 +4,90 @@
|
||||
//Added by Jack Rost
|
||||
/obj/item/trash
|
||||
icon = 'icons/obj/trash.dmi'
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
desc = "This is rubbish."
|
||||
|
||||
/obj/item/trash/raisins
|
||||
name = "4no raisins"
|
||||
icon_state= "4no_raisins"
|
||||
name = "4no raisins"
|
||||
icon_state= "4no_raisins"
|
||||
|
||||
/obj/item/trash/candy
|
||||
name = "Candy"
|
||||
icon_state= "candy"
|
||||
name = "Candy"
|
||||
icon_state= "candy"
|
||||
|
||||
/obj/item/trash/cheesie
|
||||
name = "Cheesie honkers"
|
||||
icon_state = "cheesie_honkers"
|
||||
name = "Cheesie honkers"
|
||||
icon_state = "cheesie_honkers"
|
||||
|
||||
/obj/item/trash/chips
|
||||
name = "Chips"
|
||||
icon_state = "chips"
|
||||
name = "Chips"
|
||||
icon_state = "chips"
|
||||
|
||||
/obj/item/trash/popcorn
|
||||
name = "Popcorn"
|
||||
icon_state = "popcorn"
|
||||
name = "Popcorn"
|
||||
icon_state = "popcorn"
|
||||
|
||||
/obj/item/trash/sosjerky
|
||||
name = "Scaredy's Private Reserve Beef Jerky"
|
||||
icon_state = "sosjerky"
|
||||
name = "Scaredy's Private Reserve Beef Jerky"
|
||||
icon_state = "sosjerky"
|
||||
|
||||
/obj/item/trash/syndi_cakes
|
||||
name = "Syndi cakes"
|
||||
icon_state = "syndi_cakes"
|
||||
name = "Syndi cakes"
|
||||
icon_state = "syndi_cakes"
|
||||
|
||||
/obj/item/trash/waffles
|
||||
name = "Waffles"
|
||||
icon_state = "waffles"
|
||||
name = "Waffles"
|
||||
icon_state = "waffles"
|
||||
|
||||
/obj/item/trash/plate
|
||||
name = "Plate"
|
||||
icon_state = "plate"
|
||||
name = "Plate"
|
||||
icon_state = "plate"
|
||||
|
||||
/obj/item/trash/snack_bowl
|
||||
name = "Snack bowl"
|
||||
icon_state = "snack_bowl"
|
||||
name = "Snack bowl"
|
||||
icon_state = "snack_bowl"
|
||||
|
||||
/obj/item/trash/pistachios
|
||||
name = "Pistachios pack"
|
||||
icon_state = "pistachios_pack"
|
||||
name = "Pistachios pack"
|
||||
icon_state = "pistachios_pack"
|
||||
|
||||
/obj/item/trash/semki
|
||||
name = "Semki pack"
|
||||
icon_state = "semki_pack"
|
||||
name = "Semki pack"
|
||||
icon_state = "semki_pack"
|
||||
|
||||
/obj/item/trash/tray
|
||||
name = "Tray"
|
||||
icon_state = "tray"
|
||||
name = "Tray"
|
||||
icon_state = "tray"
|
||||
|
||||
/obj/item/trash/candle
|
||||
name = "candle"
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candle4"
|
||||
name = "candle"
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candle4"
|
||||
|
||||
/obj/item/trash/liquidfood
|
||||
name = "\improper \"LiquidFood\" ration"
|
||||
icon_state = "liquidfood"
|
||||
name = "\improper \"LiquidFood\" ration"
|
||||
icon_state = "liquidfood"
|
||||
|
||||
/obj/item/trash/can
|
||||
name = "crushed can"
|
||||
icon_state = "cola"
|
||||
name = "crushed can"
|
||||
icon_state = "cola"
|
||||
var/is_glass = 0
|
||||
var/is_plastic = 0
|
||||
|
||||
/obj/item/trash/gum
|
||||
name = "chewed gum"
|
||||
desc = "NOT free candy."
|
||||
icon_state = "gum"
|
||||
name = "chewed gum"
|
||||
desc = "NOT free candy."
|
||||
icon_state = "gum"
|
||||
|
||||
/obj/item/trash/tastybread
|
||||
name = "bread tube"
|
||||
icon_state = "tastybread"
|
||||
name = "bread tube"
|
||||
icon_state = "tastybread"
|
||||
|
||||
/obj/item/trash/tapetrash
|
||||
name = "old duct tape"
|
||||
icon_state = "tape"
|
||||
desc = "Not sticky anymore."
|
||||
throw_range = 1
|
||||
name = "old duct tape"
|
||||
icon_state = "tape"
|
||||
desc = "Not sticky anymore."
|
||||
throw_range = 1
|
||||
|
||||
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
|
||||
return
|
||||
|
||||
@@ -14,7 +14,7 @@ AI MODULES
|
||||
desc = "An AI Module for transmitting encrypted instructions to the AI."
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
throwforce = 5.0
|
||||
throw_speed = 3
|
||||
throw_range = 15
|
||||
@@ -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()
|
||||
|
||||
@@ -17,7 +17,7 @@ RCD
|
||||
throwforce = 10.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
materials = list(MAT_METAL=100000)
|
||||
origin_tech = "engineering=4;materials=2"
|
||||
var/datum/effect/system/spark_spread/spark_system
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ RSF
|
||||
anchored = 0.0
|
||||
var/matter = 0
|
||||
var/mode = 1
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
|
||||
/obj/item/weapon/rsf/New()
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
name = "card"
|
||||
desc = "A card."
|
||||
icon = 'icons/obj/card.dmi'
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
var/associated_account_number = 0
|
||||
|
||||
var/list/files = list( )
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ var/global/list/moneytypes=list(
|
||||
throwforce = 1.0
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
var/access = list()
|
||||
access = access_crate_cash
|
||||
var/worth = 1 // Per chip
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
throwforce = 3.0
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
attack_verb = list("warned", "cautioned", "smashed")
|
||||
|
||||
proximity_sign
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
icon = 'icons/obj/chronos.dmi'
|
||||
icon_state = "chronobackpack"
|
||||
item_state = "backpack"
|
||||
w_class = 4.0
|
||||
w_class = 4
|
||||
slot_flags = SLOT_BACK
|
||||
slowdown = 1
|
||||
action_button_name = "Equip/Unequip TED Gun"
|
||||
actions_types = list(/datum/action/item_action/equip_unequip_TED_Gun)
|
||||
var/obj/item/weapon/gun/energy/chrono_gun/PA = null
|
||||
var/list/erased_minds = list() //a collection of minds from the dead
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
erased_minds += M
|
||||
|
||||
/obj/item/weapon/chrono_eraser/dropped()
|
||||
..()
|
||||
if(PA)
|
||||
qdel(PA)
|
||||
|
||||
@@ -24,15 +25,19 @@
|
||||
dropped()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/chrono_eraser/ui_action_click()
|
||||
var/mob/living/carbon/user = src.loc
|
||||
if(iscarbon(user) && (user.back == src))
|
||||
if(PA)
|
||||
qdel(PA)
|
||||
else
|
||||
PA = new(src)
|
||||
user.put_in_hands(PA)
|
||||
/obj/item/weapon/chrono_eraser/ui_action_click(mob/user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.back == src)
|
||||
if(PA)
|
||||
qdel(PA)
|
||||
else
|
||||
PA = new(src)
|
||||
user.put_in_hands(PA)
|
||||
|
||||
/obj/item/weapon/chrono_eraser/item_action_slot_check(slot, mob/user)
|
||||
if(slot == slot_back)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/chrono_gun
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "banana_peel"
|
||||
item_state = "banana_peel"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
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)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
item_state = "bike_horn"
|
||||
hitsound = null
|
||||
throwforce = 3
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
throw_speed = 3
|
||||
throw_range = 15
|
||||
attack_verb = list("HONKED")
|
||||
@@ -105,4 +105,28 @@
|
||||
desc = "Damn son, where'd you find this?"
|
||||
icon_state = "air_horn"
|
||||
honk_sound = 'sound/items/AirHorn2.ogg'
|
||||
cooldowntime = 50
|
||||
cooldowntime = 50
|
||||
|
||||
/obj/item/weapon/bikehorn/golden
|
||||
name = "golden bike horn"
|
||||
desc = "Golden? Clearly, its made with bananium! Honk!"
|
||||
icon_state = "gold_horn"
|
||||
item_state = "gold_horn"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack()
|
||||
flip_mobs()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack_self(mob/user)
|
||||
flip_mobs()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
|
||||
if(!spam_flag)
|
||||
var/turf/T = get_turf(src)
|
||||
for(M in ohearers(7, T))
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs) || H.ear_deaf)
|
||||
continue
|
||||
M.emote("flip")
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A generic brand of lipstick."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "lipstick"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
var/colour = "red"
|
||||
var/open = 0
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "razor"
|
||||
flags = CONDUCT
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
icon_state = "gavelhammer"
|
||||
force = 5.0
|
||||
throwforce = 6.0
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
attack_verb = list("bashed", "battered", "judged", "whacked")
|
||||
|
||||
/obj/item/weapon/gavelhammer/suicide_act(mob/user)
|
||||
@@ -24,7 +24,7 @@
|
||||
icon_state = "gavelblock"
|
||||
force = 2.0
|
||||
throwforce = 2.0
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/gavelblock/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/gavelhammer))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throwforce = 6
|
||||
w_class = 4
|
||||
origin_tech = "biotech=4"
|
||||
action_button_name = "Toggle Paddles"
|
||||
actions_types = list(/datum/action/item_action/toggle_paddles)
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/back.dmi'
|
||||
@@ -69,16 +69,13 @@
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
overlays += "[icon_state]-charge[ratio]"
|
||||
|
||||
/obj/item/weapon/defibrillator/CheckParts()
|
||||
/obj/item/weapon/defibrillator/CheckParts(list/parts_list)
|
||||
..()
|
||||
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/defibrillator/ui_action_click()
|
||||
if(usr.get_item_by_slot(slot_back) == src)
|
||||
toggle_paddles()
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Put the defibrillator on your back first!</span>")
|
||||
return
|
||||
toggle_paddles()
|
||||
|
||||
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
@@ -147,16 +144,23 @@
|
||||
remove_paddles(user)
|
||||
|
||||
update_icon()
|
||||
return
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/weapon/defibrillator/proc/make_paddles()
|
||||
return new /obj/item/weapon/twohanded/shockpaddles(src)
|
||||
|
||||
/obj/item/weapon/defibrillator/equipped(mob/user, slot)
|
||||
..()
|
||||
if(slot != slot_back)
|
||||
remove_paddles(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/defibrillator/item_action_slot_check(slot, mob/user)
|
||||
if(slot == slot_back)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user)
|
||||
var/mob/living/carbon/human/M = user
|
||||
if(paddles in get_both_hands(M))
|
||||
@@ -210,12 +214,9 @@
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "biotech=4"
|
||||
|
||||
/obj/item/weapon/defibrillator/compact/ui_action_click()
|
||||
if(usr.get_item_by_slot(slot_belt) == src)
|
||||
toggle_paddles()
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Strap the defibrillator's belt on first!</span>")
|
||||
return
|
||||
/obj/item/weapon/defibrillator/compact/item_action_slot_check(slot, mob/user)
|
||||
if(slot == slot_belt)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/defibrillator/compact/loaded/New()
|
||||
..()
|
||||
@@ -284,7 +285,7 @@
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/dropped(mob/user as mob)
|
||||
if(user)
|
||||
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
|
||||
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
||||
@@ -294,7 +295,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
|
||||
@@ -561,4 +562,4 @@
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need to target your patient's chest with [src].</span>")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,31 +1,96 @@
|
||||
/obj/item/weapon/c4
|
||||
name = "plastic explosives"
|
||||
/obj/item/weapon/grenade/plastic
|
||||
name = "plastic explosive"
|
||||
desc = "Used to put holes in specific areas without too much extra hole."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "plastic-explosive0"
|
||||
item_state = "plasticx"
|
||||
item_state = "plastic-explosive"
|
||||
flags = NOBLUDGEON
|
||||
w_class = 2.0
|
||||
det_time = 10
|
||||
display_timer = 0
|
||||
origin_tech = "syndicate=2"
|
||||
var/datum/wires/explosive/plastic/wires = null
|
||||
var/timer = 10
|
||||
var/atom/target = null
|
||||
var/open_panel = 0
|
||||
var/image_overlay = null
|
||||
var/obj/item/device/assembly_holder/nadeassembly = null
|
||||
var/assemblyattacher
|
||||
|
||||
/obj/item/weapon/c4/New()
|
||||
wires = new(src)
|
||||
/obj/item/weapon/grenade/plastic/New()
|
||||
image_overlay = image('icons/obj/grenade.dmi', "[item_state]2")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/c4/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
/obj/item/weapon/grenade/plastic/Destroy()
|
||||
qdel(nadeassembly)
|
||||
nadeassembly = null
|
||||
target = null
|
||||
return ..()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/c4/suicide_act(var/mob/user)
|
||||
. = (BRUTELOSS)
|
||||
to_chat(viewers(user), "<span class='suicide'>[user] activates the C4 and holds it above his head! It looks like \he's going out with a bang!</span>")
|
||||
/obj/item/weapon/grenade/plastic/attackby(obj/item/I, mob/user, params)
|
||||
if(!nadeassembly && istype(I, /obj/item/device/assembly_holder))
|
||||
var/obj/item/device/assembly_holder/A = I
|
||||
if(!user.unEquip(I))
|
||||
return ..()
|
||||
nadeassembly = A
|
||||
A.master = src
|
||||
A.loc = src
|
||||
assemblyattacher = user.ckey
|
||||
to_chat(user, "<span class='notice'>You add [A] to the [name].</span>")
|
||||
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
|
||||
update_icon()
|
||||
return
|
||||
if(nadeassembly && istype(I, /obj/item/weapon/wirecutters))
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 20, 1)
|
||||
nadeassembly.loc = get_turf(src)
|
||||
nadeassembly.master = null
|
||||
nadeassembly = null
|
||||
update_icon()
|
||||
return
|
||||
..()
|
||||
|
||||
//assembly stuff
|
||||
/obj/item/weapon/grenade/plastic/receive_signal()
|
||||
prime()
|
||||
|
||||
/obj/item/weapon/grenade/plastic/Crossed(atom/movable/AM)
|
||||
if(nadeassembly)
|
||||
nadeassembly.Crossed(AM)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/on_found(mob/finder)
|
||||
if(nadeassembly)
|
||||
nadeassembly.on_found(finder)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/attack_self(mob/user)
|
||||
if(nadeassembly)
|
||||
nadeassembly.attack_self(user)
|
||||
return
|
||||
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
|
||||
if(user.get_active_hand() == src)
|
||||
newtime = Clamp(newtime, 10, 60000)
|
||||
det_time = newtime
|
||||
to_chat(user, "Timer set for [det_time] seconds.")
|
||||
|
||||
/obj/item/weapon/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
|
||||
if (!flag)
|
||||
return
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>")
|
||||
|
||||
if(do_after(user, 50, target = AM))
|
||||
if(!user.unEquip(src))
|
||||
return
|
||||
src.target = AM
|
||||
loc = null
|
||||
|
||||
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [det_time] second fuse",0,1)
|
||||
log_game("[key_name(user)] planted [name] on [target.name] at ([target.x],[target.y],[target.z]) with [det_time] second fuse")
|
||||
|
||||
target.overlays += image_overlay
|
||||
if(!nadeassembly)
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
|
||||
addtimer(src, "prime", det_time*10)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/suicide_act(mob/user)
|
||||
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) suicided with [src.name] at ([user.x],[user.y],[user.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",0,1)
|
||||
message_admins("[key_name(user)] suicided with [name] at ([user.x],[user.y],[user.z])")
|
||||
user.visible_message("<span class='suicide'>[user] activates the [name] and holds it above \his head! It looks like \he's going out with a bang!</span>")
|
||||
var/message_say = "FOR NO RAISIN!"
|
||||
if(user.mind)
|
||||
if(user.mind.special_role)
|
||||
@@ -44,81 +109,125 @@
|
||||
message_say = "FOR THE REVOLOUTION!"
|
||||
else if(role == "death commando" || role == ROLE_ERT)
|
||||
message_say = "FOR NANOTRASEN!"
|
||||
|
||||
user.say(message_say)
|
||||
target = user
|
||||
message_admins("[key_name_admin(user)] suicided with [src.name] at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
message_admins("[key_name(user)] suicided with [src.name] at ([x],[y],[z])")
|
||||
explode(get_turf(user))
|
||||
return .
|
||||
sleep(10)
|
||||
prime()
|
||||
user.gib()
|
||||
|
||||
/obj/item/weapon/c4/attackby(var/obj/item/I, var/mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
open_panel = !open_panel
|
||||
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
|
||||
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
|
||||
wires.Interact(user)
|
||||
/obj/item/weapon/grenade/plastic/update_icon()
|
||||
if(nadeassembly)
|
||||
icon_state = "[item_state]1"
|
||||
else
|
||||
..()
|
||||
icon_state = "[item_state]0"
|
||||
|
||||
/obj/item/weapon/c4/attack_self(mob/user as mob)
|
||||
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num|null
|
||||
if(newtime == null)
|
||||
return
|
||||
if(newtime < 10)
|
||||
newtime = 10
|
||||
if(newtime > 60000)
|
||||
newtime = 60000
|
||||
timer = newtime
|
||||
to_chat(user, "Timer set for [timer] seconds.")
|
||||
//////////////////////////
|
||||
///// The Explosives /////
|
||||
//////////////////////////
|
||||
|
||||
/obj/item/weapon/grenade/plastic/c4
|
||||
name = "C4"
|
||||
desc = "Used to put holes in specific areas without too much extra hole. A saboteurs favourite."
|
||||
|
||||
/obj/item/weapon/c4/afterattack(atom/target as obj|turf, mob/user as mob, 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))
|
||||
return
|
||||
to_chat(user, "Planting explosives...")
|
||||
|
||||
if(do_after(user, 50, target = target) && in_range(user, target))
|
||||
user.drop_item()
|
||||
src.target = target
|
||||
loc = null
|
||||
|
||||
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)
|
||||
log_game("[key_name(user)] planted [src.name] on [key_name(target)] with [timer] second fuse")
|
||||
|
||||
else
|
||||
message_admins("[key_name_admin(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
|
||||
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
|
||||
|
||||
target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2")
|
||||
to_chat(user, "Bomb has been planted. Timer counting down from [timer].")
|
||||
spawn(timer*10)
|
||||
explode(get_turf(target))
|
||||
|
||||
/obj/item/weapon/c4/proc/explode(var/location)
|
||||
|
||||
if(!target)
|
||||
target = get_atom_on_turf(src)
|
||||
if(!target)
|
||||
target = src
|
||||
if(location)
|
||||
explosion(location, -1, -1, 4, 4)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/c4/prime()
|
||||
var/turf/location
|
||||
if(target)
|
||||
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)
|
||||
qdel(target)
|
||||
if(!qdeleted(target))
|
||||
location = get_turf(target)
|
||||
target.overlays -= image_overlay
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
location.ex_act(2, target)
|
||||
explosion(location,0,0,3)
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/c4/attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
return
|
||||
// X4 is an upgraded directional variant of c4 which is relatively safe to be standing next to. And much less safe to be standing on the other side of.
|
||||
// C4 is intended to be used for infiltration, and destroying tech. X4 is intended to be used for heavy breaching and tight spaces.
|
||||
// Intended to replace C4 for nukeops, and to be a randomdrop in surplus/random traitor purchases.
|
||||
|
||||
/obj/item/weapon/grenade/plastic/x4
|
||||
name = "X4"
|
||||
desc = "A specialized shaped high explosive breaching charge. Designed to be safer for the user, and less so, for the wall."
|
||||
var/aim_dir = NORTH
|
||||
icon_state = "plasticx40"
|
||||
item_state = "plasticx4"
|
||||
|
||||
/obj/item/weapon/grenade/plastic/x4/prime()
|
||||
var/turf/location
|
||||
if(target)
|
||||
if(!qdeleted(target))
|
||||
location = get_turf(target)
|
||||
target.overlays -= image_overlay
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
if(target && target.density)
|
||||
var/turf/T = get_step(location, aim_dir)
|
||||
explosion(get_step(T, aim_dir),0,0,3)
|
||||
explosion(T,0,2,0)
|
||||
location.ex_act(2, target)
|
||||
else
|
||||
explosion(location, 0, 2, 3)
|
||||
location.ex_act(2, target)
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
|
||||
aim_dir = get_dir(user,AM)
|
||||
..()
|
||||
|
||||
// Shaped charge
|
||||
// Same blasting power as C4, but with the same idea as the X4 -- Everyone on one side of the wall is safe.
|
||||
|
||||
/obj/item/weapon/grenade/plastic/c4_shaped
|
||||
name = "C4 (shaped)"
|
||||
desc = "A brick of C4 shaped to allow more precise breaching."
|
||||
var/aim_dir = NORTH
|
||||
|
||||
/obj/item/weapon/grenade/plastic/c4_shaped/prime()
|
||||
var/turf/location
|
||||
if(target)
|
||||
if(!qdeleted(target))
|
||||
location = get_turf(target)
|
||||
target.overlays -= image_overlay
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
if(target && target.density)
|
||||
var/turf/T = get_step(location, aim_dir)
|
||||
explosion(get_step(T, aim_dir),0,0,3)
|
||||
location.ex_act(2, target)
|
||||
else
|
||||
explosion(location, 0, 0, 3)
|
||||
location.ex_act(2, target)
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/c4_shaped/afterattack(atom/movable/AM, mob/user, flag)
|
||||
aim_dir = get_dir(user,AM)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/grenade/plastic/c4_shaped/flash
|
||||
name = "C4 (flash)"
|
||||
desc = "A C4 charge with an altered chemical composition, designed to blind and deafen the occupants of a room before breaching."
|
||||
|
||||
/obj/item/weapon/grenade/plastic/c4_shaped/flash/prime()
|
||||
if(target && target.density)
|
||||
T = get_step(get_turf(target), aim_dir)
|
||||
else if(target)
|
||||
T = get_turf(target)
|
||||
else
|
||||
T = get_turf(src)
|
||||
|
||||
var/obj/item/weapon/grenade/flashbang/CB = new/obj/item/weapon/grenade/flashbang(T)
|
||||
CB.prime()
|
||||
|
||||
..()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
flags = CONDUCT
|
||||
throwforce = 10
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
throw_speed = 2
|
||||
throw_range = 7
|
||||
force = 10
|
||||
@@ -29,7 +29,7 @@
|
||||
hitsound = null //it is much lighter, after all.
|
||||
flags = null //doesn't CONDUCT
|
||||
throwforce = 2
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
force = 3.0
|
||||
materials = list()
|
||||
max_water = 30
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
materials = list(MAT_METAL=500)
|
||||
origin_tech = "combat=1;plasmatech=1"
|
||||
var/status = 0
|
||||
@@ -164,9 +164,13 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/flamethrower/CheckParts()
|
||||
/obj/item/weapon/flamethrower/CheckParts(list/parts_list)
|
||||
..()
|
||||
weldtool = locate(/obj/item/weapon/weldingtool) in contents
|
||||
igniter = locate(/obj/item/device/assembly/igniter) in contents
|
||||
weldtool.status = 0
|
||||
igniter.secured = 0
|
||||
status = 1
|
||||
update_icon()
|
||||
|
||||
//Called from turf.dm turf/dblclick
|
||||
@@ -191,10 +195,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 +222,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
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ var/turf/T
|
||||
/obj/item/weapon/grenade/bananade
|
||||
name = "bananade"
|
||||
desc = "A yellow grenade."
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "banana"
|
||||
item_state = "flashbang"
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "HONK! brand Bananas. In a special applicator for rapid slipping of wide areas."
|
||||
icon_state = "banana"
|
||||
item_state = "flashbang"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
force = 2.0
|
||||
var/stage = 0
|
||||
var/state = 0
|
||||
@@ -55,7 +55,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "banana_peel"
|
||||
item_state = "banana_peel"
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
@@ -51,13 +51,12 @@
|
||||
if(!ear_safety)
|
||||
M.Stun(max(10/distance, 3))
|
||||
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)
|
||||
M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,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>")
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/obj/item/weapon/grenade/iedcasing
|
||||
name = "improvised explosive assembly"
|
||||
desc = "An igniter stuffed into an aluminum shell."
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
@@ -67,7 +67,7 @@
|
||||
/obj/item/weapon/grenade/iedcasing/filled
|
||||
name = "improvised firebomb"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
@@ -93,7 +93,8 @@
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/CheckParts()
|
||||
/obj/item/weapon/grenade/iedcasing/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/cans/can = locate() in contents
|
||||
if(can)
|
||||
underlays += can
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/weapon/grenade
|
||||
name = "grenade"
|
||||
desc = "A hand held grenade, with an adjustable timer."
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
@@ -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)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 5
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=500)
|
||||
@@ -20,10 +20,19 @@
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return
|
||||
|
||||
if(!istype(C))
|
||||
return
|
||||
|
||||
if(CLUMSY in user.mutations && prob(50))
|
||||
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
|
||||
apply_cuffs(user,user)
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!(H.get_organ("l_hand") || H.get_organ("r_hand")))
|
||||
to_chat(user, "<span class='warning'>How do you suggest handcuffing someone with no hands?</span>")
|
||||
return
|
||||
|
||||
if(!C.handcuffed)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put [src.name] on [C]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to put [src.name] on [C]!</span>")
|
||||
@@ -56,8 +65,8 @@
|
||||
/obj/item/weapon/restraints/handcuffs/cable
|
||||
name = "cable restraints"
|
||||
desc = "Looks like some cables tied together. Could be used to tie something up."
|
||||
icon_state = "cuff_white"
|
||||
item_state = "coil_red"
|
||||
icon_state = "cuff_red"
|
||||
materials = list(MAT_METAL=150, MAT_GLASS=75)
|
||||
breakouttime = 300 //Deciseconds = 30s
|
||||
cuffsound = 'sound/weapons/cablecuff.ogg'
|
||||
|
||||
@@ -97,7 +106,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)
|
||||
@@ -105,18 +114,37 @@
|
||||
to_chat(user, "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod to make a wired rod.</span>")
|
||||
to_chat(user, "<span class='warning'>You need one rod to make a wired rod!</span>")
|
||||
else if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.amount < 6)
|
||||
to_chat(user, "<span class='warning'>You need at least six metal sheets to make good enough weights!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin to apply [I] to [src]...</span>")
|
||||
if(do_after(user, 35, target = src))
|
||||
var/obj/item/weapon/restraints/legcuffs/bola/S = new /obj/item/weapon/restraints/legcuffs/bola
|
||||
M.use(6)
|
||||
user.put_in_hands(S)
|
||||
to_chat(user, "<span class='notice'>You make some weights out of [I] and tie them to [src].</span>")
|
||||
if(!remove_item_from_storage(user))
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/cable/zipties
|
||||
name = "zipties"
|
||||
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
|
||||
icon_state = "cuff_white"
|
||||
breakouttime = 450 //Deciseconds = 45s
|
||||
materials = list()
|
||||
trashtype = /obj/item/weapon/restraints/handcuffs/cable/zipties/used
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
|
||||
if(isrobot(user))
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!(H.get_organ("l_hand") || H.get_organ("r_hand")))
|
||||
to_chat(user, "<span class='warning'>How do you suggest handcuffing someone with no hands?</span>")
|
||||
return
|
||||
if(!C.handcuffed)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
name = "implant"
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "generic" //Shows up as the action button icon
|
||||
action_button_custom_type = /datum/action/item_action/hands_free
|
||||
origin_tech = "materials=2;biotech=3;programming=2"
|
||||
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate)
|
||||
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like mindshield implants
|
||||
var/implanted = null
|
||||
var/mob/living/imp_in = null
|
||||
@@ -41,11 +41,13 @@
|
||||
return 0
|
||||
|
||||
|
||||
if(activated)
|
||||
action_button_name = "Activate [src.name]"
|
||||
src.loc = source
|
||||
imp_in = source
|
||||
implanted = 1
|
||||
if(activated)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Grant(source)
|
||||
if(istype(source, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = source
|
||||
H.sec_hud_set_implants()
|
||||
@@ -60,6 +62,10 @@
|
||||
imp_in = null
|
||||
implanted = 0
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Grant(source)
|
||||
|
||||
if(istype(source, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = source
|
||||
H.sec_hud_set_implants()
|
||||
@@ -76,6 +82,6 @@
|
||||
return "No information available"
|
||||
|
||||
/obj/item/weapon/implant/dropped(mob/user)
|
||||
..()
|
||||
. = 1
|
||||
qdel(src)
|
||||
return .
|
||||
|
||||
@@ -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
|
||||
@@ -58,4 +58,4 @@
|
||||
|
||||
/obj/item/weapon/implantcase/chem/New()
|
||||
imp = new /obj/item/weapon/implant/chem(src)
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -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")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user