Merge remote-tracking branch 'upstream/master' into traymesons

Conflicts:
	code/modules/research/designs.dm
	icons/mob/eyes.dmi
	icons/obj/clothing/glasses.dmi
This commit is contained in:
xxalpha
2015-02-27 21:15:01 +00:00
582 changed files with 9057 additions and 5474 deletions
+3
View File
@@ -34,6 +34,9 @@
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || (buckle_requires_restraints && !M.restrained()))
return 0
if (istype(M, /mob/living/carbon/slime) || istype(M, /mob/living/simple_animal/slime))
return 0
M.buckled = src
M.dir = dir
buckled_mob = M
+3 -3
View File
@@ -132,7 +132,7 @@
healthcheck()
/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user)
/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
health -= I.force
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
@@ -213,7 +213,7 @@
qdel(src)
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user)
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
if(I.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
@@ -369,7 +369,7 @@
healthcheck()
/obj/structure/alien/egg/attackby(obj/item/I, mob/user)
/obj/structure/alien/egg/attackby(obj/item/I, mob/user, params)
if(I.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
else
+1 -1
View File
@@ -35,7 +35,7 @@
qdel(src)
/obj/effect/anomaly/attackby(obj/item/I, mob/user)
/obj/effect/anomaly/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/analyzer))
user << "<span class='notice'>Analyzing... [src]'s unstable field is fluctuating along frequency [aSignal.code]:[format_frequency(aSignal.frequency)].</span>"
@@ -296,7 +296,7 @@ obj/structure/sign/poster/New(serial,subtype)
desc += " This is a bug, please report the circumstances under which you encountered this poster at https://github.com/NTStation/NTstation13/issues."
..()
obj/structure/sign/poster/attackby(obj/item/I, mob/user)
obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wirecutters))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
if(ruined)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,51 @@
/* This is an attempt to make some easily reusable "particle" type effect, to stop the code
constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one
defined, then set up when it is created with New(). Then this same system can just be reused each time
it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam
would spawn and follow the beaker, even if it is carried or thrown.
*/
/obj/effect/effect
name = "effect"
icon = 'icons/effects/effects.dmi'
mouse_opacity = 0
unacidable = 1//So effect are not targeted by alien acid.
pass_flags = PASSTABLE | PASSGRILLE
/obj/effect/proc/delete()
loc = null
if(reagents)
reagents.delete()
return
/datum/effect/effect/proc/fadeOut(var/atom/A, var/frames = 16)
if(A.alpha == 0) //Handle already transparent case
return
if(frames == 0)
frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame".
var/step = A.alpha / frames
for(var/i = 0, i < frames, i++)
A.alpha -= step
sleep(world.tick_lag)
return
/datum/effect/effect/system
var/number = 3
var/cardinals = 0
var/turf/location
var/atom/holder
var/setup = 0
/datum/effect/effect/system/proc/set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
setup = 1
/datum/effect/effect/system/proc/attach(atom/atom)
holder = atom
/datum/effect/effect/system/proc/start()
@@ -0,0 +1,250 @@
// Foam
// Similar to smoke, but spreads out more
/obj/effect/effect/foam
name = "foam"
icon_state = "foam"
opacity = 0
anchored = 1
density = 0
layer = TURF_LAYER + 0.1
mouse_opacity = 0
var/amount = 3
var/expand = 1
animate_movement = 0
var/metal = 0
var/lifetime = 6
/obj/effect/effect/foam/metal/aluminium
name = "aluminium foam"
metal = 1
icon_state = "mfoam"
/obj/effect/effect/foam/metal/iron
name = "iron foam"
metal = 2
/obj/effect/effect/foam/New(loc)
..(loc)
create_reagents(1000) //limited by the size of the reagent holder anyway.
SSobj.processing.Add(src)
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
/obj/effect/effect/foam/metal/New(loc)
..()
var/obj/structure/foamedmetal/M = new(src.loc)
M.metal = metal
M.updateicon()
/obj/effect/effect/foam/proc/kill_foam()
SSobj.processing.Remove(src)
flick("[icon_state]-disolve", src)
spawn(5)
delete()
/obj/effect/effect/foam/process()
lifetime--
if(lifetime < 1)
kill_foam()
if(--amount < 0)
return
for(var/atom/M in view(1,src))
if(M == src)
continue
reagents.reaction(M, TOUCH)
spread_foam()
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
M.slip(5, 2, src)
/obj/effect/effect/foam/metal/Crossed(var/atom/movable/AM)
return
/obj/effect/effect/foam/proc/spread_foam()
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(!T)
continue
if(!T.Enter(src))
continue
var/obj/effect/effect/foam/foundfoam = locate() in T //Don't spread foam where there's already foam!
if(foundfoam)
continue
var/obj/effect/effect/foam/F = new type(T)
F.amount = amount
reagents.copy_to(F, (reagents.total_volume))
F.color = color
/obj/effect/effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(prob(max(0, exposed_temperature - 475))) //foam dissolves when heated
kill_foam()
/obj/effect/effect/foam/metal/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
///////////////////////////////////////////////
//FOAM EFFECT DATUM
/datum/effect/effect/system/foam_spread
var/amount = 5 // the size of the foam spread.
var/obj/chemholder
var/obj/effect/effect/foam/foamtype = /obj/effect/effect/foam
var/metal = 0
/datum/effect/effect/system/foam_spread/metal
foamtype = /obj/effect/effect/foam/metal
/datum/effect/effect/system/foam_spread/New()
..()
chemholder = new/obj()
var/datum/reagents/R = new/datum/reagents(1000)
chemholder.reagents = R
R.my_atom = chemholder
/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null)
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
amount = round(sqrt(amt / 3), 1)
carry.copy_to(chemholder, carry.total_volume)
/datum/effect/effect/system/foam_spread/metal/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metaltype)
..()
metal = metaltype
/datum/effect/effect/system/foam_spread/start()
var/obj/effect/effect/foam/foundfoam = locate()
if(foundfoam)//If there was already foam where we start, we add our foaminess to it.
foundfoam.amount += amount
else
var/obj/effect/effect/foam/F = new foamtype(src.location)
var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume)
F.color = foamcolor
F.amount = amount
F.metal = metal
//////////////////////////////////////////////////////////
// FOAM STRUCTURE. Formed by metal foams. Dense and opaque, but easy to break
/obj/structure/foamedmetal
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
density = 1
opacity = 1 // changed in New()
anchored = 1
unacidable = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
gender = PLURAL
var/metal = 1 // 1=aluminium, 2=iron
/obj/structure/foamedmetal/New()
..()
air_update_turf(1)
/obj/structure/foamedmetal/Destroy()
density = 0
air_update_turf(1)
..()
/obj/structure/foamedmetal/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/structure/foamedmetal/proc/updateicon()
if(metal == 1)
icon_state = "metalfoam"
else
icon_state = "ironfoam"
/obj/structure/foamedmetal/ex_act(severity, target)
qdel(src)
/obj/structure/foamedmetal/blob_act()
qdel(src)
/obj/structure/foamedmetal/bullet_act()
..()
if(metal==1 || prob(50))
qdel(src)
/obj/structure/foamedmetal/attack_paw(var/mob/user)
attack_hand(user)
return
/obj/structure/foamedmetal/attack_animal(var/mob/living/simple_animal/M)
if(M.environment_smash >= 1)
M.do_attack_animation(src)
M << "<span class='notice'>You smash apart the foam wall.</span>"
qdel(src)
return
/obj/structure/foamedmetal/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
if(prob(75 - metal*25))
user.visible_message("<span class='danger'>[user] smashes through the foamed metal.</span>", \
"<span class='danger'>You smash through the metal foam wall.</span>")
qdel(src)
return 1
/obj/structure/foamedmetal/attack_hand(var/mob/user)
user << "<span class='notice'>You hit the metal foam but bounce off it.</span>"
/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user, params)
if (istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
G.affecting.loc = src.loc
visible_message("<span class='danger'>[G.assailant] smashes [G.affecting] through the foamed metal wall.</span>")
qdel(I)
qdel(src)
return
if(prob(I.force*20 - metal*25))
user.visible_message("<span class='danger'>[user] smashes through the foamed metal.</span>", \
"<span class='danger'>You smash through the foamed metal with \the [I].</span>")
qdel(src)
else
user << "<span class='notice'>You hit the metal foam to no effect.</span>"
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
return !density
/obj/structure/foamedmetal/CanAtmosPass()
return !density
@@ -0,0 +1,105 @@
/////////////////////////////////////////////
//////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack)
/// just pass in the object to attach it to in set_up
/// Then do start() to start it and stop() to stop it, obviously
/// and don't call start() in a loop that will be repeated otherwise it'll get spammed!
/////////////////////////////////////////////
/obj/effect/effect/ion_trails
name = "ion trails"
icon_state = "ion_trails"
anchored = 1.0
/datum/effect/effect/system/ion_trail_follow
var/turf/oldposition
var/processing = 1
var/on = 1
/datum/effect/effect/system/ion_trail_follow/set_up(atom/atom)
attach(atom)
/datum/effect/effect/system/ion_trail_follow/start() //Whoever is responsible for this abomination of code should become an hero
if(!src.on)
src.on = 1
src.processing = 1
if(src.processing)
src.processing = 0
var/turf/T = get_turf(src.holder)
if(T != src.oldposition)
if(!has_gravity(T))
var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition)
I.dir = src.holder.dir
flick("ion_fade", I)
I.icon_state = "blank"
spawn( 20 )
if(I)
I.delete()
src.oldposition = T
spawn(2)
if(src.on)
src.processing = 1
src.start()
/datum/effect/effect/system/ion_trail_follow/proc/stop()
src.processing = 0
src.on = 0
oldposition = null
//Reagent-based explosion effect
/datum/effect/effect/system/reagents_explosion
var/amount // TNT equivalent
var/flashing = 0 // does explosion creates flash effect?
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
/datum/effect/effect/system/reagents_explosion/set_up (amt, loc, flash = 0, flash_fact = 0)
amount = amt
if(istype(loc, /turf/))
location = loc
else
location = get_turf(loc)
flashing = flash
flashing_factor = flash_fact
return
/datum/effect/effect/system/reagents_explosion/start()
if (amount <= 2)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, location)
s.start()
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
"You hear an explosion!")
for(var/mob/M in viewers(1, location))
if (prob (50 * amount))
M << "<span class='danger'>The explosion knocks you down.</span>"
M.Weaken(rand(1,5))
return
else
var/devastation = -1
var/heavy = -1
var/light = -1
var/flash = -1
// Clamp all values to MAX_EXPLOSION_RANGE
if (round(amount/12) > 0)
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
if (round(amount/6) > 0)
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
if (round(amount/3) > 0)
light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3))
if (flash && flashing_factor)
flash += (round(amount/4) * flashing_factor)
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
"You hear an explosion!")
explosion(location, devastation, heavy, light, flash)
@@ -0,0 +1,414 @@
/////////////////////////////////////////////
//// SMOKE SYSTEMS
// direct can be optionally added when set_up, to make the smoke always travel in one direction
// in case you wanted a vent to always smoke north for example
/////////////////////////////////////////////
/obj/effect/effect/smoke
name = "smoke"
icon = 'icons/effects/water.dmi'
icon_state = "smoke"
opacity = 1
anchored = 0.0
mouse_opacity = 0
var/amount = 8.0
/obj/effect/effect/harmless_smoke
name = "smoke"
icon_state = "smoke"
opacity = 1
anchored = 0.0
mouse_opacity = 0
var/amount = 6.0
//Remove this bit to use the old smoke
icon = 'icons/effects/96x96.dmi'
pixel_x = -32
pixel_y = -32
/obj/effect/effect/harmless_smoke/New()
..()
spawn (100)
delete()
return
/obj/effect/effect/harmless_smoke/Move()
..()
return
/datum/effect/effect/system/harmless_smoke_spread
var/total_smoke = 0 // To stop it being spammed and lagging!
var/direction
/datum/effect/effect/system/harmless_smoke_spread/set_up(n = 5, c = 0, loca, direct)
if(n > 10)
n = 10
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
if(direct)
direction = direct
/datum/effect/effect/system/harmless_smoke_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/harmless_smoke/smoke = new /obj/effect/effect/harmless_smoke(src.location)
src.total_smoke++
var/direction = src.direction
if(!direction)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(smoke,direction)
spawn(75+rand(10,30))
if(smoke)
fadeOut(smoke)
smoke.delete()
src.total_smoke--
/////////////////////////////////////////////
// Bad smoke
/////////////////////////////////////////////
/obj/effect/effect/bad_smoke
name = "smoke"
icon_state = "smoke"
opacity = 1
anchored = 0.0
mouse_opacity = 0
var/amount = 6.0
icon = 'icons/effects/96x96.dmi'
pixel_x = -32
pixel_y = -32
/obj/effect/effect/bad_smoke/New()
..()
spawn (200+rand(10,30))
delete()
return
/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 & MASKINTERNALS))
else
M.drop_item()
M.adjustOxyLoss(1)
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn(20)
if(M && M.loc)
M.coughedtime = 0
return
/obj/effect/effect/bad_smoke/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover, /obj/item/projectile/beam))
var/obj/item/projectile/beam/B = mover
B.damage = (B.damage/2)
return 1
/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 & MASKINTERNALS))
return
else
M.drop_item()
M.adjustOxyLoss(1)
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn(20)
if(M && M.loc)
M.coughedtime = 0
return
/datum/effect/effect/system/bad_smoke_spread
var/total_smoke = 0 // To stop it being spammed and lagging!
var/direction
/datum/effect/effect/system/bad_smoke_spread/set_up(n = 5, c = 0, loca, direct)
if(n > 20)
n = 20
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
if(direct)
direction = direct
/datum/effect/effect/system/bad_smoke_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/bad_smoke/smoke = new /obj/effect/effect/bad_smoke(src.location)
src.total_smoke++
var/direction = src.direction
if(!direction)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(smoke,direction)
spawn(150+rand(10,30))
if(smoke)
fadeOut(smoke)
smoke.delete()
src.total_smoke--
/////////////////////////////////////////////
// Chem smoke
/////////////////////////////////////////////
/obj/effect/effect/chem_smoke
name = "smoke"
opacity = 1
anchored = 0.0
mouse_opacity = 0
var/amount = 6.0
icon = 'icons/effects/chemsmoke.dmi'
pixel_x = -32
pixel_y = -32
/obj/effect/effect/chem_smoke/New()
..()
create_reagents(500)
spawn(200+rand(10,30))
delete()
return
/obj/effect/effect/chem_smoke/Move()
..()
for(var/atom/A in view(1, src))
if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve
if(prob(5))
reagents.reaction(A)
else
reagents.reaction(A)
return
/obj/effect/effect/chem_smoke/Crossed(mob/living/carbon/M as mob )
..()
reagents.reaction(M)
/datum/effect/effect/system/chem_smoke_spread
var/total_smoke = 0 // To stop it being spammed and lagging!
var/direction
var/obj/chemholder
/datum/effect/effect/system/chem_smoke_spread/New()
..()
chemholder = new/obj()
var/datum/reagents/R = new/datum/reagents(500)
chemholder.reagents = R
R.my_atom = chemholder
/datum/effect/effect/system/chem_smoke_spread/set_up(var/datum/reagents/carry = null, n = 5, c = 0, loca, direct, silent = 0)
if(n > 20)
n = 20
number = n
cardinals = c
carry.copy_to(chemholder, carry.total_volume)
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
if(direct)
direction = direct
if(!silent)
var/contained = ""
for(var/reagent in carry.reagent_list)
contained += " [reagent] "
if(contained)
contained = "\[[contained]\]"
var/area/A = get_area(location)
var/where = "[A.name] | [location.x], [location.y]"
var/whereLink = "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
if(carry.my_atom.fingerprintslast)
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
var/more = ""
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
/datum/effect/effect/system/chem_smoke_spread/start()
var/i = 0
var/color = mix_color_from_reagents(chemholder.reagents.reagent_list)
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location)
src.total_smoke++
var/direction = src.direction
if(!direction)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
if(chemholder.reagents.total_volume != 1) // can't split 1 very well
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / number) // copy reagents to each smoke, divide evenly
if(color)
smoke.color = color // give the smoke color, if it has any to begin with
else
// if no color, just use the old smoke icon
smoke.icon = 'icons/effects/96x96.dmi'
smoke.icon_state = "smoke"
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(smoke,direction)
spawn(150+rand(10,30))
if(smoke)
fadeOut(smoke)
smoke.delete()
src.total_smoke--
/////////////////////////////////////////////
// Sleep smoke
/////////////////////////////////////////////
/obj/effect/effect/sleep_smoke
name = "smoke"
icon_state = "smoke"
opacity = 1
anchored = 0.0
mouse_opacity = 0
var/amount = 6.0
//Remove this bit to use the old smoke
icon = 'icons/effects/96x96.dmi'
pixel_x = -32
pixel_y = -32
color = "#9C3636"
/obj/effect/effect/sleep_smoke/New()
..()
spawn (200+rand(10,30))
delete()
return
/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 & MASKINTERNALS))
// 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)
M.coughedtime = 1
M.emote("cough")
spawn(20)
if(M && M.loc)
M.coughedtime = 0
return
/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 & MASKINTERNALS))
// 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)
M.coughedtime = 1
M.emote("cough")
spawn(20)
if(M && M.loc)
M.coughedtime = 0
return
/datum/effect/effect/system/sleep_smoke_spread
var/total_smoke = 0 // To stop it being spammed and lagging!
var/direction
/datum/effect/effect/system/sleep_smoke_spread/set_up(n = 5, c = 0, loca, direct)
if(n > 20)
n = 20
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
if(direct)
direction = direct
/datum/effect/effect/system/sleep_smoke_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/sleep_smoke/smoke = new /obj/effect/effect/sleep_smoke(src.location)
src.total_smoke++
var/direction = src.direction
if(!direction)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(smoke,direction)
spawn(150+rand(10,30))
if(smoke)
fadeOut(smoke)
smoke.delete()
src.total_smoke--
@@ -0,0 +1,117 @@
/////////////////////////////////////////////
//SPARK SYSTEM (like steam system)
// The attach(atom/atom) proc is optional, and can be called to attach the effect
// to something, like the RCD, so then you can just call start() and the sparks
// will always spawn at the items location.
/////////////////////////////////////////////
/obj/effect/effect/sparks
name = "sparks"
icon_state = "sparks"
var/amount = 6.0
anchored = 1.0
mouse_opacity = 0
/obj/effect/effect/sparks/New()
..()
playsound(src.loc, "sparks", 100, 1)
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
spawn (100)
delete()
return
/obj/effect/effect/sparks/Destroy()
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
..()
return
/obj/effect/effect/sparks/Move()
..()
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
return
/datum/effect/effect/system/spark_spread
var/total_sparks = 0 // To stop it being spammed and lagging!
/datum/effect/effect/system/spark_spread/set_up(n = 3, c = 0, loca)
if(n > 10)
n = 10
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
/datum/effect/effect/system/spark_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_sparks > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location)
src.total_sparks++
var/direction
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(1,2,3), i++)
sleep(5)
step(sparks,direction)
spawn(20)
if(sparks) // Might be deleted already
sparks.delete()
src.total_sparks--
/obj/effect/effect/sparks/electricity
name = "lightning"
icon_state = "electricity"
/datum/effect/effect/system/lightning_spread
var/total_sparks = 0 // To stop it being spammed and lagging!
/datum/effect/effect/system/lightning_spread/set_up(n = 3, c = 0, loca)
if(n > 10)
n = 10
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
/datum/effect/effect/system/lightning_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_sparks > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/sparks/electricity/sparks = new /obj/effect/effect/sparks/electricity(src.location)
src.total_sparks++
var/direction
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(1,2,3), i++)
sleep(5)
step(sparks,direction)
spawn(20)
if(sparks) // Might be deleted already
sparks.delete()
src.total_sparks--
@@ -0,0 +1,128 @@
//WATER EFFECTS
/obj/effect/effect/water
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
var/life = 15.0
mouse_opacity = 0
/obj/effect/effect/water/New()
..()
//var/turf/T = src.loc
//if (istype(T, /turf))
// T.firelevel = 0 //TODO: FIX
spawn( 70 )
delete()
return
return
/obj/effect/effect/water/Move(turf/newloc)
//var/turf/T = src.loc
//if (istype(T, /turf))
// T.firelevel = 0 //TODO: FIX
if (--src.life < 1)
//SN src = null
delete()
if(newloc.density)
return 0
.=..()
/obj/effect/effect/water/Bump(atom/A)
if(reagents)
reagents.reaction(A)
return ..()
/////////////////////////////////////////////
// GENERIC STEAM SPREAD SYSTEM
//Usage: set_up(number of bits of steam, use North/South/East/West only, spawn location)
// The attach(atom/atom) proc is optional, and can be called to attach the effect
// to something, like a smoking beaker, so then you can just call start() and the steam
// will always spawn at the items location, even if it's moved.
/* Example:
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system
steam.set_up(5, 0, mob.loc) -- sets up variables
OPTIONAL: steam.attach(mob)
steam.start() -- spawns the effect
*/
/////////////////////////////////////////////
/obj/effect/effect/steam
name = "steam"
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
density = 0
/datum/effect/effect/system/steam_spread
/datum/effect/effect/system/steam_spread/set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
/datum/effect/effect/system/steam_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
var/direction
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(1,2,3), i++)
sleep(5)
step(steam,direction)
spawn(20)
steam.delete()
/////////////////////////////////////////////
//////// Attach a steam trail to an object (eg. a reacting beaker) that will follow it
// even if it's carried of thrown.
/////////////////////////////////////////////
/datum/effect/effect/system/steam_trail_follow
var/turf/oldposition
var/processing = 1
var/on = 1
/datum/effect/effect/system/steam_trail_follow/set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
/datum/effect/effect/system/steam_trail_follow/start()
if(!src.on)
src.on = 1
src.processing = 1
if(src.processing)
src.processing = 0
spawn(0)
if(src.number < 3)
var/obj/effect/effect/steam/I = new /obj/effect/effect/steam(src.oldposition)
src.number++
src.oldposition = get_turf(holder)
I.dir = src.holder.dir
spawn(10)
I.delete()
src.number--
spawn(2)
if(src.on)
src.processing = 1
src.start()
else
spawn(2)
if(src.on)
src.processing = 1
src.start()
/datum/effect/effect/system/steam_trail_follow/proc/stop()
src.processing = 0
src.on = 0
+1 -1
View File
@@ -24,7 +24,7 @@
/obj/effect/forcefield/mime/New()
..()
last_process = world.time
SSobj.processing.Add(src)
SSobj.processing |= src
/obj/effect/forcefield/mime/process()
timeleft -= (world.time - last_process)
+1 -1
View File
@@ -112,7 +112,7 @@
floor = 1
return 1
/obj/effect/glowshroom/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/effect/glowshroom/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
endurance -= W.force
CheckEndurance()
+31 -53
View File
@@ -1,12 +1,12 @@
/obj/effect/mine
name = "mine"
desc = "I Better stay away from that thing."
density = 1
name = "proximity mine"
desc = "Better stay away from that thing."
density = 0
anchored = 1
layer = 3
icon = 'icons/obj/weapons.dmi'
icon_state = "uglymine"
var/triggerproc = "explode" //name of the proc thats called when the mine is triggered
var/minepayload = "explosive"
var/triggered = 0
/obj/effect/mine/New()
@@ -15,74 +15,52 @@
/obj/effect/mine/Crossed(AM as mob|obj)
Bumped(AM)
/obj/effect/mine/Bumped(mob/M as mob|obj)
/obj/effect/mine/Bumped(AM as mob|obj)
if(triggered) return
visible_message("<span class='danger'>[AM] sets off \icon[src] [src]!</span>")
triggermine(AM, minepayload)
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
for(var/mob/O in viewers(world.view, src.loc))
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
triggered = 1
call(src,triggerproc)(M)
/obj/effect/mine/proc/triggerrad(obj)
/obj/effect/mine/proc/triggermine(mob/victim, var/triggertype)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
obj:radiation += 50
randmutb(obj)
domutcheck(obj)
qdel(src)
/obj/effect/mine/proc/triggerstun(obj)
if(ismob(obj))
var/mob/M = obj
M.Stun(30)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
qdel(src)
switch(triggertype)
if("explosive")
explosion(loc, 0, 1, 2, 3)
if("triggerkick")
if(isliving(victim) && victim.client)
victim << "<font color='red'><b>You have been kicked FOR NO REISIN!<b></font>"
del(victim.client)
if("triggerplasma")
atmos_spawn_air(SPAWN_TOXINS, 360)
if("triggern2o")
atmos_spawn_air(SPAWN_N2O, 360)
if("triggerstun")
if(isliving(victim))
victim.Weaken(8)
/obj/effect/mine/proc/triggern2o(obj)
atmos_spawn_air("n2o", 360)
qdel(src)
/obj/effect/mine/proc/triggerplasma(obj)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 360)
triggered = 1
qdel(src)
/obj/effect/mine/proc/triggerkick(obj)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
del(obj:client)
qdel(src)
/obj/effect/mine/proc/explode(obj)
explosion(loc, 0, 1, 2, 3)
qdel(src)
/obj/effect/mine/dnascramble
name = "radiation mine"
icon_state = "uglymine"
triggerproc = "triggerrad"
/obj/effect/mine/plasma
name = "plasma mine"
icon_state = "uglymine"
triggerproc = "triggerplasma"
/obj/effect/mine/kick
name = "kick mine"
icon_state = "uglymine"
triggerproc = "triggerkick"
minepayload = "triggerplasma"
/obj/effect/mine/n2o
name = "\improper N2O mine"
icon_state = "uglymine"
triggerproc = "triggern2o"
minepayload = "triggern2o"
/obj/effect/mine/stun
name = "stun mine"
icon_state = "uglymine"
triggerproc = "triggerstun"
minepayload = "triggerstun"
/obj/effect/mine/kickmine
name = "kick mine"
icon_state = "uglymine"
minepayload = "triggerkick"
@@ -61,7 +61,7 @@
/obj/item/bodybag = 1,
/obj/item/clothing/glasses/meson = 2,
/obj/item/clothing/glasses/sunglasses = 1,
/obj/item/clothing/gloves/color/white{color = "yellow"; desc = "The colors are a bit dodgy."; icon_state = "yellow"; item_color = "yellow"; item_state = "ygloves"; name = "insulated gloves"} = 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,
@@ -116,5 +116,8 @@
/obj/item/weapon/wirecutters = 1,
/obj/item/weapon/wrench = 4,
/obj/item/weapon/relic = 3,
/obj/item/weapon/reagent_containers/food/drinks/muriatic_acid = 3,
/obj/item/weapon/reagent_containers/food/drinks/caustic_soda = 3,
/obj/item/weapon/reagent_containers/food/drinks/hydrogen_chloride = 3,
"" = 11
)
+3 -3
View File
@@ -20,7 +20,7 @@
qdel(src)
return
/obj/effect/spider/attackby(var/obj/item/weapon/W, var/mob/user)
/obj/effect/spider/attackby(var/obj/item/weapon/W, var/mob/user, params)
if(W.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(W.attack_verb)] \the [src] with \the [W]!</span>")
else
@@ -81,7 +81,7 @@
/obj/effect/spider/eggcluster/New()
pixel_x = rand(3,-3)
pixel_y = rand(3,-3)
SSobj.processing.Add(src)
SSobj.processing |= src
/obj/effect/spider/eggcluster/process()
amount_grown += rand(0,2)
@@ -109,7 +109,7 @@
/obj/effect/spider/spiderling/New()
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
SSobj.processing.Add(src)
SSobj.processing |= src
/obj/effect/spider/spiderling/Bump(atom/user)
if(istype(user, /obj/structure/table))
+10 -1
View File
@@ -88,6 +88,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/dist = cheap_pythag(T.x - x0,T.y - y0)
var/flame_dist = 0
var/throw_dist = dist
if(dist < flame_range)
flame_dist = 1
@@ -97,7 +98,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
else if(dist < light_impact_range) dist = 3
else dist = 0
//------- TURF FIRES -------
if(T)
@@ -106,6 +106,15 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
if(dist > 0)
T.ex_act(dist)
//--- THROW ITEMS AROUND ---
var/throw_dir = get_dir(epicenter,T)
for(var/obj/item/I in T)
spawn(0) //Simultaneously not one at a time
var/throw_range = rand(throw_dist, max_range)
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
I.throw_at(throw_at, throw_range,1)
var/took = (world.timeofday-start)/10
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
if(Debug2) world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds."
+23 -1
View File
@@ -47,6 +47,11 @@
var/suittoggled = 0
var/hooded = 0
//So items can have custom embedd values
var/embed_chance = EMBED_CHANCE
var/embedded_fall_chance = EMBEDDED_ITEM_FALLOUT
var/embedded_pain_chance = EMBEDDED_PAIN_CHANCE
var/list/can_be_placed_into = list(
/obj/structure/table,
/obj/structure/rack,
@@ -191,7 +196,7 @@
// 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
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
if(S.use_to_pickup)
@@ -408,3 +413,20 @@
armor[armour_value] = max(armor[armour_value]-acidpwr,0)
if(!findtext(desc, "it looks slightly melted...")) //it looks slightly melted... it looks slightly melted... it looks slightly melted... etc.
desc += " it looks slightly melted..." //needs a space at the start, formatting
/obj/item/throw_impact(A)
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
if(can_embed(src))
if(prob(embed_chance))
var/obj/item/organ/limb/L = pick(H.organs)
L.embedded_objects |= src
add_blood(H)//it embedded itself in you, of course it's bloody!
loc = H
L.take_damage(w_class*5)
H.visible_message("<span class='danger'>\the [name] embeds itself in [H]'s [L.getDisplayName()]!</span>","<span class='userdanger'>\the [name] embeds itself in your [L.getDisplayName()]!</span>")
return
..()
+1 -1
View File
@@ -7,7 +7,7 @@
icon_state = "apc_frame"
flags = CONDUCT
/obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
+1 -1
View File
@@ -42,7 +42,7 @@
mob_storage_capacity = 2
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user)
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
if(user.get_active_hand() != I)
+2 -2
View File
@@ -23,7 +23,7 @@
icon_state = "candle[i][lit ? "_lit" : ""]"
/obj/item/candle/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/candle/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
@@ -54,7 +54,7 @@
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
SetLuminosity(CANDLE_LUMINOSITY)
SSobj.processing.Add(src)
SSobj.processing |= src
/obj/item/candle/process()
+1 -1
View File
@@ -898,7 +898,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
// access to status display signals
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob, params)
..()
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
cartridge = C
@@ -308,7 +308,7 @@
break
src.updateSelfDialog()
/obj/item/device/camera_bug/attackby(var/obj/item/W as obj,var/mob/living/user as mob)
/obj/item/device/camera_bug/attackby(var/obj/item/W as obj,var/mob/living/user as mob, params)
if(istype(W,/obj/item/weapon/screwdriver) && expansion)
expansion.loc = get_turf(loc)
user << "You unscrew [expansion]."
@@ -125,7 +125,8 @@
master.disrupt()
/obj/effect/dummy/chameleon/relaymove(var/mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement!
if(istype(loc, /turf/space) || !direction)
return //No magical space movement!
if(can_move)
can_move = 0
@@ -259,6 +259,12 @@ obj/item/device/flashlight/lamp/bananalamp
item_state = "torch"
on_damage = 10
/obj/item/device/flashlight/lantern
name = "lantern"
icon_state = "lantern"
desc = "A mining lantern."
brightness_on = 6 // luminosity when on
/obj/item/device/flashlight/slime
gender = PLURAL
@@ -283,7 +289,7 @@ obj/item/device/flashlight/lamp/bananalamp
/obj/item/device/flashlight/emp/New()
..()
SSobj.processing.Add(src)
SSobj.processing |= src
/obj/item/device/flashlight/emp/Destroy()
SSobj.processing.Remove(src)
@@ -44,7 +44,7 @@
/obj/item/device/laser_pointer/attack(mob/living/M, mob/user)
laser_act(M, user)
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user)
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/stock_parts/micro_laser))
if(!diode)
user.drop_item()
@@ -186,7 +186,7 @@
if(energy <= max_energy)
if(!recharging)
recharging = 1
SSobj.processing.Add(src)
SSobj.processing |= src
if(energy <= 0)
user << "<span class='warning'>You've overused the battery of [src], now it needs time to recharge!</span>"
recharge_locked = 1
@@ -70,7 +70,7 @@
..()
user << "It has [uses] light\s remaining."
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = W
@@ -0,0 +1,63 @@
/obj/item/device/megaphone
name = "megaphone"
desc = "A device used to project your voice. Loudly."
icon_state = "megaphone"
item_state = "radio"
w_class = 2
flags = FPRINT
siemens_coefficient = 1
var/spamcheck = 0
var/emagged = 0
var/insults = 0
var/list/insultmsg = list("FUCK EVERYONE!", "DEATH TO LIZARDS!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!", "VIVA!", "HONK!")
/obj/item/device/megaphone/attack_self(mob/living/carbon/human/user as mob)
if(user.client)
if(user.client.prefs.muted & MUTE_IC)
src << "<span class='warning'>You cannot speak in IC (muted).</span>"
return
if(!ishuman(user))
user << "<span class='warning'>You don't know how to use this!</span>"
return
if(user.can_speak())
user << "<span class='warning'>You find yourself unable to speak at all.</span>"
return
if(spamcheck > world.time)
user << "<span class='warning'>\The [src] needs to recharge!</span>"
return
var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
if(!message)
return
message = capitalize(message)
if ((src.loc == user && user.stat == 0))
if(emagged)
if(insults)
user.audible_message("<B>[user]</B> broadcasts, <FONT size=3>\"[pick(insultmsg)]\"</FONT>", null, 1) // 2 stands for hearable message
insults--
else
user << "<span class='warning'>*BZZZZzzzzzt*</span>"
else
user.audible_message("<B>[user]</B> broadcasts, <FONT size=3>\"[message]\"</FONT>", null, 1) // 2 stands for hearable message
playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1)
spamcheck = world.time + 50
return
/obj/item/device/megaphone/emag_act(mob/user)
user << "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>"
emagged = 1
insults = rand(1, 3) //to prevent dickflooding
/obj/item/device/megaphone/sec
name = "security megaphone"
icon_state = "megaphone-sec"
/obj/item/device/megaphone/command
name = "command megaphone"
icon_state = "megaphone-command"
/obj/item/device/megaphone/cargo
name = "supply megaphone"
icon_state = "megaphone-cargo"
+2 -2
View File
@@ -47,14 +47,14 @@
if(OPERATING)
if(!attached)
return
SSobj.processing.Add(src)
SSobj.processing |= src
anchored = 1
mode = value
update_icon()
SetLuminosity(0)
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
if(mode == DISCONNECTED)
var/turf/T = loc
@@ -31,7 +31,7 @@
return
..()
/obj/item/device/electropack/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/electropack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/clothing/head/helmet))
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
@@ -13,7 +13,7 @@
/obj/item/device/encryptionkey/New()
/obj/item/device/encryptionkey/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/encryptionkey/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/device/encryptionkey/syndicate
icon_state = "cypherkey"
@@ -200,7 +200,7 @@
/obj/item/device/radio/headset/ai/receive_range(freq, level)
return ..(freq, level, 1)
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/radio/headset/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/ ))))
@@ -488,7 +488,7 @@
else
user << "<span class='notice'>[name] can not be modified or attached.</span>"
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
/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) ))
@@ -536,7 +536,7 @@
..()
set_frequency(SYND_FREQ)
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
/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/ ))))
+31 -3
View File
@@ -25,7 +25,7 @@ MASS SPECTROMETER
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
if(on)
SSobj.processing.Add(src)
SSobj.processing |= src
/obj/item/device/t_scanner/process()
@@ -75,8 +75,17 @@ MASS SPECTROMETER
throw_range = 7
m_amt = 200
origin_tech = "magnets=1;biotech=1"
var/mode = 1;
var/mode = 1
var/scanchems = 0
/obj/item/device/healthanalyzer/attack_self(mob/user)
if(!scanchems)
user << "<span class = 'notice'>You switch the health analyzer to scan chemical contents.</span>"
scanchems = 1
else
user << "<span class = 'notice'>You switch the health analyzer to check physical health.</span>"
scanchems = 0
return
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/carbon/human/user as mob)
// Clumsiness/brain damage check
@@ -92,7 +101,10 @@ MASS SPECTROMETER
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
healthscan(user, M, mode)
if(!scanchems)
healthscan(user, M, mode)
else
chemscan(user, M)
src.add_fingerprint(user)
return
@@ -177,6 +189,22 @@ MASS SPECTROMETER
else
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span>")
/proc/chemscan(var/mob/living/user, var/mob/living/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.reagents)
if(H.reagents.reagent_list.len)
user.show_message("<span class='notice'>Subject contains the following reagents:</span>")
for(var/datum/reagent/R in H.reagents.reagent_list)
user.show_message("<span class='notice'>[R.volume]u of [R.name][R.overdosed == 1 ? "</span> - <span class = 'userdanger'>OVERDOSING</span>" : ".</span>"]")
else
user.show_message("<span class = 'notice'>Subject contains no reagents.</span>")
if(H.reagents.addiction_list.len)
user.show_message("<span class='userdanger'>Subject is addicted to the following reagents:</span>")
for(var/datum/reagent/R in H.reagents.addiction_list)
user.show_message("<span class='danger'>[R.name]</span>")
else
user.show_message("<span class='notice'>Subject is not addicted to any reagents.</span>")
/obj/item/device/healthanalyzer/verb/toggle_mode()
set name = "Switch Verbosity"
@@ -31,7 +31,7 @@
user << "The wire panel is [open_panel ? "opened" : "closed"]."
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user)
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
if(!mytape && istype(I, /obj/item/device/tape))
user.drop_item()
I.loc = src
@@ -280,7 +280,7 @@
ruined = 0
/obj/item/device/tape/attackby(obj/item/I, mob/user)
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You start winding the tape back in.</span>"
if(do_after(user, 120))
@@ -13,7 +13,7 @@
/obj/item/device/transfer_valve/IsAssemblyHolder()
return 1
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user)
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user, params)
if(istype(item, /obj/item/weapon/tank))
if(tank_one && tank_two)
user << "<span class='warning'>There are already two tanks attached, remove one first.</span>"
+1 -1
View File
@@ -172,7 +172,7 @@ var/list/world_uplinks = list()
return 1
return 0
//Refund proc for the borg teleporter (later I'll make a general refund proc if there is demand for it)
/obj/item/device/radio/uplink/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/radio/uplink/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/antag_spawner/borg_tele))
var/obj/item/weapon/antag_spawner/borg_tele/S = W
if(!S.used)
+253
View File
@@ -0,0 +1,253 @@
#define MAX_TAPE_RANGE 3
//The max length of a line of hazard tape by tile range
//Define all tape types in hazardtape.dm
/obj/item/tapeproj
icon = 'icons/obj/holotape.dmi'
icon_state = "rollstart"
w_class = 2.0
var/turf/start
var/turf/end
var/tape_type = /obj/item/holotape
var/icon_base
var/charging = 0
/obj/item/holotape
icon = 'icons/obj/holotape.dmi'
anchored = 1
density = 1
var/icon_base
var/health = 10
/obj/item/tapeproj/security
name = "security holotape projector"
desc = "A security hard-light holotape projector used to create holotape. It can be placed in segments along hallways or on airlocks to signify crime scenes."
icon_state = "security_start"
tape_type = /obj/item/holotape/security
icon_base = "security"
/obj/item/holotape/security
name = "security holotape"
desc = "A length of security hard-light holotape. It reads: SECURITY LINE | DO NOT CROSS."
icon_base = "security"
/obj/item/tapeproj/engineering
name = "engineering holotape projector"
desc = "An engineering hard-light holotape projector used to create holotape. It can be placed in segments along hallways or on airlocks to show hazardous areas."
icon_state = "engineering_start"
tape_type = /obj/item/holotape/engineering
icon_base = "engineering"
/obj/item/holotape/engineering
name = "engineering holotape"
desc = "A length of engineering hard-light holotape. It reads: HAZARD AHEAD // DO NOT CROSS."
icon_base = "engineering"
/obj/item/tapeproj/dropped()
reset()
/obj/item/tapeproj/equipped()
reset()
/obj/item/tapeproj/proc/reset()
if(icon_state == "[icon_base]_stop")
icon_state = "[icon_base]_start"
start = null
return
/obj/item/tapeproj/attack_self(var/mob/user)
if(charging)
usr << "<span class='warning'>[src] is recharging!</span>"
return
if(icon_state == "[icon_base]_start")
start = get_turf(src)
usr << "<span class='notice'>You project the start of the [icon_base] holotape.</span>"
icon_state = "[icon_base]_stop"
else
icon_state = "[icon_base]_start"
end = get_turf(src)
if(start.y != end.y && start.x != end.x || start.z != end.z)
usr << "<span class='warning'>[src] can only be projected horizontally or vertically.</span>"
return
if(get_dist(start,end) >= MAX_TAPE_RANGE)
usr << "<span class='warning'>Your holotape segment is too long! It must be [MAX_TAPE_RANGE] tiles long or shorter!</span>"
return
var/turf/cur = start
var/dir
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))
dir = "v"
else
var/d = end.x-start.x
if(d) d = d/abs(d)
end = get_turf(locate(end.x+d,end.y,end.z))
dir = "h"
var/can_place = 1
while (cur!=end && can_place)
if(cur.density == 1)
can_place = 0
else if(istype(cur, /turf/space))
can_place = 0
else
for(var/obj/O in cur)
if(!istype(O, /obj/item/holotape) && O.density)
can_place = 0
break
cur = get_step_towards(cur,end)
if(!can_place)
usr << "<span class='warning'>You can't project the [icon_base] holotape through that!</span>"
return
cur = start
var/tapetest = 0
while (cur!=end)
for(var/obj/item/holotape/Ptest in cur)
if(Ptest.icon_state == "[Ptest.icon_base]_[dir]")
tapetest = 1
if(tapetest != 1)
var/obj/item/holotape/P = new tape_type(cur)
P.icon_state = "[P.icon_base]_[dir]"
cur = get_step_towards(cur,end)
usr << "<span class='notice'>You finish project the legnth of [icon_base] holotape.</span>"
user.visible_message("<span class='warning'>[user] finishes projecting the length of [icon_base] holotape.</span>")
charging = 1
spawn(40)
charging = 0
/obj/item/tapeproj/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
if(charging)
return
if(proximity_flag == 0) // not adjacent
return
if(istype(target, /obj/machinery/door/airlock) || istype(target, /obj/machinery/door/firedoor) || istype(target, /obj/structure/window))
var/turf = get_turf(target)
if(locate(tape_type) in turf) //Don't you dare stack tape
return
if(istype(target, /obj/structure/window))
var/obj/structure/window/W = target
if(!(W.dir == 5) || !(W.fulltile == 1))
return
user << "<span class='notice'>You start projecting the [icon_base] holotape onto [target].</span>"
if(!do_mob(user, target, 30))
return
var/atom/tape = new tape_type(turf)
tape.icon_state = "[icon_base]_door"
tape.layer = 3.2
user << "<span class='notice'>You project the [icon_base] holotape onto [target].</span>"
charging = 1
spawn(40)
charging = 0
/obj/item/holotape/Bumped(var/mob/M)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(C.m_intent == "walk")
var/turf/T = get_turf(src)
C.loc = T
if(M.has_unlimited_silicon_privilege)
var/turf/T = get_turf(src)
M.loc = T
/obj/item/holotape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(!density) return 1
if(air_group || (height==0)) return 1
if((mover.flags & PASSGLASS || istype(mover, /obj/effect/meteor) || mover.throwing == 1) )
return 1
else
return 0
/obj/item/holotape/attack_hand(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] hits [src].</span>", \
"<span class='warning'>You hit [src].</span>" )
health -= rand(1,2)
healthcheck()
/obj/item/holotape/proc/healthcheck()
if(health <= 0)
breaktape()
/obj/item/holotape/ex_act(severity, target)
breaktape()
/obj/item/holotape/blob_act()
breaktape()
/obj/item/holotape/attack_paw(mob/living/user)
attack_hand(user)
/obj/item/holotape/bullet_act(var/obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
..()
if(health <= 0)
breaktape()
return
/obj/item/holotape/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
health -= W.force * 0.3
healthcheck()
..()
return
/obj/item/holotape/hitby(AM as mob|obj)
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(ismob(AM))
tforce = 5
else if(isobj(AM))
var/obj/item/I = AM
tforce = max(0, I.throwforce * 0.5)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
health = max(0, health - tforce)
healthcheck()
/obj/item/holotape/proc/breaktape()
var/dir[2]
var/icon_dir = src.icon_state
if(icon_dir == "[src.icon_base]_h")
dir[1] = EAST
dir[2] = WEST
if(icon_dir == "[src.icon_base]_v")
dir[1] = NORTH
dir[2] = SOUTH
for(var/i=1;i<3;i++)
var/N = 0
var/turf/cur = get_step(src,dir[i])
while(N != 1)
N = 1
for (var/obj/item/holotape/P in cur)
if(P.icon_state == icon_dir)
N = 0
del(P)
cur = get_step(cur,dir[i])
del(src)
return
#undef MAX_TAPE_RANGE
+1 -1
View File
@@ -50,7 +50,7 @@
burst()
return
/obj/item/latexballon/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/latexballon/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/tank))
var/obj/item/weapon/tank/T = W
blow(T, user)
+3 -3
View File
@@ -85,7 +85,7 @@
return 1
return 0
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/stack/sheet/metal/M = W
@@ -290,7 +290,7 @@
Interact(usr)
return
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(src.cell)
@@ -313,7 +313,7 @@
user << "<span class='warning'>You need one length of coil to wire it.</span>"
return
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/device/flash/handheld))
var/obj/item/device/flash/handheld/F = W
@@ -153,6 +153,27 @@
R.module.rebuild()
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
/obj/item/borg/upgrade/ddrill/action(var/mob/living/silicon/robot/R)
if(..()) return 0
if(!istype(R.module, /obj/item/weapon/robot_module/miner))
R << "Upgrade mounting error! No suitable hardpoint detected!"
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)
qdel(D)
for(var/obj/item/weapon/shovel/S in R.module.modules)
qdel(S)
R.module.modules += new /obj/item/weapon/pickaxe/drill/diamonddrill(src)
R.module.rebuild()
return 1
/obj/item/borg/upgrade/syndicate/
name = "illegal equipment module"
+1 -1
View File
@@ -32,7 +32,7 @@
/obj/item/target/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/target/attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
+8 -1
View File
@@ -36,8 +36,10 @@
if(stop_bleeding)
if(H.bleedsuppress)
user << "[H]'s bleeding is already bandaged."
if(!H.blood_max)
return
else if(!H.blood_max)
user << "[H] isn't bleeding."
return
if(isliving(M))
if(!M.can_inject(user, 1))
@@ -101,6 +103,11 @@
desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
stop_bleeding = 900
/obj/item/stack/medical/gauze/cyborg/
m_amt = 0
is_cyborg = 1
cost = 250
/obj/item/stack/medical/ointment
name = "ointment"
desc = "Used to treat those nasty burn wounds."
+1 -1
View File
@@ -33,7 +33,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
else
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
@@ -24,7 +24,7 @@
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params)
..()
add_fingerprint(user)
if(istype(W, /obj/item/stack/cable_coil))
@@ -315,7 +315,7 @@
M.adjustBruteLoss(force / 2)
/obj/item/weapon/shard/attackby(obj/item/I, mob/user)
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
@@ -108,7 +108,7 @@ var/global/list/datum/stack_recipe/xeno_recipes = list ( \
//Step one - dehairing.
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if( istype(W, /obj/item/weapon/kitchenknife) || \
istype(W, /obj/item/weapon/kitchen/utensil/knife) || \
istype(W, /obj/item/weapon/twohanded/fireaxe) || \
@@ -11,7 +11,7 @@
flags = CONDUCT
max_amount = 60
/obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
..()
if(istype(O,/obj/item/weapon/wirecutters))
var/obj/item/stack/cable_coil/CC = new (user.loc)
+1 -1
View File
@@ -217,7 +217,7 @@
..()
return
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, src.type))
var/obj/item/stack/S = W
@@ -25,7 +25,7 @@
else
state = 0 //fine
/obj/item/stack/tile/light/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/item/stack/tile/light/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
..()
if(istype(O,/obj/item/weapon/crowbar))
new/obj/item/stack/sheet/metal(user.loc)
@@ -16,7 +16,7 @@
var/turf_type = null
var/mineralType = null
/obj/item/stack/tile/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/stack/tile/attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
+18 -9
View File
@@ -50,7 +50,7 @@
src.update_icon()
return
/obj/item/toy/balloon/attackby(obj/O as obj, mob/user as mob)
/obj/item/toy/balloon/attackby(obj/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/reagent_containers/glass))
if(O.reagents)
if(O.reagents.total_volume < 1)
@@ -131,7 +131,7 @@
..()
user << "There [bullets == 1 ? "is" : "are"] [bullets] cap\s left."
/obj/item/toy/gun/attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob)
/obj/item/toy/gun/attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob, params)
if (istype(A, /obj/item/toy/ammo/gun))
if (src.bullets >= 7)
@@ -207,7 +207,7 @@
if (bullets)
user << "<span class='notice'>It is loaded with [bullets] foam dart\s.</span>"
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
@@ -337,7 +337,7 @@
return
// Copied from /obj/item/weapon/melee/energy/sword/attackby
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/living/user)
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/living/user, params)
..()
if(istype(W, /obj/item/toy/sword))
if(W == src)
@@ -434,7 +434,7 @@
attack_verb = list("attacked", "coloured")
var/colour = "#FF0000" //RGB
var/drawtype = "rune"
var/list/graffiti = list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","body")
var/list/graffiti = list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","body","cyka")
var/list/letters = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
var/uses = 30 //0 for unlimited uses
var/instant = 0
@@ -449,6 +449,15 @@
..()
name = "[colourName] crayon" //Makes crayons identifiable in things like grinders
drawtype = pick(pick(graffiti), pick(letters), "rune[rand(1,6)]")
if(config)
if(config.mutant_races == 1)
graffiti |= "antilizard"
graffiti |= "prolizard"
/obj/item/toy/crayon/initialize()
if(config.mutant_races == 1)
graffiti |= "antilizard"
graffiti |= "prolizard"
/obj/item/toy/crayon/attack_self(mob/living/user as mob)
update_window(user)
@@ -769,7 +778,7 @@ obj/item/toy/cards/deck/attack_self(mob/user as mob)
user.visible_message("<span class='notice'>[user] shuffles the deck.</span>", "<span class='notice'>You shuffle the deck.</span>")
cooldown = world.time
obj/item/toy/cards/deck/attackby(obj/item/toy/cards/singlecard/C, mob/living/user)
obj/item/toy/cards/deck/attackby(obj/item/toy/cards/singlecard/C, mob/living/user, params)
..()
if(istype(C))
if(C.parentdeck == src)
@@ -789,7 +798,7 @@ obj/item/toy/cards/deck/attackby(obj/item/toy/cards/singlecard/C, mob/living/use
src.icon_state = "deck_[deckstyle]_low"
obj/item/toy/cards/deck/attackby(obj/item/toy/cards/cardhand/C, mob/living/user)
obj/item/toy/cards/deck/attackby(obj/item/toy/cards/cardhand/C, mob/living/user, params)
..()
if(istype(C))
if(C.parentdeck == src)
@@ -893,7 +902,7 @@ obj/item/toy/cards/cardhand/Topic(href, href_list)
qdel(src)
return
obj/item/toy/cards/cardhand/attackby(obj/item/toy/cards/singlecard/C, mob/living/user)
obj/item/toy/cards/cardhand/attackby(obj/item/toy/cards/singlecard/C, mob/living/user, params)
if(istype(C))
if(C.parentdeck == src.parentdeck)
src.currenthand += C.cardname
@@ -963,7 +972,7 @@ obj/item/toy/cards/singlecard/verb/Flip()
src.name = "card"
src.pixel_x = -5
obj/item/toy/cards/singlecard/attackby(obj/item/I, mob/living/user)
obj/item/toy/cards/singlecard/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/toy/cards/singlecard/))
var/obj/item/toy/cards/singlecard/C = I
if(C.parentdeck == src.parentdeck)
+1 -1
View File
@@ -100,7 +100,7 @@ RCD
return
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user)
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
+1 -1
View File
@@ -19,7 +19,7 @@ RSF
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob)
/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)
@@ -57,7 +57,7 @@
user << "<span class='notice'>Its ink levels look [ink_level].</span>"
/obj/item/weapon/airlock_painter/attackby(obj/item/weapon/W, mob/user)
/obj/item/weapon/airlock_painter/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/device/toner))
if(ink)
@@ -176,7 +176,7 @@
update_icon()
desc = initial(desc) + "<br><span class='info'>It appears to contain [target.name].</span>"
SSobj.processing.Add(src)
SSobj.processing |= src
/obj/effect/chrono_field/Destroy()
if(gun && gun.field_check(src))
@@ -50,7 +50,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
name = "lit match"
desc = "A match. This one is lit."
attack_verb = list("burnt","singed")
SSobj.processing.Add(src)
SSobj.processing |= src
update_icon()
return
@@ -120,7 +120,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
create_reagents(chem_volume) // making the cigarette a chemical holder with a maximum volume of 15
reagents.add_reagent("nicotine", 15)
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
var/lighting_text = "<span class='notice'>[user] lights their [name] with [W].</span>"
if(istype(W, /obj/item/weapon/weldingtool))
@@ -185,7 +185,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(flavor_text)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
SSobj.processing.Add(src)
SSobj.processing |= src
//can't think of any other way to update the overlays :<
if(ismob(loc))
@@ -368,7 +368,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
return
/obj/item/clothing/mask/cigarette/pipe/attackby(var/obj/item/O, var/mob/user)
/obj/item/clothing/mask/cigarette/pipe/attackby(var/obj/item/O, var/mob/user, params)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = O
if(!packeditem)
@@ -475,7 +475,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light [src], they however burn their finger in the process.</span>")
user.AddLuminosity(1)
SSobj.processing.Add(src)
SSobj.processing |= src
else
lit = 0
icon_state = icon_off
+15 -4
View File
@@ -2,6 +2,7 @@
* Contains:
* Soap
* Bike Horns
* Air Horns
*/
/*
@@ -82,16 +83,26 @@
throw_range = 7
attack_verb = list("HONKED")
var/spam_flag = 0
var/honksound = 'sound/items/bikehorn.ogg'
var/cooldowntime = 20
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1) //plays instead of tap.ogg!
if(!spam_flag)
playsound(loc, honksound, 50, 1, -1) //plays instead of tap.ogg!
return ..()
/obj/item/weapon/bikehorn/attack_self(mob/user as mob)
if(spam_flag == 0)
if(!spam_flag)
spam_flag = 1
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
playsound(src.loc, honksound, 50, 1)
src.add_fingerprint(user)
spawn(20)
spawn(cooldowntime)
spam_flag = 0
return
/obj/item/weapon/bikehorn/airhorn
name = "air horn"
desc = "Damn son, where'd you find this?"
icon_state = "air_horn"
honksound = 'sound/items/AirHorn2.ogg'
cooldowntime = 50
+2 -2
View File
@@ -100,7 +100,7 @@
H.put_in_l_hand(src)
return
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user)
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
@@ -257,7 +257,7 @@
update_icon()
return
/obj/item/weapon/defibrillator/compact/combat/attackby(obj/item/weapon/W, mob/user)
/obj/item/weapon/defibrillator/compact/combat/attackby(obj/item/weapon/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
@@ -40,7 +40,7 @@
explode(get_turf(user))
return .
/obj/item/weapon/c4/attackby(var/obj/item/I, var/mob/user)
/obj/item/weapon/c4/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
@@ -67,7 +67,7 @@
var/turflist = getline(user, target_turf)
flame_turf(turflist)
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob, params)
if(user.stat || user.restrained() || user.lying) return
if(istype(W, /obj/item/weapon/wrench) && !status)//Taking this apart
var/turf/T = get_turf(src)
@@ -140,7 +140,7 @@
if(!status) return
lit = !lit
if(lit)
SSobj.processing.Add(src)
SSobj.processing |= src
if(href_list["amount"])
throw_amount = throw_amount + text2num(href_list["amount"])
throw_amount = max(50, min(5000, throw_amount))
@@ -34,7 +34,7 @@
/obj/item/weapon/storage/backpack/holding,
/obj/item/weapon/storage/belt/champion,
/obj/item/weapon/soap/deluxe,
/obj/item/weapon/pickaxe/silver,
/obj/item/weapon/pickaxe/diamond,
/obj/item/weapon/pen/invisible,
/obj/item/weapon/lipstick/random,
/obj/item/weapon/grenade/smokebomb,
@@ -47,7 +47,7 @@
prime()
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/I, mob/user)
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
if(stage == WIRED)
if(beakers.len)
@@ -250,7 +250,7 @@
//I tried to just put it in the allowed_containers list but
//if you do that it must have reagents. If you're going to
//make a special case you might as well do it explicitly. -Sayu
/obj/item/weapon/grenade/chem_grenade/large/attackby(obj/item/I, mob/user)
/obj/item/weapon/grenade/chem_grenade/large/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/slime_extract) && stage == WIRED)
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
user.drop_item()
@@ -370,6 +370,24 @@
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/colorful
name = "colorful grenade"
desc = "Used for wide scale painting projects."
stage = READY
/obj/item/weapon/grenade/chem_grenade/colorful/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("colorful_reagent", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
beakers += B1
beakers += B2
#undef EMPTY
#undef WIRED
#undef READY
@@ -81,7 +81,7 @@
M.unEquip(src)
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
/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")
+2 -1
View File
@@ -22,6 +22,7 @@
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>Uh... how do those things work?!</span>"
apply_cuffs(user,user)
return
if(!C.handcuffed)
C.visible_message("<span class='danger'>[user] is trying to put [src.name] on [C]!</span>", \
@@ -85,7 +86,7 @@
/obj/item/weapon/restraints/handcuffs/cable/white
icon_state = "cuff_white"
/obj/item/weapon/restraints/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob)
/obj/item/weapon/restraints/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob, params)
..()
if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
@@ -69,7 +69,7 @@
desc = "Lets you shoot your guns"
icon_state = "auth"
/obj/item/weapon/implant/tracking/get_data()
/obj/item/weapon/implant/weapons_auth/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Firearms Authentication Implant<BR>
<b>Life:</b> 4 hours after death of host<BR>
@@ -16,7 +16,7 @@
icon_state = "implantcase-0"
/obj/item/weapon/implantcase/attackby(obj/item/weapon/W, mob/user)
/obj/item/weapon/implantcase/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", name, null)
@@ -73,7 +73,7 @@
return
/obj/machinery/implantchair/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
/obj/machinery/implantchair/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params)
if(istype(G, /obj/item/weapon/grab))
if(!ismob(G:affecting))
return
@@ -32,7 +32,7 @@
return ..()
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C, mob/user)
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C, mob/user, params)
..()
if(istype(C, /obj/item/weapon/implantcase))
if(!case)
@@ -29,6 +29,7 @@
var/obj/effect/overlay/holograph/H = locate() in T
if(H)
user << "<span class='notice'>You use [src] to destroy [H].</span>"
signs.Remove(H)
qdel(H)
else
if(signs.len < max_signs)
+5 -5
View File
@@ -700,7 +700,7 @@
- metal rod (kebab)
<h2>Table Craft:</h2>
Put ingredients on table, then click and drag the table onto yourself to prepare recipes.
Put ingredients on table, then click and drag the table onto yourself to see what recipes you can prepare.
<h2>Microwave:</h2>
Use it to cook or boil food ingredients (meats, doughs, egg, spaghetti, donkpocket, etc...).
@@ -718,14 +718,14 @@
<h2>Example recipes:</h2>
<b>Vanilla Cake</b>: Microwave cake batter.<br>
<b>Burger:</b> 1 bun + 1 meat<br>
<b>Burger:</b> 1 bun + 1 meat steak<br>
<b>Bread:</b> Microwave dough.<br>
<b>Waffles:</b> 2 doughslices<br>
<b>Waffles:</b> 2 pastry base<br>
<b>Popcorn:</b> Microwave corn.<br>
<b>Meat Steak:</b> Microwave meat.<br>
<b>Meat Pie:</b> 1 plain pie + 1u black pepper + 1u salt + 1 meat<br>
<b>Meat Pie:</b> 1 plain pie + 1u black pepper + 1u salt + 2 meat cutlets<br>
<b>Boiled Spagetti:</b> Microwave spaghetti.<br>
<b>Donuts:</b> 1u sugar + 1 doughslice<br>
<b>Donuts:</b> 1u sugar + 1 pastry base<br>
<b>Fries:</b> Process potato.
</body>
@@ -117,7 +117,7 @@
/obj/item/weapon/melee/energy/sword/saber/red
item_color = "red"
/obj/item/weapon/melee/energy/sword/saber/attackby(obj/item/weapon/W, mob/living/user)
/obj/item/weapon/melee/energy/sword/saber/attackby(obj/item/weapon/W, mob/living/user, params)
..()
if(istype(W, /obj/item/weapon/melee/energy/sword/saber))
if(W == src)
+1 -1
View File
@@ -50,7 +50,7 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A)
user << "<span class='notice'>You have finished mopping!</span>"
/obj/effect/attackby(obj/item/I, mob/user)
/obj/effect/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap))
return
..()
+1 -1
View File
@@ -21,7 +21,7 @@
/obj/item/weapon/shield/riot/IsShield()
return 1
/obj/item/weapon/shield/riot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/shield/riot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/melee/baton))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
@@ -17,7 +17,7 @@
/obj/item/weapon/twohanded/singularityhammer/New()
..()
SSobj.processing.Add(src)
SSobj.processing |= src
/obj/item/weapon/twohanded/singularityhammer/Destroy()
@@ -19,7 +19,7 @@
max_w_class = 3
max_combined_w_class = 21
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
..()
@@ -7,6 +7,12 @@
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined")
/obj/item/weapon/storage/belt/update_icon()
overlays.Cut()
for(var/obj/item/I in contents)
overlays += "[I.name]"
..()
/obj/item/weapon/storage/belt/utility
name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
desc = "Holds tools."
@@ -132,6 +132,6 @@
A.reagents.del_reagent("unholywater")
A.reagents.add_reagent("holywater",unholy2clean)
/obj/item/weapon/storage/book/bible/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/book/bible/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
..()
@@ -50,7 +50,7 @@
user.update_inv_r_hand()
qdel(src)
/obj/item/weapon/storage/box/attackby(obj/item/W, mob/user)
/obj/item/weapon/storage/box/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/packageWrap))
return 0
..()
@@ -138,17 +138,17 @@
new /obj/item/weapon/reagent_containers/hypospray/medipen( src )
/obj/item/weapon/storage/box/medipens/utility
name = "medipens kit"
desc = "A box with several utility medipens for the economical miner."
name = "stimpack value kit"
desc = "A box with several stimpack medipens for the economical miner."
icon_state = "syringe"
/obj/item/weapon/storage/box/medipens/utility/New()
..()
new /obj/item/weapon/reagent_containers/hypospray/medipen/leporazine( src )
new /obj/item/weapon/reagent_containers/hypospray/medipen/leporazine( src )
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack( src )
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack( src )
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack( src )
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack(src)
/obj/item/weapon/storage/box/beakers
name = "box of beakers"
@@ -546,7 +546,7 @@
for(var/i=1; i <= storage_slots; i++)
new /obj/item/weapon/match(src)
/obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/match/W as obj, mob/user as mob)
/obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/match/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/match))
W.matchignite()
return
@@ -124,7 +124,7 @@
for(var/obj/item/toy/crayon/crayon in contents)
overlays += image('icons/obj/crayons.dmi',crayon.colourName)
/obj/item/weapon/storage/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/storage/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/toy/crayon))
switch(W:colourName)
if("mime")
@@ -17,7 +17,7 @@
var/icon_broken = "lockbox+b"
/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (W.GetID())
if(src.broken)
user << "<span class='danger'>It appears to be broken.</span>"
@@ -31,7 +31,7 @@
..()
user << text("The service panel is [src.open ? "open" : "closed"].")
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(locked)
if (istype(W, /obj/item/weapon/melee/energy/blade) && !emagged)
emagged = 1
@@ -321,7 +321,7 @@
//This proc is called when you want to place an item into the storage item.
/obj/item/weapon/storage/attackby(obj/item/W, mob/user)
/obj/item/weapon/storage/attackby(obj/item/W, mob/user, params)
..()
if(isrobot(user))
+22 -1
View File
@@ -13,6 +13,7 @@
var/status = 0
var/obj/item/weapon/stock_parts/cell/high/bcell = null
var/hitcost = 1000
var/losspertick = 5
/obj/item/weapon/melee/baton/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.</span>")
@@ -44,6 +45,25 @@
else
return 0
/obj/item/weapon/melee/baton/proc/update_process()
if(status)
SSobj.processing |= src
else
SSobj.processing.Remove(src)
/obj/item/weapon/melee/baton/process()
if(bcell)
if(bcell.charge < hitcost)
status = 0
update_icon()
if(status)
if(isrobot(loc))
var/mob/living/silicon/robot/R = loc
if(R && R.cell)
R.cell.use(losspertick)
else
bcell.use(losspertick)
/obj/item/weapon/melee/baton/update_icon()
if(status)
icon_state = "[initial(name)]_active"
@@ -51,6 +71,7 @@
icon_state = "[initial(name)]_nocell"
else
icon_state = "[initial(name)]"
update_process()
/obj/item/weapon/melee/baton/examine(mob/user)
..()
@@ -59,7 +80,7 @@
if(!bcell)
user <<"<span class='warning'>The baton does not have a power source installed.</span>"
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(bcell)
@@ -86,7 +86,7 @@
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/internals/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/tank/internals/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if (istype(W, /obj/item/weapon/flamethrower))
@@ -24,7 +24,7 @@
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
SSobj.processing.Add(src)
SSobj.processing |= src
return
@@ -74,7 +74,7 @@
qdel(src)
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
src.add_fingerprint(user)
@@ -93,7 +93,7 @@
H.put_in_l_hand(src)
return
/obj/item/weapon/watertank/attackby(obj/item/W, mob/user)
/obj/item/weapon/watertank/attackby(obj/item/W, mob/user, params)
if(W == noz)
remove_noz()
return
+3 -3
View File
@@ -186,7 +186,7 @@
user << "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weapon/weldingtool/attackby(obj/item/I, mob/user)
/obj/item/weapon/weldingtool/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
flamethrower_screwdriver(I, user)
if(istype(I, /obj/item/stack/rods))
@@ -311,13 +311,13 @@
return
welding = !welding
if(welding)
if(remove_fuel(1))
if(get_fuel() >= 1)
user << "<span class='notice'>You switch [src] on.</span>"
force = 15
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
icon_state = "welder1"
SSobj.processing.Add(src)
SSobj.processing |= src
else
user << "<span class='notice'>You need more fuel.</span>"
welding = 0
+1 -1
View File
@@ -258,7 +258,7 @@ obj/item/weapon/twohanded/
New()
item_color = "red"
/obj/item/weapon/twohanded/dualsaber/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/twohanded/dualsaber/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/device/multitool))
if(hacked == 0)
+23 -2
View File
@@ -107,7 +107,7 @@ obj/item/weapon/wirerod
m_amt = 1875
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob, params)
..()
if(istype(I, /obj/item/weapon/shard))
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
@@ -129,4 +129,25 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
user.put_in_hands(P)
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
qdel(I)
qdel(src)
qdel(src)
/obj/item/weapon/throwing_star
name = "throwing star"
desc = "An ancient weapon still used to this day due to it's ease of lodging itself into victim's body parts"
icon_state = "throwingstar"
item_state = "eshield0"
force = 2
throwforce = 20
w_class = 2
embed_chance = 100
embedded_fall_chance = 0 //Hahaha!
/obj/item/weapon/storage/box/throwing_stars/New()
..()
contents = list()
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
+1 -1
View File
@@ -28,7 +28,7 @@
return 0
/obj/structure/optable/attackby(obj/item/weapon/W, mob/user)
/obj/structure/optable/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(!G.confirm())
+241
View File
@@ -0,0 +1,241 @@
/obj/structure/sign/barsign // All Signs are 64 by 32 pixels, they take two tiles
name = "Bar Sign"
desc = "A bar sign with no writing on it"
icon = 'icons/obj/barsigns.dmi'
icon_state = "empty"
req_access = list(access_bar)
var/list/barsigns=list()
var/list/hiddensigns
var/broken = 0
var/emagged = 0
var/state = 0
var/prev_sign = ""
var/panel_open = 0
/obj/structure/sign/barsign/New()
..()
//filling the barsigns list
for(var/bartype in typesof(/datum/barsign) - /datum/barsign)
var/datum/barsign/signinfo = new bartype
if(!signinfo.hidden)
barsigns += signinfo
//randomly assigning a sign
set_sign(pick(barsigns))
/obj/structure/sign/barsign/proc/set_sign(var/datum/barsign/sign)
if(!istype(sign))
return
icon_state = sign.icon
name = sign.name
if(sign.desc)
desc = sign.desc
else
desc = "It displays \"[name]\"."
/obj/structure/sign/barsign/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/structure/sign/barsign/attack_hand(mob/user as mob)
if (!src.allowed(user))
user << "<span class = 'info'>Access denied.</span>"
return
if (broken)
user << "<span class ='danger'>The controls seem unresponsive.</span>"
return
pick_sign()
/obj/structure/sign/barsign/attackby(var/obj/item/I, var/mob/user)
if(!allowed(user))
user << "<span class = 'info'>Access denied.</span>"
return
if( istype(I, /obj/item/weapon/screwdriver))
if(!panel_open)
user << "You open the maintenance panel."
set_sign(new /datum/barsign/hiddensigns/signoff)
panel_open = 1
else
user << "You close the maintenance panel."
if(!broken && !emagged)
set_sign(pick(barsigns))
else if(emagged)
set_sign(new /datum/barsign/hiddensigns/syndibarsign)
else
set_sign(new /datum/barsign/hiddensigns/empbarsign)
panel_open = 0
if(istype(I, /obj/item/stack/cable_coil) && panel_open)
var/obj/item/stack/cable_coil/C = I
if(emagged) //Emagged, not broken by EMP
user << "Sign has been damaged beyond repair."
return
else if(!broken)
user << "This sign is functioning properly."
return
if(C.use(2))
user << "<span class='notice'>You replace the burnt wiring.</span>"
broken = 0
else
user << "<span class='warning'>You need at least two lengths of cable.</span>"
/obj/structure/sign/barsign/emp_act(severity)
set_sign(new /datum/barsign/hiddensigns/empbarsign)
broken = 1
/obj/structure/sign/barsign/emag_act(mob/user)
if(broken || emagged)
user << "Nothing interesting happens."
return
user << "<span class='notice'>You emag the barsign. Takeover in progress...</span>"
sleep(100) //10 seconds
set_sign(new /datum/barsign/hiddensigns/syndibarsign)
emagged = 1
req_access = list(access_syndicate)
/obj/structure/sign/barsign/proc/pick_sign()
var/picked_name = input("Available Signage", "Bar Sign") as null|anything in barsigns
if(!picked_name)
return
set_sign(picked_name)
//Code below is to define useless variables for datums. It errors without these
/datum/barsign
var/name = "Name"
var/icon = "Icon"
var/desc = "desc"
var/hidden = 0
//Anything below this is where all the specific signs are. If people want to add more signs, add them below.
/datum/barsign/maltesefalcon
name = "Maltese Falcon"
icon = "maltesefalcon"
desc = "The Maltese Falcon, Space Bar and Grill"
/datum/barsign/thebark
name = "The Bark"
icon = "thebark"
desc = "Ian's bar of choice"
/datum/barsign/harmbaton
name = "The Harmbaton"
icon = "theharmbaton"
desc = "A great dining experience for both security members and assistants"
/datum/barsign/thesingulo
name = "The Singulo"
icon = "thesingulo"
desc = "Where people go that'd rather not be called by their name"
/datum/barsign/thedrunkcarp
name = "The Drunk Carp"
icon = "thedrunkcarp"
desc = "Don't drink and Swim"
/datum/barsign/scotchservinwill
name = "Scotch Servin Willy's"
icon = "scotchservinwill"
desc = "Willy sure moved up in the world from clown to bartender"
/datum/barsign/officerbeersky
name = "Officer Beersky's"
icon = "officerbeersky"
desc = "Man eat a dong, these drinks are great"
/datum/barsign/thecavern
name = "The Cavern"
icon = "thecavern"
desc = "Fine drinks while listening to some fine tunes"
/datum/barsign/theouterspess
name = "The Outer Spess"
icon = "theouterspess"
desc = "This bar isn't actually located in outer space"
/datum/barsign/slipperyshots
name = "Slippery Shots"
icon = "slipperyshots"
desc = "Slippery slope to drunkeness with our shots!"
/datum/barsign/thegreytide
name = "The Grey Tide"
icon = "thegreytide"
desc = "Abandon your toolboxing ways and enjoy a lazy beer!"
/datum/barsign/honkednloaded
name = "Honked 'n' Loaded"
icon = "honkednloaded"
desc = "Honk."
/datum/barsign/hiddensigns
hidden = 1
//Hidden signs list below this point
/datum/barsign/hiddensigns/empbarsign
name = "Haywire Barsign"
icon = "empbarsign"
desc = "Something has gone very wrong."
/datum/barsign/hiddensigns/syndibarsign
name = "Syndi Cat Takeover"
icon = "syndibarsign"
desc = "Syndicate or die."
/datum/barsign/hiddensigns/signoff
name = "Bar Sign"
icon = "empty"
desc = "This sign doesn't seem to be on."
+2 -2
View File
@@ -32,7 +32,7 @@ LINEN BINS
add_fingerprint(user)
return
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/weapon/shard))
new /obj/item/stack/medical/gauze/improvised(src.loc)
qdel(src)
@@ -186,7 +186,7 @@ LINEN BINS
else icon_state = "linenbin-full"
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob)
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/bedsheet))
user.drop_item()
I.loc = src
@@ -29,7 +29,7 @@
else
overlays += orangelight
/obj/structure/closet/crate/bin/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/closet/crate/bin/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/storage/bag/trash))
var/obj/item/weapon/storage/bag/trash/T = W
user << "<span class='notice'>You fill the bag.</span>"
@@ -154,7 +154,7 @@
qdel(src)
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
if(src.large)
@@ -260,7 +260,7 @@
src.add_fingerprint(user)
if(!src.toggle())
usr << "<span class='notice'>It won't budge!</span>"
user << "<span class='notice'>It won't budge!</span>"
/obj/structure/closet/verb/verb_toggleopen()
set src in oview(1)
@@ -22,7 +22,7 @@
return ..()
if(content_mob != null && already_opened == 0)
for(var/i = 0, i <= amount, i++)
for(var/i = 1, i <= amount, i++)
new content_mob(loc)
already_opened = 1
..()
@@ -15,7 +15,7 @@
locked = 1
var/smashed = 0
/obj/structure/closet/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri
/obj/structure/closet/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/living/user as mob, params) //Marker -Agouri
//..() //That's very useful, Erro
var/hasaxe = 0 //gonna come in handy later~
@@ -34,9 +34,10 @@
new /obj/item/clothing/under/rank/cargo(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/clothing/gloves/fingerless(src)
// new /obj/item/weapon/cartridge/quartermaster(src)
new /obj/item/clothing/suit/fire/firefighter(src)
new /obj/item/clothing/gloves/fingerless(src)
new /obj/item/device/megaphone/cargo(src)
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson(src)
@@ -18,8 +18,6 @@
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
new /obj/item/weapon/storage/backpack/dufflebag/engineering(src)
new /obj/item/areaeditor/blueprints(src)
new /obj/item/weapon/storage/box/permits(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/head/hardhat/white(src)
new /obj/item/clothing/head/welding(src)
@@ -29,7 +27,10 @@
new /obj/item/device/radio/headset/heads/ce(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/weapon/storage/box/permits(src)
new /obj/item/areaeditor/blueprints(src)
new /obj/item/weapon/airlock_painter(src)
new /obj/item/tapeproj/engineering(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/device/flash/handheld(src)
@@ -107,10 +108,11 @@
new /obj/item/weapon/storage/backpack/dufflebag/engineering(src)
new /obj/item/clothing/under/rank/engineer(src)
new /obj/item/clothing/shoes/workboots(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
// new /obj/item/weapon/cartridge/engineering(src)
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/tapeproj/engineering(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson/engine(src)
return
@@ -134,6 +136,7 @@
new /obj/item/weapon/storage/backpack/satchel_norm(src)
new /obj/item/weapon/storage/backpack/dufflebag/engineering(src)
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
new /obj/item/tapeproj/engineering(src)
new /obj/item/weapon/watertank/atmos(src)
new /obj/item/clothing/suit/fire/atmos(src)
new /obj/item/clothing/head/hardhat/atmos(src)
@@ -55,7 +55,7 @@
new /obj/item/device/radio/headset( src )
return
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob)
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W))
var/obj/item/weapon/card/id/I = W.GetID()
@@ -60,7 +60,7 @@
return 1
return 0
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(!src.opened && src.broken)
user << "<span class='notice'>The locker appears to be broken.</span>"

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