Merge branch 'master' of https://github.com/tgstation/-tg-station into newhosjumpsuit

Conflicts:
	code/game/objects/structures/crates_lockers/closets/secure/security.dm
	code/modules/clothing/under/jobs/security.dm
	code/modules/clothing/under/miscellaneous.dm
	code/modules/clothing/under/ties.dm
	icons/mob/head.dmi
	icons/mob/uniform.dmi
	icons/obj/clothing/hats.dmi
	icons/obj/clothing/uniforms.dmi
This commit is contained in:
Miauw
2015-01-07 14:59:24 +01:00
1091 changed files with 57356 additions and 80658 deletions
+27 -27
View File
@@ -79,7 +79,7 @@
healthcheck()
/obj/structure/alien/resin/ex_act(severity)
/obj/structure/alien/resin/ex_act(severity, target)
switch(severity)
if(1.0)
health -= 150
@@ -108,14 +108,12 @@
health -= tforce
healthcheck()
/obj/structure/alien/resin/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
health = 0
healthcheck()
/obj/structure/alien/resin/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
health = 0
healthcheck()
/obj/structure/alien/resin/attack_paw(mob/user)
return attack_hand(user)
@@ -211,16 +209,16 @@
new /obj/structure/alien/weeds(T, linked_node)
/obj/structure/alien/weeds/ex_act(severity)
/obj/structure/alien/weeds/ex_act(severity, target)
qdel(src)
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user)
user.changeNext_move(CLICK_CD_MELEE)
if(I.attack_verb.len)
visible_message("<span class='danger'>[src] has been [pick(I.attack_verb)] with [I] by [user].</span>")
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
else
visible_message("<span class='danger'>[src] has been attacked with [I] by [user]!</span>")
visible_message("<span class='danger'>[user] has attacked [src] with [I]!</span>")
var/damage = I.force / 4.0
if(istype(I, /obj/item/weapon/weldingtool))
@@ -253,16 +251,16 @@
var/turf/W = get_step(src, WEST)
if(!locate(/obj/structure/alien) in N.contents)
if(istype(N, /turf/simulated/floor))
src.overlays += image('icons/mob/alien.dmi', "weeds_side_s", layer=2.6, pixel_y = 32)
src.overlays += image('icons/mob/alien.dmi', "weeds_side_s", layer=2.11, pixel_y = 32)
if(!locate(/obj/structure/alien) in S.contents)
if(istype(S, /turf/simulated/floor))
src.overlays += image('icons/mob/alien.dmi', "weeds_side_n", layer=2.6, pixel_y = -32)
src.overlays += image('icons/mob/alien.dmi', "weeds_side_n", layer=2.11, pixel_y = -32)
if(!locate(/obj/structure/alien) in E.contents)
if(istype(E, /turf/simulated/floor))
src.overlays += image('icons/mob/alien.dmi', "weeds_side_w", layer=2.6, pixel_x = 32)
src.overlays += image('icons/mob/alien.dmi', "weeds_side_w", layer=2.11, pixel_x = 32)
if(!locate(/obj/structure/alien) in W.contents)
if(istype(W, /turf/simulated/floor))
src.overlays += image('icons/mob/alien.dmi', "weeds_side_e", layer=2.6, pixel_x = -32)
src.overlays += image('icons/mob/alien.dmi', "weeds_side_e", layer=2.11, pixel_x = -32)
/obj/structure/alien/weeds/proc/fullUpdateWeedOverlays()
@@ -373,9 +371,9 @@
/obj/structure/alien/egg/attackby(obj/item/I, mob/user)
if(I.attack_verb.len)
visible_message("<span class='danger'>[src] has been [pick(I.attack_verb)] with [I] by [user].</span>")
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
else
visible_message("<span class='danger'>[src] has been attacked with [I] by [user]!</span>")
visible_message("<span class='danger'>[user] has attacked [src] with [I]!</span>")
var/damage = I.force / 4
if(istype(I, /obj/item/weapon/weldingtool))
@@ -450,9 +448,9 @@
pixel_y = target.pixel_y
if(isturf(target)) //Turfs take twice as long to take down.
target_strength = 8
target_strength = 640
else
target_strength = 4
target_strength = 320
tick()
@@ -474,18 +472,20 @@
qdel(src)
return
loc = target.loc
x = target.x
y = target.y
z = target.z
switch(target_strength - ticks)
if(6)
if(480)
visible_message("<span class='warning'>[target] is holding up against the acid!</span>")
if(4)
if(320)
visible_message("<span class='warning'>[target] is being melted by the acid!</span>")
if(2)
if(160)
visible_message("<span class='warning'>[target] is struggling to withstand the acid!</span>")
if(0 to 1)
if(80)
visible_message("<span class='warning'>[target] begins to crumble under the acid!</span>")
spawn(rand(150, 200))
spawn(1)
if(src)
tick()
tick()
@@ -58,7 +58,7 @@
icon_state = "gibbl5"
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
/obj/effect/decal/cleanable/blood/gibs/ex_act(severity)
/obj/effect/decal/cleanable/blood/gibs/ex_act(severity, target)
return
/obj/effect/decal/cleanable/blood/gibs/remove_ex_blood()
@@ -174,8 +174,8 @@ obj/structure/sign/poster/New(serial,subtype)
name += " - D-Day Promotional Poster"
desc += " A promotional poster for some rapper."
if(28)
name += " - Stetchkin Pistol Advertisment"
desc += " A poster advertising Stetchkin pistols as being 'Classy as fuck'."
name += " - Syndicate Pistol Advertisment"
desc += " A poster advertising syndicate pistols as being 'Classy as fuck'."
if(29)
name += " - E-sword Rainbow"
desc += " All the colors of bloody murder rainbow."
@@ -314,7 +314,7 @@ obj/structure/sign/poster/attackby(obj/item/I, mob/user)
var/temp_loc = user.loc
switch(alert("Do I want to rip the poster from the wall?","You think...","Yes","No"))
if("Yes")
if(user.loc != temp_loc)
if( user.loc != temp_loc || ruined )
return
visible_message("<span class='warning'>[user] rips [src] in a single, decisive motion!</span>" )
playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1)
+1 -1
View File
@@ -2,5 +2,5 @@
name = "decal"
icon = 'icons/effects/effects.dmi'
/obj/effect/decal/ex_act(severity)
/obj/effect/decal/ex_act(severity, target)
qdel(src)
+20 -16
View File
@@ -365,8 +365,9 @@ steam.start() -- spawns the effect
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn ( 20 )
M.coughedtime = 0
spawn(20)
if(M && M.loc)
M.coughedtime = 0
return
@@ -389,8 +390,9 @@ steam.start() -- spawns the effect
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn ( 20 )
M.coughedtime = 0
spawn(20)
if(M && M.loc)
M.coughedtime = 0
return
/datum/effect/effect/system/bad_smoke_spread
@@ -602,8 +604,9 @@ steam.start() -- spawns the effect
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn ( 20 )
M.coughedtime = 0
spawn(20)
if(M && M.loc)
M.coughedtime = 0
return
/obj/effect/effect/sleep_smoke/Crossed(mob/living/carbon/M as mob )
@@ -618,8 +621,9 @@ steam.start() -- spawns the effect
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn ( 20 )
M.coughedtime = 0
spawn(20)
if(M && M.loc)
M.coughedtime = 0
return
/datum/effect/effect/system/sleep_smoke_spread
@@ -787,7 +791,7 @@ steam.start() -- spawns the effect
spawn(3 + metal*3)
process()
spawn(120)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
sleep(30)
if(metal)
@@ -940,7 +944,7 @@ steam.start() -- spawns the effect
icon_state = "ironfoam"
/obj/structure/foamedmetal/ex_act(severity)
/obj/structure/foamedmetal/ex_act(severity, target)
qdel(src)
/obj/structure/foamedmetal/blob_act()
@@ -962,16 +966,16 @@ steam.start() -- spawns the effect
qdel(src)
return
/obj/structure/foamedmetal/attack_hand(var/mob/user)
if ((HULK in user.mutations) || (prob(75 - metal*25)))
/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)
else
user << "<span class='notice'>You hit the metal foam but bounce off it.</span>"
return
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)
@@ -0,0 +1,70 @@
/obj/effect/expl_particles
name = "fire"
icon = 'icons/effects/effects.dmi'
icon_state = "explosion_particle"
opacity = 1
anchored = 1
mouse_opacity = 0
/obj/effect/expl_particles/New()
..()
spawn (15)
qdel(src)
return
/obj/effect/expl_particles/Move()
..()
return
/datum/effect/system/expl_particles
var/number = 10
var/turf/location
var/total_particles = 0
/datum/effect/system/expl_particles/proc/set_up(n = 10, loca)
number = n
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)
/datum/effect/system/expl_particles/proc/start()
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
var/obj/effect/expl_particles/expl = new /obj/effect/expl_particles(src.location)
var/direct = pick(alldirs)
for(i=0, i<pick(1;25,2;50,3,4;200), i++)
sleep(1)
step(expl,direct)
/obj/effect/explosion
name = "fire"
icon = 'icons/effects/96x96.dmi'
icon_state = "explosion"
opacity = 1
anchored = 1
mouse_opacity = 0
pixel_x = -32
pixel_y = -32
/obj/effect/explosion/New()
..()
spawn (10)
qdel(src)
return
/datum/effect/system/explosion
var/turf/location
/datum/effect/system/explosion/proc/set_up(loca)
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)
/datum/effect/system/explosion/proc/start()
new/obj/effect/explosion( location )
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
P.set_up(10,location)
P.start()
spawn(5)
var/datum/effect/effect/system/harmless_smoke_spread/S = new/datum/effect/effect/system/harmless_smoke_spread()
S.set_up(5,0,location,null)
S.start()
+2 -2
View File
@@ -24,10 +24,10 @@
/obj/effect/forcefield/mime/New()
..()
last_process = world.time
processing_objects.Add(src)
SSobj.processing.Add(src)
/obj/effect/forcefield/mime/process()
timeleft -= (world.time - last_process)
if(timeleft <= 0)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
qdel(src)
+1 -1
View File
@@ -117,7 +117,7 @@
endurance -= W.force
CheckEndurance()
/obj/effect/glowshroom/ex_act(severity)
/obj/effect/glowshroom/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
+1 -5
View File
@@ -13,10 +13,6 @@
landmarks_list += src
switch(name) //some of these are probably obsolete
if("shuttle")
shuttle_z = z
qdel(src)
return
if("monkey")
monkeystart += loc
qdel(src)
@@ -111,7 +107,7 @@
/obj/effect/landmark/costume/madscientist/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/suit/labcoat/mad(src.loc)
new /obj/item/clothing/suit/toggle/labcoat/mad(src.loc)
new /obj/item/clothing/glasses/gglasses(src.loc)
qdel(src)
+6 -6
View File
@@ -8,13 +8,11 @@
var/obj/item/target = null
var/creator = null
anchored = 1.0
var/precision = 1 // how close to the portal you will teleport. 0 = on the portal, 1 = adjacent
/obj/effect/portal/Bumped(mob/M as mob|obj)
src.teleport(M)
/obj/effect/portal/Crossed(AM as mob|obj)
src.teleport(AM)
/obj/effect/portal/New(loc, turf/target, creator, lifespan=300)
portals += src
src.loc = loc
@@ -32,6 +30,9 @@
if(istype(creator, /obj/item/weapon/hand_tele))
var/obj/item/weapon/hand_tele/O = creator
O.active_portals--
else if(istype(creator, /obj/item/weapon/gun/energy/wormhole_projector))
var/obj/item/weapon/gun/energy/wormhole_projector/P = creator
P.portal_destroyed(src)
return ..()
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
@@ -39,11 +40,10 @@
return
if(M.anchored&&istype(M, /obj/mecha))
return
if(icon_state == "portal1")
return
if (!( target ))
qdel(src)
return
if (istype(M, /atom/movable))
do_teleport(M, target, 1) ///You will appear adjacent to the beacon
do_teleport(M, target, precision) ///You will appear adjacent to the beacon
@@ -26,7 +26,7 @@
/obj/item/weapon/gun/projectile/automatic/pistol = 8,
/obj/item/weapon/gun/projectile/shotgun/combat = 5,
/obj/item/weapon/gun/projectile/revolver/mateba,
/obj/item/weapon/gun/projectile/automatic/deagle
/obj/item/weapon/gun/projectile/automatic/pistol/deagle
)
/obj/effect/spawner/lootdrop/maintenance
@@ -61,7 +61,7 @@
/obj/item/bodybag = 1,
/obj/item/clothing/glasses/meson = 2,
/obj/item/clothing/glasses/sunglasses = 1,
/obj/item/clothing/gloves/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/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/head/hardhat = 1,
/obj/item/clothing/head/hardhat/red = 1,
/obj/item/clothing/head/that{throwforce = 1; throwing = 1} = 1,
+43 -46
View File
@@ -8,7 +8,7 @@
var/health = 15
//similar to weeds, but only barfed out by nurses manually
/obj/effect/spider/ex_act(severity)
/obj/effect/spider/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
@@ -22,9 +22,9 @@
/obj/effect/spider/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.attack_verb.len)
visible_message("<span class='danger'>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]" : "")]!</span>")
visible_message("<span class='danger'>[user] has [pick(W.attack_verb)] \the [src] with \the [W]!</span>")
else
visible_message("<span class='danger'>\The [src] has been attacked with \the [W][(user ? " by [user]" : "")]!</span>")
visible_message("<span class='danger'>[user] has attacked \the [src] with \the [W]!</span>")
var/damage = W.force / 4.0
@@ -61,7 +61,7 @@
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover, /mob/living/simple_animal/hostile/giant_spider))
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
return 1
else if(istype(mover, /mob/living))
if(prob(50))
@@ -81,7 +81,7 @@
/obj/effect/spider/eggcluster/New()
pixel_x = rand(3,-3)
pixel_y = rand(3,-3)
processing_objects.Add(src)
SSobj.processing.Add(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)
processing_objects.Add(src)
SSobj.processing.Add(src)
/obj/effect/spider/spiderling/Bump(atom/user)
if(istype(user, /obj/structure/table))
@@ -132,43 +132,40 @@
entry_vent = null
else if(entry_vent)
if(get_dist(src, entry_vent) <= 1)
if(entry_vent.network && entry_vent.network.normal_members.len)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in entry_vent.network.normal_members)
vents.Add(temp_vent)
if(!vents.len)
entry_vent = null
return
var/obj/machinery/atmospherics/unary/vent_pump/exit_vent = pick(vents)
if(prob(50))
visible_message("<B>[src] scrambles into the ventillation ducts!</B>", \
"<span class='notice'>You hear something squeezing through the ventilation ducts.</span>")
spawn(rand(20,60))
loc = exit_vent
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
spawn(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
if(prob(50))
audible_message("<span class='notice'>You hear something squeezing through the ventilation ducts.</span>")
sleep(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
loc = exit_vent.loc
entry_vent = null
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
else
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in entry_vent.parent.other_atmosmch)
vents.Add(temp_vent)
if(!vents.len)
entry_vent = null
return
var/obj/machinery/atmospherics/unary/vent_pump/exit_vent = pick(vents)
if(prob(50))
visible_message("<B>[src] scrambles into the ventillation ducts!</B>", \
"<span class='notice'>You hear something squeezing through the ventilation ducts.</span>")
spawn(rand(20,60))
loc = exit_vent
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
spawn(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
if(prob(50))
audible_message("<span class='notice'>You hear something squeezing through the ventilation ducts.</span>")
sleep(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
loc = exit_vent.loc
entry_vent = null
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
//=================
else if(prob(33))
@@ -189,8 +186,8 @@
amount_grown += rand(0,2)
if(amount_grown >= 100)
if(!grow_as)
grow_as = pick(typesof(/mob/living/simple_animal/hostile/giant_spider))
var/mob/living/simple_animal/hostile/giant_spider/S = new grow_as(src.loc)
grow_as = pick(typesof(/mob/living/simple_animal/hostile/poison/giant_spider))
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
if(player_spiders)
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
var/client/C = null
@@ -213,9 +210,9 @@
var/mob/living/user = usr
var/breakout_time = 2
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
user.last_special = world.time + CLICK_CD_BREAKOUT
user << "<span class='notice'>You struggle against the tight bonds! (This will take about [breakout_time] minutes.)</span>"
visible_message("You see something struggling and writhing in the [src]!")
visible_message("You see something struggling and writhing in \the [src]!")
if(do_after(user,(breakout_time*60*10)))
if(!user || user.stat != CONSCIOUS || user.loc != src)
return
+30 -1
View File
@@ -3,6 +3,7 @@
/obj/effect/step_trigger
var/affect_ghosts = 0
var/stopper = 1 // stops throwers
var/mobs_only = 0
invisibility = 101 // nope cant see this shit
anchored = 1
@@ -15,10 +16,11 @@
return
if(istype(H, /mob/dead/observer) && !affect_ghosts)
return
if(!istype(H, /mob) && mobs_only)
return
Trigger(H)
/* Tosses things in a certain direction */
/obj/effect/step_trigger/thrower
@@ -114,3 +116,30 @@
A.x = rand(teleport_x, teleport_x_offset)
A.y = rand(teleport_y, teleport_y_offset)
A.z = rand(teleport_z, teleport_z_offset)
/* Simple sound player, Mapper friendly! */
/obj/effect/step_trigger/sound_effect
var/sound //eg. path to the sound, inside '' eg: 'growl.ogg'
var/volume = 100
var/freq_vary = 1 //Should the frequency of the sound vary?
var/extra_range = 0 // eg World.view = 7, extra_range = 1, 7+1 = 8, 8 turfs radius
var/happens_once = 0
var/triggerer_only = 0 //Whether the triggerer is the only person who hears this
/obj/effect/step_trigger/sound_effect/Trigger(var/atom/movable/A)
var/turf/T = get_turf(A)
if(!T)
return
if(triggerer_only)
A.playsound_local(T, sound, volume, freq_vary)
else
playsound(T, sound, volume, freq_vary, extra_range)
if(happens_once)
qdel(src)
+5 -47
View File
@@ -6,7 +6,6 @@
if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse
else return dy + (0.5*dx)
proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
if(Center==null) return
@@ -38,15 +37,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
flame_range = min (MAX_EX_FLAME_RANGE, flame_range)
spawn(0)
if(config.use_recursive_explosions)
devastation_range += 1 //Original code uses -1 as no explosion, this code uses 0 as no explosion and -1 would ruin everything
heavy_impact_range += 1
light_impact_range += 1
var/power = devastation_range * 3 + heavy_impact_range * 1.5 + light_impact_range * 0.75
//So max power is (3 * 4) + (1.5 * 8) + (0.75 * 15) = 36,25
explosion_rec(epicenter, power)
return
var/start = world.timeofday
if(!epicenter) return
@@ -82,13 +72,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
lighting_controller.processing = 0
// var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild
// if(defer_powernet_rebuild != 2)
// defer_powernet_rebuild = 1
//postpone light processing for a bit
SSlighting.postpone()
if(heavy_impact_range > 1)
var/datum/effect/system/explosion/E = new/datum/effect/system/explosion()
@@ -103,7 +88,6 @@ 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/hotspot_exists
if(dist < flame_range)
flame_dist = 1
@@ -117,29 +101,10 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
//------- TURF FIRES -------
if(T)
if(flame_dist && prob(40) && !istype(T, /turf/space))
if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density)
new/obj/effect/hotspot(T) //Mostly for ambience!
hotspot_exists = 1
if(dist)
if(T)
T.ex_act(dist)
//------- THINGS IN TURFS FIRES -------
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
var/atom/movable/AM = atom_movable
if(AM) //Something is inside T (We have already checked T exists above) - RR
if(flame_dist) //if it has flame distance, run this - RR
if(isliving(AM) && !hotspot_exists && !istype(T, /turf/space))
if(AM && AM.loc!=null)
new /obj/effect/hotspot(AM.loc)
//Just in case we missed a mob while they were in flame_range, but a hotspot didn't spawn on them, otherwise it looks weird when you just burst into flame out of nowhere
if(dist) //if no flame_dist, run this - RR
if(AM)
AM.ex_act(dist)
if(dist > 0)
T.ex_act(dist)
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
@@ -151,13 +116,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
if(Array)
Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took,orig_dev_range,orig_heavy_range,orig_light_range)
sleep(8)
if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
// if(!powernet_rebuild_was_deferred_already)
// if(defer_powernet_rebuild != 2)
// defer_powernet_rebuild = 0
return 1
-133
View File
@@ -1,133 +0,0 @@
/client/proc/kaboom()
set category = "Debug"
var/power = input(src, "power?", "power?") as num
var/turf/T = get_turf(src.mob)
explosion_rec(T, power)
/obj
var/explosion_resistance
var/list/explosion_turfs = list()
var/explosion_in_progress = 0
proc/explosion_rec(turf/epicenter, power)
var/loopbreak = 0
while(explosion_in_progress)
if(loopbreak >= 15) return
sleep(10)
loopbreak++
if(power <= 0) return
epicenter = get_turf(epicenter)
if(!epicenter) return
message_admins("Explosion with size ([power]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z])")
log_game("Explosion with size ([power]) in area [epicenter.loc.name] ")
playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(power*2,1) )
playsound(epicenter, "explosion", 100, 1, round(power,1) )
explosion_in_progress = 1
explosion_turfs = list()
explosion_turfs[epicenter] = power
//This steap handles the gathering of turfs which will be ex_act() -ed in the next step. It also ensures each turf gets the maximum possible amount of power dealt to it.
for(var/direction in cardinal)
var/turf/T = get_step(epicenter, direction)
T.explosion_spread(power - epicenter.explosion_resistance, direction)
//This step applies the ex_act effects for the explosion, as planned in the previous step.
for(var/turf/T in explosion_turfs)
if(explosion_turfs[T] <= 0) continue
if(!T) continue
//Wow severity looks confusing to calculate... Fret not, I didn't leave you with any additional instructions or help. (just kidding, see the line under the calculation)
var/severity = 4 - round(max(min( 3, ((explosion_turfs[T] - T.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1) //sanity effective power on tile divided by either 3 or one third the total explosion power
// One third because there are three power levels and I
// want each one to take up a third of the crater
var/x = T.x
var/y = T.y
var/z = T.z
T.ex_act(severity)
if(!T)
T = locate(x,y,z)
for(var/atom/A in T)
A.ex_act(severity)
explosion_in_progress = 0
/turf
var/explosion_resistance
/turf/space
explosion_resistance = 10
/turf/simulated/floor
explosion_resistance = 1
/turf/simulated/mineral
explosion_resistance = 2
/turf/simulated/shuttle/floor
explosion_resistance = 1
/turf/simulated/shuttle/floor4
explosion_resistance = 1
/turf/simulated/shuttle/plating
explosion_resistance = 1
/turf/simulated/shuttle/wall
explosion_resistance = 5
/turf/simulated/wall
explosion_resistance = 5
/turf/simulated/wall/r_wall
explosion_resistance = 15
//Code-wise, a safe value for power is something up to ~25 or ~30.. This does quite a bit of damage to the station.
//direction is the direction that the spread took to come to this tile. So it is pointing in the main blast direction - meaning where this tile should spread most of it's force.
/turf/proc/explosion_spread(power, direction)
if(power <= 0)
return
/*
sleep(2)
new/obj/effect/debugging/marker(src)
*/
if(explosion_turfs[src] >= power)
return //The turf already sustained and spread a power greated than what we are dealing with. No point spreading again.
explosion_turfs[src] = power
var/spread_power = power - src.explosion_resistance //This is the amount of power that will be spread to the tile in the direction of the blast
var/side_spread_power = power - 2 * src.explosion_resistance //This is the amount of power that will be spread to the side tiles
for(var/obj/O in src)
if(O.explosion_resistance)
spread_power -= O.explosion_resistance
side_spread_power -= O.explosion_resistance
var/turf/T = get_step(src, direction)
T.explosion_spread(spread_power, direction)
T = get_step(src, turn(direction,90))
T.explosion_spread(side_spread_power, turn(direction,90))
T = get_step(src, turn(direction,-90))
T.explosion_spread(side_spread_power, turn(direction,90))
/*
for(var/direction in cardinal)
var/turf/T = get_step(src, direction)
T.explosion_spread(spread_power)
*/
/turf/unsimulated/explosion_spread(power)
return //So it doesn't get to the parent proc, which simulates explosions
+20 -36
View File
@@ -42,6 +42,9 @@
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/list/species_exception = list() // even if a species cannot put items in a certain slot, if the species id is in the item's exception list, it will be able to wear that item
var/suittoggled = 0
var/hooded = 0
/obj/item/device
icon = 'icons/obj/device.dmi'
@@ -51,25 +54,15 @@
m.unEquip(src, 1)
return ..()
/obj/item/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if (prob(50))
qdel(src)
return
if(3.0)
if (prob(5))
qdel(src)
return
else
return
/obj/item/blob_act()
qdel(src)
/obj/item/ex_act(severity, target)
if(severity == 1 || target == src)
qdel(src)
if(!gc_destroyed)
contents_explosion(severity, target)
//user: The mob that is suiciding
//damagetype: The type of damage the item will inflict on the user
//BRUTELOSS = 1
@@ -126,7 +119,7 @@
if (istype(src.loc, /obj/item/weapon/storage))
//If the item is in a storage item, take it out
var/obj/item/weapon/storage/S = src.loc
S.remove_from_storage(src)
S.remove_from_storage(src, user.loc)
src.throwing = 0
if (loc == user)
@@ -221,9 +214,6 @@
/obj/item/proc/talk_into(mob/M as mob, text)
return
/obj/item/proc/moved(mob/user as mob, old_loc as turf)
return
/obj/item/proc/dropped(mob/user as mob)
..()
@@ -323,16 +313,9 @@
add_logs(user, M, "attacked", object="[src.name]", addition="(INTENT: [uppertext(user.a_intent)])")
src.add_fingerprint(user)
//if((CLUMSY in user.mutations) && prob(50))
// M = user
/*
M << "\red You stab yourself in the eye."
M.sdisabilities |= BLIND
M.weakened += 4
M.adjustBruteLoss(10)
*/
if(M != user)
M.visible_message("<span class='danger'>[M] has been stabbed in the eye with [src] by [user]!</span>", \
M.visible_message("<span class='danger'>[user] has stabbed [M] in the eye with [src]!</span>", \
"<span class='userdanger'>[user] stabs you in the eye with [src]!</span>")
else
user.visible_message( \
@@ -351,7 +334,7 @@
M.eye_stat += rand(2,4)
if (M.eye_stat >= 10)
M.eye_blurry += 15+(0.1*M.eye_blurry)
M.disabilities |= NEARSIGHTED
M.disabilities |= NEARSIGHT
if(M.stat != 2)
M << "<span class='danger'>Your eyes start to bleed profusely!</span>"
if(prob(50))
@@ -364,7 +347,7 @@
if (prob(M.eye_stat - 10 + 1))
if(M.stat != 2)
M << "<span class='danger'>You go blind!</span>"
M.sdisabilities |= BLIND
M.disabilities |= BLIND
return
/obj/item/clean_blood()
@@ -396,11 +379,12 @@
break
if(.)
var/turf/T = get_turf(src)
T.visible_message("<span class='danger'>[src] melts away!</span>")
var/obj/effect/decal/cleanable/molten_item/I = new (get_turf(src))
I.pixel_x = rand(1,16)
I.pixel_y = rand(1,16)
I.desc = "Looks like this was \an [src] some time ago."
if(T)
T.visible_message("<span class='danger'>[src] melts away!</span>")
var/obj/effect/decal/cleanable/molten_item/I = new (T)
I.pixel_x = rand(-16,16)
I.pixel_y = rand(-16,16)
I.desc = "Looks like this was \an [src] some time ago."
qdel(src)
else
for(var/armour_value in armor) //but is weakened
+3 -4
View File
@@ -57,7 +57,7 @@
. = ..()
var/area/A = get_area()
if(get_area_type() == AREA_STATION)
. += "<p>According to the [src], you are now in <b>\"[A.name]\"</b>.</p>"
. += "<p>According to \the [src], you are now in <b>\"[strip_html_properly(A.name)]\"</b>.</p>"
var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
popup.set_content(.)
popup.open()
@@ -82,7 +82,7 @@
. = ..()
var/area/A = get_area()
if(get_area_type() == AREA_STATION)
. += "<p>According to the [src], you are now in <b>\"[A.name]\"</b>.</p>"
. += "<p>According to \the [src], you are now in <b>\"[strip_html_properly(A.name)]\"</b>.</p>"
. += "<p>You may <a href='?src=\ref[src];edit_area=1'> move an amendment</a> to the drawing.</p>"
var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
popup.set_content(.)
@@ -116,7 +116,6 @@
/area/centcom,
/area/asteroid,
/area/tdome,
/area/syndicate_station,
/area/wizard_station,
/area/prison
)
@@ -262,4 +261,4 @@
if(BORDER_SPACE)
return ROOM_ERR_SPACE
found+=T
return found
return found
+1 -1
View File
@@ -54,7 +54,7 @@
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
SetLuminosity(CANDLE_LUMINOSITY)
processing_objects.Add(src)
SSobj.processing.Add(src)
/obj/item/candle/process()
+5
View File
@@ -28,6 +28,11 @@
colour = "#DA00FF"
colourName = "purple"
/obj/item/toy/crayon/white
icon_state = "crayonwhite"
colour = "#FFFFFF"
colourName = "white"
/obj/item/toy/crayon/mime
icon_state = "crayonmime"
desc = "A very sad-looking crayon."
+21 -10
View File
@@ -47,6 +47,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/chat_channel = "#ss13" //name of our current NTRC channel
var/nick = "" //our NTRC nick
var/list/ntrclog = list() //NTRC message log
var/new_ntrc_msg = 0
var/noreturn = 0 //whether the PDA can use the Return button, used for the aiPDA chatroom
@@ -161,6 +162,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/librarian
icon_state = "pda-library"
default_cartridge = /obj/item/weapon/cartridge/librarian
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
silent = 1 //Quiet in the library!
@@ -170,8 +172,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case."
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition!"
/obj/item/device/pda/chef
icon_state = "pda-chef"
/obj/item/device/pda/cook
icon_state = "pda-cook"
/obj/item/device/pda/bar
icon_state = "pda-bartender"
@@ -259,6 +261,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(active_uplink_check(user))
return
setup_chatrooms()
var/dat = "<html><head><title>Personal Data Assistant</title></head><body bgcolor=\"#808000\"><style>a, a:link, a:visited, a:active, a:hover { color: #000000; }img {border-style:none;}</style>"
dat += "<a href='byond://?src=\ref[src];choice=Close'><img src=pda_exit.png> Close</a>"
@@ -291,7 +295,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=pda_notes.png> Notekeeper</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=pda_mail.png> Messenger</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=5'><img src=pda_chatroom.png> Nanotrasen Relay Chat</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=5'><img src=pda_chatroom.png> Nanotrasen Relay Chat</a> ([new_ntrc_msg] unread)</li>"
if (cartridge)
if (cartridge.access_clown)
@@ -343,6 +347,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "<li><a href='byond://?src=\ref[src];choice=50'><img src=pda_cleanbot.png> Cleanbot Access</a></li>"
if (istype(cartridge.radio, /obj/item/radio/integrated/signal))
dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png> Signaler System</a></li>"
if (cartridge.access_newscaster)
dat += "<li><a href='byond://?src=\ref[src];choice=53'><img src=pda_notes.png> Newscaster Access </a></li>"
if (cartridge.access_reagent_scanner)
dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><img src=pda_reagent.png> [scanmode == 3 ? "Disable" : "Enable"] Reagent Scanner</a></li>"
if (cartridge.access_engine)
@@ -367,7 +373,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += note
if (2)
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.5</h4>"
dat += "<a href='byond://?src=\ref[src];choice=Toggle Ringer'><img src=pda_bell.png> Ringer: [silent == 1 ? "Off" : "On"]</a> | "
dat += "<a href='byond://?src=\ref[src];choice=Toggle Messenger'><img src=pda_mail.png> Send / Receive: [toff == 1 ? "Off" : "On"]</a> | "
dat += "<a href='byond://?src=\ref[src];choice=Ringtone'><img src=pda_bell.png> Set Ringtone</a> | "
@@ -403,7 +409,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "None detected.<br>"
if(21)
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.5</h4>"
dat += "<a href='byond://?src=\ref[src];choice=Clear'><img src=pda_blank.png> Clear Messages</a>"
dat += "<h4><img src=pda_mail.png> Messages</h4>"
@@ -441,10 +447,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "<br>"
if (5)
if(!nick) //first time join
nick = copytext(sanitize(owner), 1, 9)
var/datum/chatroom/C = chatchannels[chat_channel]
C.parse_msg(src, nick, "/join [chat_channel]")
new_ntrc_msg = 0
dat += "<h4><img src=pda_chatroom.png> SS13 Nanotrasen Relay Chat Network</h4>"
dat += "<a href='byond://?src=\ref[src];choice=Set Nick'>[nick]</a> | "
@@ -753,7 +756,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
id = null
/obj/item/device/pda/proc/msg_input(var/mob/living/U = usr)
var/t = input(U, "Please enter message", name, null) as text
var/t = input(U, "Please enter message", name, null) as null|text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
if (!t || toff)
return
@@ -1149,6 +1152,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
ntrclog[channel] = msg + ntrclog[channel]
if (findtext(message, nick) && !silent)
loc.audible_message("\icon[src] *[ttone]*", null, 3)
new_ntrc_msg++
/obj/item/device/pda/proc/setup_chatrooms() //this can't be done on New() because the messaging server needs to be instanced first
if(!nick) //first time using the PDA
//join the default chat channel
nick = copytext(sanitize(owner), 1, 9)
var/datum/chatroom/C = chatchannels[chat_channel]
C.parse_msg(src, nick, "/join [chat_channel]")
/proc/get_viewable_pdas()
. = list()
+67 -4
View File
@@ -17,6 +17,7 @@
var/access_janitor = 0
// var/access_flora = 0
var/access_reagent_scanner = 0
var/access_newscaster = 0
var/access_remote_door = 0 //Control some blast doors remotely!!
var/remote_door_id = ""
var/access_status_display = 0
@@ -32,6 +33,7 @@
var/message1 // used for status_displays
var/message2
var/list/stored_data = list()
var/current_channel
/obj/item/weapon/cartridge/engineering
name = "\improper Power-ON cartridge"
@@ -115,6 +117,12 @@
icon_state = "cart-mi"
access_mime = 1
var/mime_charges = 5
/obj/item/weapon/cartridge/librarian
name = "\improper Lib-Tweet cartridge"
icon_state = "cart-s"
access_newscaster = 1
/*
/obj/item/weapon/cartridge/botanist
name = "\improper Green Thumb v4.20 cartridge"
@@ -553,15 +561,29 @@ Code:
menu = "<h4><img src=pda_crate.png> Supply Record Interlink</h4>"
menu += "<BR><B>Supply shuttle</B><BR>"
menu += "Location: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Dock"]<BR>"
menu += "Current approved orders: <BR><ol>"
for(var/S in supply_shuttle.shoppinglist)
menu += "Location: "
switch(SSshuttle.supply.mode)
if(SHUTTLE_CALL)
menu += "Moving to "
if(SSshuttle.supply.z != ZLEVEL_STATION)
menu += "station"
else
menu += "centcomm"
menu += " ([SSshuttle.supply.timeLeft(600)] Mins)"
else
menu += "At "
if(SSshuttle.supply.z != ZLEVEL_STATION)
menu += "centcomm"
else
menu += "station"
menu += "<BR>Current approved orders: <BR><ol>"
for(var/S in SSshuttle.shoppinglist)
var/datum/supply_order/SO = S
menu += "<li>#[SO.ordernum] - [SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]</li>"
menu += "</ol>"
menu += "Current requests: <BR><ol>"
for(var/S in supply_shuttle.requestlist)
for(var/S in SSshuttle.requestlist)
var/datum/supply_order/SO = S
menu += "<li>#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]</li>"
menu += "</ol><font size=\"-3\">Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management."
@@ -700,6 +722,20 @@ Code:
var/obj/item/radio/integrated/medbot/SC = radio
bot_control(SC)
if (53) // Newscaster
menu = "<h4><img src=pda_notes.png> Newscaster Access</h4>"
menu += "<br> Current Newsfeed: <A href='byond://?src=\ref[src];choice=Newscaster Switch Channel'>[current_channel ? current_channel : "None"]</a> <br>"
var/datum/feed_channel/current
for(var/datum/feed_channel/chan in news_network.network_channels)
if (chan.channel_name == current_channel)
current = chan
if(!current)
menu += "<h5> ERROR : NO CHANNEL FOUND </h5>"
return
for(var/datum/feed_message/msg in current.messages)
menu +="-[msg.body] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[msg.author]</FONT>\]</FONT><BR>"
menu += "<br> <A href='byond://?src=\ref[src];choice=Newscaster Message'>Post Message</a>"
/obj/item/weapon/cartridge/Topic(href, href_list)
..()
@@ -762,5 +798,32 @@ Code:
loc:mode = 433
mode = 433
if("Newscaster Access")
mode = 53
if("Newscaster Message")
var/obj/item/device/pda/pda = loc
var/pda_owner_name = pda.id ? "[pda.id.registered_name] ([pda.id.assignment])" : "Unknown"
var/message = pda.msg_input()
var/datum/feed_channel/current
for(var/datum/feed_channel/chan in news_network.network_channels)
if (chan.channel_name == current_channel)
current = chan
if(current.locked && current.author != pda_owner_name)
pda.cart += "<h5> ERROR : NOT AUTHORIZED [pda.id ? "" : "- ID SLOT EMPTY"] </h5>"
pda.Topic(null,list("choice"="Refresh"))
return
news_network.SubmitArticle(message,pda.owner,current_channel)
pda.Topic(null,list("choice"=num2text(mode)))
return
if("Newscaster Switch Channel")
var/obj/item/device/pda/pda = loc
current_channel = pda.msg_input()
pda.Topic(null,list("choice"=num2text(mode)))
return
generate_menu()
print_to_host(menu)
+15 -4
View File
@@ -23,6 +23,11 @@
spawn(5)
add_to_radio(bot_filter)
/obj/item/radio/integrated/Destroy()
if(radio_controller)
radio_controller.remove_object(src, control_freq)
..()
/obj/item/radio/integrated/proc/post_signal(var/freq, var/key, var/value, var/key2, var/value2, var/key3, var/value3,var/key4, var/value4, s_filter)
//world << "Post: [freq]: [key]=[value], [key2]=[value2]"
@@ -55,10 +60,6 @@
return
/obj/item/radio/integrated/proc/generate_menu()
/obj/item/radio/integrated/receive_signal(datum/signal/signal)
/*var/obj/item/device/pda/P = src.loc
@@ -145,6 +146,11 @@
spawn(10)
post_signal(beacon_freq, "findbeacon", "delivery", s_filter = RADIO_NAVBEACONS)
/obj/item/radio/integrated/mule/Destroy()
if(radio_controller)
radio_controller.remove_object(src,beacon_freq)
..()
// receive radio signals
// can detect bot status signals
// and beacon locations
@@ -239,6 +245,11 @@
if(radio_controller)
initialize()
/obj/item/radio/integrated/signal/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
..()
/obj/item/radio/integrated/signal/initialize()
if (src.frequency < 1441 || src.frequency > 1489)
src.frequency = sanitize_frequency(src.frequency)
+3 -3
View File
@@ -1,5 +1,5 @@
/obj/item/device/aicard
name = "inteliCard"
name = "intelliCard"
desc = "A storage device for AIs. Patent pending."
icon = 'icons/obj/aicards.dmi'
icon_state = "aicard" // aicard-full
@@ -23,7 +23,7 @@
if (!in_range(src, user))
return
user.set_machine(src)
var/dat = "<TT><B>Intelicard</B><BR>"
var/dat = "<TT><B>Intellicard</B><BR>"
var/laws
for(var/mob/living/silicon/ai/A in src)
dat += "Stored AI: [A.name]<br>System integrity: [(A.health+100)/2]%<br>"
@@ -107,7 +107,7 @@
if ("Wireless")
for(var/mob/living/silicon/ai/A in src)
A.control_disabled = !A.control_disabled
A << "The intelicard's wireless port has been [A.control_disabled ? "disabled" : "enabled"]!"
A << "The intellicard's wireless port has been [A.control_disabled ? "disabled" : "enabled"]!"
if (A.control_disabled)
overlays -= image('icons/obj/aicards.dmi', "aicard-on")
else
@@ -42,7 +42,7 @@
/obj/item/device/camera_bug/New()
..()
processing_objects += src
SSobj.processing += src
/obj/item/device/camera_bug/Destroy()
if(expansion)
@@ -71,7 +71,7 @@
interact(user)
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
if (user.stat || loc != user || !user.canmove || user.blinded || !current)
if (user.stat || loc != user || !user.canmove || user.eye_blind || !current)
user.reset_view(null)
user.unset_machine()
return null
@@ -169,7 +169,7 @@
if(current && current.can_use())
var/list/seen = current.can_see()
var/list/names = list()
for(var/obj/machinery/singularity/S in seen) // god help you if you see more than one
for(var/obj/singularity/S in seen) // god help you if you see more than one
if(S.name in names)
names[S.name]++
dat += "[S.name] ([names[S.name]])"
@@ -45,7 +45,7 @@
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
qdel(active_dummy)
active_dummy = null
usr << "<span class='notice'>You deactivate the [src].</span>"
usr << "<span class='notice'>You deactivate \the [src].</span>"
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
flick("emppulse",T)
@@ -57,7 +57,7 @@
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
C.activate(O, usr, saved_icon, saved_icon_state, saved_overlays, saved_underlays, src)
qdel(O)
usr << "<span class='notice'>You activate the [src].</span>"
usr << "<span class='notice'>You activate \the [src].</span>"
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
flick("emppulse",T)
@@ -113,7 +113,7 @@
M << "<span class='danger'>Your chameleon-projector deactivates.</span>"
master.disrupt()
/obj/effect/dummy/chameleon/ex_act()
/obj/effect/dummy/chameleon/ex_act() //ok now THATS some serious protection against explosions right here
for(var/mob/M in src)
M << "<span class='danger'>Your chameleon-projector deactivates.</span>"
master.disrupt()
+16 -11
View File
@@ -2,7 +2,7 @@
name = "flash"
desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production."
icon_state = "flash"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
item_state = "flashtool"
throwforce = 0
w_class = 1
throw_speed = 3
@@ -15,10 +15,9 @@
var/last_used = 0 //last world.time it was used.
/obj/item/device/flash/proc/clown_check(mob/user)
if(user && (CLUMSY in user.mutations) && prob(50))
/obj/item/device/flash/proc/clown_check(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
flash_carbon(user, user, 15, 0)
user.visible_message("<span class='disarm'>[user] blinds [user] with the flash!</span>")
return 0
return 1
@@ -42,7 +41,7 @@
times_used = max(0, times_used) //sanity
/obj/item/device/flash/proc/try_use_flash(var/mob/user)
/obj/item/device/flash/proc/try_use_flash(var/mob/user = null)
flash_recharge(user)
if(broken)
@@ -58,15 +57,21 @@
return 1
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, convert = 1)
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
add_logs(user, M, "flashed", object="[src.name]")
var/safety = M:eyecheck()
var/safety = M.eyecheck()
if(safety <= 0)
M.confused += power
flick("e_flash", M.flash)
if(user && convert)
if(user && targeted)
terrible_conversion_proc(M, user)
M.Stun(1)
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
return 1
else
if(user && targeted)
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
return 0
/obj/item/device/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))
@@ -74,7 +79,6 @@
if(iscarbon(M))
flash_carbon(M, user, 5, 1)
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
return 1
else if(issilicon(M))
@@ -89,6 +93,7 @@
/obj/item/device/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
if(!try_use_flash(user))
return 0
user.visible_message("<span class='disarm'>[user]'s flash emits a blinding light!</span>")
for(var/mob/living/carbon/M in oviewers(3, null))
flash_carbon(M, user, 3, 0)
@@ -158,4 +163,4 @@
icon_state = "memorizer"
item_state = "nullrod"
/obj/item/device/flash/handheld //this is now the regular pocket flashes
/obj/item/device/flash/handheld //this is now the regular pocket flashes
+66 -19
View File
@@ -45,11 +45,11 @@
return 1
/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/device/flashlight/attack(mob/living/carbon/human/M as mob, mob/living/carbon/human/user as mob)
add_fingerprint(user)
if(on && user.zone_sel.selecting == "eyes")
if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
if((user.disabilities & CLUMSY || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
if(!user.IsAdvancedToolUser())
@@ -62,7 +62,7 @@
return
if(M == user) //they're using it on themselves
if(!M.blinded)
if(!M.eye_blind)
flick("flash", M.flash)
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
@@ -75,12 +75,12 @@
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) //robots and aliens are unaffected
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
if(M.stat == DEAD || M.disabilities & BLIND) //mob is dead or fully blind
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
else if(XRAY in M.mutations) //mob has X-RAY vision
else if(M.dna.check_mutation(XRAY)) //mob has X-RAY vision
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
else //they're okay!
if(!M.blinded)
if(!M.eye_blind)
flick("flash", M.flash) //flash the affected mob
user << "<span class='notice'>[M]'s pupils narrow.</span>"
else
@@ -101,12 +101,45 @@
/obj/item/device/flashlight/pen
name = "penlight"
desc = "A pen-sized light, used by medical staff."
desc = "A pen-sized light, used by medical staff. It can also be used to create a hologram to alert people of incoming medical assistance."
icon_state = "penlight"
item_state = ""
flags = CONDUCT
brightness_on = 2
var/holo_cooldown = 0
/obj/item/device/flashlight/pen/afterattack(atom/target, mob/user, proximity_flag)
if(!proximity_flag)
if(holo_cooldown)
user << "<span class='warning'>[src] is not ready yet.</span>"
return
var/T = get_turf(target)
if(locate(/mob/living) in T)
CreateHolo(T, user)
return
..()
/obj/item/device/flashlight/pen/proc/CreateHolo(var/tturf,var/creator)
var/obj/effect/medical_holosign/M = new /obj/effect/medical_holosign(tturf)
M.visible_message("<span class='danger'>[creator] created a medical hologram!</span>")
holo_cooldown = 1
spawn(100)
holo_cooldown = 0
return
/obj/effect/medical_holosign
name = "medical holosign"
desc = "A small holographic barrier that indicates a medic is coming to treat a patient."
icon = 'icons/effects/effects.dmi'
icon_state = "medi_holo"
layer = 4.1
mouse_opacity = 0
/obj/effect/medical_holosign/New()
playsound(loc, 'sound/machines/ping.ogg', 50, 0)
spawn(30)
qdel(src)
return
/obj/item/device/flashlight/seclite
name = "seclite"
@@ -136,7 +169,7 @@
desc = "A classic green-shaded desk lamp."
icon_state = "lampgreen"
item_state = "lampgreen"
brightness_on = 5
/obj/item/device/flashlight/lamp/verb/toggle_light()
@@ -147,6 +180,13 @@
if(!usr.stat)
attack_self(usr)
//Bananalamp
obj/item/device/flashlight/lamp/bananalamp
name = "banana lamp"
desc = "Only a clown would think to make a ghetto banana-shaped lamp. Even has a goofy pullstring."
icon_state = "bananalamp"
item_state = "bananalamp"
// FLARES
/obj/item/device/flashlight/flare
@@ -173,19 +213,26 @@
if(!fuel || !on)
turn_off()
if(!fuel)
src.icon_state = "[initial(icon_state)]-empty"
processing_objects -= src
icon_state = "[initial(icon_state)]-empty"
SSobj.processing -= src
/obj/item/device/flashlight/flare/proc/turn_off()
on = 0
src.force = initial(src.force)
src.damtype = initial(src.damtype)
force = initial(src.force)
damtype = initial(src.damtype)
if(ismob(loc))
var/mob/U = loc
update_brightness(U)
else
update_brightness(null)
/obj/item/device/flashlight/flare/update_brightness(var/mob/user = null)
..()
if(on)
item_state = "[initial(item_state)]-on"
else
item_state = "[initial(item_state)]"
/obj/item/device/flashlight/flare/attack_self(mob/user)
// Usual checks
@@ -198,10 +245,10 @@
. = ..()
// All good, turn it on.
if(.)
user.visible_message("<span class='notice'>[user] lights the [src].</span>", "<span class='notice'>You light the [src]!</span>")
src.force = on_damage
src.damtype = "fire"
processing_objects += src
user.visible_message("<span class='notice'>[user] lights \the [src].</span>", "<span class='notice'>You light \the [src]!</span>")
force = on_damage
damtype = "fire"
SSobj.processing += src
/obj/item/device/flashlight/flare/torch
name = "torch"
@@ -209,7 +256,7 @@
w_class = 4
brightness_on = 7
icon_state = "torch"
item_state = "torch_off"
item_state = "torch"
on_damage = 10
@@ -236,10 +283,10 @@
/obj/item/device/flashlight/emp/New()
..()
processing_objects.Add(src)
SSobj.processing.Add(src)
/obj/item/device/flashlight/emp/Destroy()
processing_objects.Remove(src)
SSobj.processing.Remove(src)
..()
/obj/item/device/flashlight/emp/process()
@@ -57,7 +57,7 @@
else if(istype(W, /obj/item/weapon/screwdriver))
if(diode)
user << "<span class='notice'>You remove the [diode.name] from the [src].</span>"
user << "<span class='notice'>You remove the [diode.name] from \the [src].</span>"
diode.loc = get_turf(src.loc)
diode = null
return
@@ -78,12 +78,9 @@
if (!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
if(user.has_mutation(HULK))
user << "<span class='warning'>Your meaty finger is too large for the button!</span>"
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.dna && NOGUNS in H.dna.species.specflags)
if(H.dna && (H.dna.check_mutation(HULK) || NOGUNS in H.dna.species.specflags))
user << "<span class='warning'>Your fingers can't press the button!</span>"
return
@@ -109,7 +106,7 @@
//eye target check
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
var/eye_prot = C.eyecheck()
if(C.blinded || eye_prot >= 2)
if(C.eye_blind || eye_prot >= 2)
eye_prot = 4
var/severity = 3 - eye_prot
if(prob(33))
@@ -189,7 +186,7 @@
if(energy <= max_energy)
if(!recharging)
recharging = 1
processing_objects.Add(src)
SSobj.processing.Add(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
@@ -71,14 +71,11 @@
user << "It has [uses] light\s remaining."
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/emag) && emagged == 0)
Emag()
return
if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = W
if(uses >= max_uses)
user << "span class='warning'>[src.name] is full."
user << "<span class='warning'>[src.name] is full.</span>"
return
else if(G.use(decrement))
AddUses(increment)
@@ -100,6 +97,9 @@
user << "You need a working light."
return
/obj/item/device/lightreplacer/emag_act()
if(!emagged)
Emag()
/obj/item/device/lightreplacer/attack_self(mob/user)
/* // This would probably be a bit OP. If you want it though, uncomment the code.
@@ -137,7 +137,7 @@
if(target.status != LIGHT_OK)
if(CanUse(U))
if(!Use(U)) return
U << "<span class='notice'>You replace the [target.fitting] with the [src].</span>"
U << "<span class='notice'>You replace the [target.fitting] with \the [src].</span>"
if(target.status != LIGHT_EMPTY)
+2 -2
View File
@@ -28,11 +28,11 @@
/obj/item/device/multitool/ai_detect/New()
..()
processing_objects += src
SSobj.processing += src
/obj/item/device/multitool/ai_detect/Destroy()
processing_objects -= src
SSobj.processing -= src
..()
/obj/item/device/multitool/ai_detect/process()
@@ -29,37 +29,9 @@
var/obj/machinery/atmospherics/pipe/P = A
P.color = modes[mode]
P.pipe_color = modes[mode]
P.stored.color = modes[mode]
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
//P.update_icon()
if(istype(A,/obj/machinery/atmospherics/pipe/simple))
var/obj/machinery/atmospherics/pipe/simple/pipe = A
if(pipe.node1)
pipe.node1.update_icon()
if(pipe.node2)
pipe.node2.update_icon()
else if(istype(A,/obj/machinery/atmospherics/pipe/manifold))
var/obj/machinery/atmospherics/pipe/manifold/pipe = A
if(pipe.node1)
pipe.node1.update_icon()
if(pipe.node2)
pipe.node2.update_icon()
if(pipe.node3)
pipe.node3.update_icon()
else if(istype(A,/obj/machinery/atmospherics/pipe/manifold4w))
var/obj/machinery/atmospherics/pipe/manifold4w/pipe = A
if(pipe.node1)
pipe.node1.update_icon()
if(pipe.node2)
pipe.node2.update_icon()
if(pipe.node3)
pipe.node3.update_icon()
if(pipe.node4)
pipe.node4.update_icon()
P.update_node_icon() //updates the neighbors
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?","Pipe painter") in modes
+4 -4
View File
@@ -34,20 +34,20 @@
if(DISCONNECTED)
attached = null
if(mode == OPERATING)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
anchored = 0
if(CLAMPED_OFF)
if(!attached)
return
if(mode == OPERATING)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
anchored = 1
if(OPERATING)
if(!attached)
return
processing_objects.Add(src)
SSobj.processing.Add(src)
anchored = 1
mode = value
@@ -140,6 +140,6 @@
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
if(power_drained >= max_power)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
explosion(src.loc, 3,6,9,12)
qdel(src)
@@ -15,12 +15,14 @@
var/shock_cooldown = 0
/obj/item/device/electropack/initialize()
radio_controller.add_object(src, frequency, RADIO_CHAT)
/obj/item/device/electropack/New()
if(radio_controller)
radio_controller.add_object(src, frequency, RADIO_CHAT)
/obj/item/device/electropack/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
..()
/obj/item/device/electropack/attack_hand(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
@@ -22,6 +22,8 @@
syndie = 1//Signifies that it de-crypts Syndicate transmissions
/obj/item/device/encryptionkey/binary
name = "binary translator key"
desc = "An encryption key for a radio headset. To access the binary channel, use :b."
icon_state = "cypherkey"
translate_binary = 1
origin_tech = "syndicate=3"
@@ -1,6 +1,6 @@
/obj/item/device/radio/headset
name = "radio headset"
desc = "An updated, modular intercom that fits over the head. Takes encryption keys"
desc = "An updated, modular intercom that fits over the head. Takes encryption keys. \nTo speak on the general radio frequency, use ; before speaking."
icon_state = "headset"
item_state = "headset"
g_amt = 0
@@ -9,21 +9,17 @@
canhear_range = 0 // can't hear headsets from very far away
slot_flags = SLOT_EARS
var/translate_binary = 0
var/translate_hive = 0
var/obj/item/device/encryptionkey/keyslot1 = null
var/obj/item/device/encryptionkey/keyslot2 = null
maxf = 1489
/obj/item/device/radio/headset/New()
..()
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
/obj/item/device/radio/headset/Destroy()
qdel(keyslot1)
qdel(keyslot)
qdel(keyslot2)
keyslot1 = null
keyslot = null
keyslot2 = null
..()
@@ -41,153 +37,161 @@
return ..(freq, level)
return -1
/obj/item/device/radio/headset/syndicate
/obj/item/device/radio/headset/syndicate //disguised to look like a normal headset for stealth ops
origin_tech = "syndicate=3"
/obj/item/device/radio/headset/syndicate/alt //undisguised bowman with flash protection
name = "syndicate headset"
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs. \nTo access the syndicate channel, use ; before speaking."
flags = EARBANGPROTECT
origin_tech = "syndicate=3"
icon_state = "syndie_headset"
item_state = "syndie_headset"
/obj/item/device/radio/headset/syndicate/New()
..()
qdel(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/syndicate
syndie = 1
recalculateChannels()
make_syndie()
/obj/item/device/radio/headset/binary
origin_tech = "syndicate=3"
/obj/item/device/radio/headset/binary/New()
..()
qdel(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/binary
qdel(keyslot)
keyslot = new /obj/item/device/encryptionkey/binary
recalculateChannels()
/obj/item/device/radio/headset/headset_sec
name = "security radio headset"
desc = "This is used by your elite security force. To access the security channel, use :s."
desc = "This is used by your elite security force. \nTo access the security channel, use :s."
icon_state = "sec_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_sec
keyslot = new /obj/item/device/encryptionkey/headset_sec
/obj/item/device/radio/headset/headset_sec/alt
name = "security bowman headset"
desc = "This is used by your elite security force. Protects ears from flashbangs. \nTo access the security channel, use :s."
flags = EARBANGPROTECT
icon_state = "sec_headset_alt"
item_state = "sec_headset_alt"
/obj/item/device/radio/headset/headset_eng
name = "engineering radio headset"
desc = "When the engineers wish to chat like girls. To access the engineering channel, use :e. "
desc = "When the engineers wish to chat like girls. \nTo access the engineering channel, use :e. "
icon_state = "eng_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_eng
keyslot = new /obj/item/device/encryptionkey/headset_eng
/obj/item/device/radio/headset/headset_rob
name = "robotics radio headset"
desc = "Made specifically for the roboticists, who cannot decide between departments. To access the engineering channel, use :e. For research, use :n."
desc = "Made specifically for the roboticists, who cannot decide between departments. \nTo access the engineering channel, use :e. For research, use :n."
icon_state = "rob_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_rob
keyslot = new /obj/item/device/encryptionkey/headset_rob
/obj/item/device/radio/headset/headset_med
name = "medical radio headset"
desc = "A headset for the trained staff of the medbay. To access the medical channel, use :m."
desc = "A headset for the trained staff of the medbay. \nTo access the medical channel, use :m."
icon_state = "med_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_med
keyslot = new /obj/item/device/encryptionkey/headset_med
/obj/item/device/radio/headset/headset_sci
name = "science radio headset"
desc = "A sciency headset. Like usual. To access the science channel, use :n."
desc = "A sciency headset. Like usual. \nTo access the science channel, use :n."
icon_state = "sci_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_sci
keyslot = new /obj/item/device/encryptionkey/headset_sci
/obj/item/device/radio/headset/headset_medsci
name = "medical research radio headset"
desc = "A headset that is a result of the mating between medical and science. To access the medical channel, use :m. For science, use :n."
desc = "A headset that is a result of the mating between medical and science. \nTo access the medical channel, use :m. For science, use :n."
icon_state = "medsci_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_medsci
keyslot = new /obj/item/device/encryptionkey/headset_medsci
/obj/item/device/radio/headset/headset_com
name = "command radio headset"
desc = "A headset with a commanding channel. To access the command channel, use :c."
desc = "A headset with a commanding channel. \nTo access the command channel, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_com
keyslot = new /obj/item/device/encryptionkey/headset_com
/obj/item/device/radio/headset/heads/captain
name = "\proper the captain's headset"
desc = "The headset of the king. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
desc = "The headset of the king. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
keyslot = new /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/heads/captain/alt
name = "\proper the captain's bowman headset"
desc = "The headset of the boss. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
desc = "The headset of the boss. Protects ears from flashbangs. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/rd
name = "\proper the research director's headset"
desc = "Headset of the fellow who keeps society marching towards technological singularity. To access the science channel, use :n. For command, use :c."
desc = "Headset of the fellow who keeps society marching towards technological singularity. \nTo access the science channel, use :n. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/rd
keyslot = new /obj/item/device/encryptionkey/heads/rd
/obj/item/device/radio/headset/heads/hos
name = "\proper the head of security's headset"
desc = "The headset of the man in charge of keeping order and protecting the station. To access the security channel, use :s. For command, use :c."
desc = "The headset of the man in charge of keeping order and protecting the station. \nTo access the security channel, use :s. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hos
keyslot = new /obj/item/device/encryptionkey/heads/hos
/obj/item/device/radio/headset/heads/hos/alt
name = "\proper the head of security's bowman headset"
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs. \nTo access the security channel, use :s. For command, use :c."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/heads/ce
name = "\proper the chief engineer's headset"
desc = "The headset of the guy in charge of keeping the station powered and undamaged. To access the engineering channel, use :e. For command, use :c."
desc = "The headset of the guy in charge of keeping the station powered and undamaged. \nTo access the engineering channel, use :e. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/ce
keyslot = new /obj/item/device/encryptionkey/heads/ce
/obj/item/device/radio/headset/heads/cmo
name = "\proper the chief medical officer's headset"
desc = "The headset of the highly trained medical chief. To access the medical channel, use :m. For command, use :c."
desc = "The headset of the highly trained medical chief. \nTo access the medical channel, use :m. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/cmo
keyslot = new /obj/item/device/encryptionkey/heads/cmo
/obj/item/device/radio/headset/heads/hop
name = "\proper the head of personnel's headset"
desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :v - service, :c - command."
desc = "The headset of the guy who will one day be captain. \nChannels are as follows: :u - supply, :v - service, :c - command."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hop
keyslot = new /obj/item/device/encryptionkey/heads/hop
/obj/item/device/radio/headset/headset_cargo
name = "supply radio headset"
desc = "A headset used by the QM and his slaves. To access the supply channel, use :u."
desc = "A headset used by the QM and his slaves. \nTo access the supply channel, use :u."
icon_state = "cargo_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_cargo
keyslot = new /obj/item/device/encryptionkey/headset_cargo
/obj/item/device/radio/headset/headset_srv
name = "service radio headset"
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean. To access the service channel, use :v."
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean. \nTo access the service channel, use :v."
icon_state = "srv_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_service
keyslot = new /obj/item/device/encryptionkey/headset_service
/obj/item/device/radio/headset/headset_cent
name = "\improper Centcom headset"
desc = "A headset used by the upper echelons of Nanotrasen. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
desc = "A headset used by the upper echelons of Nanotrasen. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
icon_state = "cent_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
keyslot = new /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/ai
name = "\proper Integrated Subspace Transceiver "
@@ -203,7 +207,7 @@
return
if(istype(W, /obj/item/weapon/screwdriver))
if(keyslot1 || keyslot2)
if(keyslot || keyslot2)
for(var/ch_name in channels)
@@ -211,11 +215,11 @@
secure_radio_connections[ch_name] = null
if(keyslot1)
if(keyslot)
var/turf/T = get_turf(user)
if(T)
keyslot1.loc = T
keyslot1 = null
keyslot.loc = T
keyslot = null
@@ -229,17 +233,17 @@
user << "You pop out the encryption keys in the headset!"
else
user << "This headset doesn't have any encryption keys! How useless..."
user << "This headset doesn't have any unique encryption keys! How useless..."
if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot1 && keyslot2)
if(keyslot && keyslot2)
user << "The headset can't hold another key!"
return
if(!keyslot1)
if(!keyslot)
user.drop_item()
W.loc = src
keyslot1 = W
keyslot = W
else
user.drop_item()
@@ -252,28 +256,8 @@
return
/obj/item/device/radio/headset/proc/recalculateChannels()
src.channels = list()
src.translate_binary = 0
src.translate_hive = 0
src.syndie = 0
if(keyslot1)
for(var/ch_name in keyslot1.channels)
if(ch_name in src.channels)
continue
src.channels += ch_name
src.channels[ch_name] = keyslot1.channels[ch_name]
if(keyslot1.translate_binary)
src.translate_binary = 1
if(keyslot1.translate_hive)
src.translate_hive = 1
if(keyslot1.syndie)
src.syndie = 1
/obj/item/device/radio/headset/recalculateChannels()
..()
if(keyslot2)
for(var/ch_name in keyslot2.channels)
if(ch_name in src.channels)
@@ -292,15 +276,6 @@
for(var/ch_name in channels)
//this is the most hilarious piece of code i have seen this week, so im not going to remove it
/*
if(!radio_controller)
sleep(30) // Waiting for the radio_controller to be created.
if(!radio_controller)
src.name = "broken radio headset"
return
*/
secure_radio_connections[ch_name] = add_radio(src, radiochannels[ch_name])
return
@@ -12,10 +12,10 @@
/obj/item/device/radio/intercom/New()
..()
processing_objects += src
SSobj.processing += src
/obj/item/device/radio/intercom/Destroy()
processing_objects -= src
SSobj.processing -= src
..()
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
+35 -27
View File
@@ -16,8 +16,11 @@
var/b_stat = 0
var/broadcasting = 0
var/listening = 1
var/translate_binary = 0
var/translate_hive = 0
var/freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
var/obj/item/device/encryptionkey/keyslot //To allow the radio to accept encryption keys.
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/maxf = 1499
@@ -49,6 +52,38 @@
if(radio_controller)
initialize()
/obj/item/device/radio/proc/recalculateChannels()
channels = list()
translate_binary = 0
translate_hive = 0
syndie = 0
if(keyslot)
for(var/ch_name in keyslot.channels)
if(ch_name in src.channels)
continue
channels += ch_name
channels[ch_name] = keyslot.channels[ch_name]
if(keyslot.translate_binary)
translate_binary = 1
if(keyslot.translate_hive)
translate_hive = 1
if(keyslot.syndie)
syndie = 1
for(var/ch_name in channels)
secure_radio_connections[ch_name] = add_radio(src, radiochannels[ch_name])
/obj/item/device/radio/proc/make_syndie() //Turns normal radios into Syndicate radios!
qdel(keyslot)
keyslot = new /obj/item/device/encryptionkey/syndicate
syndie = 1
recalculateChannels()
/obj/item/device/radio/Destroy()
qdel(wires)
wires = null
@@ -493,7 +528,6 @@
//Giving borgs their own radio to have some more room to work with -Sieve
/obj/item/device/radio/borg
var/obj/item/device/encryptionkey/keyslot = null//Borg radios can handle a single encryption key
/obj/item/device/radio/borg/syndicate
syndie = 1
@@ -543,32 +577,6 @@
return
/obj/item/device/radio/borg/proc/recalculateChannels()
src.channels = list()
src.syndie = 0
if(keyslot)
for(var/ch_name in keyslot.channels)
if(ch_name in src.channels)
continue
src.channels += ch_name
src.channels[ch_name] = keyslot.channels[ch_name]
if(keyslot.syndie)
src.syndie = 1
for (var/ch_name in channels)
if(!radio_controller)
sleep(30) // Waiting for the radio_controller to be created.
if(!radio_controller)
src.name = "broken radio"
return
secure_radio_connections[ch_name] = add_radio(src, radiochannels[ch_name])
return
/obj/item/device/radio/borg/Topic(href, href_list)
if(usr.stat || !on)
return
+3 -3
View File
@@ -21,8 +21,8 @@
user << "<span class='info'>\icon[src]Error: Device out of range of station communication arrays.</span>"
return
if(emergency_shuttle.location==0)
if (emergency_shuttle.online)
switch(SSshuttle.emergency.mode)
if(SHUTTLE_CALL)
recalling = 1
loc << "<span class='info'>\icon[src]Generating shuttle recall order with codes retrieved from last call signal...</span>"
sleep(rand(10,30))
@@ -33,7 +33,7 @@
recalling = 0
log_game("[key_name(user)] has recalled the shuttle with a recaller.")
message_admins("[key_name_admin(user)] has recalled the shuttle with a recaller.", 1)
if(!cancel_call_proc(user))
if(!SSshuttle.cancelEvac(user))
loc << "<span class='info'>\icon[src]No response recieved. Emergency shuttle cannot be recalled at this time.</span>"
return
+4 -4
View File
@@ -25,12 +25,12 @@ MASS SPECTROMETER
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
if(on)
processing_objects.Add(src)
SSobj.processing.Add(src)
/obj/item/device/t_scanner/process()
if(!on)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
return null
scan()
@@ -77,10 +77,10 @@ MASS SPECTROMETER
origin_tech = "magnets=1;biotech=1"
var/mode = 1;
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/carbon/human/user as mob)
// Clumsiness/brain damage check
if ((CLUMSY in user.mutations || user.getBrainLoss() >= 60) && prob(50))
if ((user.disabilities & CLUMSY || user.getBrainLoss() >= 60) && prob(50))
user << "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>"
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
user.show_message("<span class='notice'>Analyzing Results for The floor:\n\t Overall Status: Healthy", 1)
@@ -0,0 +1,11 @@
/obj/item/device/sensor_device
name = "handheld crew monitor" //Thanks to Gun Hog for the name!
desc = "A miniature machine that tracks suit sensors across the station."
icon = 'icons/obj/device.dmi'
icon_state = "scanner"
w_class = 2.0
slot_flags = SLOT_BELT
origin_tech = "programming=3;materials=3;magnets=3"
/obj/item/device/sensor_device/attack_self(mob/user as mob)
crewmonitor(user,src) //Proc already exists, just had to call it
@@ -88,8 +88,8 @@ effective or pretty fucking useless.
/obj/item/device/rad_laser/attack(mob/living/M as mob, mob/living/user as mob)
if(!used)
..()
user.visible_message(text("<span class='notice'>[] has analyzed []'s vitals.</span>", user, M))
add_logs(user, M, "irradiated", object="[src.name]")
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
var/cooldown = round(max(100,(((intensity*8)-(wavelength/2))+(intensity*2))*10))
used = 1
icon_state = "health1"
@@ -100,7 +100,7 @@ effective or pretty fucking useless.
M.apply_effect(round(intensity/1.5), PARALYZE)
M.apply_effect(intensity*10, IRRADIATE)
else
user << "<span class='danger'>The radioactive microlaser is still recharging.</span>"
user << "<span class='warning'>The radioactive microlaser is still recharging.</span>"
/obj/item/device/rad_laser/proc/handle_cooldown(var/cooldown)
spawn(cooldown)
@@ -10,8 +10,6 @@
var/valve_open = 0
var/toggle = 1
/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D)
/obj/item/device/transfer_valve/IsAssemblyHolder()
return 1
@@ -44,7 +42,7 @@
user << "<span class='notice'>The device is secured.</span>"
return
if(attached_device)
user << "<span class='warning'>There is already an device attached to the valve, remove it first.</span>"
user << "<span class='warning'>There is already a device attached to the valve, remove it first.</span>"
return
user.remove_from_mob(item)
attached_device = A
@@ -114,7 +112,7 @@
return
return
/obj/item/device/transfer_valve/process_activation(var/obj/item/device/D)
/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D)
if(toggle)
toggle = 0
toggle_valve()
+17 -6
View File
@@ -11,22 +11,29 @@
var/state
var/datum/gas_mixture/air_contents = null
/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank)
/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank, mob/user as mob)
if (icon_state == "latexballon_bursted")
return
src.air_contents = tank.remove_air_volume(3)
icon_state = "latexballon_blow"
item_state = "latexballon"
user.update_inv_r_hand()
user.update_inv_l_hand()
user << "<span class='notice'> You blow up [src] with [tank].</span>"
air_contents = tank.remove_air_volume(3)
/obj/item/latexballon/proc/burst()
if (!air_contents)
if (!air_contents || icon_state != "latexballon_blow")
return
playsound(src, 'sound/weapons/Gunshot.ogg', 100, 1)
icon_state = "latexballon_bursted"
item_state = "lgloves"
if(istype(src.loc, /mob/living))
var/mob/living/user = src.loc
user.update_inv_r_hand()
user.update_inv_l_hand()
loc.assume_air(air_contents)
/obj/item/latexballon/ex_act(severity)
/obj/item/latexballon/ex_act(severity, target)
burst()
switch(severity)
if (1)
@@ -44,5 +51,9 @@
return
/obj/item/latexballon/attackby(obj/item/W as obj, mob/user as mob)
if (is_sharp(W))
burst()
if(istype(W, /obj/item/weapon/tank))
var/obj/item/weapon/tank/T = W
blow(T, user)
return
if (is_sharp(W) || is_hot(W))
burst()
@@ -5,43 +5,31 @@
icon_state = "blank"
flags = CONDUCT
slot_flags = SLOT_BELT
var/construction_time = 100
var/list/construction_cost = list("metal"=20000,"glass"=5000)
/obj/item/robot_parts/l_arm
name = "cyborg left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
construction_time = 200
construction_cost = list("metal"=10000)
/obj/item/robot_parts/r_arm
name = "cyborg right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
construction_time = 200
construction_cost = list("metal"=10000)
/obj/item/robot_parts/l_leg
name = "cyborg left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
construction_time = 200
construction_cost = list("metal"=10000)
/obj/item/robot_parts/r_leg
name = "cyborg right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
construction_time = 200
construction_cost = list("metal"=10000)
/obj/item/robot_parts/chest
name = "cyborg torso"
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
icon_state = "chest"
construction_time = 350
construction_cost = list("metal"=40000)
var/wires = 0.0
var/obj/item/weapon/stock_parts/cell/cell = null
@@ -49,8 +37,6 @@
name = "cyborg head"
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
icon_state = "head"
construction_time = 350
construction_cost = list("metal"=5000)
var/obj/item/device/flash/handheld/flash1 = null
var/obj/item/device/flash/handheld/flash2 = null
@@ -58,8 +44,6 @@
name = "cyborg endoskeleton"
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
icon_state = "robo_suit"
construction_time = 500
construction_cost = list("metal"=15000)
var/obj/item/robot_parts/l_arm/l_arm = null
var/obj/item/robot_parts/r_arm/r_arm = null
var/obj/item/robot_parts/l_leg/l_leg = null
@@ -6,15 +6,13 @@
desc = "Protected by FRM."
icon = 'icons/obj/module.dmi'
icon_state = "cyborg_upgrade"
var/construction_time = 120
var/construction_cost = list("metal"=10000)
var/locked = 0
var/require_module = 0
var/installed = 0
/obj/item/borg/upgrade/proc/action(var/mob/living/silicon/robot/R)
if(R.stat == DEAD)
usr << "/red The [src] will not function on a deceased cyborg."
usr << "<span class='notice'>[src] will not function on a deceased cyborg.</span>"
return 1
return 0
@@ -37,7 +35,7 @@
R.status_flags |= CANPUSH
R.designation = "Default"
R.notify_ai(2)
R.updateicon()
R.update_icons()
return 1
@@ -45,7 +43,6 @@
name = "cyborg reclassification board"
desc = "Used to rename a cyborg."
icon_state = "cyborg_upgrade1"
construction_cost = list("metal"=35000)
var/heldname = "default name"
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
@@ -64,7 +61,6 @@
/obj/item/borg/upgrade/restart
name = "cyborg emergency restart module"
desc = "Used to force a restart of a disabled-but-repaired cyborg, bringing it back online."
construction_cost = list("metal"=60000 , "glass"=5000)
icon_state = "cyborg_upgrade1"
@@ -89,7 +85,6 @@
/obj/item/borg/upgrade/vtec
name = "cyborg VTEC module"
desc = "Used to kick in a cyborg's VTEC systems, increasing their speed."
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 5000)
icon_state = "cyborg_upgrade2"
require_module = 1
@@ -106,7 +101,6 @@
/obj/item/borg/upgrade/tasercooler
name = "cyborg rapid taser cooling module"
desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate."
construction_cost = list("metal"=80000 , "glass"=6000 , "gold"= 2000, "diamond" = 500)
icon_state = "cyborg_upgrade3"
require_module = 1
@@ -119,7 +113,7 @@
usr << "There's no mounting point for the module!"
return 0
var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in R.module
var/obj/item/weapon/gun/energy/gun/advtaser/cyborg/T = locate() in R.module
if(!T)
T = locate() in R.module.contents
if(!T)
@@ -141,7 +135,6 @@
/obj/item/borg/upgrade/jetpack
name = "mining cyborg jetpack"
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
construction_cost = list("metal"=10000,"plasma"=15000,"uranium" = 20000)
icon_state = "cyborg_upgrade3"
require_module = 1
@@ -157,13 +150,13 @@
for(var/obj/item/weapon/tank/jetpack/carbondioxide in R.module.modules)
R.internals = src
R.icon_state="Miner+j"
R.module.rebuild()
return 1
/obj/item/borg/upgrade/syndicate/
name = "illegal equipment module"
desc = "Unlocks the hidden, deadlier functions of a cyborg"
construction_cost = list("metal"=10000,"glass"=15000,"diamond" = 10000)
icon_state = "cyborg_upgrade3"
require_module = 1
@@ -174,4 +167,4 @@
return 0
R.SetEmagged(1)
return 1
return 1
+1 -1
View File
@@ -32,7 +32,7 @@
if (user)
if (M != user)
user.visible_message( \
"<span class='notice'>[M] has been applied with [src] by [user].</span>", \
"<span class='notice'>[user] has applied [src] on [M].</span>", \
"<span class='notice'>You apply \the [src] to [M].</span>" \
)
else
+13 -32
View File
@@ -1,3 +1,8 @@
var/global/list/datum/stack_recipe/rod_recipes = list ( \
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/rods
name = "metal rod"
desc = "Some rods. Can be used for building, or something."
@@ -14,20 +19,25 @@
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
/obj/item/stack/rods/New(var/loc, var/amount=null)
recipes = rod_recipes
return ..()
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 2)
user << "<span class='danger'>You need at least two rods to do this.</span>"
user << "<span class='warning'>You need at least two rods to do this.</span>"
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
M.show_message("<span class='danger'>[src] is shaped into metal by [user.name] with the weldingtool.</span>", 3, "<span class='danger'>You hear welding.</span>", 2)
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
"<span class='warning'>You hear welding.</span>")
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
@@ -37,35 +47,6 @@
return
..()
/obj/item/stack/rods/attack_self(mob/user as mob)
src.add_fingerprint(user)
if(!istype(user.loc,/turf)) return 0
if (locate(/obj/structure/grille, usr.loc))
for(var/obj/structure/grille/G in usr.loc)
if (G.destroyed)
G.health = 10
G.density = 1
G.destroyed = 0
G.icon_state = "grille"
use(1)
else
return 1
else
if(get_amount() < 2)
user << "<span class='notice'>You need at least two rods to do this.</span>"
return
usr << "<span class='notice'>Assembling grille...</span>"
if (!do_after(usr, 10))
return
var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
usr << "<span class='notice'>You assemble a grille.</span>"
F.add_fingerprint(usr)
use(2)
return
/obj/item/stack/rods/cyborg/
m_amt = 0
is_cyborg = 1
@@ -93,7 +93,7 @@
break
var/obj/structure/window/W
W = new /obj/structure/window/basic( user.loc, 0 )
W = new /obj/structure/window( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
@@ -110,7 +110,7 @@
user << "<span class='danger'>There is a window in the way.</span>"
return 1
var/obj/structure/window/W
W = new /obj/structure/window/basic( user.loc, 0 )
W = new /obj/structure/window/fulltile( user.loc, 0 )
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
@@ -210,7 +210,7 @@
user << "<span class='warning'>There is a window in the way.</span>"
return 1
var/obj/structure/window/W
W = new /obj/structure/window/reinforced(user.loc, 1)
W = new /obj/structure/window/reinforced/fulltile(user.loc, 1)
W.state = 0
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
@@ -309,10 +309,10 @@
var/obj/item/organ/limb/affecting = H.get_organ(organ)
if(affecting.take_damage(force / 2))
H.update_damage_overlays(0)
else if(isliving(user))
var/mob/living/L = user
L << "<span class='warning'>[src] cuts into your hand!</span>"
L.adjustBruteLoss(force / 2)
else if(ismonkey(user))
var/mob/living/carbon/monkey/M = user
M << "<span class='warning'>[src] cuts into your hand!</span>"
M.adjustBruteLoss(force / 2)
/obj/item/weapon/shard/attackby(obj/item/I, mob/user)
@@ -17,7 +17,6 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
@@ -91,7 +90,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
@@ -11,7 +11,7 @@
throw_range = 7
flags = CONDUCT
max_amount = 60
turf_type = /turf/simulated/floor
turf_type = /turf/simulated/floor/plasteel
/obj/item/stack/tile/plasteel/cyborg
desc = "The ground you walk on" //Not the usual floor tile desc as that refers to throwing, Cyborgs can't do that - RR
@@ -31,14 +31,15 @@
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 4)
user << "<span class='danger'>You need at least four tiles to do this.</span>"
user << "<span class='warning'>You need at least four tiles to do this.</span>"
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
M.show_message("<span class='danger'>[src] is shaped into metal by [user.name] with the weldingtool.</span>", 3, "<span class='danger'>You hear welding.</span>", 2)
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
"<span class='warning'>You hear welding.</span>")
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
@@ -30,7 +30,7 @@
throw_range = 7
max_amount = 60
origin_tech = "biotech=1"
turf_type = /turf/simulated/floor/grass
turf_type = /turf/simulated/floor/fancy/grass
/*
* Wood
@@ -63,7 +63,7 @@
throw_speed = 3
throw_range = 7
max_amount = 60
turf_type = /turf/simulated/floor/carpet
turf_type = /turf/simulated/floor/fancy/carpet
/*
* High-traction
+6 -6
View File
@@ -67,7 +67,7 @@
/obj/item/toy/balloon/throw_impact(atom/hit_atom)
if(src.reagents.total_volume >= 1)
src.visible_message("<span class='danger'>The [src] bursts!</span>","You hear a pop and a splash.")
src.visible_message("<span class='danger'>\The [src] bursts!</span>","You hear a pop and a splash.")
src.reagents.reaction(get_turf(hit_atom))
for(var/atom/A in get_turf(hit_atom))
src.reagents.reaction(A)
@@ -166,17 +166,17 @@
"<span class='danger'> You hear a gunshot.</span>")
/obj/item/toy/ammo/gun
name = "ammo-caps"
name = "capgun ammo"
desc = "Make sure to recyle the box in an autolathe when it gets empty."
icon = 'icons/obj/ammo.dmi'
icon_state = "357-7"
icon_state = "357OLD-7"
w_class = 1.0
g_amt = 10
m_amt = 10
var/amount_left = 7.0
/obj/item/toy/ammo/gun/update_icon()
src.icon_state = text("357-[]", src.amount_left)
src.icon_state = text("357OLD-[]", src.amount_left)
/obj/item/toy/ammo/gun/examine(mob/user)
..()
@@ -415,7 +415,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")
var/list/graffiti = list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","body")
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
@@ -735,7 +735,7 @@ obj/item/toy/cards/deck/attack_hand(mob/user as mob)
src.cards -= choice
H.pickup(user)
user.put_in_active_hand(H)
src.visible_message("<span class='notice'>[user] draws a card from the deck.</span>", "<span class='notice'>You draw a card from the deck.</span>")
user.visible_message("<span class='notice'>[user] draws a card from the deck.</span>", "<span class='notice'>You draw a card from the deck.</span>")
if(cards.len > 26)
src.icon_state = "deck_[deckstyle]_full"
else if(cards.len > 10)
@@ -28,12 +28,13 @@ AI MODULES
user << "<span class='warning'>ERROR: No laws found on board.</span>"
return
//Handle the lawcap
if(reciever.laws)
var/tot_laws = 0
tot_laws += reciever.laws.inherent.len
tot_laws += reciever.laws.supplied.len
tot_laws += reciever.laws.ion.len
tot_laws += laws.len
for(var/lawlist in list(reciever.laws.inherent,reciever.laws.supplied,reciever.laws.ion,laws))
for(var/mylaw in lawlist)
if(mylaw != "")
tot_laws++
if(tot_laws > config.silicon_max_law_amount && !bypass_law_amt_check)//allows certain boards to avoid this check, eg: reset
user << "<span class='caution'>Not enough memory allocated to [reciever]'s law processor to handle this amount of laws."
message_admins("[key_name_admin(user)] tried to upload laws to [key_name_admin(reciever)] that would exceed the law cap.")
+34 -19
View File
@@ -6,7 +6,7 @@ RCD
*/
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build walls/floor."
desc = "A device used to rapidly build and deconstruct walls and floors."
icon = 'icons/obj/items.dmi'
icon_state = "rcd"
opacity = 0
@@ -18,10 +18,11 @@ RCD
throw_speed = 3
throw_range = 5
w_class = 3.0
m_amt = 30000
m_amt = 100000
origin_tech = "engineering=4;materials=2"
var/datum/effect/effect/system/spark_spread/spark_system
var/matter = 0
var/max_matter = 100
var/working = 0
var/mode = 1
var/canRwall = 0
@@ -92,7 +93,7 @@ RCD
/obj/item/weapon/rcd/New()
desc = "A RCD. It currently holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -102,15 +103,15 @@ RCD
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
if((matter + 10) > 30)
if((matter + 20) > max_matter)
user << "<span class='notice'>The RCD cant hold any more matter-units.</span>"
return
user.drop_item()
qdel(W)
matter += 10
matter += 20
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user << "<span class='notice'>The RCD now holds [matter]/30 matter-units.</span>"
desc = "A RCD. It currently holds [matter]/30 matter-units."
user << "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>"
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
return
@@ -174,15 +175,29 @@ RCD
if(2)
if(istype(A, /turf/simulated/floor))
if(checkResource(10, user))
user << "Building Airlock..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!useResource(10, user)) return 0
activate()
var/obj/machinery/door/airlock/T = new airlock_type( A )
T.autoclose = 1
return 1
return 0
var/door_check = 1
for(var/obj/machinery/door/D in A)
if(!D.sub_door)
door_check = 0
break
if(door_check)
user << "Building Airlock..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!useResource(10, user)) return 0
activate()
var/obj/machinery/door/airlock/T = new airlock_type( A )
if(!T.checkForMultipleDoors())
qdel(T)
useResource(-10, user)
return 0
T.autoclose = 1
return 1
return 0
else
user << "There is another door here!"
return 0
return 0
if(3)
@@ -211,11 +226,11 @@ RCD
return 0
if(istype(A, /obj/machinery/door/airlock))
if(checkResource(10, user))
if(checkResource(20, user))
user << "Deconstructing Airlock..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!useResource(10, user)) return 0
if(!useResource(20, user)) return 0
activate()
qdel(A)
return 1
@@ -229,7 +244,7 @@ RCD
if(matter < amount)
return 0
matter -= amount
desc = "A RCD. It currently holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
return 1
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
+569
View File
@@ -0,0 +1,569 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/*
CONTAINS:
RPD
*/
#define PIPE_BINARY 0
#define PIPE_BENT 1
#define PIPE_TRINARY 2
#define PIPE_TRIN_M 3
#define PIPE_UNARY 4
#define PIPE_QUAD 5
#define PAINT_MODE -2
#define EATING_MODE -1
#define ATMOS_MODE 0
#define METER_MODE 1
#define DISPOSALS_MODE 2
/datum/pipe_info
var/id=-1
var/dir=SOUTH
var/dirtype=PIPE_BINARY
var/icon = 'icons/obj/pipe-item.dmi'
var/icon_state=""
var/selected=0
/datum/pipe_info/New(var/pid,var/direction,var/dt)
src.id=pid
src.icon_state=pipeID2State[pid+1]
src.dir=direction
src.dirtype=dt
/datum/pipe_info/proc/Render(var/dispenser,var/label)
return "<li><a href='?src=\ref[dispenser];makepipe=[id];dir=[dir];type=[dirtype]'>[label]</a></li>"
/datum/pipe_info/meter
icon = 'icons/obj/pipes.dmi'
icon_state = "meterX"
/datum/pipe_info/meter/New()
return
/datum/pipe_info/meter/Render(var/dispenser,var/label)
return "<li><a href='?src=\ref[dispenser];makemeter=1;type=[dirtype]'>[label]</a></li>" //hardcoding is no
var/global/list/disposalpipeID2State=list(
"pipe-s",
"pipe-c",
"pipe-j1",
"pipe-y",
"pipe-t",
"disposal",
"outlet",
"intake",
"pipe-j1s"
)
/datum/pipe_info/disposal
icon = 'icons/obj/pipes/disposal.dmi'
icon_state = "meterX"
/datum/pipe_info/disposal/New(var/pid,var/dt)
src.id=pid
src.icon_state=disposalpipeID2State[pid+1]
src.dir=2
src.dirtype=dt
if(pid<5 || pid>7)
icon_state = "con[icon_state]"
/datum/pipe_info/disposal/Render(var/dispenser,var/label)
return "<li><a href='?src=\ref[dispenser];dmake=[id];type=[dirtype]'>[label]</a></li>" //avoid hardcoding.
//find these defines in code\game\machinery\pipe\consruction.dm
var/global/list/RPD_recipes=list(
"Regular Pipes" = list(
"Pipe" = new /datum/pipe_info(PIPE_SIMPLE_STRAIGHT, 1, PIPE_BINARY),
"Bent Pipe" = new /datum/pipe_info(PIPE_SIMPLE_BENT, 5, PIPE_BENT),
"Manifold" = new /datum/pipe_info(PIPE_MANIFOLD, 1, PIPE_TRINARY),
"Manual Valve" = new /datum/pipe_info(PIPE_MVALVE, 1, PIPE_BINARY),
"Digital Valve" = new /datum/pipe_info(PIPE_DVALVE, 1, PIPE_BINARY),
"4-Way Manifold" = new /datum/pipe_info(PIPE_4WAYMANIFOLD, 1, PIPE_QUAD),
),
"Devices"=list(
"Connector" = new /datum/pipe_info(PIPE_CONNECTOR, 1, PIPE_UNARY),
"Unary Vent" = new /datum/pipe_info(PIPE_UVENT, 1, PIPE_UNARY),
"Gas Pump" = new /datum/pipe_info(PIPE_PUMP, 1, PIPE_UNARY),
"Passive Gate" = new /datum/pipe_info(PIPE_PASSIVE_GATE, 1, PIPE_UNARY),
"Volume Pump" = new /datum/pipe_info(PIPE_VOLUME_PUMP, 1, PIPE_UNARY),
"Scrubber" = new /datum/pipe_info(PIPE_SCRUBBER, 1, PIPE_UNARY),
"Meter" = new /datum/pipe_info/meter(),
"Gas Filter" = new /datum/pipe_info(PIPE_GAS_FILTER, 1, PIPE_TRIN_M),
"Gas Mixer" = new /datum/pipe_info(PIPE_GAS_MIXER, 1, PIPE_TRIN_M),
// "Injector" = new /datum/pipe_info(PIPE_INJECTOR, 1, PIPE_UNARY),
),
"Heat Exchange" = list(
"Pipe" = new /datum/pipe_info(PIPE_HE_STRAIGHT, 1, PIPE_BINARY),
"Bent Pipe" = new /datum/pipe_info(PIPE_HE_BENT, 5, PIPE_BENT),
"Junction" = new /datum/pipe_info(PIPE_JUNCTION, 1, PIPE_UNARY),
"Heat Exchanger" = new /datum/pipe_info(PIPE_HEAT_EXCHANGE, 1, PIPE_UNARY),
),
"Insulated Pipes" = list(
"Pipe" = new /datum/pipe_info(PIPE_INSULATED_STRAIGHT,1, PIPE_BINARY),
"Bent Pipe" = new /datum/pipe_info(PIPE_INSULATED_BENT, 5, PIPE_BENT),
),
"Disposal Pipes" = list(
"Pipe" = new /datum/pipe_info/disposal(DISP_PIPE_STRAIGHT, PIPE_BINARY),
"Bent Pipe" = new /datum/pipe_info/disposal(DISP_PIPE_BENT, PIPE_TRINARY),
"Junction" = new /datum/pipe_info/disposal(DISP_JUNCTION, PIPE_TRINARY),
"Y-Junction" = new /datum/pipe_info/disposal(DISP_YJUNCTION, PIPE_TRINARY),
"Trunk" = new /datum/pipe_info/disposal(DISP_END_TRUNK, PIPE_TRINARY),
"Bin" = new /datum/pipe_info/disposal(DISP_END_BIN, PIPE_QUAD),
"Outlet" = new /datum/pipe_info/disposal(DISP_END_OUTLET, PIPE_UNARY),
"Chute" = new /datum/pipe_info/disposal(DISP_END_CHUTE, PIPE_UNARY),
"Sort Junction" = new /datum/pipe_info/disposal(DISP_SORTJUNCTION, PIPE_TRINARY),
)
)
/obj/item/weapon/pipe_dispenser
name = "Rapid Piping Device (RPD)"
desc = "A device used to rapidly pipe things."
icon = 'icons/obj/items.dmi'
icon_state = "rpd"
opacity = 0
density = 0
anchored = 0.0
flags = CONDUCT
force = 10.0
throwforce = 10.0
throw_speed = 1
throw_range = 5
w_class = 3.0
m_amt = 75000
g_amt = 37500
origin_tech = "engineering=4;materials=2"
var/datum/effect/effect/system/spark_spread/spark_system
var/working = 0
var/p_type = 0
var/p_conntype = 0
var/p_dir = 1
var/p_class = ATMOS_MODE
var/p_disposal = 0
var/list/paint_colors = list(
"grey" = rgb(255,255,255),
"red" = rgb(255,0,0),
"blue" = rgb(0,0,255),
"cyan" = rgb(0,256,249),
"green" = rgb(30,255,0),
"yellow" = rgb(255,198,0),
"purple" = rgb(130,43,255)
)
var/paint_color="grey"
/obj/item/weapon/pipe_dispenser/New()
. = ..()
spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/pipe_dispenser/attack_self(mob/user as mob)
show_menu(user)
/obj/item/weapon/pipe_dispenser/proc/render_dir_img(var/_dir,var/pic,var/title)
var/selected=""
if(_dir == p_dir)
selected=" class=\"selected\""
return "<a href=\"?src=\ref[src];setdir=[_dir]\" title=\"[title]\"[selected]><img src=\"[pic]\" /></a>"
/obj/item/weapon/pipe_dispenser/proc/show_menu(mob/user as mob)
if(!user || !src) return 0
var/dat = {"<h2>Type</h2>
<b>Utilities:</b>
<ul>
<li><a href='?src=\ref[src];eatpipes=1;type=-1'>Eat Pipes</a></li>
<li><a href='?src=\ref[src];paintpipes=1;type=-1'>Paint Pipes</a></li>
</ul>"}
var/icon/preview=null
for(var/category in RPD_recipes)
dat += "<b>[category]:</b><ul>"
var/list/cat=RPD_recipes[category]
for(var/label in cat)
var/datum/pipe_info/I = cat[label]
var/found=0
if(I.id == p_type)
if(p_class==ATMOS_MODE && I.type==/datum/pipe_info)
found=1
else if(p_class==DISPOSALS_MODE && I.type==/datum/pipe_info/disposal)
found=1
if(found)
preview=new /icon(I.icon,I.icon_state)
dat += I.Render(src,label)
dat += "</ul>"
var/color_css=""
var/color_picker=""
for(var/color_name in paint_colors)
var/color=paint_colors[color_name]
color_css += {"
a.color.[color_name] {
color: [color];
}
a.color.[color_name]:hover {
border:1px solid [color];
}
a.color.[color_name].selected {
background-color: [color];
}
"}
var/selected=""
if(color_name==paint_color)
selected = " selected"
color_picker += {"<a class="color [color_name][selected]" href="?src=\ref[src];set_color=[color_name]">&bull;</a>"}
var/dirsel="<h2>Direction</h2>"
switch(p_conntype)
if(-1)
if(p_class==PAINT_MODE)
dirsel = "<h2>Direction</h2>[color_picker]"
if(PIPE_BINARY) // Straight, N-S, W-E
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"vertical.png","Vertical")
dirsel += render_dir_img(4,"horizontal.png","Horizontal")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1" title="vertical">&#8597;</a>
<a href="?src=\ref[src];setdir=4" title="horizontal">&harr;</a>
</p>
"}
if(PIPE_BENT) // Bent, N-W, N-E etc
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nw.png")
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "ne.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "sw.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "se.png")
dirsel += "<p>"
dirsel += render_dir_img(9,"nw.png","West to North")
dirsel += render_dir_img(5,"ne.png","North to East")
dirsel += "<br />"
dirsel += render_dir_img(10,"sw.png","South to West")
dirsel += render_dir_img(6,"se.png","East to South")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=9" title="West to North">&#9565;</a>
<a href="?src=\ref[src];setdir=5" title="North to East">&#9562;</a>
<br />
<a href="?src=\ref[src];setdir=10" title="South to West">&#9559;</a>
<a href="?src=\ref[src];setdir=6" title="East to South">&#9556;</a>
</p>
"}
if(PIPE_TRINARY) // Manifold
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"s.png","West South East")
dirsel += render_dir_img(4,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(2,"n.png","East North West")
dirsel += render_dir_img(8,"e.png","South East North")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1" title="West, South, East">&#9574;</a>
<a href="?src=\ref[src];setdir=4" title="North, West, South">&#9571;</a>
<br />
<a href="?src=\ref[src];setdir=2" title="East, North, West">&#9577;</a>
<a href="?src=\ref[src];setdir=8" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_TRIN_M) // Mirrored ones
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "sm.png") //each mirror icon is 45 anticlockwise from it's real direction
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "wm.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nm.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "em.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"s.png","West South East")
dirsel += render_dir_img(4,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(2,"n.png","East North West")
dirsel += render_dir_img(8,"e.png","South East North")
dirsel += "<br />"
dirsel += render_dir_img(6,"sm.png","West South East")
dirsel += render_dir_img(5,"wm.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(9,"nm.png","East North West")
dirsel += render_dir_img(10,"em.png","South East North")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1" title="West, South, East">&#9574;</a>
<a href="?src=\ref[src];setdir=4" title="North, West, South">&#9571;</a>
<br />
<a href="?src=\ref[src];setdir=2" title="East, North, West">&#9577;</a>
<a href="?src=\ref[src];setdir=8" title="South, East, North">&#9568;</a>
<br />
<a href="?src=\ref[src];setdir=6" title="West, South, East">&#9574;</a>
<a href="?src=\ref[src];setdir=5" title="North, West, South">&#9571;</a>
<br />
<a href="?src=\ref[src];setdir=9" title="East, North, West">&#9577;</a>
<a href="?src=\ref[src];setdir=10" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_UNARY) // Unary
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "n.png")
user << browse_rsc(new /icon(preview, dir=EAST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "s.png")
user << browse_rsc(new /icon(preview, dir=WEST), "w.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"n.png","North")
dirsel += render_dir_img(EAST, "e.png","East")
dirsel += render_dir_img(SOUTH,"s.png","South")
dirsel += render_dir_img(WEST, "w.png","West")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=[NORTH]" title="North">&uarr;</a>
<a href="?src=\ref[src];setdir=[EAST]" title="East">&rarr;</a>
<a href="?src=\ref[src];setdir=[SOUTH]" title="South">&darr;</a>
<a href="?src=\ref[src];setdir=[WEST]" title="West">&larr;</a>
</p>
"}
if(PIPE_QUAD) // Single icon_state (eg 4-way manifolds)
if(preview)
user << browse_rsc(new /icon(preview), "pipe.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"pipe.png","Pipe")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1" title="Pipe">&#8597;</a>
</p>
"}
dat = {"
<html>
<head>
<title>[name]</title>
<style type="text/css">
html {
font-family:sans-serif;
font-size:small;
}
a{
color:#0066cc;
text-decoration:none;
}
a img {
border:1px solid #0066cc;
background:#dfdfdf;
}
a.color {
padding: 5px 10px;
font-size: large;
font-weight: bold;
border:1px solid white;
}
a.selected img,
a:hover {
background: #0066cc;
color: #ffffff;
}
[color_css]
</style>
</head>
<body>
[dirsel][dat]
</body>
</html>
"}
user << browse(dat, "window=pipedispenser")
onclose(user, "pipedispenser")
return
/obj/item/weapon/pipe_dispenser/Topic(href, href_list)
if(usr.stat || usr.restrained())
usr << browse(null, "window=pipedispenser")
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["setdir"])
p_dir= text2num(href_list["setdir"])
show_menu(usr)
if(href_list["eatpipes"])
p_class = EATING_MODE
p_conntype=-1
p_dir=1
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["paintpipes"])
p_class = PAINT_MODE
p_conntype=-1
p_dir=1
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["set_color"])
paint_color=href_list["set_color"]
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makepipe"])
p_type = text2num(href_list["makepipe"])
p_dir = text2num(href_list["dir"])
p_conntype = text2num(href_list["type"])
p_class = ATMOS_MODE
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makemeter"])
p_class = METER_MODE
p_conntype=-1
p_dir=1
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["dmake"])
p_type = text2num(href_list["dmake"])
p_conntype = text2num(href_list["type"])
p_dir = 1
p_class = DISPOSALS_MODE
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
/obj/item/weapon/pipe_dispenser/afterattack(atom/A, mob/user)
if(!in_range(A,user))
return
if(loc != user)
return
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
return 0
switch(p_class)
if(PAINT_MODE) // Paint pipes
if(!istype(A,/obj/machinery/atmospherics/pipe))
// Avoid spewing errors about invalid mode -2 when clicking on stuff that aren't pipes.
user << "<span class='warning'>\The [src]'s error light flickers. Perhaps you need to only use it on pipes and pipe meters?</span>"
return 0
var/obj/machinery/atmospherics/pipe/P = A
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
P.color = paint_colors[paint_color]
P.pipe_color = paint_colors[paint_color]
P.stored.color = paint_colors[paint_color]
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
//P.update_icon()
P.update_node_icon()
return 1
if(EATING_MODE) // Eating pipes
// Must click on an actual pipe or meter.
if(istype(A,/obj/item/pipe) || istype(A,/obj/item/pipe_meter) || istype(A,/obj/structure/disposalconstruct))
user << "<span class='notice'>Destroying Pipe...</span>"
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 5))
activate()
qdel(A)
return 1
return 0
// Avoid spewing errors about invalid mode -1 when clicking on stuff that aren't pipes.
user << "<span class='warning'>The [src]'s error light flickers. Perhaps you need to only use it on pipes and pipe meters?</span>"
return 0
if(ATMOS_MODE)
if(!(istype(A, /turf)))
user << "<span class='warning'>The [src]'s error light flickers.</span>"
return 0
user << "<span class='notice'>Building Pipes ...</span>"
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20))
activate()
var/obj/item/pipe/P = new (A, pipe_type=p_type, dir=p_dir)
P.update()
P.add_fingerprint(usr)
return 1
return 0
if(METER_MODE)
if(!(istype(A, /turf)))
user << "<span class='warning'>The [src]'s error light flickers.</span>"
return 0
user << "<span class='notice'>Building Meter...</span>"
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20))
activate()
new /obj/item/pipe_meter(A)
return 1
return 0
if(DISPOSALS_MODE)
if(!(istype(A, /turf)))
user << "<span class='warning'>The [src]'s error light flickers.</span>"
return 0
user << "<span class='notice'>Building Pipes...</span>"
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20))
activate()
var/obj/structure/disposalconstruct/C = new (A)
// This may still produce runtimes, but I checked and /obj/structure/disposalconstruct
// DOES have a dir property, inherited from /obj/structure. - N3X
C.dir=p_dir
switch(p_type)
if(0)
C.ptype = 0
if(1)
C.ptype = 1
if(2)
C.ptype = 2
if(3)
C.ptype = 4
if(4)
C.ptype = 5
if(5)
C.ptype = 6
C.density = 1
if(6)
C.ptype = 7
C.density = 1
if(7)
C.ptype = 8
C.density = 1
if(8)
C.ptype = 9
C.add_fingerprint(usr)
C.update()
return 1
return 0
else
..()
return 0
/obj/item/weapon/pipe_dispenser/proc/activate()
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
@@ -62,6 +62,15 @@
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
flags = NOBLUDGEON
/obj/item/weapon/card/emag/attack()
return
/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity)
var/atom/A = target
if(!proximity) return
A.emag_act(user)
/obj/item/weapon/card/id
name = "identification card"
@@ -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")
processing_objects.Add(src)
SSobj.processing.Add(src)
update_icon()
return
@@ -64,12 +64,32 @@ CIGARETTE PACKETS ARE IN FANCY.DM
name = "burnt match"
desc = "A match. This one has seen better days."
attack_verb = null
processing_objects.Remove(src)
SSobj.processing.Remove(src)
/obj/item/weapon/match/dropped(mob/user as mob)
matchburnout()
return ..()
/obj/item/weapon/match/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!isliving(M))
return
M.IgniteMob()
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M,user)
if(lit && cig)
if(M == user)
cig.attackby(src, user)
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
else
..()
/obj/item/proc/help_light_cig(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!iscarbon(M))
return
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth")
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
return cig
//////////////////
//FINE SMOKABLES//
//////////////////
@@ -97,46 +117,21 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
var/lighting_text = "<span class='notice'>[user] lights their [name] with [W].</span>"
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
light("<span class='notice'>[user] casually lights the [name] with [W], what a badass.</span>")
lighting_text = "<span class='notice'>[user] casually lights the [name] with [W], what a badass.</span>"
else if(istype(W, /obj/item/weapon/lighter/zippo))
var/obj/item/weapon/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With a single flick of their wrist, [user] smoothly lights their [name] with [W]. Damn they're cool.</span>")
lighting_text = "<span class='rose'>With a single flick of their wrist, [user] smoothly lights their [name] with [W]. Damn they're cool.</span>"
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
if(M.lit == 1) //checking for lit = 1 instead of just lit prevents cigarettes being lit by used matches
light("<span class='notice'>[user] lights their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/melee/energy/sword))
var/obj/item/weapon/melee/energy/sword/S = W
if(S.active)
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>")
lighting_text = "<span class='notice'>After some fiddling, [user] manages to light their [name] with [W].</span>"
else if(istype(W, /obj/item/weapon/melee/energy))
lighting_text = "<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>"
else if(istype(W, /obj/item/device/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name].</span>")
else if(istype(W, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/M = W
if(M.lit)
light("<span class='notice'>[user] lights their [name] with [W].</span>")
else if(istype(W, /obj/item/candle))
var/obj/item/candle/C = W
if(C.lit)
light("<span class='notice'>[user] lights their [name] with [W].</span>")
lighting_text = "<span class='notice'>[user] fiddles with [W], and manages to light their [name].</span>"
else if(istype(W, /obj/item/device/flashlight/flare))
var/obj/item/device/flashlight/flare/F = W
if(F.on)
light("<span class='notice'>[user] lights their [name] with [W] like a real badass.</span>")
lighting_text = "<span class='notice'>[user] lights their [name] with [W] like a real badass.</span>"
if(is_hot(W))
light(lighting_text)
return
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
@@ -185,7 +180,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(flavor_text)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
processing_objects.Add(src)
SSobj.processing.Add(src)
//can't think of any other way to update the overlays :<
if(ismob(loc))
@@ -214,7 +209,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
smoketime--
if(smoketime < 1)
new type_butt(location)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
if(ismob(loc))
M << "<span class='notice'>Your [name] goes out.</span>"
M.unEquip(src, 1) //un-equip it so the overlays can update //Force the un-equip so the overlays update
@@ -233,15 +228,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/T = get_turf(src)
new type_butt(T)
new /obj/effect/decal/cleanable/ash(T)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
qdel(src)
return ..()
/obj/item/clothing/mask/cigarette/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M))
return ..()
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M,user)
if(lit && cig)
if(M == user)
cig.attackby(src, user)
else
@@ -359,7 +354,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
M.update_inv_wear_mask(0)
packeditem = 0
name = "empty [initial(name)]"
processing_objects.Remove(src)
SSobj.processing.Remove(src)
return
if(location)
location.hotspot_expose(700, 5)
@@ -396,7 +391,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
lit = 0
icon_state = icon_off
item_state = icon_off
processing_objects.Remove(src)
SSobj.processing.Remove(src)
return
if(!lit && smoketime > 0)
user << "<span class='notice'>You empty [src] onto [location].</span>"
@@ -475,7 +470,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)
processing_objects.Add(src)
SSobj.processing.Add(src)
else
lit = 0
icon_state = icon_off
@@ -489,7 +484,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.visible_message("<span class='notice'>[user] quietly shuts off [src].")
user.AddLuminosity(-1)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
else
return ..()
return
@@ -498,10 +493,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!isliving(M))
return
M.IgniteMob()
if(!istype(M,/mob/living/carbon))
return
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M,user)
if(lit && cig)
if(M == user)
cig.attackby(src, user)
else
@@ -518,7 +511,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
location.hotspot_expose(700, 5)
return
/obj/item/weapon/lighter/pickup(mob/user)
if(lit)
SetLuminosity(0)
@@ -40,7 +40,8 @@
M.slip(4, 2, src)
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity) return
if(!proximity)
return
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
if(user.client && (target in user.client.screen))
@@ -50,6 +51,9 @@
if(do_after(user, src.cleanspeed))
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
qdel(target)
else if(ishuman(target) && user.zone_sel && user.zone_sel.selecting == "mouth")
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
return
else
user.visible_message("<span class='warning'>[user] begins to clean \the [target.name] with [src].</span>")
if(do_after(user, src.cleanspeed))
@@ -59,11 +63,6 @@
target.clean_blood()
return
/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == "mouth" )
user.visible_message("<span class='danger'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
return
..()
/*
* Bike Horns
+63 -32
View File
@@ -75,7 +75,35 @@
usr << "<span class='warning'>Put the defibrillator on your back first!</span>"
return
/obj/item/weapon/defibrillator/attack_hand(mob/user as mob)
if(src.loc == user)
ui_action_click()
return
..()
/obj/item/weapon/defibrillator/MouseDrop(obj/over_object)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
switch(over_object.name)
if("r_hand")
if(H.r_hand)
return
if(!H.unEquip(src))
return
H.put_in_r_hand(src)
if("l_hand")
if(H.l_hand)
return
if(!H.unEquip(src))
return
H.put_in_l_hand(src)
return
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user)
if(W == paddles)
paddles.unwield()
toggle_paddles()
return
if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(bcell)
@@ -89,24 +117,24 @@
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
if(istype(W, /obj/item/weapon/card/emag))
if(safety)
safety = 0
user << "<span class='warning'>You silently disable [src]'s safety protocols with the [W]."
else
safety = 1
user << "<span class='notice'>You silently enable [src]'s safety protocols with the [W]."
if(istype(W, /obj/item/weapon/screwdriver))
if(bcell)
bcell.updateicon()
bcell.loc = get_turf(src.loc)
bcell = null
user << "<span class='notice'>You remove the cell from the [src].</span>"
user << "<span class='notice'>You remove the cell from [src].</span>"
update_icon()
return
/obj/item/weapon/defibrillator/emag_act(mob/user as mob)
if(safety)
safety = 0
user << "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer."
else
safety = 1
user << "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer."
/obj/item/weapon/defibrillator/emp_act(severity)
if(bcell)
deductcharge(1000 / severity)
@@ -115,15 +143,15 @@
if(safety)
safety = 0
src.visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_saftyOff.ogg', 50, 0)
else
safety = 1
src.visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_saftyOn.ogg', 50, 0)
update_icon()
..()
/obj/item/weapon/defibrillator/verb/toggle_paddles()
/obj/item/weapon/defibrillator/proc/toggle_paddles()
set name = "Toggle Paddles"
set category = "Object"
on = !on
@@ -139,6 +167,7 @@
paddles.loc = user
else
//Remove from their hands and back onto the defib unit
paddles.unwield()
remove_paddles(user)
update_icon()
@@ -155,7 +184,7 @@
/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user)
var/mob/living/carbon/human/M = user
if(paddles in get_both_hands(M))
M.unEquip(paddles)
M.unEquip(paddles,1)
update_icon()
return
@@ -184,10 +213,10 @@
if(bcell)
if(bcell.charge >= paddles.revivecost)
user.visible_message("<span class='notice'>[src] beeps: Unit ready.</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_ready.ogg', 50, 0)
else
user.visible_message("<span class='notice'>[src] beeps: Charge depleted.</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
paddles.cooldown = 0
paddles.update_icon()
update_icon()
@@ -203,6 +232,7 @@
force = 0
throwforce = 6
w_class = 4
flags = NODROP
var/revivecost = 1000
var/cooldown = 0
@@ -227,7 +257,7 @@
/obj/item/weapon/twohanded/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on \his chest! It looks like \he's trying to commit suicide.</span>")
defib.deductcharge(revivecost)
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
return (OXYLOSS)
/obj/item/weapon/twohanded/shockpaddles/dropped(mob/user as mob)
@@ -258,10 +288,10 @@
return
if(!defib.powered)
user.visible_message("<span class='notice'>[defib] beeps: Unit is unpowered.</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
return
if(!wielded)
user << "<span class='boldnotice'>You need to wield the paddles in both hands before you can use them on someone!</span>"
user << "<span class='notice'>You need to wield the paddles in both hands before you can use them on someone!</span>"
return
if(cooldown)
user << "<span class='notice'>[defib] is recharging.</span>"
@@ -272,11 +302,12 @@
else
if(user.a_intent == "harm" && !defib.safety)
busy = 1
H.visible_message("<span class='danger'>[M.name] has been touched with [src] by [user]!</span>")
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
H.adjustStaminaLoss(50)
H.Weaken(5)
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
add_logs(user, M, "stunned", object="defibrillator")
defib.deductcharge(revivecost)
@@ -291,18 +322,18 @@
update_icon()
if(do_after(user, 30)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the subject is unrecoverable, currently 3m
var/tloss = 900 //brain damage starts setting in after some time, currently 1m30s
var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 900 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if((istype(carried_item, /obj/item/clothing/suit/armor)) || (istype(carried_item, /obj/item/clothing/suit/space)))
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
@@ -310,7 +341,7 @@
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/limb/O in H.organs)
total_brute += O.brute_dam
total_burn += O.burn_dam
@@ -321,8 +352,8 @@
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/ping.ogg', 50, 0)
user.visible_message("<span class='notice'>[defib] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.stat = 1
dead_mob_list -= H
living_mob_list |= list(H)
@@ -333,22 +364,22 @@
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
user.visible_message("<span class='warning'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
user.visible_message("<span class='warning'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed.</span>")
user.visible_message("<span class='warning'>[defib] buzzes: Resuscitation failed.</span>")
if(ghost)
ghost << "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)"
ghost << sound('sound/effects/genetics.ogg')
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
defib.deductcharge(revivecost)
update_icon()
cooldown = 1
defib.cooldowncheck(user)
else
user.visible_message("<span class='notice'>[defib] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
else
+11 -5
View File
@@ -5,9 +5,11 @@
icon_state = "d6"
w_class = 1
var/sides = 6
var/result = null
/obj/item/weapon/dice/New()
icon_state = "[initial(icon_state)][rand(1, sides)]"
result = rand(1, sides)
update_icon()
/obj/item/weapon/dice/d2
name = "d2"
@@ -60,13 +62,13 @@
diceroll(user)
/obj/item/weapon/dice/proc/diceroll(mob/user as mob)
var/result = rand(1, sides)
result = rand(1, sides)
var/comment = ""
if(sides == 20 && result == 20)
comment = "Nat 20!"
else if(sides == 20 && result == 1)
comment = "Ouch, bad luck."
icon_state = "[initial(icon_state)][result]"
update_icon()
if(initial(icon_state) == "d00")
result = (result - 1)*10
if(user != null) //Dice was rolled in someone's hand
@@ -74,10 +76,14 @@
"<span class='notice'>You throw [src]. It lands on [result]. [comment]</span>", \
"<span class='notice'>You hear [src] landing on [result]. [comment]</span>")
else if(src.throwing == 0) //Dice was thrown and is coming to rest
src.loc.visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
/obj/item/weapon/dice/d4/Crossed(var/mob/living/carbon/human/H)
if(istype(H) && !H.shoes)
H << "<span class='userdanger'>You step on the D4!</span>"
H.apply_damage(4,BRUTE,(pick("l_leg", "r_leg")))
H.Weaken(3)
H.Weaken(3)
/obj/item/weapon/dice/update_icon()
overlays.Cut()
overlays += "[src.icon_state][src.result]"
+37 -37
View File
@@ -9,6 +9,8 @@
var/damage_coeff = 1
var/list/fields
var/list/add_mutations = list()
var/list/remove_mutations = list()
/obj/item/weapon/dnainjector/attack_paw(mob/user)
return attack_hand(user)
@@ -20,8 +22,15 @@
user << "<span class='notice'>You can't modify [M]'s DNA while \he's dead.</span>"
return
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
for(var/datum/mutation/human/HM in remove_mutations)
HM.on_losing(M)
for(var/datum/mutation/human/HM in add_mutations)
if(HM.name == RACEMUT)
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
log_msg += " (MONKEY)"
HM.force_give(M)
if(fields)
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
if(fields["name"] && fields["UE"] && fields["blood_type"])
M.real_name = fields["name"]
M.dna.unique_enzymes = fields["UE"]
@@ -30,13 +39,7 @@
if(fields["UI"]) //UI+UE
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
updateappearance(M)
if(fields["SE"])
M.dna.struc_enzymes = merge_text(M.dna.struc_enzymes, fields["SE"])
if(ishuman(M) && (deconstruct_block(getblock(M.dna.struc_enzymes, RACEBLOCK), BAD_MUTATION_DIFFICULTY) == BAD_MUTATION_DIFFICULTY)) //check for monkeying people.
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
log_msg += " (MONKEY)"
domutcheck(M, null,(type != /obj/item/weapon/dnainjector)) //admin-spawnable-injectors always work
log_attack(log_msg)
log_attack(log_msg)
else
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
return
@@ -67,28 +70,27 @@
desc = "Cures green skin."
New()
..()
fields = list("SE"=setblock(NULLED_SE, HULKBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[HULK])
/obj/item/weapon/dnainjector/hulkmut
name = "\improper DNA injector (Hulk)"
desc = "This will make you big and strong, but give you a bad skin condition."
New()
..()
fields = list("SE"=setblock(NULLED_SE, HULKBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[HULK])
/obj/item/weapon/dnainjector/xraymut
name = "\improper DNA injector (Xray)"
desc = "Finally you can see what the Captain does."
New()
..()
fields = list("SE"=setblock(NULLED_SE, XRAYBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[XRAY])
/obj/item/weapon/dnainjector/antixray
name = "\improper DNA injector (Anti-Xray)"
desc = "It will make you see harder."
New()
..()
fields = list("SE"=setblock(NULLED_SE, XRAYBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[XRAY])
/////////////////////////////////////
/obj/item/weapon/dnainjector/antiglasses
@@ -96,128 +98,126 @@
desc = "Toss away those glasses!"
New()
..()
fields = list("SE"=setblock(NULLED_SE, NEARSIGHTEDBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[BADSIGHT])
/obj/item/weapon/dnainjector/glassesmut
name = "\improper DNA injector (Glasses)"
desc = "Will make you need dorkish glasses."
New()
..()
fields = list("SE"=setblock(NULLED_SE, NEARSIGHTEDBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[BADSIGHT])
/obj/item/weapon/dnainjector/epimut
name = "\improper DNA injector (Epi.)"
desc = "Shake shake shake the room!"
New()
..()
fields = list("SE"=setblock(NULLED_SE, EPILEPSYBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[EPILEPSY])
/obj/item/weapon/dnainjector/antiepi
name = "\improper DNA injector (Anti-Epi.)"
desc = "Will fix you up from shaking the room."
New()
..()
fields = list("SE"=setblock(NULLED_SE, EPILEPSYBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[EPILEPSY])
////////////////////////////////////
/obj/item/weapon/dnainjector/anticough
name = "\improper DNA injector (Anti-Cough)"
desc = "Will stop that aweful noise."
New()
..()
fields = list("SE"=setblock(NULLED_SE, COUGHBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[COUGH])
/obj/item/weapon/dnainjector/coughmut
name = "\improper DNA injector (Cough)"
desc = "Will bring forth a sound of horror from your throat."
New()
..()
fields = list("SE"=setblock(NULLED_SE, COUGHBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[COUGH])
/obj/item/weapon/dnainjector/clumsymut
name = "\improper DNA injector (Clumsy)"
desc = "Makes clown minions."
New()
..()
fields = list("SE"=setblock(NULLED_SE, CLUMSYBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[CLOWNMUT])
/obj/item/weapon/dnainjector/anticlumsy
name = "\improper DNA injector (Anti-Clumy)"
desc = "Apply this for Security Clown."
New()
..()
fields = list("SE"=setblock(NULLED_SE, CLUMSYBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[CLOWNMUT])
/obj/item/weapon/dnainjector/antitour
name = "\improper DNA injector (Anti-Tour.)"
desc = "Will cure tourrets."
New()
..()
fields = list("SE"=setblock(NULLED_SE, TOURETTESBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[TOURETTES])
/obj/item/weapon/dnainjector/tourmut
name = "\improper DNA injector (Tour.)"
desc = "Gives you a nasty case off tourrets."
New()
..()
fields = list("SE"=setblock(NULLED_SE, TOURETTESBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[TOURETTES])
/obj/item/weapon/dnainjector/stuttmut
name = "\improper DNA injector (Stutt.)"
desc = "Makes you s-s-stuttterrr"
New()
..()
fields = list("SE"=setblock(NULLED_SE, NERVOUSBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[NERVOUS])
/obj/item/weapon/dnainjector/antistutt
name = "\improper DNA injector (Anti-Stutt.)"
desc = "Fixes that speaking impairment."
New()
..()
fields = list("SE"=setblock(NULLED_SE, NERVOUSBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[NERVOUS])
/obj/item/weapon/dnainjector/antifire
name = "\improper DNA injector (Anti-Fire)"
desc = "Cures fire."
New()
..()
fields = list("SE"=setblock(NULLED_SE, FIREBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[COLDRES])
/obj/item/weapon/dnainjector/firemut
name = "\improper DNA injector (Fire)"
desc = "Gives you fire."
New()
..()
fields = list("SE"=setblock(NULLED_SE, FIREBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
add_mutations.Add(mutations_list[COLDRES])
/obj/item/weapon/dnainjector/blindmut
name = "\improper DNA injector (Blind)"
desc = "Makes you not see anything."
New()
..()
fields = list("SE"=setblock(NULLED_SE, BLINDBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[BLINDMUT])
/obj/item/weapon/dnainjector/antiblind
name = "\improper DNA injector (Anti-Blind)"
desc = "ITS A MIRACLE!!!"
New()
..()
fields = list("SE"=setblock(NULLED_SE, BLINDBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[BLINDMUT])
/obj/item/weapon/dnainjector/antitele
name = "\improper DNA injector (Anti-Tele.)"
desc = "Will make you not able to control your mind."
New()
..()
fields = list("SE"=setblock(NULLED_SE, TELEBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[TK])
/obj/item/weapon/dnainjector/telemut
name = "\improper DNA injector (Tele.)"
desc = "Super brain man!"
New()
..()
fields = list("SE"=setblock(NULLED_SE, TELEBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[TK])
/obj/item/weapon/dnainjector/telemut/darkbundle
name = "\improper DNA injector"
@@ -228,25 +228,25 @@
desc = "Sorry, what did you say?"
New()
..()
fields = list("SE"=setblock(NULLED_SE, DEAFBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[DEAFMUT])
/obj/item/weapon/dnainjector/antideaf
name = "\improper DNA injector (Anti-Deaf)"
desc = "Will make you hear once more."
New()
..()
fields = list("SE"=setblock(NULLED_SE, DEAFBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[DEAFMUT])
/obj/item/weapon/dnainjector/h2m
name = "\improper DNA injector (Human > Monkey)"
desc = "Will make you a flea bag."
New()
..()
fields = list("SE"=setblock(NULLED_SE, RACEBLOCK, repeat_string(DNA_BLOCK_SIZE,"f")))
add_mutations.Add(mutations_list[RACEMUT])
/obj/item/weapon/dnainjector/m2h
name = "\improper DNA injector (Monkey > Human)"
desc = "Will make you...less hairy."
New()
..()
fields = list("SE"=setblock(NULLED_SE, RACEBLOCK, repeat_string(DNA_BLOCK_SIZE,"0")))
remove_mutations.Add(mutations_list[RACEMUT])
+8 -18
View File
@@ -81,27 +81,17 @@
target.overlays += image_overlay
user << "Bomb has been planted. Timer counting down from [timer]."
spawn(timer*10)
explode(get_turf(target))
if(target && !target.gc_destroyed)
explode(get_turf(target))
else
qdel(src)
/obj/item/weapon/c4/proc/explode(var/location)
if(!target)
target = get_atom_on_turf(src)
if(!target)
target = src
if(location)
explosion(location, -1, -1, 4, 4)
if(target)
if (istype(target, /turf/simulated/wall))
var/turf/simulated/wall/W = target
W.dismantle_wall(1)
else if(istype(target, /mob/living))
target.ex_act(2) // c4 can't gib mobs anymore.
else
target.ex_act(1)
/obj/item/weapon/c4/proc/explode(var/turf/location)
location.ex_act(2, target)
explosion(location,0,0,3)
if(target)
target.overlays -= image_overlay
qdel(src)
/obj/item/weapon/c4/attack(mob/M as mob, mob/user as mob, def_zone)
return
return
@@ -17,6 +17,9 @@
var/last_use = 1.0
var/safety = 1
var/sprite_name = "fire_extinguisher"
var/power = 5 //Maximum distance launched water will travel
var/precision = 0 //By default, turfs picked from a spray are random, set to 1 to make it always have at least one water effect per row
var/cooling_power = 2 //Sets the cooling_temperature of the water reagent datum inside of the extinguisher when it is refilled
/obj/item/weapon/extinguisher/mini
name = "pocket fire extinguisher"
@@ -43,16 +46,35 @@
user << "The safety is [safety ? "on" : "off"]."
return
/obj/item/weapon/extinguisher/proc/AttemptRefill(atom/target, mob/user)
if(istype(target, /obj/structure/reagent_dispensers/watertank) && target.Adjacent(user))
var/safety_save = safety
safety = 1
if(reagents.total_volume == reagents.maximum_volume)
user << "<span class='notice'>\The [src] is already full!</span>"
safety = safety_save
return 1
var/obj/structure/reagent_dispensers/watertank/W = target
var/transferred = W.reagents.trans_to(src, max_water)
if(transferred > 0)
user << "<span class='notice'>\The [src] has been refilled by [transferred] units</span>"
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
for(var/datum/reagent/water/R in reagents.reagent_list)
R.cooling_temperature = cooling_power
else
user << "<span class='notice'>\The [W] is empty!</span>"
safety = safety_save
return 1
else
return 0
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
//TODO; Add support for reagents in water.
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1)
var/obj/o = target
o.reagents.trans_to(src, max_water)
user << "<span class='notice'>\The [src] is now refilled</span>"
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
if(target.loc == user)//No more spraying yourself when putting your extinguisher away
return
var/Refill = AttemptRefill(target, user)
if(Refill)
return
if (!safety)
if (src.reagents.total_volume < 1)
usr << "<span class='danger'>\The [src] is empty.</span>"
@@ -94,20 +116,25 @@
var/turf/T = get_turf(target)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
if(precision)
var/turf/T3 = get_step(T1, turn(direction, 90))
var/turf/T4 = get_step(T2,turn(direction, -90))
the_targets = list(T,T1,T2,T3,T4)
for(var/a=0, a<5, a++)
spawn(0)
var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) )
var/turf/my_target = pick(the_targets)
if(precision)
the_targets -= my_target
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
W.reagents = R
R.my_atom = W
if(!W || !src) return
src.reagents.trans_to(W,1)
for(var/b=0, b<5, b++)
for(var/b=0, b<power, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
W.reagents.reaction(get_turf(W))
@@ -33,7 +33,7 @@
/obj/item/weapon/flamethrower/process()
if(!lit)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
return null
var/turf/location = loc
if(istype(location, /mob/))
@@ -140,7 +140,7 @@
if(!status) return
lit = !lit
if(lit)
processing_objects.Add(src)
SSobj.processing.Add(src)
if(href_list["amount"])
throw_amount = throw_amount + text2num(href_list["amount"])
throw_amount = max(50, min(5000, throw_amount))
@@ -189,7 +189,7 @@
//Burn it based on transfered gas
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500)
//location.hotspot_expose(1000,500,1)
air_master.add_to_active(target, 0)
SSair.add_to_active(target, 0)
return
@@ -22,7 +22,11 @@
icon_state = "giftcrate[rand(1,5)]"
/obj/item/weapon/a_gift/attack_self(mob/M as mob)
var/gift_type = pick(/obj/item/weapon/sord,
if(M && M.mind && M.mind.special_role == "Santa")
M << "<span class='warning'>You're supposed to be spreading gifts, not opening them yourself!</span>"
return
var/gift_type_list = list(/obj/item/weapon/sord,
/obj/item/weapon/storage/wallet,
/obj/item/weapon/storage/photo_album,
/obj/item/weapon/storage/box/snappops,
@@ -36,35 +40,28 @@
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grown/corncob,
/obj/item/weapon/contraband/poster,
/obj/item/weapon/contraband/poster/legit,
/obj/item/weapon/book/manual/barman_recipes,
/obj/item/weapon/book/manual/chef_recipes,
/obj/item/weapon/bikehorn,
/obj/item/weapon/beach_ball,
/obj/item/weapon/beach_ball/holoball,
/obj/item/weapon/banhammer,
/obj/item/toy/balloon,
/obj/item/toy/crossbow,
/obj/item/toy/gun,
/obj/item/toy/katana,
/obj/item/toy/prize/deathripley,
/obj/item/toy/prize/durand,
/obj/item/toy/prize/fireripley,
/obj/item/toy/prize/gygax,
/obj/item/toy/prize/honk,
/obj/item/toy/prize/marauder,
/obj/item/toy/prize/mauler,
/obj/item/toy/prize/odysseus,
/obj/item/toy/prize/phazon,
/obj/item/toy/prize/ripley,
/obj/item/toy/prize/seraph,
/obj/item/toy/spinningtoy,
/obj/item/toy/sword,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/device/paicard,
/obj/item/device/violin,
/obj/item/weapon/storage/belt/utility/full,
/obj/item/clothing/tie/horrible)
/obj/item/clothing/tie/horrible,
/obj/item/clothing/suit/jacket/leather,
/obj/item/clothing/suit/poncho,
/obj/item/clothing/suit/poncho/green,
/obj/item/clothing/suit/poncho/red)
gift_type_list += typesof(/obj/item/clothing/head/collectable) - /obj/item/clothing/head/collectable
gift_type_list += typesof(/obj/item/toy) - (((typesof(/obj/item/toy/cards) - /obj/item/toy/cards/deck) + /obj/item/toy/ammo) + /obj/item/toy) //All toys, except for abstract types and syndicate cards.
var/gift_type = pick(gift_type_list)
if(!ispath(gift_type,/obj/item)) return
@@ -76,8 +76,6 @@
else if(stage == EMPTY && istype(I, /obj/item/device/assembly_holder))
var/obj/item/device/assembly_holder/A = I
if(!A.secured)
return
if(isigniter(A.a_left) == isigniter(A.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
@@ -186,10 +184,18 @@
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, loc))
if(A == src)
continue
reagents.reaction(A, 1, 10)
var/list/viewable = view(affected_area, loc)
var/list/accessible = can_flood_from(loc, affected_area)
var/list/reactable = accessible
var/mycontents = GetAllContents()
for(var/turf/T in accessible)
for(var/atom/A in T.GetAllContents())
if(A in mycontents) continue
if(!(A in viewable)) continue
reactable |= A
var/fraction = (reagents.total_volume/reactable.len) - reagents.total_volume
for(var/atom/A in reactable)
reagents.reaction(A, TOUCH, fraction)
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
@@ -199,6 +205,19 @@
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
/obj/item/weapon/grenade/chem_grenade/proc/can_flood_from(myloc, maxrange)
var/list/reachable = list(myloc)
for(var/i=1; i<=maxrange; i++)
for(var/turf/T in (orange(i, myloc) - orange(i-1, myloc)))
if(T in reachable) continue
for(var/turf/NT in orange(1, T))
if(!(NT in reachable)) continue
if(!(get_dir(T,NT) in cardinal)) continue
if(!NT.CanAtmosPass(T)) continue
reachable |= T
break
return reachable
//Large chem grenades accept slime cores and use the appropriately.
/obj/item/weapon/grenade/chem_grenade/large
name = "large grenade"
@@ -8,6 +8,8 @@
/obj/item/weapon/grenade/flashbang/prime()
update_mob()
var/flashbang_turf = get_turf(src)
if(!flashbang_turf)
return
for(var/mob/living/M in get_hearers_in_view(7, flashbang_turf))
bang(get_turf(M), M)
@@ -23,35 +25,32 @@
//Checking for protections
var/eye_safety = 0
var/ear_safety = 2
var/distance = max(1, get_dist(src, T))
var/ear_safety = 0
var/distance = max(1,get_dist(src,T))
var/takes_eye_damage = 0
if(iscarbon(M))
takes_eye_damage++
var/mob/living/carbon/C = M
eye_safety = C.eyecheck()
if(ishuman(C))
takes_eye_damage = 1
var/mob/living/carbon/human/H = C
ear_safety = 0
if(istype(H.ears, /obj/item/clothing/ears/earmuffs) || istype(H.head, /obj/item/clothing/head/helmet))
if((H.ears && (H.ears.flags & EARBANGPROTECT)) || (H.head && (H.head.flags & HEADBANGPROTECT)))
ear_safety++
if(ismonkey(C))
ear_safety = 0
takes_eye_damage = 1
//Flash
if(eye_safety < 1)
if(!eye_safety)
flick("e_flash", M.flash)
M.eye_stat += rand(1, 3)
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
if (M.eye_stat >= 20 && takes_eye_damage)
M << "<span class='warning'>Your eyes start to burn badly!</span>"
M.disabilities |= NEARSIGHTED
M.disabilities |= NEARSIGHT
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (prob(M.eye_stat - 20 + 1))
M << "<span class='warning'>You can't see anything!</span>"
M.sdisabilities |= BLIND
M.disabilities |= BLIND
//Bang
if((src.loc == M) || src.loc == M.loc)//Holding on person or being exactly where lies is significantly more dangerous and voids protection
M.Stun(10)
@@ -64,9 +63,9 @@
if (M.ear_damage >= 15)
M << "<span class='warning'>Your ears start to ring badly!</span>"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (prob(M.ear_damage - 10 + 5))
if(prob(M.ear_damage - 10 + 5))
M << "<span class='warning'>You can't hear anything!</span>"
M.sdisabilities |= DEAF
M.disabilities |= DEAF
else
if (M.ear_damage >= 5)
M << "<span class='warning'>Your ears start to ring!</span>"
@@ -13,8 +13,8 @@
var/det_time = 50
var/display_timer = 1
/obj/item/weapon/grenade/proc/clown_check(var/mob/living/user)
if((CLUMSY in user.mutations) && prob(50))
/obj/item/weapon/grenade/proc/clown_check(var/mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>Huh? How does this thing work?</span>"
active = 1
icon_state = initial(icon_state) + "_active"
+8 -3
View File
@@ -18,8 +18,8 @@
var/cuffsound = 'sound/weapons/handcuffs.ogg'
var/trashtype = null //for disposable cuffs
/obj/item/weapon/restraints/handcuffs/attack(mob/living/carbon/C, mob/user)
if(CLUMSY in user.mutations && prob(50))
/obj/item/weapon/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>Uh... how do those things work?!</span>"
apply_cuffs(user,user)
@@ -30,12 +30,15 @@
playsound(loc, cuffsound, 30, 1, -2)
if(do_mob(user, C, 30))
apply_cuffs(C,user)
user << "<span class='notice'>You handcuff [C].</span>"
if(istype(src, /obj/item/weapon/restraints/handcuffs/cable))
feedback_add_details("handcuffs","C")
else
feedback_add_details("handcuffs","H")
add_logs(user, C, "handcuffed")
else
user << "<span class='warning'>You fail to handcuff [C].</span>"
/obj/item/weapon/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user)
if(!target.handcuffed)
@@ -106,13 +109,15 @@
if(!C.handcuffed)
C.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(C)
C.update_inv_handcuffed(0)
user << "<span class='notice'>You handcuff [C].</span>"
add_logs(user, C, "handcuffed")
else
user << "<span class='warning'>You fail to handcuff [C].</span>"
/obj/item/weapon/restraints/handcuffs/cable/zipties
name = "zipties"
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
icon_state = "cuff_white"
item_state = "coil_white"
breakouttime = 450 //Deciseconds = 45s
trashtype = /obj/item/weapon/restraints/handcuffs/cable/zipties/used
@@ -27,6 +27,9 @@
/obj/item/weapon/implant/proc/implanted(var/mob/source)
if(activated)
action_button_name = "Activate [src.name]"
if(istype(source, /mob/living/carbon/human))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
return 1
@@ -205,4 +208,4 @@
/obj/item/weapon/implant/emp/activate()
if (src.uses < 1) return 0
src.uses--
empulse(imp_in, 3, 5)
empulse(imp_in, 3, 5)
@@ -130,7 +130,7 @@
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
if(!imp) continue
if(istype(imp, /obj/item/weapon/implant/loyalty))
M.visible_message("<span class='danger'>[M] has been implanted by the [src.name].</span>")
M.visible_message("<span class='warning'>[M] has been implanted by the [src.name].</span>")
if(imp.implanted(M))
imp.loc = M
@@ -16,7 +16,7 @@
icon_state = "implanter0"
/obj/item/weapon/implanter/attack(mob/M, mob/user)
/obj/item/weapon/implanter/attack(mob/living/carbon/M, mob/user)
if(!iscarbon(M))
return
if(user && imp)
@@ -25,7 +25,7 @@
var/turf/T = get_turf(M)
if(T && (M == user || do_after(user, 50)))
if(user && M && (get_turf(M) == T) && src && imp)
M.visible_message("<span class='warning'>[M] has been implanted by [user].</span>")
M.visible_message("<span class='warning'>[user] has implanted [M].</span>")
add_logs(user, M, "implanted", object="[name]")
user << "<span class='notice'>You implanted the implant into [M].</span>"
if(imp.implanted(M))
@@ -35,6 +35,9 @@
imp = null
update_icon()
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
H.sec_hud_set_implants()
@@ -71,4 +74,4 @@
/obj/item/weapon/implanter/emp/New()
imp = new /obj/item/weapon/implant/emp(src)
..()
update_icon()
update_icon()
+6 -6
View File
@@ -66,7 +66,7 @@
src.icon_state = "fork"
return
else
if((CLUMSY in user.mutations) && prob(50))
if(user.disabilities & CLUMSY && prob(50))
M = user
return eyestab(M,user)
@@ -86,9 +86,9 @@
"<span class='suicide'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"))
return (BRUTELOSS)
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "<span class='danger'> You accidentally cut yourself with the [src].</span>"
/obj/item/weapon/kitchen/utensil/knife/attack(target, mob/living/carbon/human/user)
if(istype(user) && user.disabilities & CLUMSY && prob(50))
user << "<span class='danger'>You accidentally cut yourself with \the [src].</span>"
user.take_organ_damage(20)
return
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
@@ -127,14 +127,14 @@
/*
* Bucher's cleaver
*/
/obj/item/weapon/butch
/obj/item/weapon/kitchenknife/butcher
name = "butcher's cleaver"
icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
flags = CONDUCT
force = 15.0
w_class = 2.0
w_class = 3.0
throwforce = 8.0
throw_speed = 3
throw_range = 6
+38 -40
View File
@@ -1,5 +1,11 @@
/obj/item/weapon/melee/energy
var/active = 0
var/force_on = 30 //force when active
var/throwforce_on = 20
var/icon_state_on = "axe1"
var/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
w_class = 2
var/w_class_on = 4
/obj/item/weapon/melee/energy/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>", \
@@ -14,34 +20,22 @@
desc = "An energised battle axe."
icon_state = "axe0"
force = 40.0
throwforce = 25.0
force_on = 150
throwforce = 25
throwforce_on = 30
hitsound = 'sound/weapons/bladeslice.ogg'
throw_speed = 3
throw_range = 5
w_class = 3.0
w_class = 3
w_class_on = 5
flags = CONDUCT | NOSHIELD
origin_tech = "combat=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = null
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] swings the [src.name] towards /his head! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/melee/energy/axe/attack_self(mob/user)
active = !active
if(active)
user << "<span class='notice'>[src] is now energised.</span>"
force = 150 //these are the drugs, friend
hitsound = 'sound/weapons/blade1.ogg'
icon_state = "axe1"
w_class = 5
else
user << "<span class='notice'>[src] can now be concealed.</span>"
force = 40
hitsound = 'sound/weapons/bladeslice.ogg'
icon_state = "axe0"
w_class = 3 //it goes back to three you goose
add_fingerprint(user)
user.visible_message("<span class='suicide'>[user] swings the [src.name] towards /his head! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/melee/energy/sword
name = "energy sword"
@@ -52,11 +46,10 @@
hitsound = "swing_hit" //it starts deactivated
throw_speed = 3
throw_range = 5
w_class = 2.0
flags = NOSHIELD
attack_verb = null
origin_tech = "magnets=3;syndicate=4"
var/hacked = 0
item_color = null
/obj/item/weapon/melee/energy/sword/New()
if(item_color == null)
@@ -67,33 +60,31 @@
return 1
return 0
/obj/item/weapon/melee/energy/sword/attack_self(mob/living/user)
if ((CLUMSY in user.mutations) && prob(50))
/obj/item/weapon/melee/energy/attack_self(mob/living/carbon/user)
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>"
user.take_organ_damage(5,5)
active = !active
if (active)
force = 30
throwforce = 20
force = force_on
throwforce = throwforce_on
hitsound = 'sound/weapons/blade1.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
if(istype(src,/obj/item/weapon/melee/energy/sword/pirate))
icon_state = "cutlass1"
if(attack_verb_on)
attack_verb = attack_verb_on
if(!item_color)
icon_state = icon_state_on
else
icon_state = "sword[item_color]"
w_class = 4
w_class = w_class_on
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
user << "<span class='notice'>[src] is now active.</span>"
else
force = 3
throwforce = 5.0
hitsound = "swing_hit"
attack_verb = null
if(istype(src,/obj/item/weapon/melee/energy/sword/pirate))
icon_state = "cutlass0"
else
icon_state = "sword0"
w_class = 2
force = initial(force)
throwforce = initial(throwforce)
hitsound = initial(hitsound)
attack_verb = initial(attack_verb)
icon_state = initial(icon_state)
w_class = initial(w_class)
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
user << "<span class='notice'>[src] can now be concealed.</span>"
add_fingerprint(user)
@@ -166,6 +157,10 @@
name = "energy cutlass"
desc = "Arrrr matey."
icon_state = "cutlass0"
icon_state_on = "cutlass1"
/obj/item/weapon/melee/energy/sword/pirate/New()
return
/obj/item/weapon/melee/energy/blade
name = "energy blade"
@@ -173,12 +168,12 @@
icon_state = "blade"
force = 30 //Normal attacks deal esword damage
hitsound = 'sound/weapons/blade1.ogg'
active = 1
throwforce = 1//Throwing or dropping the item deletes it.
throw_speed = 3
throw_range = 1
w_class = 4.0//So you can't hide it in your pocket or some such.
flags = NOSHIELD
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/datum/effect/effect/system/spark_spread/spark_system
//Most of the other special functions are handled in their own files. aka special snowflake code so kewl
@@ -192,3 +187,6 @@
/obj/item/weapon/melee/energy/blade/proc/throw()
qdel(src)
/obj/item/weapon/melee/energy/blade/attack_self(mob/user)
return
+43 -79
View File
@@ -25,86 +25,15 @@
icon_state = "baton"
item_state = "classic_baton"
slot_flags = SLOT_BELT
force = 10
/obj/item/weapon/melee/classic_baton/attack(mob/M, mob/living/user)
add_fingerprint(user)
if((CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>You club yourself over the head!</span>"
user.Weaken(3 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2 * force, BRUTE, "head")
H.forcesay(hit_appends)
else
user.take_organ_damage(2 * force)
return
add_logs(user, M, "attacked", object="[src.name]")
if(isrobot(M)) // Don't stun borgs, fix for issue #2436
..()
return
if(!isliving(M)) // Don't stun nonhuman things
return
if(user.a_intent == "harm")
if(!..()) return
if(M.stuttering < 7 && !(HULK in M.mutations))
M.stuttering = 7
M.Stun(7)
M.Weaken(7)
M.visible_message("<span class='danger'>[M] has been beaten with [src] by [user]!</span>", \
"<span class='userdanger'>[M] has been beaten with [src] by [user]!</span>")
else
playsound(loc, 'sound/effects/woodhit.ogg', 50, 1, -1)
M.Stun(7)
M.Weaken(7)
M.visible_message("<span class='danger'>[M] has been stunned with [src] by [user]!</span>", \
"<span class='userdanger'>[M] has been stunned with [src] by [user]!</span>")
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.forcesay(hit_appends)
/obj/item/weapon/melee/telebaton
name = "telescopic baton"
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
icon = 'icons/obj/weapons.dmi'
icon_state = "telebaton_0"
item_state = "telebaton_0"
slot_flags = SLOT_BELT
w_class = 2
force = 3
force = 12 //9 hit crit
w_class = 3
var/cooldown = 0
var/on = 0
var/on = 1
/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
on = !on
if(on)
user << "<span class ='warning'>You extend the baton.</span>"
icon_state = "telebaton_1"
item_state = "nullrod"
w_class = 4 //doesnt fit in backpack when its on for balance
force = 10 //seclite damage
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
user << "<span class ='notice'>You collapse the baton.</span>"
icon_state = "telebaton_0"
item_state = "telebaton_0" //no sprite in other words
slot_flags = SLOT_BELT
w_class = 2
force = 3 //not so robust now
attack_verb = list("hit", "poked")
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob)
/obj/item/weapon/melee/classic_baton/attack(mob/target as mob, mob/living/user as mob)
if(on)
add_fingerprint(user)
if((CLUMSY in user.mutations) && prob(50))
if((CLUMSY in user.disabilities) && prob(50))
user << "<span class ='danger'>You club yourself over the head.</span>"
user.Weaken(3 * force)
if(ishuman(user))
@@ -125,9 +54,10 @@
if(cooldown <= 0)
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Weaken(3)
add_logs(user, target, "stunned", object="telescopic baton")
add_logs(user, target, "stunned", object="classic baton")
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[target] has been knocked down with \the [src] by [user]!</span>")
target.visible_message("<span class ='danger'>[user] has knocked down [target] with \the [src]!</span>", \
"<span class ='userdanger'>[user] has knocked down [target] with \the [src]!</span>")
if(!iscarbon(user))
target.LAssailant = null
else
@@ -137,4 +67,38 @@
cooldown = 0
return
else
return ..()
return ..()
/obj/item/weapon/melee/classic_baton/telescopic
name = "telescopic baton"
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
icon = 'icons/obj/weapons.dmi'
icon_state = "telebaton_0"
item_state = null
slot_flags = SLOT_BELT
w_class = 2
force = 0
on = 0
/obj/item/weapon/melee/classic_baton/telescopic/attack_self(mob/user as mob)
on = !on
if(on)
user << "<span class ='warning'>You extend the baton.</span>"
icon_state = "telebaton_1"
item_state = "nullrod"
w_class = 4 //doesnt fit in backpack when its on for balance
force = 10 //stunbaton damage
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
user << "<span class ='notice'>You collapse the baton.</span>"
icon_state = "telebaton_0"
item_state = null //no sprite for concealment even when in hand
slot_flags = SLOT_BELT
w_class = 2
force = 0 //not so robust now
attack_verb = list("hit", "poked")
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
+3
View File
@@ -21,6 +21,8 @@
obj/item/weapon/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
var/turf/simulated/floor/F = A
F.dirt = 0
for(var/obj/effect/O in A)
if(istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
qdel(O)
@@ -69,6 +71,7 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A)
name = "advanced mop"
mopcap = 10
icon_state = "advmop"
item_state = "mop"
force = 6
throwforce = 8
throw_range = 4
@@ -16,8 +16,6 @@
g_amt = 50
var/rigged = 0 // true if rigged to explode
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
var/construction_cost = list("metal"=750,"glass"=75)
var/construction_time=100
/obj/item/weapon/stock_parts/cell/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.</span>")
@@ -64,7 +62,6 @@
icon_state = "scell"
maxcharge = 20000
g_amt = 70
construction_cost = list("metal"=750,"glass"=100)
rating = 4
/obj/item/weapon/stock_parts/cell/super/empty/New()
@@ -77,7 +74,6 @@
icon_state = "hpcell"
maxcharge = 30000
g_amt = 80
construction_cost = list("metal"=500,"glass"=150,"gold"=200,"silver"=200)
rating = 5
/obj/item/weapon/stock_parts/cell/hyper/empty/New()
+6 -5
View File
@@ -79,16 +79,17 @@
if(user && user.buckled)
user.buckled.unbuckle()
var/list/tempL = L
var/list/tempL = L.Copy()
var/attempt = null
var/success = 0
while(tempL.len)
attempt = pick(tempL)
success = user.Move(attempt)
if(!success)
tempL.Remove(attempt)
else
user.Move(attempt)
if(get_turf(user) == attempt)
success = 1
break
else
tempL.Remove(attempt)
if(!success)
user.loc = pick(L)
+3 -3
View File
@@ -56,8 +56,8 @@
/obj/item/weapon/shield/energy/IsReflect()
return (active)
/obj/item/weapon/shield/energy/attack_self(mob/living/user)
if((CLUMSY in user.mutations) && prob(50))
/obj/item/weapon/shield/energy/attack_self(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>You beat yourself in the head with [src].</span>"
user.take_organ_damage(5)
active = !active
@@ -108,7 +108,7 @@
throw_speed = 2
w_class = 4
slot_flags = SLOT_BACK
user << "<span class='notice'>You extend the [src].</span>"
user << "<span class='notice'>You extend \the [src].</span>"
else
force = 3
throwforce = 3
@@ -17,11 +17,11 @@
/obj/item/weapon/twohanded/singularityhammer/New()
..()
processing_objects.Add(src)
SSobj.processing.Add(src)
/obj/item/weapon/twohanded/singularityhammer/Destroy()
processing_objects.Remove(src)
SSobj.processing.Remove(src)
..()
@@ -35,19 +35,23 @@
max_w_class = 5
max_combined_w_class = 35
/obj/item/weapon/storage/backpack/holding/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/storage/backpack/holding/can_be_inserted(obj/item/W, stop_messages = 0, mob/user)
if(crit_fail)
user << "<span class='danger'>The Bluespace generator isn't working.</span>"
return
return ..()
/obj/item/weapon/storage/backpack/holding/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user << "<span class='danger'>The Bluespace interfaces of the two devices catastrophically malfunction!</span>"
qdel(W)
var/obj/machinery/singularity/singulo = new /obj/machinery/singularity (get_turf(src))
var/obj/singularity/singulo = new /obj/singularity (get_turf(src))
singulo.energy = 300 //should make it a bit bigger~
message_admins("[key_name_admin(user)] detonated a bag of holding")
log_game("[key_name(user)] detonated a bag of holding")
qdel(src)
singulo.process()
return
..()
@@ -7,34 +7,6 @@
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined")
/obj/item/weapon/storage/belt/proc/can_use()
if(!ismob(loc)) return 0
var/mob/M = loc
if(src in M.get_equipped_items())
return 1
else
return 0
/obj/item/weapon/storage/belt/MouseDrop(obj/over_object as obj, src_location, over_location)
var/mob/M = usr
if(!istype(over_object, /obj/screen))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if (!M.restrained() && !M.stat && can_use())
switch(over_object.name)
if("r_hand")
M.unEquip(src)
M.put_in_r_hand(src)
if("l_hand")
M.unEquip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
/obj/item/weapon/storage/belt/utility
name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
desc = "Holds tools."
@@ -111,6 +83,7 @@
/obj/item/weapon/melee/baton,
/obj/item/weapon/melee/classic_baton,
/obj/item/weapon/grenade/flashbang,
/obj/item/weapon/grenade/chem_grenade/teargas,
/obj/item/weapon/reagent_containers/spray/pepper,
/obj/item/weapon/restraints/handcuffs,
/obj/item/device/flash/handheld,
@@ -120,7 +93,7 @@
/obj/item/weapon/reagent_containers/food/snacks/donut/normal,
/obj/item/weapon/reagent_containers/food/snacks/donut/jelly,
/obj/item/device/flashlight/seclite,
/obj/item/weapon/melee/telebaton
/obj/item/weapon/melee/classic_baton/telescopic
)
/obj/item/weapon/storage/belt/security/New()
+10 -11
View File
@@ -44,7 +44,7 @@
H.update_damage_overlays(0)
return
/obj/item/weapon/storage/book/bible/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/weapon/storage/book/bible/attack(mob/living/M as mob, mob/living/carbon/human/user as mob)
var/chaplain = 0
if(user.mind && (user.mind.assigned_role == "Chaplain"))
@@ -60,7 +60,7 @@
user.take_organ_damage(0,10)
return
if ((CLUMSY in user.mutations) && prob(50))
if (user.disabilities & CLUMSY && prob(50))
user << "<span class='danger'>The [src] slips out of your hand and hits your head.</span>"
user.take_organ_damage(10)
user.Paralyse(20)
@@ -85,13 +85,12 @@
for(var/obj/item/organ/limb/affecting in H.organs)
if(affecting.status == ORGAN_ORGANIC)
if(message_halt == 0)
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='userdanger'>[] heals [] with the power of [src.deity_name]!</span>", user, M), 1)
M << "<span class='danger'>May the power of [src.deity_name] compel you to be healed!</span>"
M.visible_message("<span class='notice'>[user] heals [M] with the power of [src.deity_name]!</span>")
M << "<span class='boldnotice'>May the power of [src.deity_name] compel you to be healed!</span>"
playsound(src.loc, "punch", 25, 1, -1)
message_halt = 1
else
src << "<span class='warning'>[src.deity_name] refuses to heal this metallic taint!</span>"
user << "<span class='warning'>[src.deity_name] refuses to heal this metallic taint!</span>"
return
@@ -101,18 +100,18 @@
if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet))
M.adjustBrainLoss(10)
M << "<span class='danger'>You feel dumber.</span>"
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[user] beats [M] over the head with [src]!</span>"), 1)
M.visible_message("<span class='danger'>[user] beats [M] over the head with [src]!</span>", \
"<span class='userdanger'>[user] beats [M] over the head with [src]!</span>")
playsound(src.loc, "punch", 25, 1, -1)
else if(M.stat == 2)
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[user] smacks [M]'s lifeless corpse with [src].</span>"), 1)
M.visible_message("<span class='danger'>[user] smacks [M]'s lifeless corpse with [src].</span>")
playsound(src.loc, "punch", 25, 1, -1)
return
/obj/item/weapon/storage/book/bible/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(!proximity)
return
if (istype(A, /turf/simulated/floor))
user << "<span class='notice'>You hit the floor with the bible.</span>"
if(user.mind && (user.mind.assigned_role == "Chaplain"))
@@ -61,7 +61,6 @@
/obj/item/weapon/storage/box/survival/New()
..()
contents = list()
sleep(1)
new /obj/item/clothing/mask/breath(src)
new /obj/item/weapon/tank/emergency_oxygen(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
@@ -72,7 +71,6 @@
/obj/item/weapon/storage/box/engineer/New()
..()
contents = list()
sleep(1)
new /obj/item/clothing/mask/breath(src)
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
@@ -85,13 +83,13 @@
/obj/item/weapon/storage/box/gloves/New()
..()
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/color/latex(src)
new /obj/item/clothing/gloves/color/latex(src)
new /obj/item/clothing/gloves/color/latex(src)
new /obj/item/clothing/gloves/color/latex(src)
new /obj/item/clothing/gloves/color/latex(src)
new /obj/item/clothing/gloves/color/latex(src)
new /obj/item/clothing/gloves/color/latex(src)
/obj/item/weapon/storage/box/masks
name = "box of sterile masks"
@@ -526,6 +524,7 @@
storage_slots = 10
w_class = 1
slot_flags = SLOT_BELT
can_hold = list(/obj/item/weapon/match)
/obj/item/weapon/storage/box/matches/New()
..()
@@ -587,4 +586,4 @@
new /obj/item/clothing/tie/armband/deputy(src)
new /obj/item/clothing/tie/armband/deputy(src)
new /obj/item/clothing/tie/armband/deputy(src)
new /obj/item/clothing/tie/armband/deputy(src)
new /obj/item/clothing/tie/armband/deputy(src)
@@ -160,7 +160,6 @@
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
desc = "There are [contents.len] cig\s left!"
return
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W, atom/new_location)
@@ -35,30 +35,33 @@
else
user << "<span class='danger'>Access Denied.</span>"
return
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
else if(istype(W, /obj/item/weapon/melee/energy/blade) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message(text("<span class='notice'>\The [src] has been sliced open by [] with an energy blade!</span>", user), 1, text("<span class='danger'>You hear metal being sliced and sparks flying.</span>"), 2)
return
else
for(var/mob/O in viewers(user, 3))
O.show_message(text("<span class='notice'>\The [src] has been broken by [] with an electromagnetic card!</span>", user), 1, text("You hear a faint electrical spark."), 2)
return
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
visible_message("<span class='notice'>[user] has sliced open \the [src] with an energy blade!</span>", "<span class='danger'>You hear metal being sliced and sparks flying.</span>")
return
if(!locked)
..()
else
user << "<span class='danger'>It's locked!</span>"
return
/obj/item/weapon/storage/lockbox/emag_act(mob/user as mob)
if(!broken)
broken = 1
locked = 0
desc += "It appears to be broken."
icon_state = src.icon_broken
for(var/mob/O in viewers(user, 3))
O.show_message(text("<span class='notice'>\The [src] has been broken by [] with an electromagnetic card!</span>", user), 1, text("You hear a faint electrical spark."), 2)
return
/obj/item/weapon/storage/lockbox/show_to(mob/user as mob)
if(locked)
user << "<span class='danger'>It's locked!</span>"
@@ -33,22 +33,19 @@
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
if (istype(W, /obj/item/weapon/melee/energy/blade) && !emagged)
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
user << "You slice through the lock on [src]."
else
user << "You short out the lock on [src]."
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
user << "You slice through the lock on [src]."
return
if (istype(W, /obj/item/weapon/screwdriver))
@@ -79,6 +76,16 @@
// -> storage/attackby() what with handle insertion, etc
..()
/obj/item/weapon/storage/secure/emag_act(mob/user as mob)
if(locked)
if(!emagged)
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
user << "You short out the lock on [src]."
/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location)
if (locked)
@@ -11,6 +11,7 @@
w_class = 3.0
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
var/storage_slots = 7 //The number of storage slots in this container.
@@ -81,6 +82,12 @@
user.client.screen += closer
user.client.screen += contents
user.s_active = src
is_seeing |= user
/obj/item/weapon/storage/throw_at(atom/target, range, speed)
close_all()
return ..()
/obj/item/weapon/storage/proc/hide_from(mob/user)
@@ -91,6 +98,17 @@
user.client.screen -= contents
if(user.s_active == src)
user.s_active = null
is_seeing -= user
/obj/item/weapon/storage/proc/can_see_contents()
var/list/cansee = list()
for(var/mob/M in is_seeing)
if(M.s_active == src && M.client)
cansee |= M
else
is_seeing -= M
return cansee
/obj/item/weapon/storage/proc/close(mob/user)
@@ -98,13 +116,11 @@
user.s_active = null
/obj/item/weapon/storage/proc/close_all() //returns 1 if any mobs actually got a close(M) call
var/actually_closed = 0
for(var/mob/M in range(1))
if(M.s_active == src)
close(M)
actually_closed = 1
return actually_closed
/obj/item/weapon/storage/proc/close_all()
for(var/mob/M in can_see_contents())
close(M)
. = 1 //returns 1 if any mobs actually got a close(M) call
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
@@ -190,7 +206,7 @@
//This proc return 1 if the item can be picked up and 0 if it can't.
//Set the stop_messages to stop it from printing messages
/obj/item/weapon/storage/proc/can_be_inserted(obj/item/W, stop_messages = 0)
/obj/item/weapon/storage/proc/can_be_inserted(obj/item/W, stop_messages = 0, mob/user)
if(!istype(W) || (W.flags & ABSTRACT)) return //Not an item
if(loc == W)
@@ -247,7 +263,7 @@
//This proc handles items being inserted. It does not perform any checks of whether an item can or can't be inserted. That's done by can_be_inserted()
//The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once,
//such as when picking up all the items on a tile with one click.
/obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W, prevent_warning = 0)
/obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
if(!istype(W)) return 0
if(usr)
if(!usr.unEquip(W))
@@ -270,8 +286,8 @@
M.show_message("<span class='notice'>[usr] puts [W] [preposition]to [src].</span>", 1)
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
for(var/mob/M in can_see_contents())
show_to(M)
update_icon()
return 1
@@ -284,21 +300,14 @@
var/obj/item/weapon/storage/fancy/F = src
F.update_icon(1)
for(var/mob/M in range(1, loc))
if(M.s_active == src)
if(M.client)
M.client.screen -= W
for(var/mob/M in can_see_contents())
if(M.client)
M.client.screen -= W
if(new_location)
if(ismob(loc))
W.dropped(usr)
if(ismob(new_location))
W.layer = 20
else
W.layer = initial(W.layer)
W.loc = new_location
else
W.loc = get_turf(src)
if(ismob(loc))
W.dropped(usr)
W.layer = initial(W.layer)
W.loc = new_location
if(usr)
orient2hud(usr)
@@ -319,10 +328,10 @@
user << "<span class='notice'>You're a robot. No.</span>"
return 0 //Robots can't interact with storage items.
if(!can_be_inserted(W))
if(!can_be_inserted(W, 0 , user))
return 0
handle_item_insertion(W)
handle_item_insertion(W, 0 , user)
return 1
@@ -394,7 +403,7 @@
/obj/item/weapon/storage/New()
..()
if(allow_quick_empty)
verbs += /obj/item/weapon/storage/verb/quick_empty
else
@@ -61,7 +61,7 @@
new /obj/item/stack/cable_coil(src,30,color)
new /obj/item/stack/cable_coil(src,30,color)
if(prob(5))
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/clothing/gloves/color/yellow(src)
else
new /obj/item/stack/cable_coil(src,30,color)
@@ -81,8 +81,7 @@
new /obj/item/weapon/melee/energy/sword/saber(src)
new /obj/item/weapon/melee/energy/sword/saber(src)
new /obj/item/weapon/dnainjector/telemut/darkbundle(src)
new /obj/item/clothing/head/chaplain_hood(src)
new /obj/item/clothing/suit/chaplain_hoodie(src)
new /obj/item/clothing/suit/toggle/chaplain_hoodie(src)
new /obj/item/weapon/card/id/syndicate(src)
return
+40 -30
View File
@@ -79,7 +79,7 @@
bcell.updateicon()
bcell.loc = get_turf(src.loc)
bcell = null
user << "<span class='notice'>You remove the cell from the [src].</span>"
user << "<span class='notice'>You remove the cell from [src].</span>"
status = 0
update_icon()
return
@@ -100,9 +100,10 @@
update_icon()
add_fingerprint(user)
/obj/item/weapon/melee/baton/attack(mob/M, mob/user)
if(status && (CLUMSY in user.mutations) && prob(50))
user << "<span class='danger'>You accidentally hit yourself with [src]!</span>"
/obj/item/weapon/melee/baton/attack(mob/M, mob/living/carbon/human/user)
if(status && user.disabilities & CLUMSY && prob(50))
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
user.Weaken(stunforce*3)
deductcharge(hitcost)
return
@@ -115,35 +116,44 @@
var/mob/living/L = M
if(user.a_intent == "harm")
..()
else if(!status)
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")
return
if(status)
user.lastattacked = L
L.lastattacker = user
L.Stun(stunforce)
L.Weaken(stunforce)
L.apply_effect(STUTTER, stunforce)
L.visible_message("<span class='danger'>[L] has been stunned with [src] by [user]!</span>")
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
if(isrobot(loc))
var/mob/living/silicon/robot/R = loc
if(R && R.cell)
R.cell.use(hitcost)
if(user.a_intent != "harm")
if(status)
user.do_attack_animation(L)
baton_stun(L, user)
else
deductcharge(hitcost)
L.visible_message("<span class='warning'>[user] has prodded [L] with [src]. Luckily it was off.</span>", \
"<span class='warning'>[user] has prodded you with [src]. Luckily it was off</span>")
return
else
..()
if(status)
baton_stun(L, user)
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.forcesay(hit_appends)
add_logs(user, L, "stunned")
/obj/item/weapon/melee/baton/proc/baton_stun(mob/living/L, mob/user)
user.lastattacked = L
L.lastattacker = user
L.Stun(stunforce)
L.Weaken(stunforce)
L.apply_effect(STUTTER, stunforce)
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
if(isrobot(loc))
var/mob/living/silicon/robot/R = loc
if(R && R.cell)
R.cell.use(hitcost)
else
deductcharge(hitcost)
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.forcesay(hit_appends)
add_logs(user, L, "stunned")
/obj/item/weapon/melee/baton/emp_act(severity)
if(bcell)
@@ -1,97 +0,0 @@
/* Table parts and rack parts
* Contains:
* Table Parts
* Reinforced Table Parts
* Wooden Table Parts
* Rack Parts
*/
/*
* Table Parts
*/
/obj/item/weapon/table_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( user.loc )
//SN src = null
qdel(src)
if (istype(W, /obj/item/stack/rods))
var/obj/item/stack/rods/V = W
if (V.use(4))
new /obj/item/weapon/table_parts/reinforced( user.loc )
user << "<span class='notice'>You reinforce the [name].</span>"
qdel(src)
else
user << "<span class='warning'>You need four rods to reinforce table parts.</span>"
return
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
user << "<span class='notice'>Constructing table..</span>"
if (do_after(user, construct_delay))
var/obj/new_table = new table_type( user.loc )
new_table.add_fingerprint(user)
user.drop_item()
qdel(src)
return
/*
* Reinforced Table Parts
*/
/obj/item/weapon/table_parts/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( user.loc )
new /obj/item/stack/rods( user.loc )
qdel(src)
/*
* Wooden Table Parts
*/
/obj/item/weapon/table_parts/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/mineral/wood( user.loc )
qdel(src)
if (istype(W, /obj/item/stack/tile/grass))
var/obj/item/stack/tile/grass/Grass = W
if(Grass.amount > 1)
Grass.amount -= 1
else
qdel(Grass)
var/obj/item/weapon/table_parts/wood/poker/P = new
user.put_in_hands(P)
visible_message("<span class='notice'>[user] adds grass to the wooden table parts</span>")
qdel(src)
/*
* Poker Table Parts
*/
/obj/item/weapon/table_parts/wood/poker/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/mineral/wood( user.loc )
new /obj/item/stack/tile/grass( user.loc )
qdel(src)
/*
* Rack Parts
*/
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( user.loc )
qdel(src)
return
return
/obj/item/weapon/rack_parts/attack_self(mob/user as mob)
user << "<span class='notice'>Constructing rack...</span>"
if (do_after(user, 50))
var/obj/structure/rack/R = new /obj/structure/rack( user.loc )
R.add_fingerprint(user)
user.drop_item()
qdel(src)
return
@@ -41,6 +41,7 @@
icon_state = initial(icon_state)
// item_state = initial(item_state)
ion_trail.stop()
usr << "You toggle the jetpack [on? "on":"off"]."
return
@@ -24,7 +24,7 @@
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
processing_objects.Add(src)
SSobj.processing.Add(src)
return
@@ -32,7 +32,7 @@
if(air_contents)
del(air_contents)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
..()
@@ -83,10 +83,6 @@
if ((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
atmosanalyzer_scan(air_contents, user)
else if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W
LB.blow(src)
src.add_fingerprint(user)
if(istype(W, /obj/item/device/assembly_holder))
bomb_assemble(W,user)
@@ -20,26 +20,27 @@
noz = make_noz()
/obj/item/weapon/watertank/ui_action_click()
if (usr.get_item_by_slot(slot_back) == src)
toggle_mister()
else
usr << "<span class='notice'>The watertank needs to be on your back to use!</span>"
return
toggle_mister()
/obj/item/weapon/watertank/verb/toggle_mister()
set name = "Toggle Mister"
set category = "Object"
if (usr.get_item_by_slot(slot_back) != src)
usr << "<span class='notice'>The watertank needs to be on your back to use.</span>"
return
if(usr.stat || !usr.canmove || usr.restrained())
return
on = !on
var/mob/living/carbon/human/user = usr
if(on)
if(noz == null)
noz = make_noz()
//Detach the nozzle into the user's hands
var/list/L = list("left hand" = slot_l_hand,"right hand" = slot_r_hand)
if(!user.equip_in_one_of_slots(noz, L))
if(!user.put_in_hands(noz))
on = 0
user << "<span class='notice'>You need a free hand to hold the mister!</span>"
user << "<span class='notice'>You need a free hand to hold the mister.</span>"
return
noz.loc = user
else
@@ -57,16 +58,48 @@
/obj/item/weapon/watertank/proc/remove_noz(mob/user)
var/mob/living/carbon/human/M = user
if(noz in get_both_hands(M))
M.unEquip(noz)
M.unEquip(noz, 1)
return
/obj/item/weapon/watertank/Destroy()
if (on)
var/M = get(noz, /mob)
remove_noz(M)
qdel(noz)
noz = null
..()
return
/obj/item/weapon/watertank/attack_hand(mob/user as mob)
if(src.loc == user)
ui_action_click()
return
..()
/obj/item/weapon/watertank/MouseDrop(obj/over_object)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
switch(over_object.name)
if("r_hand")
if(H.r_hand)
return
if(!H.unEquip(src))
return
H.put_in_r_hand(src)
if("l_hand")
if(H.l_hand)
return
if(!H.unEquip(src))
return
H.put_in_l_hand(src)
return
/obj/item/weapon/watertank/attackby(obj/item/W, mob/user)
if(W == noz)
remove_noz(user)
return
..()
// This mister item is intended as an extension of the watertank and always attached to it.
// Therefore, it's designed to be "locked" to the player's hands or extended back onto
// the watertank backpack. Allowing it to be placed elsewhere or created without a parent
@@ -81,6 +114,7 @@
amount_per_transfer_from_this = 50
possible_transfer_amounts = list(25,50,100)
volume = 500
flags = NODROP | OPENCONTAINER | NOBLUDGEON
var/obj/item/weapon/watertank/tank
@@ -93,7 +127,7 @@
return
/obj/item/weapon/reagent_containers/spray/mister/dropped(mob/user as mob)
user << "<span class='notice'>The mister snaps back onto the watertank!</span>"
user << "<span class='notice'>The mister snaps back onto the watertank.</span>"
tank.on = 0
loc = tank
@@ -108,6 +142,16 @@
else
return 1
/obj/item/weapon/reagent_containers/spray/mister/Move()
..()
if(loc != tank.loc)
loc = tank.loc
/obj/item/weapon/reagent_containers/spray/mister/afterattack(obj/target, mob/user, proximity)
if(target.loc == loc || target == tank) //Safety check so you don't fill your mister with mutagen or something and then blast yourself in the face with it putting it away
return
..()
//Janitor tank
/obj/item/weapon/watertank/janitor
name = "backpack water tank"
@@ -119,7 +163,6 @@
..()
reagents.add_reagent("cleaner", 500)
/obj/item/weapon/reagent_containers/spray/mister/janitor
name = "janitor spray nozzle"
desc = "A janitorial spray nozzle attached to a watertank, designed to clean up large messes."
@@ -136,25 +179,45 @@
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
user << "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>"
//Atmos tank
//ATMOS FIRE FIGHTING BACKPACK
#define EXTINGUISHER 0
#define NANOFROST 1
#define METAL_FOAM 2
/obj/item/weapon/watertank/atmos
name = "backpack water tank"
desc = "A backpack watertank with fire extinguisher nozzle, intended to fight fires. Shouldn't toxins have one of these?"
name = "backpack firefighter tank"
desc = "A refridgerated and pressurized backpack tank with extinguisher nozzle, intended to fight fires. Swaps between extinguisher, nanofrost launcher, and metal foam dispenser for breaches. Nanofrost converts plasma in the air to nitrogen, but only if it is combusting at the time."
icon_state = "waterbackpackatmos"
item_state = "waterbackpackatmos"
volume = 100
volume = 200
/obj/item/weapon/watertank/atmos/make_noz()
return new /obj/item/weapon/extinguisher/mini/nozzle(src)
/obj/item/weapon/watertank/atmos/dropped(mob/user as mob)
icon_state = "waterbackpackatmos"
if(istype(noz, /obj/item/weapon/extinguisher/mini/nozzle))
var/obj/item/weapon/extinguisher/mini/nozzle/N = noz
N.nozzle_mode = 0
/obj/item/weapon/extinguisher/mini/nozzle
name = "fire extinguisher nozzle"
desc = "A fire extinguisher nozzle attached to a water tank."
name = "extinguisher nozzle"
desc = "A heavy duty nozzle attached to a firefighter's backpack tank."
icon = 'icons/obj/hydroponics.dmi'
icon_state = "misteratmos"
item_state = "misteratmos"
icon_state = "atmos_nozzle"
item_state = "nozzleatmos"
safety = 0
max_water = 200
power = 8
precision = 1
cooling_power = 5
w_class = 5
flags = NODROP //Necessary to ensure that the nozzle and tank never seperate
var/obj/item/weapon/watertank/tank
var/nozzle_mode = 0
var/metal_synthesis_cooldown = 0
var/nanofrost_cooldown = 0
/obj/item/weapon/extinguisher/mini/nozzle/New(parent_tank)
if(check_tank_exists(parent_tank, src))
@@ -164,10 +227,168 @@
loc = tank
return
/obj/item/weapon/extinguisher/mini/nozzle/Move()
..()
if(loc != tank.loc)
loc = tank
return
/obj/item/weapon/extinguisher/mini/nozzle/attack_self(mob/user as mob)
switch(nozzle_mode)
if(EXTINGUISHER)
nozzle_mode = NANOFROST
tank.icon_state = "waterbackpackatmos_1"
user << "Swapped to nanofrost launcher"
return
if(NANOFROST)
nozzle_mode = METAL_FOAM
tank.icon_state = "waterbackpackatmos_2"
user << "Swapped to metal foam synthesizer"
return
if(METAL_FOAM)
nozzle_mode = EXTINGUISHER
tank.icon_state = "waterbackpackatmos_0"
user << "Swapped to water extinguisher"
return
return
/obj/item/weapon/extinguisher/mini/nozzle/dropped(mob/user as mob)
user << "<span class='notice'>The nozzle snaps back onto the watertank!</span>"
user << "<span class='notice'>The nozzle snaps back onto the tank!</span>"
tank.on = 0
loc = tank
/obj/item/weapon/extinguisher/mini/nozzle/attack_self()
return
/obj/item/weapon/extinguisher/mini/nozzle/afterattack(atom/target, mob/user)
if(nozzle_mode == EXTINGUISHER)
..()
return
var/Adj = user.Adjacent(target)
if(Adj)
AttemptRefill(target, user)
if(nozzle_mode == NANOFROST)
if(Adj)
return //Safety check so you don't blast yourself trying to refill your tank
var/datum/reagents/R = reagents
if(R.total_volume < 100)
user << "You need at least 100 units of water to use the nanofrost launcher!"
return
if(nanofrost_cooldown)
user << "Nanofrost launcher is still recharging"
return
nanofrost_cooldown = 1
R.remove_any(100)
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
log_game("[user.ckey] ([user.name]) used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).")
playsound(src,'sound/items/syringeproj.ogg',40,1)
for(var/a=0, a<5, a++)
step_towards(A, target)
sleep(2)
A.Smoke()
spawn(100)
if(src)
nanofrost_cooldown = 0
return
if(nozzle_mode == METAL_FOAM)
if(!Adj|| !istype(target, /turf))
return
if(metal_synthesis_cooldown < 5)
var/obj/effect/effect/foam/F = new /obj/effect/effect/foam(get_turf(target), 1)
F.amount = 0
metal_synthesis_cooldown++
spawn(100)
if(src)
metal_synthesis_cooldown--
else
user << "Metal foam mix is still being synthesized."
return
/obj/effect/nanofrost_container
name = "nanofrost container"
desc = "A frozen shell of ice containing nanofrost that freezes the surrounding area after activation."
icon = 'icons/effects/effects.dmi'
icon_state = "frozen_smoke_capsule"
mouse_opacity = 0
pass_flags = PASSTABLE
/obj/effect/nanofrost_container/proc/Smoke()
new /obj/effect/effect/freezing_smoke(src.loc, 6, 1)
var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc)
F.color = "#B2FFFF"
F.name = "nanofrost residue"
F.desc = "Residue left behind from a nanofrost detonation. Perhaps there was a fire here?"
playsound(src,'sound/effects/bamf.ogg',100,1)
qdel(src)
/obj/effect/effect/freezing_smoke
name = "nanofrost smoke"
icon_state = "smoke"
opacity = 0
anchored = 0.0
mouse_opacity = 0
icon = 'icons/effects/96x96.dmi'
pixel_x = -32
pixel_y = -32
color = "#B2FFFF"
var/amount = 0
/obj/effect/effect/freezing_smoke/New(loc, var/amt, var/blast)
..()
spawn(100+rand(10,30))
delete()
amount = amt
if(amount)
var/datum/effect/effect/system/freezing_smoke_spread/F = new /datum/effect/effect/system/freezing_smoke_spread
F.set_up(amount, 0, src.loc)
F.start()
if(blast)
for(var/turf/T in trange(2, src.loc))
Chilled(T)
return
/obj/effect/effect/freezing_smoke/proc/Chilled(atom/A)
if(istype(A, /turf/simulated))
var/turf/simulated/T = A
if(T.air)
var/datum/gas_mixture/G = T.air
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
G.temperature = 2
T.air_update_turf()
for(var/obj/effect/hotspot/H in T)
H.Kill()
if(G.toxins)
G.nitrogen += (G.toxins)
G.toxins = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/V in T)
V.welded = 1
V.update_icon()
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
for(var/mob/living/L in T)
L.ExtinguishMob()
return
/datum/effect/effect/system/freezing_smoke_spread
/datum/effect/effect/system/freezing_smoke_spread/set_up(n = 6, c = 0, loca)
number = n
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
/datum/effect/effect/system/freezing_smoke_spread/start()
var/i = 0
for(i=0, i<number, i++)
spawn(0)
var/obj/effect/effect/freezing_smoke/smoke = new /obj/effect/effect/freezing_smoke(location, 0, 0)
smoke.amount = 0
var/direction = pick(alldirs)
for(i=0, i<rand(1,3), i++)
sleep(5)
step(smoke,direction)
spawn(150+rand(10,30))
if(smoke)
fadeOut(smoke)
smoke.delete()
#undef EXTINGUISHER
#undef NANOFROST
#undef METAL_FOAM
@@ -138,7 +138,7 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
if(!current_location||current_location.z==2||current_location.z>=7 || !istype(user.loc, /turf))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
var/list/L = list( )
+11 -14
View File
@@ -86,7 +86,7 @@
if(!istype(M)) return ..()
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
return ..()
if((CLUMSY in user.mutations) && prob(50))
if(user.disabilities & CLUMSY && prob(50))
M = user
return eyestab(M,user)
@@ -204,15 +204,15 @@
force = 3
damtype = "brute"
update_icon()
processing_objects.Remove(src)
SSobj.processing.Remove(src)
return
//Welders left on now use up fuel, but lets not have them run out quite that fast
if(1)
force = 15
damtype = "fire"
update_icon()
if(prob(5))
remove_fuel(1)
update_icon()
//This is to start fires. process() is only called if the welder is on.
var/turf/location = loc
@@ -283,14 +283,12 @@
/obj/item/weapon/weldingtool/proc/check_fuel(mob/user)
if(get_fuel() <= 0 && welding)
toggle(user, 1)
update_icon()
//mob icon update
if(ismob(loc))
var/mob/M = loc
if(M.r_hand == src)
M.update_inv_r_hand(0)
else if(M.l_hand == src)
M.update_inv_l_hand(0)
M.update_inv_r_hand(0)
M.update_inv_l_hand(0)
return 0
return 1
@@ -308,7 +306,7 @@
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
icon_state = "welder1"
processing_objects.Add(src)
SSobj.processing.Add(src)
else
user << "<span class='notice'>You need more fuel.</span>"
welding = 0
@@ -321,7 +319,7 @@
damtype = "brute"
hitsound = "swing_hit"
icon_state = "welder"
welding = 0
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
@@ -351,14 +349,14 @@
user << "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>"
if (prob(user.eye_stat - 25 + 1))
user << "<span class='warning'>You go blind!</span>"
user.sdisabilities |= BLIND
user.disabilities |= BLIND
else if(prob(user.eye_stat - 15 + 1))
user << "<span class='warning'>You go blind!</span>"
user.eye_blind = 5
user.eye_blurry = 5
user.disabilities |= NEARSIGHTED
user.disabilities |= NEARSIGHT
spawn(100)
user.disabilities &= ~NEARSIGHTED
user.disabilities &= ~NEARSIGHT
/obj/item/weapon/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
if(welding)
@@ -416,7 +414,6 @@
m_amt = 70
g_amt = 120
origin_tech = "engineering=4;plasmatech=3"
icon_state = "ewelder"
var/last_gen = 0
+42 -49
View File
@@ -27,24 +27,46 @@
var/wieldsound = null
var/unwieldsound = null
/obj/item/weapon/twohanded/proc/unwield()
/obj/item/weapon/twohanded/proc/unwield(mob/living/carbon/user)
if(!wielded) return
wielded = 0
force = force_unwielded
name = "[initial(name)]"
update_icon()
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
if(unwieldsound)
playsound(loc, unwieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
O.unwield()
return
/obj/item/weapon/twohanded/proc/wield()
/obj/item/weapon/twohanded/proc/wield(mob/living/carbon/user)
if(wielded) return
if(istype(user,/mob/living/carbon/monkey) )
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
if(user.get_inactive_hand())
user << "<span class='warning'>You need your other hand to be empty</span>"
return
wielded = 1
force = force_wielded
name = "[initial(name)] (Wielded)"
update_icon()
user << "<span class='notice'>You grab the [initial(name)] with both hands.</span>"
if (wieldsound)
playsound(loc, wieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[initial(name)] - offhand"
O.desc = "Your second grip on the [initial(name)]"
user.put_in_inactive_hand(O)
return
/obj/item/weapon/twohanded/mob_can_equip(M as mob, slot)
//Cannot equip wielded items.
if(wielded)
M << "<span class='warning'>Unwield the [initial(name)] first!</span>"
return 0
return ..()
/obj/item/weapon/twohanded/dropped(mob/user as mob)
@@ -58,41 +80,12 @@
/obj/item/weapon/twohanded/update_icon()
return
/obj/item/weapon/twohanded/pickup(mob/user)
unwield()
/obj/item/weapon/twohanded/attack_self(mob/user as mob)
if( istype(user,/mob/living/carbon/monkey) )
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
..()
if(wielded) //Trying to unwield it
unwield()
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
if (src.unwieldsound)
playsound(src.loc, unwieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
O.unwield()
return
unwield(user)
else //Trying to wield it
if(user.get_inactive_hand())
user << "<span class='warning'>You need your other hand to be empty</span>"
return
wield()
user << "<span class='notice'>You grab the [initial(name)] with both hands.</span>"
if (src.wieldsound)
playsound(src.loc, wieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[initial(name)] - offhand"
O.desc = "Your second grip on the [initial(name)]"
user.put_in_inactive_hand(O)
return
wield(user)
///////////OFFHAND///////////////
/obj/item/weapon/twohanded/offhand
@@ -212,9 +205,9 @@ obj/item/weapon/twohanded/
clean_blood()//blood overlays get weird otherwise, because the sprite changes.
return
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/carbon/human/user as mob)
..()
if((CLUMSY in user.mutations) && (wielded) && prob(40))
if(user.disabilities & CLUMSY && (wielded) && prob(40))
impale(user)
return
if((wielded) && prob(50))
@@ -224,7 +217,7 @@ obj/item/weapon/twohanded/
sleep(1)
/obj/item/weapon/twohanded/dualsaber/proc/impale(mob/living/user as mob)
user << "<span class='warning'>You twirl around a bit before losing your balance and impaling yourself on the [src].</span>"
user << "<span class='warning'>You twirl around a bit before losing your balance and impaling yourself on \the [src].</span>"
if (force_wielded)
user.take_organ_damage(20,25)
else
@@ -236,14 +229,18 @@ obj/item/weapon/twohanded/
else
return 0
/obj/item/weapon/twohanded/dualsaber/wield() //Specific wield () hulk checks due to reflect_chance var for balance issues and switches hitsounds.
..()
var/mob/living/M = loc
if(istype(loc, /mob/living))
if (HULK in M.mutations)
loc << "<span class='warning'>You lack the grace to wield this to its full extent.</span>"
hitsound = 'sound/weapons/blade1.ogg'
/obj/item/weapon/twohanded/dualsaber/attack_hulk(mob/living/carbon/human/user) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
if(wielded)
user << "<span class='warning'>You cant pick up such dangerous item with your meaty hands without losing fingers, better not to.</span>"
return 1
/obj/item/weapon/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflect_chance var for balance issues and switches hitsounds.
if(istype(M))
if(M.dna.check_mutation(HULK))
M << "<span class='warning'>You lack the grace to wield this.</span>"
return
..()
hitsound = 'sound/weapons/blade1.ogg'
/obj/item/weapon/twohanded/dualsaber/unwield() //Specific unwield () to switch hitsounds.
..()
@@ -251,11 +248,7 @@ obj/item/weapon/twohanded/
/obj/item/weapon/twohanded/dualsaber/IsReflect()
if(wielded)
var/mob/living/M = loc
if(istype(loc, /mob/living))
if (HULK in M.mutations)
return
return 1
return 1
/obj/item/weapon/twohanded/dualsaber/green
New()
@@ -35,7 +35,7 @@
charges = 46//of 138
/obj/item/weapon/vending_refill/coffee
machine_name = "hot drinks"
machine_name = "Solar's Best Hot Drinks"
icon_state = "refill_joe"
charges = 28//of 85
@@ -49,11 +49,16 @@
charges = 21//of 65
/obj/item/weapon/vending_refill/cigarette
machine_name = "cigarette"
machine_name = "ShadyCigs Deluxe"
icon_state = "refill_smoke"
charges = 9// of 29
/obj/item/weapon/vending_refill/autodrobe
machine_name = "AutoDrobe"
icon_state = "refill_costume"
charges = 19// of 58
charges = 20// of 60
/obj/item/weapon/vending_refill/clothing
machine_name = "ClothesMate"
icon_state = "refill_clothes"
charges = 20// of 62
+12 -3
View File
@@ -11,12 +11,12 @@
var/force = 0
/obj/proc/process()
processing_objects.Remove(src)
SSobj.processing.Remove(src)
return 0
/obj/Destroy()
if(!istype(src, /obj/machinery))
processing_objects.Remove(src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
SSobj.processing.Remove(src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
..()
/obj/assume_air(datum/gas_mixture/giver)
@@ -73,7 +73,7 @@
var/mob/living/carbon/human/H = usr
if(!(usr in nearby))
if(usr.client && usr.machine==src)
if(TK in H.mutations)
if(H.dna.check_mutation(TK))
is_in_use = 1
src.attack_hand(usr)
in_use = is_in_use
@@ -123,6 +123,15 @@
/obj/proc/hide(h)
return
/obj/ex_act(severity, target)
if(severity == 1 || target == src)
qdel(src)
else if(severity == 2)
if(prob(50))
qdel(src)
if(!gc_destroyed)
..()
//If a mob logouts/logins in side of an object you can use this proc
/obj/proc/on_log()
..()

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