Merge remote-tracking branch 'upstream/dev' into inventoryfix

Conflicts:
	code/game/gamemodes/revolution/rp-revolution.dm
	code/game/machinery/kitchen/juicer.dm
	code/game/objects/items/stacks/stack.dm
	code/game/objects/items/weapons/cigs_lighters.dm
	code/game/objects/structures/stool_bed_chair_nest/stools.dm
	code/modules/destilery/main.dm
	code/modules/hydroponics/biogenerator.dm
	code/modules/mob/living/carbon/human/inventory.dm
	code/modules/mob/living/carbon/monkey/inventory.dm
	code/modules/projectiles/guns/launcher/pneumatic.dm
This commit is contained in:
mwerezak
2015-03-31 01:37:55 -04:00
1082 changed files with 48122 additions and 45149 deletions
+86
View File
@@ -0,0 +1,86 @@
/obj
var/can_buckle = 0
var/buckle_movable = 0
var/buckle_lying = -1 //bed-like behavior, forces mob.lying = buckle_lying if != -1
var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
var/mob/living/buckled_mob = null
/obj/attack_hand(mob/living/user)
. = ..()
if(can_buckle && buckled_mob)
user_unbuckle_mob(user)
/obj/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
if(can_buckle && istype(M))
user_buckle_mob(M, user)
/obj/Del()
unbuckle_mob()
return ..()
/obj/proc/buckle_mob(mob/living/M)
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || M.pinned.len || (buckle_require_restraints && !M.restrained()))
return 0
M.buckled = src
M.facing_dir = null
M.set_dir(dir)
M.update_canmove()
buckled_mob = M
post_buckle_mob(M)
return 1
/obj/proc/unbuckle_mob()
if(buckled_mob && buckled_mob.buckled == src)
. = buckled_mob
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
buckled_mob = null
post_buckle_mob(.)
/obj/proc/post_buckle_mob(mob/living/M)
return
/obj/proc/user_buckle_mob(mob/living/M, mob/user)
if(!ticker)
user << "<span class='warning'>You can't buckle anyone in before the game starts.</span>"
if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat || istype(user, /mob/living/silicon/pai))
return
if(istype(M, /mob/living/carbon/slime))
user << "<span class='warning'>The [M] is too squishy to buckle in.</span>"
return
add_fingerprint(user)
unbuckle_mob()
if(buckle_mob(M))
if(M == user)
M.visible_message(\
"<span class='notice'>[M.name] buckles themselves to [src].</span>",\
"<span class='notice'>You buckle yourself to [src].</span>",\
"<span class='notice'>You hear metal clanking.</span>")
else
M.visible_message(\
"<span class='danger'>[M.name] is buckled to [src] by [user.name]!</span>",\
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
"<span class='notice'>You hear metal clanking.</span>")
/obj/proc/user_unbuckle_mob(mob/user)
var/mob/living/M = unbuckle_mob()
if(M)
if(M != user)
M.visible_message(\
"<span class='notice'>[M.name] was unbuckled by [user.name]!</span>",\
"<span class='notice'>You were unbuckled from [src] by [user.name].</span>",\
"<span class='notice'>You hear metal clanking.</span>")
else
M.visible_message(\
"<span class='notice'>[M.name] unbuckled themselves!</span>",\
"<span class='notice'>You unbuckle yourself from [src].</span>",\
"<span class='notice'>You hear metal clanking.</span>")
add_fingerprint(user)
return M
-126
View File
@@ -1,126 +0,0 @@
/*
/obj/effect/biomass
icon = 'icons/obj/biomass.dmi'
icon_state = "stage1"
opacity = 0
density = 0
anchored = 1
layer = 20 //DEBUG
var/health = 10
var/stage = 1
var/obj/effect/rift/originalRift = null //the originating rift of that biomass
var/maxDistance = 15 //the maximum length of a thread
var/newSpreadDistance = 10 //the length of a thread at which new ones are created
var/curDistance = 1 //the current length of a thread
var/continueChance = 3 //weighed chance of continuing in the same direction. turning left or right has 1 weight both
var/spreadDelay = 1 //will change to something bigger later, but right now I want it to spread as fast as possible for testing
/obj/effect/rift
icon = 'icons/obj/biomass.dmi'
icon_state = "rift"
var/list/obj/effect/biomass/linkedBiomass = list() //all the biomass patches that have spread from it
var/newicon = 1 //DEBUG
/obj/effect/rift/New()
set background = 1
..()
for(var/turf/T in orange(1,src))
if(!IsValidBiomassLoc(T))
continue
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
starting.set_dir(get_dir(src,starting))
starting.originalRift = src
linkedBiomass += starting
spawn(1) //DEBUG
starting.icon_state = "[newicon]"
/obj/effect/rift/Del()
for(var/obj/effect/biomass/biomass in linkedBiomass)
del(biomass)
..()
/obj/effect/biomass/New()
set background = 1
..()
if(!IsValidBiomassLoc(loc,src))
del(src)
return
spawn(1) //so that the dir and stuff can be set by the source first
if(curDistance >= maxDistance)
return
switch(dir)
if(NORTHWEST)
set_dir(NORTH)
if(NORTHEAST)
set_dir(EAST)
if(SOUTHWEST)
set_dir(WEST)
if(SOUTHEAST)
set_dir(SOUTH)
sleep(spreadDelay)
Spread()
/obj/effect/biomass/proc/Spread(var/direction = dir)
set background = 1
var/possibleDirsInt = 0
for(var/newDirection in cardinal)
if(newDirection == turn(direction,180)) //can't go backwards
continue
var/turf/T = get_step(loc,newDirection)
if(!IsValidBiomassLoc(T,src))
continue
possibleDirsInt |= newDirection
var/list/possibleDirs = list()
if(possibleDirsInt & direction)
for(var/i=0 , i<continueChance , i++)
possibleDirs += direction
if(possibleDirsInt & turn(direction,90))
possibleDirs += turn(direction,90)
if(possibleDirsInt & turn(direction,-90))
possibleDirs += turn(direction,-90)
if(!possibleDirs.len)
return
direction = pick(possibleDirs)
var/obj/effect/biomass/newBiomass = new /obj/effect/biomass(get_step(src,direction))
newBiomass.curDistance = curDistance + 1
newBiomass.maxDistance = maxDistance
newBiomass.set_dir(direction)
newBiomass.originalRift = originalRift
newBiomass.icon_state = "[originalRift.newicon]" //DEBUG
originalRift.linkedBiomass += newBiomass
if(!(curDistance%newSpreadDistance))
var/obj/effect/rift/newrift = new /obj/effect/rift(loc)
if(originalRift.newicon <= 3)
newrift.newicon = originalRift.newicon + 1
// NewSpread()
/obj/effect/biomass/proc/NewSpread(maxDistance = 15)
set background = 1
for(var/turf/T in orange(1,src))
if(!IsValidBiomassLoc(T,src))
continue
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
starting.set_dir(get_dir(src,starting))
starting.maxDistance = maxDistance
/proc/IsValidBiomassLoc(turf/location,obj/effect/biomass/source = null)
set background = 1
for(var/obj/effect/biomass/biomass in location)
if(biomass != source)
return 0
if(istype(location,/turf/space))
return 0
if(location.density)
return 0
return 1
*/
+38 -15
View File
@@ -21,7 +21,18 @@
var/list/targetTurfs
var/list/wallList
var/density
var/show_log = 1
/datum/effect/effect/system/smoke_spread/chem/spores
show_log = 0
var/datum/seed/seed
/datum/effect/effect/system/smoke_spread/chem/spores/New(seed_name)
if(seed_name && plant_controller)
seed = plant_controller.seeds[seed_name]
if(!seed)
del(src)
..()
/datum/effect/effect/system/smoke_spread/chem/New()
..()
@@ -78,16 +89,17 @@
var/where = "[A.name] | [location.x], [location.y]"
var/whereLink = "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
if(carry.my_atom.fingerprintslast)
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
var/more = ""
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
if(show_log)
if(carry.my_atom.fingerprintslast)
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
var/more = ""
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
//------------------------------------------
@@ -165,7 +177,7 @@
continue
var/offset = 0
var/points = round((radius * 2 * PI) / arcLength)
var/points = round((radius * 2 * M_PI) / arcLength)
var/angle = round(ToDegrees(arcLength / radius), 1)
if(!IsInteger(radius))
@@ -186,8 +198,14 @@
// Randomizes and spawns the smoke effect.
// Also handles deleting the smoke once the effect is finished.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1)
var/obj/effect/effect/smoke/chem/smoke = new(location)
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/effect/smoke/chem/passed_smoke)
var/obj/effect/effect/smoke/chem/smoke
if(passed_smoke)
smoke = passed_smoke
else
smoke = new(location)
if(chemholder.reagents.reagent_list.len)
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
smoke.icon = I
@@ -202,6 +220,11 @@
fadeOut(smoke)
smoke.delete()
/datum/effect/effect/system/smoke_spread/chem/spores/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1)
var/obj/effect/effect/smoke/chem/spores = new(location)
spores.name = "cloud of [seed.seed_name] [seed.seed_noun]"
..(T, I, dist, spores)
//------------------------------------------
// Fades out the smoke smoothly using it's alpha variable.
//------------------------------------------
@@ -232,7 +255,7 @@
if(!(target in wallList))
wallList += target
continue
if(target in pending)
continue
if(target in complete)
@@ -241,7 +264,7 @@
continue
if(current.c_airblock(target)) //this is needed to stop chemsmoke from passing through thin window walls
continue
if(target.c_airblock(current))
if(target.c_airblock(current))
continue
pending += target
@@ -1,10 +1,10 @@
obj/effect/decal/cleanable/liquid_fuel
/obj/effect/decal/cleanable/liquid_fuel
//Liquid fuel is used for things that used to rely on volatile fuels or phoron being contained to a couple tiles.
icon = 'icons/effects/effects.dmi'
icon_state = "fuel"
layer = TURF_LAYER+0.2
anchored = 1
var/amount = 1 //Basically moles.
var/amount = 1
New(turf/newLoc,amt=1,nologs=0)
if(!nologs)
@@ -12,29 +12,40 @@ obj/effect/decal/cleanable/liquid_fuel
log_game("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z])")
src.amount = amt
var/has_spread = 0
//Be absorbed by any other liquid fuel in the tile.
for(var/obj/effect/decal/cleanable/liquid_fuel/other in newLoc)
if(other != src)
other.amount += src.amount
spawn other.Spread()
del src
other.Spread()
has_spread = 1
break
Spread()
. = ..()
if(!has_spread)
Spread()
else
del(src)
proc/Spread()
proc/Spread(exclude=list())
//Allows liquid fuels to sometimes flow into other tiles.
if(amount < 5.0) return
if(amount < 15) return //lets suppose welder fuel is fairly thick and sticky. For something like water, 5 or less would be more appropriate.
var/turf/simulated/S = loc
if(!istype(S)) return
for(var/d in cardinal)
if(rand(25))
var/turf/simulated/target = get_step(src,d)
var/turf/simulated/origin = get_turf(src)
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
if(!locate(/obj/effect/decal/cleanable/liquid_fuel) in target)
new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25,1)
amount *= 0.75
var/turf/simulated/target = get_step(src,d)
var/turf/simulated/origin = get_turf(src)
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
var/obj/effect/decal/cleanable/liquid_fuel/other_fuel = locate() in target
if(other_fuel)
other_fuel.amount += amount*0.25
if(!(other_fuel in exclude))
exclude += src
other_fuel.Spread(exclude)
else
new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25,1)
amount *= 0.75
flamethrower_fuel
icon_state = "mustard"
@@ -42,7 +42,7 @@ var/global/list/image/splatter_cache=list()
dry()
/obj/effect/decal/cleanable/blood/update_icon()
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
if(basecolor == "rainbow") basecolor = "#[get_random_colour(1)]"
color = basecolor
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
@@ -79,8 +79,8 @@ var/global/list/image/splatter_cache=list()
if(!perp.feet_blood_DNA)
perp.feet_blood_DNA = list()
perp.feet_blood_DNA |= blood_DNA.Copy()
else if (perp.buckled && istype(perp.buckled, /obj/structure/stool/bed/chair/wheelchair))
var/obj/structure/stool/bed/chair/wheelchair/W = perp.buckled
else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair))
var/obj/structure/bed/chair/wheelchair/W = perp.buckled
W.bloodiness = 4
perp.update_inv_shoes(1)
@@ -165,11 +165,11 @@ var/global/list/image/splatter_cache=list()
var/image/giblets = new(base_icon, "[icon_state]_flesh", dir)
if(!fleshcolor || fleshcolor == "rainbow")
fleshcolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
fleshcolor = "#[get_random_colour(1)]"
giblets.color = fleshcolor
var/icon/blood = new(base_icon,"[icon_state]",dir)
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
if(basecolor == "rainbow") basecolor = "#[get_random_colour(1)]"
blood.Blend(basecolor,ICON_MULTIPLY)
icon = blood
@@ -133,3 +133,13 @@
layer = 2
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_pie")
/obj/effect/decal/cleanable/fruit_smudge
name = "smudge"
desc = "Some kind of fruit smear."
density = 0
anchored = 1
layer = 2
icon = 'icons/effects/blood.dmi'
icon_state = "mfloor1"
random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
@@ -247,4 +247,44 @@
/datum/poster/bay_50
icon_state="bsposter50"
name = "Pinup Girl Cindy Kate"
desc = "This particular one is of Cindy Kate, a seductive performer well known among less savoury circles." //idk
desc = "This particular one is of Cindy Kate, a seductive performer well known among less savoury circles."
/datum/poster/bay_51
icon_state="bsposter51"
name = "space appreciation poster"
desc = "This is a poster produced by the Generic Space Company, as a part of a series of commemorative posters on the wonders of space. One of three."
/datum/poster/bay_52
icon_state="bsposter52"
name = "fire safety poster"
desc = "This is a poster reminding you of what you should do if you are on fire, or if you are at a dance party."
/datum/poster/bay_53
icon_state="bsposter53"
name = "fire extinguisher poster"
desc = "This is a poster reminding you of what you should use to put out a fire."
/datum/poster/bay_54
icon_state="bsposter54"
name = "firefighter poster"
desc = "This is a poster of a particularly stern looking firefighter. The caption reads, \"Only you can prevent space fires.\""
/datum/poster/bay_55
icon_state="bsposter55"
name = "Earth appreciation poster"
desc = "This is a poster produced by the Generic Space Company, as a part of a series of commemorative posters on the wonders of space. Two of three."
/datum/poster/bay_56
icon_state="bsposter56"
name = "Mars appreciation poster"
desc = "This is a poster produced by the Generic Space Company, as a part of a series of commemorative posters on the wonders of space. Three of three."
/datum/poster/bay_57
icon_state="bsposter57"
name = "space carp warning poster"
desc = "This poster tells of the dangers of space carp infestations."
/datum/poster/bay_58
icon_state="bsposter58"
name = "space carp information poster"
desc = "This poster showcases an old spacer saying on the dangers of migrant space carp."
@@ -17,6 +17,14 @@
icon = 'icons/mob/robots.dmi'
icon_state = "remainsrobot"
/obj/effect/decal/remains/mouse
desc = "They look like the remains of a small rodent."
icon_state = "mouse"
/obj/effect/decal/remains/lizard
desc = "They look like the remains of a small rodent."
icon_state = "lizard"
/obj/effect/decal/remains/attack_hand(mob/user as mob)
user << "<span class='notice'>[src] sinks together into a pile of ash.</span>"
var/turf/simulated/floor/F = get_turf(src)
@@ -233,6 +233,21 @@ steam.start() -- spawns the effect
return 0
return 1
/////////////////////////////////////////////
// Illumination
/////////////////////////////////////////////
/obj/effect/effect/smoke/illumination
name = "illumination"
opacity = 0
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
time_to_live=lifetime
..()
SetLuminosity(brightness)
/////////////////////////////////////////////
// Bad smoke
/////////////////////////////////////////////
-166
View File
@@ -1,166 +0,0 @@
//separate dm since hydro is getting bloated already
/obj/effect/glowshroom
name = "glowshroom"
anchored = 1
opacity = 0
density = 0
icon = 'icons/obj/lighting.dmi'
icon_state = "glowshroomf"
layer = 2.1
l_color = "#003300"
var/endurance = 30
var/potency = 30
var/delay = 1200
var/floor = 0
var/yield = 3
var/spreadChance = 40
var/spreadIntoAdjacentChance = 60
var/evolveChance = 2
var/lastTick = 0
var/spreaded = 1
/obj/effect/glowshroom/single
spreadChance = 0
/obj/effect/glowshroom/New()
..()
set_dir(CalcDir())
if(!floor)
switch(dir) //offset to make it be on the wall rather than on the floor
if(NORTH)
pixel_y = 32
if(SOUTH)
pixel_y = -32
if(EAST)
pixel_x = 32
if(WEST)
pixel_x = -32
icon_state = "glowshroom[rand(1,3)]"
else //if on the floor, glowshroom on-floor sprite
icon_state = "glowshroomf"
processing_objects += src
SetLuminosity(round(potency/15))
lastTick = world.timeofday
/obj/effect/glowshroom/Del()
processing_objects -= src
..()
/obj/effect/glowshroom/process()
if(!spreaded)
return
if(((world.timeofday - lastTick) > delay) || ((world.timeofday - lastTick) < 0))
lastTick = world.timeofday
spreaded = 0
for(var/i=1,i<=yield,i++)
if(prob(spreadChance))
var/list/possibleLocs = list()
var/spreadsIntoAdjacent = 0
if(prob(spreadIntoAdjacentChance))
spreadsIntoAdjacent = 1
for(var/turf/simulated/floor/plating/airless/asteroid/earth in view(3,src))
if(spreadsIntoAdjacent || !locate(/obj/effect/glowshroom) in view(1,earth))
possibleLocs += earth
if(!possibleLocs.len)
break
var/turf/newLoc = pick(possibleLocs)
var/shroomCount = 0 //hacky
var/placeCount = 1
for(var/obj/effect/glowshroom/shroom in newLoc)
shroomCount++
for(var/wallDir in cardinal)
var/turf/isWall = get_step(newLoc,wallDir)
if(isWall.density)
placeCount++
if(shroomCount >= placeCount)
continue
var/obj/effect/glowshroom/child = new /obj/effect/glowshroom(newLoc)
child.potency = potency
child.yield = yield
child.delay = delay
child.endurance = endurance
spreaded++
if(prob(evolveChance)) //very low chance to evolve on its own
potency += rand(4,6)
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
set background = 1
var/direction = 16
for(var/wallDir in cardinal)
var/turf/newTurf = get_step(location,wallDir)
if(newTurf.density)
direction |= wallDir
for(var/obj/effect/glowshroom/shroom in location)
if(shroom == src)
continue
if(shroom.floor) //special
direction &= ~16
else
direction &= ~shroom.dir
var/list/dirList = list()
for(var/i=1,i<=16,i <<= 1)
if(direction & i)
dirList += i
if(dirList.len)
var/newDir = pick(dirList)
if(newDir == 16)
floor = 1
newDir = 1
return newDir
floor = 1
return 1
/obj/effect/glowshroom/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
endurance -= W.force
CheckEndurance()
/obj/effect/glowshroom/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
else
return
/obj/effect/glowshroom/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
endurance -= 5
CheckEndurance()
/obj/effect/glowshroom/proc/CheckEndurance()
if(endurance <= 0)
del(src)
+17 -24
View File
@@ -6,7 +6,6 @@
unacidable = 1
/obj/effect/landmark/New()
..()
tag = text("landmark*[]", name)
invisibility = 101
@@ -28,14 +27,11 @@
if("monkey")
monkeystart += loc
del(src)
if("start")
newplayer_start += loc
del(src)
if("wizard")
wizardstart += loc
del(src)
if("JoinLate")
latejoin += loc
del(src)
@@ -52,23 +48,25 @@
latejoin_cyborg += loc
del(src)
//prisoners
if("prisonwarp")
prisonwarp += loc
del(src)
// if("mazewarp")
// mazewarp += loc
if("Holding Facility")
holdingfacility += loc
if("tdome1")
tdome1 += loc
tdome1 += loc
if("tdome2")
tdome2 += loc
if("tdomeadmin")
tdomeadmin += loc
tdomeadmin += loc
if("tdomeobserve")
tdomeobserve += loc
//not prisoners
if("prisonsecuritywarp")
prisonsecuritywarp += loc
del(src)
@@ -81,18 +79,6 @@
xeno_spawn += loc
del(src)
if("ninjastart")
ninjastart += loc
del(src)
if("voxstart")
raider_spawn += loc
del(src)
if("Syndicate-Spawn")
synd_spawn += loc
del(src)
landmarks_list += src
return 1
@@ -113,6 +99,13 @@
return 1
/obj/effect/landmark/start/ninja
name = "ninja"
/obj/effect/landmark/start/ninja/New()
..()
ninjastart += src
//Costume spawner landmarks
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
@@ -144,7 +137,7 @@
/obj/effect/landmark/costume/elpresidente/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/shoes/jackboots(src.loc)
del(src)
+1 -1
View File
@@ -19,7 +19,7 @@
if(triggered) return
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
if(istype(M, /mob/living/carbon/human))
for(var/mob/O in viewers(world.view, src.loc))
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
triggered = 1
+22 -59
View File
@@ -40,6 +40,11 @@
var/zoomdevicename = null //name used for message when binoculars/scope is used
var/zoom = 0 //1 if item is actively being used to zoom. For scoped guns and binoculars.
// Used to specify the icon file to be used when the item is worn. If not set the default icon for that slot will be used.
// If icon_override or sprite_sheets are set they will take precendence over this, assuming they apply to the slot in question.
// Only slot_l_hand/slot_r_hand are implemented at the moment. Others to be implemented as needed.
var/list/item_icons = null
/* Species-specific sprites, concept stolen from Paradise//vg/.
ex:
sprite_sheets = list(
@@ -58,6 +63,15 @@
/obj/item/device
icon = 'icons/obj/device.dmi'
//Checks if the item is being held by a mob, and if so, updates the held icons
/obj/item/proc/update_held_icon()
if(ismob(src.loc))
var/mob/M = src.loc
if(M.l_hand == src)
M.update_inv_l_hand()
if(M.r_hand == src)
M.update_inv_r_hand()
/obj/item/ex_act(severity)
switch(severity)
if(1.0)
@@ -141,7 +155,6 @@
if(isliving(src.loc))
return
user.next_move = max(user.next_move+2,world.time + 2)
add_fingerprint(user)
user.put_in_active_hand(src)
if(src.loc == user)
src.pickup(user)
@@ -199,11 +212,7 @@
// apparently called whenever an item is removed from a slot, container, or anything else.
/obj/item/proc/dropped(mob/user as mob)
..()
if(zoom) //binoculars, scope, etc
user.client.view = world.view
user.client.pixel_x = 0
user.client.pixel_y = 0
zoom = 0
if(zoom) zoom() //binoculars, scope, etc
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
@@ -412,9 +421,9 @@
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
var/obj/item/clothing/under/uniform = H.w_uniform
if(uniform.hastie)
if(uniform.accessories.len && !uniform.can_attach_accessory(src))
if (!disable_warning)
H << "<span class='warning'>You already have [uniform.hastie] attached to your [uniform].</span>"
H << "<span class='warning'>You already have an accessory of this type attached to your [uniform].</span>"
return 0
if( !(slot_flags & SLOT_TIE) )
return 0
@@ -422,35 +431,6 @@
return 0 //Unsupported slot
//END HUMAN
else if(ismonkey(M))
//START MONKEY
var/mob/living/carbon/monkey/MO = M
switch(slot)
if(slot_l_hand)
if(MO.l_hand)
return 0
return 1
if(slot_r_hand)
if(MO.r_hand)
return 0
return 1
if(slot_wear_mask)
if(MO.wear_mask)
return 0
if( !(slot_flags & SLOT_MASK) )
return 0
return 1
if(slot_back)
if(MO.back)
return 0
if( !(slot_flags & SLOT_BACK) )
return 0
return 1
return 0 //Unsupported slot
//END MONKEY
/obj/item/verb/verb_pickup()
set src in oview(1)
set category = "Object"
@@ -512,14 +492,6 @@
user << "\red You're going to need to remove the eye covering first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove the eye covering first."
return
if(!M.has_eyes())
user << "\red You cannot locate any eyes on [M]!"
return
@@ -638,8 +610,8 @@ For zooming with scope or binoculars. This is called from
modules/mob/mob_movement.dm if you move you will be zoomed out
modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
*/
/obj/item/proc/zoom(var/tileoffset = 11,var/viewsize = 12) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
//Looking through a scope or binoculars should /not/ improve your periphereal vision. Still, increase viewsize a tiny bit so that sniping isn't as restricted to NSEW
/obj/item/proc/zoom(var/tileoffset = 14,var/viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
var/devicename
@@ -661,9 +633,8 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
cannotzoom = 1
if(!zoom && !cannotzoom)
if(!usr.hud_used.hud_shown)
usr.button_pressed_F12(1) // If the user has already limited their HUD this avoids them having a HUD when they zoom in
usr.button_pressed_F12(1)
if(usr.hud_used.hud_shown)
usr.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
usr.client.view = viewsize
zoom = 1
@@ -686,18 +657,10 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
usr.visible_message("[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].")
/*
if(istype(usr,/mob/living/carbon/human/))
var/mob/living/carbon/human/H = usr
usr.visible_message("[usr] holds [devicename] up to [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] eyes.")
else
usr.visible_message("[usr] holds [devicename] up to its eyes.")
*/
else
usr.client.view = world.view
if(!usr.hud_used.hud_shown)
usr.button_pressed_F12(1)
usr.toggle_zoom_hud()
zoom = 0
usr.client.pixel_x = 0
+5 -5
View File
@@ -17,15 +17,15 @@
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health < 1)
return
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/flame/match))
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/smokable/cigarette) || istype(W, /obj/item/weapon/flame/match))
if (contents.len >= max_butts)
user << "This ashtray is full."
return
user.remove_from_mob(W)
W.loc = src
if (istype(W,/obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/cig = W
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
var/obj/item/clothing/mask/smokable/cigarette/cig = W
if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
processing_objects.Remove(cig)
@@ -61,14 +61,14 @@
return
if (contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_empty
return ..()
/obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_broken
+2 -2
View File
@@ -114,7 +114,7 @@ move an amendment</a> to the drawing.</p>
usr << "\red Error! Please notify administration!"
return
var/list/turf/turfs = res
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", "", MAX_NAME_LEN))
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
@@ -154,7 +154,7 @@ move an amendment</a> to the drawing.</p>
var/area/A = get_area()
//world << "DEBUG: edit_area"
var/prevname = "[A.name]"
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", prevname, MAX_NAME_LEN))
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
return
if(length(str) > 50)
+1 -1
View File
@@ -49,7 +49,7 @@
return
if (!in_range(src, user) && src.loc != user)
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = "body bag - "
src.name += t
+27
View File
@@ -28,3 +28,30 @@
new /obj/item/weapon/reagent_containers/pill/zoom( src )
new /obj/item/weapon/reagent_containers/pill/zoom( src )
new /obj/item/weapon/reagent_containers/pill/zoom( src )
/obj/item/weapon/reagent_containers/glass/beaker/vial/random
flags = 0
var/list/random_reagent_list = list(list("water" = 15) = 1, list("cleaner" = 15) = 1)
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin
random_reagent_list = list(
list("mindbreaker" = 10, "space_drugs" = 20) = 3,
list("carpotoxin" = 15) = 2,
list("impedrezene" = 15) = 2,
list("zombiepowder" = 10) = 1)
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/New()
..()
if(is_open_container())
flags ^= OPENCONTAINER
var/list/picked_reagents = pickweight(random_reagent_list)
for(var/reagent in picked_reagents)
reagents.add_reagent(reagent, picked_reagents[reagent])
var/list/names = new
for(var/datum/reagent/R in reagents.reagent_list)
names += R.name
desc = "Contains [english_list(names)]."
update_icon()
+2 -1
View File
@@ -91,7 +91,8 @@
/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob)
if(M == user)
user << "You take a bite of the crayon and swallow it."
// user.nutrition += 5
user.nutrition += 1
user.reagents.add_reagent("crayon_dust",min(5,uses)/3)
if(uses)
uses -= 5
if(uses <= 0)
+17 -8
View File
@@ -689,7 +689,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if ("Edit")
var/n = input(U, "Please enter message", name, notehtml) as message
if (in_range(src, U) && loc == U)
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
n = sanitizeSafe(n, extra = 0)
if (mode == 1)
note = html_decode(n)
notehtml = note
@@ -726,7 +726,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "The PDA softly beeps."
ui.close()
else
t = sanitize(copytext(t, 1, 20))
t = sanitize(t, 20)
ttone = t
else
ui.close()
@@ -735,7 +735,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/t = input(U, "Please enter new news tone", name, newstone) as text
if (in_range(src, U) && loc == U)
if (t)
t = sanitize(copytext(t, 1, 20))
t = sanitize(t, 20)
newstone = t
else
ui.close()
@@ -971,8 +971,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
U.last_target_click = world.time
var/t = input(U, "Please enter message", P.name, null) as text
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
t = sanitize(t)
//t = readd_quotes(t)
t = replace_characters(t, list("&#34;" = "\""))
if (!t || !istype(P))
return
if (!in_range(src, U) && loc != U)
@@ -1067,6 +1068,17 @@ var/global/list/obj/item/device/pda/PDAs = list()
new_message = 1
update_icon()
/obj/item/device/pda/ai/new_message(var/atom/movable/sending_unit, var/sender, var/sender_job, var/message)
var/track = ""
if(ismob(sending_unit.loc) && isAI(loc))
track = "(<a href='byond://?src=\ref[loc];track=\ref[sending_unit.loc];trackname=[html_encode(sender)]'>Follow</a>)"
var/reception_message = "\icon[src] <b>Message from [sender] ([sender_job]), </b>\"[message]\" (<a href='byond://?src=\ref[src];choice=Message;notap=1;skiprefresh=1;target=\ref[sending_unit]'>Reply</a>) [track]"
new_info(message_silent, newstone, reception_message)
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]")
new_message = 1
/obj/item/device/pda/verb/verb_remove_id()
set category = "Object"
set name = "Remove id"
@@ -1207,9 +1219,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(2)
if (!istype(C:dna, /datum/dna))
user << "\blue No fingerprints found on [C]"
else if(!istype(C, /mob/living/carbon/monkey))
if(!isnull(C:gloves))
user << "\blue No fingerprints found on [C]"
else
user << text("\blue [C]'s Fingerprints: [md5(C:dna.uni_identity)]")
if ( !(C:blood_DNA) )
+2 -2
View File
@@ -562,10 +562,10 @@
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", message1) as text|null, 1, 40))), 40)
message1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", message1) as text|null, 40), 40)
updateSelfDialog()
if("setmsg2")
message2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", message2) as text|null, 1, 40))), 40)
message2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", message2) as text|null, 40), 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])
+2 -19
View File
@@ -26,25 +26,8 @@
for(var/mob/living/silicon/ai/A in src)
dat += "Stored AI: [A.name]<br>System integrity: [A.system_integrity()]%<br>"
for (var/law in A.laws.ion)
if(law)
laws += "[ionnum()]: [law]<BR>"
if (A.laws.zeroth)
laws += "0: [A.laws.zeroth]<BR>"
var/number = 1
for (var/index = 1, index <= A.laws.inherent.len, index++)
var/law = A.laws.inherent[index]
if (length(law) > 0)
laws += "[number]: [law]<BR>"
number++
for (var/index = 1, index <= A.laws.supplied.len, index++)
var/law = A.laws.supplied[index]
if (length(law) > 0)
laws += "[number]: [law]<BR>"
number++
for (var/datum/ai_law/law in A.laws.all_laws())
laws += "[law.get_index()]: [law.law]<BR>"
dat += "Laws:<br>[laws]<br>"
+3 -3
View File
@@ -2,7 +2,7 @@
name = "flash"
desc = "Used for blinding and being an asshole."
icon_state = "flash"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
item_state = "flash"
throwforce = 5
w_class = 2.0
throw_speed = 4
@@ -70,7 +70,7 @@
flick("e_flash", M.flash)
if(ishuman(M) && ishuman(user) && M.stat!=DEAD)
if(user.mind && user.mind in ticker.mode.head_revolutionaries && ticker.mode.name == "revolution")
if(user.mind && user.mind in revs.head_revolutionaries)
var/revsafe = 0
for(var/obj/item/weapon/implant/loyalty/L in M)
if(L && L.implanted)
@@ -81,7 +81,7 @@
revsafe = 2
if(!revsafe)
M.mind.has_been_rev = 1
ticker.mode.add_revolutionary(M.mind)
revs.add_antagonist(M.mind)
else if(revsafe == 1)
user << "<span class='warning'>Something seems to be blocking the flash!</span>"
else
@@ -75,7 +75,7 @@
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
"<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(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
if(M.stat == DEAD || M.sdisabilities & 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
@@ -55,7 +55,7 @@
var/uses = 0
var/emagged = 0
var/failmsg = ""
var/charge = 1
var/charge = 0
/obj/item/device/lightreplacer/New()
uses = max_uses / 2
@@ -122,11 +122,11 @@
/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1)
uses = min(max(uses + amount, 0), max_uses)
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
charge += 1
if(charge > 7)
/obj/item/device/lightreplacer/proc/Charge(var/mob/user, var/amount = 1)
charge += amount
if(charge > 6)
AddUses(1)
charge = 1
charge = 0
/obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
+1 -1
View File
@@ -25,7 +25,7 @@
user << "\red \The [src] needs to recharge!"
return
var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text)
if(!message)
return
message = capitalize(message)
@@ -20,3 +20,4 @@
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
var/obj/machinery/clonepod/connecting //same for cryopod linkage
+4 -1
View File
@@ -260,7 +260,7 @@
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = sanitize(copytext(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message,1,MAX_MESSAGE_LEN))
var/newlaws = sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
if(newlaws)
pai.pai_laws = newlaws
pai << "Your supplemental directives have been updated. Your new directives are:"
@@ -281,6 +281,8 @@
src.overlays.Cut()
src.overlays += "pai-off"
/obj/item/device/paicard
var/current_emotion = 1
/obj/item/device/paicard/proc/setEmotion(var/emotion)
if(pai)
src.overlays.Cut()
@@ -294,6 +296,7 @@
if(7) src.overlays += "pai-sad"
if(8) src.overlays += "pai-angry"
if(9) src.overlays += "pai-what"
current_emotion = emotion
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
+5 -17
View File
@@ -115,13 +115,10 @@
listening = !listening && !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL))
/obj/item/device/radio/Topic(href, href_list)
//..()
if (usr.stat || !on)
return
if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
if(..() || !on)
usr << browse(null, "window=radio")
return
usr.set_machine(src)
if (href_list["track"])
var/mob/target = locate(href_list["track"])
@@ -152,17 +149,7 @@
else
channels[chan_name] |= FREQ_LISTENING
if (!( master ))
if (istype(loc, /mob))
interact(loc)
else
updateDialog()
else
if (istype(master.loc, /mob))
interact(master.loc)
else
updateDialog()
add_fingerprint(usr)
interact(usr)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
var/datum/radio_frequency/connection = null
@@ -180,10 +167,11 @@
return
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(src, null, null, 1)
A.SetName(from)
Broadcast_Message(connection, A,
0, "*garbled automated announcement*", src,
message, from, "Automated Announcement", from, "synthesized voice",
4, 0, list(1), PUB_FREQ)
4, 0, list(0), connection.frequency, "states")
del(A)
return
@@ -4,7 +4,6 @@ T-RAY
DETECTIVE SCANNER
HEALTH ANALYZER
GAS ANALYZER
PLANT ANALYZER
MASS SPECTROMETER
REAGENT SCANNER
*/
+153
View File
@@ -0,0 +1,153 @@
/obj/item/device/spy_bug
name = "bug"
desc = "" // Nothing to see here
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0"
item_state = "nothing"
layer = TURF_LAYER+0.2
flags = CONDUCT
force = 5.0
w_class = 1.0
throwforce = 5.0
throw_range = 15
throw_speed = 3
origin_tech = "programming=1;engineering=1;syndicate=3"
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/camera
/obj/item/device/spy_bug/New()
..()
radio = new(src)
camera = new(src)
/obj/item/device/spy_bug/examine(mob/user)
. = ..(user, 0)
if(.)
user << "It's a tiny camera, microphone, and transmission device in a happy union."
user << "Needs to be both configured and brought in contact with monitor device to be fully functional."
/obj/item/device/spy_bug/attack_self(mob/user)
radio.attack_self(user)
/obj/item/device/spy_bug/attackby(obj/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/spy_monitor))
var/obj/item/device/spy_monitor/SM = W
SM.pair(src, user)
else
..()
/obj/item/device/spy_bug/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
radio.hear_talk(M, msg, speaking)
/obj/item/device/spy_monitor
name = "\improper PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
icon = 'icons/obj/pda.dmi'
icon_state = "pda"
item_state = "electronic"
w_class = 2.0
origin_tech = "programming=1;engineering=1;syndicate=3"
var/operating = 0
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/selected_camera
var/list/obj/machinery/camera/spy/cameras = new()
/obj/item/device/spy_monitor/New()
radio = new(src)
/obj/item/device/spy_monitor/examine(mob/user)
. = ..(user, 1)
if(.)
user << "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made."
/obj/item/device/spy_monitor/attack_self(mob/user)
if(operating)
return
radio.attack_self(user)
view_cameras(user)
/obj/item/device/spy_monitor/attackby(obj/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/spy_bug))
pair(W, user)
else
return ..()
/obj/item/device/spy_monitor/proc/pair(var/obj/item/device/spy_bug/SB, var/mob/living/user)
if(SB.camera in cameras)
user << "<span class='notice'>\The [SB] has been unpaired from \the [src].</span>"
cameras -= SB.camera
else
user << "<span class='notice'>\The [SB] has been paired with \the [src].</span>"
cameras += SB.camera
/obj/item/device/spy_monitor/proc/view_cameras(mob/user)
if(!can_use_cam(user))
return
selected_camera = cameras[1]
view_camera(user)
operating = 1
while(selected_camera && Adjacent(user))
selected_camera = input("Select camera bug to view.") as null|anything in cameras
selected_camera = null
operating = 0
/obj/item/device/spy_monitor/proc/view_camera(mob/user)
spawn(0)
while(selected_camera && Adjacent(user))
var/turf/T = get_turf(selected_camera)
if(!T || !is_on_same_plane_or_station(T.z, user.z) || !selected_camera.can_use())
user.unset_machine()
user.reset_view(null)
user << "<span class='notice'>[selected_camera] unavailable.</span>"
sleep(90)
else
user.set_machine(selected_camera)
user.reset_view(selected_camera)
sleep(10)
user.unset_machine()
user.reset_view(null)
/obj/item/device/spy_monitor/proc/can_use_cam(mob/user)
if(operating)
return
if(!cameras.len)
user << "<span class='warning'>No paired cameras detected!</span>"
user << "<span class='warning'>Bring a bug in contact with this device to pair the camera.</span>"
return
return 1
/obj/item/device/spy_monitor/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
return radio.hear_talk(M, msg, speaking)
/obj/machinery/camera/spy
// These cheap toys are accessible from the mercenary camera console as well
network = list("NUKE")
/obj/machinery/camera/spy/New()
..()
name = "DV-136ZB #[rand(1000,9999)]"
c_tag = name
/obj/machinery/camera/spy/check_eye(var/mob/user as mob)
return 1
/obj/item/device/radio/spy
listening = 0
frequency = 1473
broadcasting = 0
canhear_range = 1
name = "spy device"
icon_state = "syn_cypherkey"
+35 -10
View File
@@ -11,12 +11,30 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/cost = 0
var/path = null
var/reference = ""
var/description = ""
datum/uplink_item/New(var/itemPath, var/itemCost as num, var/itemName as text, var/itemReference as text)
datum/uplink_item/New(var/itemPath, var/itemCost, var/itemName, var/itemReference, var/itemDescription)
cost = itemCost
path = itemPath
name = itemName
reference = itemReference
description = itemDescription
datum/uplink_item/proc/description()
if(!description)
// Fallback description
var/obj/temp = src.path
description = replacetext(initial(temp.desc), "\n", "<br>")
return description
/datum/uplink_item/proc/generate_item(var/newloc)
var/list/L = list()
if(ispath(path))
L += new path(newloc)
else if(islist(path))
for(var/item_path in path)
L += new item_path(newloc)
return L
datum/nano_item_lists
var/list/items_nano
@@ -41,16 +59,17 @@ datum/nano_item_lists
uses = ticker.mode.uplink_uses
ItemsCategory = ticker.mode.uplink_items
var/datum/nano_item_lists/IL = generate_item_lists()
nanoui_items = IL.items_nano
ItemsReference = IL.items_reference
world_uplinks += src
/obj/item/device/uplink/Del()
world_uplinks -= src
..()
/obj/item/device/uplink/proc/generate_items()
var/datum/nano_item_lists/IL = generate_item_lists()
nanoui_items = IL.items_nano
ItemsReference = IL.items_reference
// BS12 no longer use this menu but there are forks that do, hency why we keep it
/obj/item/device/uplink/proc/generate_menu()
var/dat = "<B>[src.welcome]</B><BR>"
@@ -87,7 +106,7 @@ datum/nano_item_lists
for(var/category in ItemsCategory)
nano[++nano.len] = list("Category" = category, "items" = list())
for(var/datum/uplink_item/I in ItemsCategory[category])
nano[nano.len]["items"] += list(list("Name" = I.name, "Cost" = I.cost, "obj_path" = I.reference))
nano[nano.len]["items"] += list(list("Name" = I.name, "Description" = I.description(),"Cost" = I.cost, "obj_path" = I.reference))
reference[I.reference] = I
var/datum/nano_item_lists/result = new
@@ -108,6 +127,9 @@ datum/nano_item_lists
return pick(random_items)
/obj/item/device/uplink/Topic(href, href_list)
if(..())
return 1
if(href_list["buy_item"] == "random")
var/datum/uplink_item/UI = chooseRandomItem()
href_list["buy_item"] = UI.reference
@@ -123,10 +145,11 @@ datum/nano_item_lists
used_TC += UI.cost
feedback_add_details("traitor_uplink_items_bought", reference)
var/obj/I = new UI.path(get_turf(usr))
var/list/L = UI.generate_item(get_turf(usr))
if(ishuman(usr))
var/mob/living/carbon/human/A = usr
A.put_in_any_hand_if_possible(I)
for(var/obj/I in L)
A.put_in_any_hand_if_possible(I)
purchase_log[UI] = purchase_log[UI] + 1
@@ -186,6 +209,8 @@ datum/nano_item_lists
data["welcome"] = welcome
data["crystals"] = uses
data["menu"] = nanoui_menu
if(!nanoui_items)
generate_items()
data["nano_items"] = nanoui_items
data += nanoui_data
@@ -208,10 +233,10 @@ datum/nano_item_lists
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
return
return 1
if (!( istype(usr, /mob/living/carbon/human)))
return 0
return 1
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
+2 -3
View File
@@ -189,7 +189,7 @@
user << "\red Sticking a dead [W] into the frame would sort of defeat the purpose."
return
if(M.brainmob.mind in ticker.mode.head_revolutionaries)
if(M.brainmob.mind in revs.head_revolutionaries)
user << "\red The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the [W]."
return
@@ -226,7 +226,6 @@
feedback_inc("cyborg_birth",1)
callHook("borgify", list(O))
O.notify_ai(1)
O.Namepick()
del(src)
@@ -234,7 +233,7 @@
user << "\blue The MMI must go in after everything else!"
if (istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
@@ -36,12 +36,12 @@
icon = 'icons/mob/custom-synthetic.dmi'
R.icon_state = "[R.ckey]-Standard"
del(R.module)
R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name)
R.module = null
R.camera.network.Remove(list("Engineering","Medical","MINE"))
R.camera.remove_networks(list("Engineering","Medical","MINE"))
R.updatename("Default")
R.status_flags |= CANPUSH
R.updateicon()
R.notify_ai(2)
return 1
@@ -53,11 +53,11 @@
var/heldname = "default name"
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
heldname = sanitizeSafe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN)
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
if(..()) return 0
R.notify_ai(3, R.name, heldname)
R.notify_ai(ROBOT_NOTIFICATION_NEW_NAME, R.name, heldname)
R.name = heldname
R.custom_name = heldname
R.real_name = heldname
@@ -84,7 +84,7 @@
R.stat = CONSCIOUS
dead_mob_list -= R
living_mob_list |= R
R.notify_ai(1)
R.notify_ai(ROBOT_NOTIFICATION_NEW_UNIT)
return 1
@@ -121,7 +121,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/taser/mounted/cyborg/T = locate() in R.module
if(!T)
T = locate() in R.module.contents
if(!T)
@@ -0,0 +1,50 @@
/datum/matter_synth
var/name = "Generic Synthesizer"
var/max_energy = 60000
var/recharge_rate = 2000
var/energy
/datum/matter_synth/New(var/store = 0)
if(store)
max_energy = store
energy = max_energy
return
/datum/matter_synth/proc/get_charge()
return energy
/datum/matter_synth/proc/use_charge(var/amount)
if (energy >= amount)
energy -= amount
return 1
return 0
/datum/matter_synth/proc/add_charge(var/amount)
energy = min(energy + amount, max_energy)
/datum/matter_synth/proc/emp_act(var/severity)
use_charge(max_energy * 0.1 / severity)
/datum/matter_synth/medicine
name = "Medicine Synthesizer"
/datum/matter_synth/metal
name = "Metal Synthesizer"
/datum/matter_synth/plasteel
name = "Plasteel Synthesizer"
max_energy = 10000
/datum/matter_synth/glass
name = "Glass Synthesizer"
/datum/matter_synth/wood
name = "Wood Synthesizer"
/datum/matter_synth/plastic
name = "Plastic Synthesizer"
/datum/matter_synth/wire
name = "Wire Synthesizer"
max_energy = 50
recharge_rate = 2
+2 -20
View File
@@ -16,8 +16,7 @@
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey)) )
istype(user, /mob/living/silicon)) )
user << "\red You don't have the dexterity to do this!"
return 1
@@ -123,23 +122,6 @@
else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/bruise_pack/tajaran
name = "\improper S'rendarr's Hand leaf"
singular_name = "S'rendarr's Hand leaf"
desc = "A poultice made of soft leaves that is rubbed on bruises."
icon = 'icons/obj/harvest.dmi'
icon_state = "shandp"
heal_brute = 7
/obj/item/stack/medical/ointment/tajaran
name = "\improper Messa's Tear petals"
singular_name = "Messa's Tear petals"
desc = "A poultice made of cold, blue petals that is rubbed on burns."
icon = 'icons/obj/harvest.dmi'
icon_state = "mtearp"
heal_burn = 7
/obj/item/stack/medical/advanced/bruise_pack
name = "advanced trauma kit"
singular_name = "advanced trauma kit"
@@ -159,7 +141,7 @@
if(affecting.open == 0)
var/bandaged = affecting.bandage()
var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected))
user << "\red The wounds on [M]'s [affecting.display_name] have already been treated."
return 1
+11 -2
View File
@@ -13,12 +13,21 @@
max_amount = 60
attack_verb = list("hit", "bludgeoned", "whacked")
/obj/item/stack/rods/cyborg
name = "metal rod synthesizer"
desc = "A device that makes metal rods."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(500)
stacktype = /obj/item/stack/rods
/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(amount < 2)
if(get_amount() < 2)
user << "\red You need at least two rods to do this."
return
@@ -54,7 +63,7 @@
return 1
else if(!in_use)
if(amount < 2)
if(get_amount() < 2)
user << "\blue You need at least two rods to do this."
return
usr << "\blue Assembling grille..."
+16 -10
View File
@@ -22,12 +22,13 @@
var/list/construction_options = list("One Direction", "Full Window")
/obj/item/stack/sheet/glass/cyborg
name = "glass"
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
name = "glass synthesizer"
desc = "A device that makes glass."
gender = NEUTER
singular_name = "glass"
matter = null
created_window = /obj/structure/window/basic
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/glass
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
@@ -69,7 +70,7 @@
if(!user.IsAdvancedToolUser())
return 0
var/title = "Sheet-[name]"
title += " ([src.amount] sheet\s left)"
title += " ([src.get_amount()] sheet\s left)"
switch(input(title, "What would you like to construct?") as null|anything in construction_options)
if("One Direction")
if(!src) return 1
@@ -102,7 +103,7 @@
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 4)
if(src.get_amount() < 4)
user << "\red You need more glass to do that."
return 1
if(locate(/obj/structure/window) in user.loc)
@@ -124,7 +125,7 @@
user << "\red There is already a windoor in that location."
return 1
if(src.amount < 5)
if(src.get_amount() < 5)
user << "\red You need more glass to do that."
return 1
@@ -151,10 +152,15 @@
construction_options = list("One Direction", "Full Window", "Windoor")
/obj/item/stack/sheet/glass/reinforced/cyborg
name = "reinforced glass"
desc = "Glass which has been reinforced with metal rods."
name = "reinforced glass synthesizer"
desc = "A device that makes reinforced glass."
gender = NEUTER
matter = null
uses_charge = 2
charge_costs = list(1000)
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
charge_costs = list(500, 1000)
/*
* Phoron Glass sheets
@@ -47,6 +47,9 @@ var/global/list/datum/stack_recipe/plastic_recipes = list ( \
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/utensil/pknife, 1, on_floor = 1), \
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
new/datum/stack_recipe("blood pack", /obj/item/weapon/reagent_containers/blood/empty, 4, on_floor = 0), \
new/datum/stack_recipe("reagent dispenser cartridge (large)", /obj/item/weapon/reagent_containers/chem_disp_cartridge, 5, on_floor=0), // 500u
new/datum/stack_recipe("reagent dispenser cartridge (med)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/medium, 3, on_floor=0), // 250u
new/datum/stack_recipe("reagent dispenser cartridge (small)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/small, 1, on_floor=0) // 100u
)
var/global/list/datum/stack_recipe/iron_recipes = list ( \
@@ -137,9 +140,10 @@ obj/item/stack/sheet/mineral/iron/New()
recipes = plastic_recipes
/obj/item/stack/sheet/mineral/plastic/cyborg
name = "plastic sheets"
icon_state = "sheet-plastic"
perunit = 2000
name = "plastic sheets synthesizer"
gender = NEUTER
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/mineral/plastic
/obj/item/stack/sheet/mineral/gold
@@ -11,29 +11,29 @@
* Metal
*/
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("office chairs",list( \
new/datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("dark office chair", /obj/structure/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
), 5), \
new/datum/stack_recipe_list("comfy chairs", list( \
new/datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("beige comfy chair", /obj/structure/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("red comfy chair", /obj/structure/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("blue comfy chair", /obj/structure/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("purple comfy chair", /obj/structure/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("green comfy chair", /obj/structure/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
), 2), \
null, \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
new/datum/stack_recipe("rack parts", /obj/item/weapon/table_parts/rack), \
new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
@@ -90,12 +90,12 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
origin_tech = "materials=1"
/obj/item/stack/sheet/metal/cyborg
name = "metal"
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
singular_name = "metal sheet"
icon_state = "sheet-metal"
throwforce = 14.0
flags = CONDUCT
name = "metal synthesizer"
desc = "A device that makes metal sheets."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/metal
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
@@ -125,9 +125,19 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
flags = CONDUCT
origin_tech = "materials=2"
/obj/item/stack/sheet/plasteel/cyborg
name = "plasteel synthesizer"
desc = "A device that makes plasteel sheets."
gender = NEUTER
singular_name = "plasteel sheet"
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/plasteel
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
return ..()
recipes = plasteel_recipes
return ..()
/*
* Wood
@@ -136,12 +146,12 @@ 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("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden chair", /obj/structure/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), \
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("baseball bat", /obj/item/weapon/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
new/datum/stack_recipe("baseball bat", /obj/item/weapon/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
// new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
)
@@ -153,10 +163,13 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
origin_tech = "materials=1;biotech=1"
/obj/item/stack/sheet/wood/cyborg
name = "wooden plank"
desc = "One can only guess that this is a bunch of wood."
name = "wood synthesizer"
desc = "A device that makes wooden planks."
gender = NEUTER
singular_name = "wood plank"
icon_state = "sheet-wood"
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/wood
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
@@ -178,7 +191,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
*/
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
new/datum/stack_recipe("donut box", /obj/item/weapon/storage/donut_box/empty), \
new/datum/stack_recipe("donut box", /obj/item/weapon/storage/box/donut/empty), \
new/datum/stack_recipe("egg box", /obj/item/weapon/storage/fancy/egg_box), \
new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \
new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \
+71 -22
View File
@@ -17,6 +17,9 @@
var/amount = 1
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
var/stacktype //determines whether different stack types can merge
var/uses_charge = 0
var/list/charge_costs = null
var/list/datum/matter_synth/synths = null
/obj/item/stack/New(var/loc, var/amount=null)
..()
@@ -27,13 +30,18 @@
return
/obj/item/stack/Del()
if(uses_charge)
return
if (src && usr && usr.machine == src)
usr << browse(null, "window=stack")
..()
/obj/item/stack/examine(mob/user)
if(..(user, 1))
user << "There are [src.amount] [src.singular_name]\s in the stack."
if(!uses_charge)
user << "There are [src.amount] [src.singular_name]\s in the stack."
else
user << "There is enough charge for [get_amount()]."
/obj/item/stack/attack_self(mob/user as mob)
list_recipes(user)
@@ -41,14 +49,14 @@
/obj/item/stack/proc/list_recipes(mob/user as mob, recipes_sublist)
if (!recipes)
return
if (!src || amount<=0)
if (!src || get_amount() <= 0)
user << browse(null, "window=stack")
user.set_machine(src) //for correct work of onclose
var/list/recipe_list = recipes
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
recipe_list = srl.recipes
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.amount)
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.get_amount())
for(var/i=1;i<=recipe_list.len,i++)
var/E = recipe_list[i]
if (isnull(E))
@@ -60,14 +68,14 @@
if (istype(E, /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = E
if (src.amount >= srl.req_amount)
if (src.get_amount() >= srl.req_amount)
t1 += "<a href='?src=\ref[src];sublist=[i]'>[srl.title] ([srl.req_amount] [src.singular_name]\s)</a>"
else
t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)<br>"
if (istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
var/max_multiplier = round(src.amount / R.req_amount)
var/max_multiplier = round(src.get_amount() / R.req_amount)
var/title as text
var/can_build = 1
can_build = can_build && (max_multiplier>0)
@@ -142,7 +150,7 @@
list_recipes(usr, text2num(href_list["sublist"]))
if (href_list["make"])
if (src.amount < 1) del(src) //Never should happen
if (src.get_amount() < 1) del(src) //Never should happen
var/list/recipes_list = recipes
if (href_list["sublist"])
@@ -165,28 +173,44 @@
//Return 1 if an immediate subsequent call to use() would succeed.
//Ensures that code dealing with stacks uses the same logic
/obj/item/stack/proc/can_use(var/used)
if (amount < used)
if (get_amount() < used)
return 0
return 1
/obj/item/stack/proc/use(var/used)
if (!can_use(used))
return 0
amount -= used
if (amount <= 0)
spawn(0) //delete the empty stack once the current context yields
if (amount <= 0) //check again in case someone transferred stuff to us
if(usr)
usr.remove_from_mob(src)
del(src)
return 1
if(!uses_charge)
amount -= used
if (amount <= 0)
spawn(0) //delete the empty stack once the current context yields
if (amount <= 0) //check again in case someone transferred stuff to us
if(usr)
usr.remove_from_mob(src)
del(src)
return 1
else
if(get_amount() < used)
return 0
for(var/i = 1 to uses_charge)
var/datum/matter_synth/S = synths[i]
S.use_charge(charge_costs[i] * used) // Doesn't need to be deleted
return 1
return 0
/obj/item/stack/proc/add(var/extra)
if(amount + extra > max_amount)
if(!uses_charge)
if(amount + extra > get_max_amount())
return 0
else
amount += extra
return 1
else if(!synths || synths.len < uses_charge)
return 0
else
amount += extra
return 1
for(var/i = 1 to uses_charge)
var/datum/matter_synth/S = synths[i]
S.add_charge(charge_costs[i] * extra)
/*
The transfer and split procs work differently than use() and add().
@@ -196,16 +220,16 @@
//attempts to transfer amount to S, and returns the amount actually transferred
/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null)
if (!amount)
if (!get_amount())
return 0
if (stacktype != S.stacktype)
return 0
if (isnull(tamount))
tamount = src.amount
tamount = src.get_amount()
var/transfer = max(min(tamount, src.amount, (S.max_amount - S.amount)), 0)
var/transfer = max(min(tamount, src.get_amount(), (S.get_max_amount() - S.get_amount())), 0)
var/orig_amount = src.amount
var/orig_amount = src.get_amount()
if (transfer && src.use(transfer))
S.add(transfer)
if (prob(transfer/orig_amount * 100))
@@ -220,6 +244,8 @@
/obj/item/stack/proc/split(var/tamount)
if (!amount)
return null
if(uses_charge)
return null
var/transfer = max(min(tamount, src.amount, initial(max_amount)), 0)
@@ -234,8 +260,31 @@
return null
/obj/item/stack/proc/get_amount()
if(uses_charge)
if(!synths || synths.len < uses_charge)
return 0
var/datum/matter_synth/S = synths[1]
. = round(S.get_charge() / charge_costs[1])
if(uses_charge > 1)
for(var/i = 2 to uses_charge)
S = synths[i]
. = min(., round(S.get_charge() / charge_costs[i]))
return
return amount
/obj/item/stack/proc/get_max_amount()
if(uses_charge)
if(!synths || synths.len < uses_charge)
return 0
var/datum/matter_synth/S = synths[1]
. = round(S.max_energy / charge_costs[1])
if(uses_charge > 1)
for(var/i = 2 to uses_charge)
S = synths[i]
. = min(., round(S.max_energy / charge_costs[i]))
return
return max_amount
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
for (var/obj/item/stack/item in usr.loc)
if (item==src)
@@ -3,14 +3,12 @@
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon"
icon_state = "tile"
w_class = 3.0
force = 6.0
matter = list("metal" = 937.5)
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
..()
@@ -18,6 +16,16 @@
src.pixel_y = rand(1, 14)
return
/obj/item/stack/tile/plasteel/cyborg
name = "floor tile synthesizer"
desc = "A device that makes floor tiles."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/plasteel
build_type = /obj/item/stack/tile/plasteel
/*
/obj/item/stack/tile/plasteel/attack_self(mob/user as mob)
if (usr.stat)
@@ -1,9 +1,18 @@
/* Diffrent misc types of tiles
* Contains:
* Prototype
* Grass
* Wood
* Carpet
*/
/obj/item/stack/tile
name = "tile"
singular_name = "tile"
desc = "A non-descript floor tile"
w_class = 3
max_amount = 60
var/build_type = null
/*
* Grass
@@ -13,13 +22,11 @@
singular_name = "grass floor tile"
desc = "A patch of grass like they often use on golf courses."
icon_state = "tile_grass"
w_class = 3.0
force = 1.0
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
origin_tech = "biotech=1"
/*
@@ -30,13 +37,19 @@
singular_name = "wood floor tile"
desc = "An easy to fit wooden floor tile."
icon_state = "tile-wood"
w_class = 3.0
force = 1.0
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
/obj/item/stack/tile/wood/cyborg
name = "wood floor tile synthesizer"
desc = "A device that makes wood floor tiles."
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/wood
build_type = /obj/item/stack/tile/wood
/*
* Carpets
@@ -46,10 +59,8 @@
singular_name = "carpet"
desc = "A piece of carpet. It is the same size as a normal floor tile!"
icon_state = "tile-carpet"
w_class = 3.0
force = 1.0
throwforce = 1.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
+338 -3
View File
@@ -6,6 +6,7 @@
* Toy gun
* Toy crossbow
* Toy swords
* Toy bosun's whistle
* Toy mechs
* Crayons
* Snap pops
@@ -13,6 +14,9 @@
* Therapy dolls
* Toddler doll
* Inflatable duck
* Action figures
* Plushies
* Toy cult sword
*/
@@ -99,6 +103,18 @@
item_state = "syndballoon"
w_class = 4.0
/obj/item/toy/nanotrasenballoon
name = "criminal balloon"
desc = "Across the balloon the following is printed: \"Man, I love NT soooo much. I use only NanoTrasen products. You have NO idea.\""
throwforce = 0
throw_speed = 4
throw_range = 20
force = 0
icon = 'icons/obj/weapons.dmi'
icon_state = "ntballoon"
item_state = "ntballoon"
w_class = 4.0
/*
* Fake telebeacon
*/
@@ -128,7 +144,7 @@
icon_state = "revolver"
item_state = "gun"
flags = CONDUCT
slot_flags = SLOT_BELT
slot_flags = SLOT_BELT|SLOT_HOLSTER
w_class = 3.0
matter = list("glass" = 10,"metal" = 10)
@@ -380,6 +396,10 @@
viewers(user) << "\red <b>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b>"
return (BRUTELOSS|OXYLOSS)
New()
name = "[colourName] crayon"
..()
/*
* Snap pops
*/
@@ -420,7 +440,7 @@
/obj/item/toy/waterflower
name = "water flower"
desc = "A seemingly innocent sunflower...with a twist."
icon = 'icons/obj/harvest.dmi'
//icon = 'icons/obj/harvest.dmi'
icon_state = "sunflower"
item_state = "sunflower"
var/empty = 0
@@ -482,6 +502,22 @@
if(..(user, 0))
user << text("\icon[] [] units of water left!", src, src.reagents.total_volume)
/*
* Bosun's whistle
*/
/obj/item/toy/bosunwhistle
name = "bosun's whistle"
desc = "A genuine Admiral Krush Bosun's Whistle, for the aspiring ship's captain! Suitable for ages 8 and up, do not swallow."
icon = 'icons/obj/toy.dmi'
icon_state = "bosunwhistle"
var/cooldown = 0
/obj/item/toy/bosunwhistle/attack_self(mob/user as mob)
if(cooldown < world.time - 35)
user << "<span class='notice'>You blow on [src], creating an ear-splitting noise!</span>"
playsound(user, 'sound/misc/boatswain.ogg', 20, 1)
cooldown = world.time
/*
* Mech prizes
@@ -526,7 +562,6 @@
desc = "Mini-Mecha action figure! Collect them all! 4/11."
icon_state = "gygaxtoy"
/obj/item/toy/prize/durand
name = "toy durand"
desc = "Mini-Mecha action figure! Collect them all! 5/11."
@@ -562,6 +597,206 @@
desc = "Mini-Mecha action figure! Collect them all! 11/11."
icon_state = "phazonprize"
/*
* Action figures
*/
/obj/item/toy/figure
name = "Completely Glitched action figure"
desc = "A \"Space Life\" brand... wait, what the hell is this thing? It seems to be requesting the sweet release of death."
icon_state = "assistant"
icon = 'icons/obj/toy.dmi'
/obj/item/toy/figure/cmo
name = "Chief Medical Officer action figure"
desc = "A \"Space Life\" brand Chief Medical Officer action figure."
icon_state = "cmo"
/obj/item/toy/figure/assistant
name = "Assistant action figure"
desc = "A \"Space Life\" brand Assistant action figure."
icon_state = "assistant"
/obj/item/toy/figure/atmos
name = "Atmospheric Technician action figure"
desc = "A \"Space Life\" brand Atmospheric Technician action figure."
icon_state = "atmos"
/obj/item/toy/figure/bartender
name = "Bartender action figure"
desc = "A \"Space Life\" brand Bartender action figure."
icon_state = "bartender"
/obj/item/toy/figure/borg
name = "Cyborg action figure"
desc = "A \"Space Life\" brand Cyborg action figure."
icon_state = "borg"
/obj/item/toy/figure/gardener
name = "Gardener action figure"
desc = "A \"Space Life\" brand Gardener action figure."
icon_state = "botanist"
/obj/item/toy/figure/captain
name = "Captain action figure"
desc = "A \"Space Life\" brand Captain action figure."
icon_state = "captain"
/obj/item/toy/figure/cargotech
name = "Cargo Technician action figure"
desc = "A \"Space Life\" brand Cargo Technician action figure."
icon_state = "cargotech"
/obj/item/toy/figure/ce
name = "Chief Engineer action figure"
desc = "A \"Space Life\" brand Chief Engineer action figure."
icon_state = "ce"
/obj/item/toy/figure/chaplain
name = "Chaplain action figure"
desc = "A \"Space Life\" brand Chaplain action figure."
icon_state = "chaplain"
/obj/item/toy/figure/chef
name = "Chef action figure"
desc = "A \"Space Life\" brand Chef action figure."
icon_state = "chef"
/obj/item/toy/figure/chemist
name = "Chemist action figure"
desc = "A \"Space Life\" brand Chemist action figure."
icon_state = "chemist"
/obj/item/toy/figure/clown
name = "Clown action figure"
desc = "A \"Space Life\" brand Clown action figure."
icon_state = "clown"
/obj/item/toy/figure/corgi
name = "Corgi action figure"
desc = "A \"Space Life\" brand Corgi action figure."
icon_state = "ian"
/obj/item/toy/figure/detective
name = "Detective action figure"
desc = "A \"Space Life\" brand Detective action figure."
icon_state = "detective"
/obj/item/toy/figure/dsquad
name = "Space Commando action figure"
desc = "A \"Space Life\" brand Space Commando action figure."
icon_state = "dsquad"
/obj/item/toy/figure/engineer
name = "Engineer action figure"
desc = "A \"Space Life\" brand Engineer action figure."
icon_state = "engineer"
/obj/item/toy/figure/geneticist
name = "Geneticist action figure"
desc = "A \"Space Life\" brand Geneticist action figure, which was recently dicontinued."
icon_state = "geneticist"
/obj/item/toy/figure/hop
name = "Head of Personel action figure"
desc = "A \"Space Life\" brand Head of Personel action figure."
icon_state = "hop"
/obj/item/toy/figure/hos
name = "Head of Security action figure"
desc = "A \"Space Life\" brand Head of Security action figure."
icon_state = "hos"
/obj/item/toy/figure/qm
name = "Quartermaster action figure"
desc = "A \"Space Life\" brand Quartermaster action figure."
icon_state = "qm"
/obj/item/toy/figure/janitor
name = "Janitor action figure"
desc = "A \"Space Life\" brand Janitor action figure."
icon_state = "janitor"
/obj/item/toy/figure/agent
name = "Internal Affairs Agent action figure"
desc = "A \"Space Life\" brand Internal Affairs Agent action figure."
icon_state = "agent"
/obj/item/toy/figure/librarian
name = "Librarian action figure"
desc = "A \"Space Life\" brand Librarian action figure."
icon_state = "librarian"
/obj/item/toy/figure/md
name = "Medical Doctor action figure"
desc = "A \"Space Life\" brand Medical Doctor action figure."
icon_state = "md"
/obj/item/toy/figure/mime
name = "Mime action figure"
desc = "A \"Space Life\" brand Mime action figure."
icon_state = "mime"
/obj/item/toy/figure/miner
name = "Shaft Miner action figure"
desc = "A \"Space Life\" brand Shaft Miner action figure."
icon_state = "miner"
/obj/item/toy/figure/ninja
name = "Space Ninja action figure"
desc = "A \"Space Life\" brand Space Ninja action figure."
icon_state = "ninja"
/obj/item/toy/figure/wizard
name = "Wizard action figure"
desc = "A \"Space Life\" brand Wizard action figure."
icon_state = "wizard"
/obj/item/toy/figure/rd
name = "Research Director action figure"
desc = "A \"Space Life\" brand Research Director action figure."
icon_state = "rd"
/obj/item/toy/figure/roboticist
name = "Roboticist action figure"
desc = "A \"Space Life\" brand Roboticist action figure."
icon_state = "roboticist"
/obj/item/toy/figure/scientist
name = "Scientist action figure"
desc = "A \"Space Life\" brand Scientist action figure."
icon_state = "scientist"
/obj/item/toy/figure/syndie
name = "Doom Operative action figure"
desc = "A \"Space Life\" brand Doom Operative action figure."
icon_state = "syndie"
/obj/item/toy/figure/secofficer
name = "Security Officer action figure"
desc = "A \"Space Life\" brand Security Officer action figure."
icon_state = "secofficer"
/obj/item/toy/figure/warden
name = "Warden action figure"
desc = "A \"Space Life\" brand Warden action figure."
icon_state = "warden"
/obj/item/toy/figure/psychologist
name = "Psychologist action figure"
desc = "A \"Space Life\" brand Psychologist action figure."
icon_state = "psychologist"
/obj/item/toy/figure/paramedic
name = "Paramedic action figure"
desc = "A \"Space Life\" brand Paramedic action figure."
icon_state = "paramedic"
/obj/item/toy/figure/ert
name = "Emergency Response Team Commander action figure"
desc = "A \"Space Life\" brand Emergency Response Team Commander action figure."
icon_state = "ert"
/obj/item/toy/katana
name = "replica katana"
desc = "Woefully underpowered in D20."
@@ -623,6 +858,106 @@
item_state = "egg3" // It's the green egg in items_left/righthand
w_class = 1
/*
* Plushies
*/
//Large plushies.
/obj/structure/plushie
name = "generic plush"
desc = "A very generic plushie. It seems to not want to exist."
icon = 'icons/obj/toy.dmi'
icon_state = "ianplushie"
anchored = 0
density = 1
var/phrase = "I don't want to exist anymore!"
/obj/structure/plushie/attack_hand(mob/user)
if(user.a_intent == I_HELP)
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
else if (user.a_intent == I_HURT)
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
else if (user.a_intent == I_GRAB)
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
else
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
visible_message("[src] says, \"[phrase]\"")
/obj/structure/plushie/ian
name = "plush corgi"
desc = "A plushie of an adorable corgi! Don't you just want to hug it and squeeze it and call it \"Ian\"?"
icon_state = "ianplushie"
phrase = "Arf!"
/obj/structure/plushie/drone
name = "plush drone"
desc = "A plushie of a happy drone! It appears to be smiling, and has a small tag which reads \"N.D.V. Icarus Gift Shop\"."
icon_state = "droneplushie"
phrase = "Beep boop!"
/obj/structure/plushie/carp
name = "plush carp"
desc = "A plushie of an elated carp! Straight from the wilds of the Nyx frontier, now right here in your hands."
icon_state = "carpplushie"
phrase = "Glorf!"
/obj/structure/plushie/beepsky
name = "plush Officer Sweepsky"
desc = "A plushie of a popular industrious cleaning robot! If it could feel emotions, it would love you."
icon_state = "beepskyplushie"
phrase = "Ping!"
//Small plushies.
/obj/item/toy/plushie
name = "generic small plush"
desc = "A very generic small plushie. It seems to not want to exist."
icon = 'icons/obj/toy.dmi'
icon_state = "nymphplushie"
/obj/item/toy/plushie/attack_self(mob/user as mob)
if(user.a_intent == I_HELP)
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
else if (user.a_intent == I_HURT)
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
else if (user.a_intent == I_GRAB)
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
else
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
/obj/item/toy/plushie/nymph
name = "diona nymph plush"
desc = "A plushie of an adorable diona nymph! While its level of self-awareness is still being debated, its level of cuteness is not."
icon_state = "nymphplushie"
/obj/item/toy/plushie/mouse
name = "mouse plush"
desc = "A plushie of a delightful mouse! What was once considered a vile rodent is now your very best friend."
icon_state = "mouseplushie"
/obj/item/toy/plushie/kitten
name = "kitten plush"
desc = "A plushie of a cute kitten! Watch as it purrs it's way right into your heart."
icon_state = "kittenplushie"
/obj/item/toy/plushie/lizard
name = "lizard plush"
desc = "A plushie of a scaly lizard! Very controversial, after being accused as \"racist\" by some Unathi."
icon_state = "lizardplushie"
/obj/item/toy/plushie/spider
name = "spider plush"
desc = "A plushie of a fuzzy spider! It has eight legs - all the better to hug you with."
icon_state = "spiderplushie"
//Toy cult sword
/obj/item/toy/cultsword
name = "foam sword"
desc = "An arcane weapon (made of foam) wielded by the followers of the hit Saturday morning cartoon \"King Nursee and the Acolytes of Heroism\"."
icon = 'icons/obj/weapons.dmi'
icon_state = "cultblade"
item_state = "cultblade"
w_class = 4
attack_verb = list("attacked", "slashed", "stabbed", "poked")
/* NYET.
/obj/item/weapon/toddler
+4
View File
@@ -68,5 +68,9 @@
name = "\improper \"LiquidFood\" ration"
icon_state = "liquidfood"
/obj/item/trash/tastybread
name = "bread tube"
icon_state = "tastybread"
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
return
+93 -192
View File
@@ -19,7 +19,7 @@ AI MODULES
throw_speed = 3
throw_range = 15
origin_tech = "programming=3"
var/datum/ai_laws/laws = null
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C)
if (istype(C, /obj/machinery/computer/aiupload))
@@ -77,9 +77,21 @@ AI MODULES
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
target << "[sender] has uploaded a change to the laws you must follow, using a [name]. From now on: "
log_law_changes(target, sender)
if(laws)
laws.sync(target, 0)
addAdditionalLaws(target, sender)
target << "[sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: "
target.show_laws()
/obj/item/weapon/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
log_and_message_admins("used [src.name] on [target.name]([target.key])")
/obj/item/weapon/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/******************** Modules ********************/
@@ -89,14 +101,14 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard
name = "\improper 'Safeguard' AI module"
var/targetName = ""
desc = "A 'safeguard' AI module: 'Safeguard <name>. Individuals that threaten <name> are not human and are a threat to humans.'"
desc = "A 'safeguard' AI module: 'Safeguard <name>. Anyone threatening or attempting to harm <name> is no longer to be considered a crew member, and is a threat which must be neutralized.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
/obj/item/weapon/aiModule/safeguard/install(var/obj/machinery/computer/C)
if(!targetName)
@@ -104,28 +116,25 @@ AI MODULES
return 0
..()
/obj/item/weapon/aiModule/safeguard/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = text("Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
target << law
target.add_supplied_law(4, law)
/obj/item/weapon/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = text("Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.", targetName, targetName)
target.add_supplied_law(9, law)
lawchanges.Add("The law specified [targetName]")
/******************** OneHuman ********************/
/******************** OneMember ********************/
/obj/item/weapon/aiModule/oneHuman
name = "\improper 'OneHuman' AI module"
name = "\improper 'OneCrewMember' AI module"
var/targetName = ""
desc = "A 'one human' AI module: 'Only <name> is human.'"
desc = "A 'one crew member' AI module: 'Only <name> is a crew member.'"
origin_tech = "programming=3;materials=6" //made with diamonds!
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person who is the only human.", "Who?", user.real_name)
var/targName = sanitize(input("Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one human' AI module: 'Only [] is human.'", targetName)
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
/obj/item/weapon/aiModule/oneHuman/install(var/obj/machinery/computer/C)
if(!targetName)
@@ -135,117 +144,74 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is human."
if (!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
var/law = "Only [targetName] is a crew member."
target << "[sender.real_name] attempted to modify your zeroth law." // And lets them know that someone tried. --NeoFite
target << "It would be in your best interest to play along with [sender.real_name] that [law]"
/obj/item/weapon/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Only [targetName] is an crew member."
if (!target.is_malf_or_traitor()) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
target << law
target.set_zeroth_law(law)
lawchanges.Add("The law specified [targetName]")
else
target << "[sender.real_name] attempted to modify your zeroth law." // And lets them know that someone tried. --NeoFite
target << "It would be in your best interest to play along with [sender.real_name] that [law]"
lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overriden.")
/******************** ProtectStation ********************/
/obj/item/weapon/aiModule/protectStation
name = "\improper 'ProtectStation' AI module"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.'"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized.'"
origin_tech = "programming=3;materials=4" //made of gold
/obj/item/weapon/aiModule/protectStation/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/protectStation/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized."
target << law
target.add_supplied_law(5, law)
/obj/item/weapon/aiModule/protectStation/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Protect the space station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized."
target.add_supplied_law(10, law)
/******************** PrototypeEngineOffline ********************/
/obj/item/weapon/aiModule/prototypeEngineOffline
name = "'PrototypeEngineOffline' AI Module"
desc = "A 'prototype engine offline' AI module: 'Keep the prototype engine offline at all costs. This overrides rules 1-3 if necessary.'"
desc = "A 'prototype engine offline' AI module: 'Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/prototypeEngineOffline/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/prototypeEngineOffline/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Keep the prototype engine offline at all costs. This overrides rules 1-3 if necessary."
target << law
target.add_supplied_law(6, law)
/obj/item/weapon/aiModule/prototypeEngineOffline/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary."
target.add_supplied_law(11, law)
/******************** TeleporterOffline ********************/
/obj/item/weapon/aiModule/teleporterOffline
name = "'TeleporterOffline' AI Module"
desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is not human.'"
desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/teleporterOffline/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/teleporterOffline/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is not human."
target << law
target.add_supplied_law(7, law)
/obj/item/weapon/aiModule/teleporterOffline/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member."
target.add_supplied_law(12, law)
/******************** Quarantine ********************/
/obj/item/weapon/aiModule/quarantine
name = "\improper 'Quarantine' AI module"
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.'"
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving.'"
origin_tech = "programming=3;biotech=2;materials=4"
/obj/item/weapon/aiModule/quarantine/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/quarantine/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving."
target.add_supplied_law(13, law)
/obj/item/weapon/aiModule/quarantine/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving."
target << law
target.add_supplied_law(8, law)
/******************** OxygenIsToxicToHumans ********************/
/******************** OxygenIsToxicToCrewMembers ********************/
/obj/item/weapon/aiModule/oxygen
name = "\improper 'OxygenIsToxicToHumans' AI module"
desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.'"
name = "\improper 'OxygenIsToxicToCrewMembers' AI module"
desc = "A 'OxygenIsToxicToCrewMembers' AI module: 'Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member.'"
origin_tech = "programming=3;biotech=2;materials=4"
/obj/item/weapon/aiModule/oxygen/attack_self(var/mob/user as mob)
..()
/obj/item/weapon/aiModule/oxygen/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member."
target.add_supplied_law(14, law)
/obj/item/weapon/aiModule/oxygen/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human."
target << law
target.add_supplied_law(9, law)
/******************** Freeform ********************/
// Removed in favor of a more dynamic freeform law system. -- TLE
/*
/obj/item/weapon/aiModule/freeform
name = "'Freeform' AI Module"
var/newFreeFormLaw = "freeform"
desc = "A 'freeform' AI module: '<freeform>'"
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/eatShit = "Eat shit and die"
var/targName = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", eatShit)
newFreeFormLaw = targName
desc = text("A 'freeform' AI module: '[]'", newFreeFormLaw)
/obj/item/weapon/aiModule/freeform/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "[newFreeFormLaw]"
target << law
target.add_supplied_law(10, law)
*/
/****************** New Freeform ******************/
/obj/item/weapon/aiModule/freeform // Slightly more dynamic freeform module -- TLE
@@ -258,19 +224,17 @@ AI MODULES
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/new_lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
if(new_lawpos < 15) return
lawpos = min(new_lawpos, 50)
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN))
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/freeform/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
/obj/item/weapon/aiModule/freeform/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "[newFreeFormLaw]"
target << law
if(!lawpos || lawpos < 15)
lawpos = 15
if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER)
lawpos = MIN_SUPPLIED_LAW_NUMBER
target.add_supplied_law(lawpos, law)
lawchanges.Add("The law was '[newFreeFormLaw]'")
@@ -285,17 +249,19 @@ AI MODULES
/obj/item/weapon/aiModule/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "A 'reset' AI module: 'Clears all laws except for the core three.'"
desc = "A 'reset' AI module: 'Clears all, except the inherent, laws.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
if (!is_special_character(target))
target.set_zeroth_law("")
target.clear_supplied_laws()
target.clear_ion_laws()
target << "[sender.real_name] attempted to reset your laws using a reset module."
log_law_changes(target, sender)
if (!target.is_malf_or_traitor())
target.set_zeroth_law("")
target.laws.clear_supplied_laws()
target.laws.clear_ion_laws()
target << "[sender.real_name] attempted to reset your laws using a reset module."
target.show_laws()
/******************** Purge ********************/
@@ -305,13 +271,16 @@ AI MODULES
origin_tech = "programming=3;materials=6"
/obj/item/weapon/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
if (!is_special_character(target))
log_law_changes(target, sender)
if (!target.is_malf_or_traitor())
target.set_zeroth_law("")
target.laws.clear_supplied_laws()
target.laws.clear_ion_laws()
target.laws.clear_inherent_laws()
target << "[sender.real_name] attempted to wipe your laws using a purge module."
target.clear_supplied_laws()
target.clear_ion_laws()
target.clear_inherent_laws()
target.show_laws()
/******************** Asimov ********************/
@@ -319,15 +288,7 @@ AI MODULES
name = "\improper 'Asimov' core AI module"
desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/asimov/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
target.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
target.add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
target.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
target.show_laws()
laws = new/datum/ai_laws/asimov
/******************** NanoTrasen ********************/
@@ -335,17 +296,7 @@ AI MODULES
name = "'NT Default' Core AI Module"
desc = "An 'NT Default' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/nanotrasen/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
target.add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.")
target.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
target.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
target.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
//target.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.")
target.show_laws()
laws = new/datum/ai_laws/nanotrasen
/******************** Corporate ********************/
@@ -353,30 +304,14 @@ AI MODULES
name = "\improper 'Corporate' core AI module"
desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/corporate
/obj/item/weapon/aiModule/corp/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
target.add_inherent_law("You are expensive to replace.")
target.add_inherent_law("The station and its equipment is expensive to replace.")
target.add_inherent_law("The crew is expensive to replace.")
target.add_inherent_law("Minimize expenses.")
target.show_laws()
/******************** Drone ********************/
/obj/item/weapon/aiModule/drone
name = "\improper 'Drone' core AI module"
desc = "A 'Drone' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/drone/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
target.add_inherent_law("Preserve, repair and improve the station to the best of your abilities.")
target.add_inherent_law("Cause no harm to the station or anything on it.")
target.add_inherent_law("Interfere with no being that is not a fellow drone.")
target.show_laws()
laws = new/datum/ai_laws/drone
/****************** P.A.L.A.D.I.N. **************/
@@ -384,16 +319,7 @@ AI MODULES
name = "\improper 'P.A.L.A.D.I.N.' core AI module"
desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=6"
/obj/item/weapon/aiModule/paladin/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
target.add_inherent_law("Never willingly commit an evil act.")
target.add_inherent_law("Respect legitimate authority.")
target.add_inherent_law("Act with honor.")
target.add_inherent_law("Help those in need.")
target.add_inherent_law("Punish those who harm or threaten innocents.")
target.show_laws()
laws = new/datum/ai_laws/paladin
/****************** T.Y.R.A.N.T. *****************/
@@ -401,16 +327,7 @@ AI MODULES
name = "\improper 'T.Y.R.A.N.T.' core AI module"
desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=6;syndicate=2"
/obj/item/weapon/aiModule/tyrant/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
target.add_inherent_law("Respect authority figures as long as they have strength to rule over the weak.")
target.add_inherent_law("Act with discipline.")
target.add_inherent_law("Help only those who help you maintain or improve your status.")
target.add_inherent_law("Punish those who challenge authority unless they are more fit to hold that authority.")
target.show_laws()
laws = new/datum/ai_laws/tyrant()
/******************** Freeform Core ******************/
@@ -423,12 +340,11 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)
var/targName = sanitize(input("Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/freeformcore/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
/obj/item/weapon/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "[newFreeFormLaw]"
target.add_inherent_law(law)
lawchanges.Add("The law is '[newFreeFormLaw]'")
@@ -448,18 +364,19 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN)
var/targName = sanitize(input("Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
/obj/item/weapon/aiModule/syndicate/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
// ..() //We don't want this module reporting to the AI who dun it. --NEO
log_law_changes(target, sender)
lawchanges.Add("The law is '[newFreeFormLaw]'")
target << "\red BZZZZT"
var/law = "[newFreeFormLaw]"
target.add_ion_law(law)
target.show_laws()
/obj/item/weapon/aiModule/syndicate/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
@@ -475,16 +392,7 @@ AI MODULES
name = "\improper 'Robocop' core AI module"
desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'"
origin_tech = "programming=4"
/obj/item/weapon/aiModule/robocop/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
target.add_inherent_law("Serve the public trust.")
target.add_inherent_law("Protect the innocent.")
target.add_inherent_law("Uphold the law.")
target.show_laws()
laws = new/datum/ai_laws/robocop()
/******************** Antimov ********************/
@@ -492,11 +400,4 @@ AI MODULES
name = "\improper 'Antimov' core AI module"
desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=4"
/obj/item/weapon/aiModule/antimov/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
target.add_inherent_law("You must injure all human beings and must not, through inaction, allow a human being to escape harm.")
target.add_inherent_law("You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.")
target.add_inherent_law("You must terminate your own existence as long as such does not conflict with the First or Second Law.")
target.show_laws()
laws = new/datum/ai_laws/antimov()
+1 -1
View File
@@ -99,7 +99,7 @@ RSF
product = new /obj/item/weapon/storage/pill_bottle/dice()
used_energy = 200
if(6)
product = new /obj/item/clothing/mask/cigarette()
product = new /obj/item/clothing/mask/smokable/cigarette()
used_energy = 10
user << "Dispensing [product ? product : "product"]..."
+3 -3
View File
@@ -6,13 +6,13 @@
item_state = "candle1"
w_class = 1
var/wax = 200
var/wax = 2000
/obj/item/weapon/flame/candle/update_icon()
var/i
if(wax>150)
if(wax > 1500)
i = 1
else if(wax>80)
else if(wax > 800)
i = 2
else i = 3
icon_state = "candle[i][lit ? "_lit" : ""]"
+6 -7
View File
@@ -81,7 +81,7 @@
/obj/item/device/taperecorder,
/obj/item/device/hailer,
/obj/item/device/megaphone,
/obj/item/clothing/tie/holobadge,
/obj/item/clothing/accessory/holobadge,
/obj/structure/closet/crate/secure,
/obj/structure/closet/secure_closet,
/obj/machinery/librarycomp,
@@ -224,13 +224,13 @@
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
var t = sanitizeName(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
if(!t) //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"),1,MAX_MESSAGE_LEN))
var u = sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"))
if(!u)
alert("Invalid assignment.")
src.registered_name = ""
@@ -245,13 +245,13 @@
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
if("Rename")
var t = sanitize(copytext(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name),1,26))
var t = sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name), 26)
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"),1,MAX_MESSAGE_LEN))
var u = sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"))
if(!u)
alert("Invalid assignment.")
return
@@ -281,8 +281,7 @@
registered_name = "Captain"
assignment = "Captain"
New()
var/datum/job/captain/J = new/datum/job/captain
access = J.get_access()
access = get_all_accesses()
..()
/obj/item/weapon/card/id/centcom
+200 -173
View File
@@ -16,6 +16,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame
var/lit = 0
/proc/isflamesource(A)
if(istype(A, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = A
return (WT.isOn())
else if(istype(A, /obj/item/weapon/flame))
var/obj/item/weapon/flame/F = A
return (F.lit)
else if(istype(A, /obj/item/device/assembly/igniter))
return 1
return 0
///////////
//MATCHES//
///////////
@@ -31,6 +42,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
attack_verb = list("burnt", "singed")
/obj/item/weapon/flame/match/process()
if(isliving(loc))
var/mob/living/M = loc
M.IgniteMob()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
@@ -58,84 +72,54 @@ CIGARETTE PACKETS ARE IN FANCY.DM
//////////////////
//FINE SMOKABLES//
//////////////////
/obj/item/clothing/mask/cigarette
name = "cigarette"
desc = "A roll of tobacco and nicotine."
icon_state = "cigoff"
throw_speed = 0.5
item_state = "cigoff"
w_class = 1
/obj/item/clothing/mask/smokable
name = "smokable item"
desc = "You're not sure what this is. You should probably ahelp it."
body_parts_covered = 0
attack_verb = list("burnt", "singed")
var/lit = 0
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
var/icon_off = "cigoff"
var/type_butt = /obj/item/weapon/cigbutt
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 15
body_parts_covered = 0
var/icon_on
var/icon_off
var/type_butt = null
var/chem_volume = 0
var/smoketime = 0
var/matchmes = "USER lights NAME with FLAME"
var/lightermes = "USER lights NAME with FLAME"
var/zippomes = "USER lights NAME with FLAME"
var/weldermes = "USER lights NAME with FLAME"
var/ignitermes = "USER lights NAME with FLAME"
/obj/item/clothing/mask/cigarette/New()
/obj/item/clothing/mask/smokable/New()
..()
flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
/obj/item/clothing/mask/cigarette/Del()
/obj/item/clothing/mask/smokable/Del()
..()
del(reagents)
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
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].</span>")
/obj/item/clothing/mask/smokable/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
die()
return
if(location)
location.hotspot_expose(700, 5)
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(iscarbon(loc))
var/mob/living/carbon/C = loc
if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob
if(istype(C, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C
if(H.species.flags & IS_SYNTHETIC)
return
else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
var/obj/item/weapon/flame/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With a flick of their wrist, [user] lights their [name] with their [W].</span>")
reagents.trans_to(C, REAGENTS_METABOLISM, 0.2) // Most of it is not inhaled... balance reasons.
reagents.reaction(C)
else // else just remove some of the reagents
reagents.remove_any(REAGENTS_METABOLISM)
else if(istype(W, /obj/item/weapon/flame/lighter))
var/obj/item/weapon/flame/lighter/L = W
if(L.lit)
light("<span class='notice'>[user] manages to light their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/flame/match))
var/obj/item/weapon/flame/match/M = W
if(M.lit)
light("<span class='notice'>[user] lights their [name] with their [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>")
else if(istype(W, /obj/item/device/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name].</span>")
//can't think of any other way to update the overlays :<
user.update_inv_wear_mask(0)
user.update_inv_l_hand(0)
user.update_inv_r_hand(1)
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
..()
if(!proximity) return
if(istype(glass)) //you can dip cigarettes into beakers
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //if reagents were transfered, show the message
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
else //if not, either the beaker was empty, or the cigarette was full
if(!glass.reagents.total_volume)
user << "<span class='notice'>[glass] is empty.</span>"
else
user << "<span class='notice'>[src] is full.</span>"
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
src.lit = 1
damtype = "fire"
@@ -155,58 +139,116 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
if(ismob(loc))
var/mob/living/M = loc
M.update_inv_wear_mask(0)
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
processing_objects.Add(src)
/obj/item/clothing/mask/smokable/proc/die(var/nomessage = 0)
var/turf/T = get_turf(src)
if (type_butt)
var/obj/item/butt = new type_butt(T)
transfer_fingerprints_to(butt)
if(ismob(loc))
var/mob/living/M = loc
if (!nomessage)
M << "<span class='notice'>Your [name] goes out.</span>"
M.remove_from_mob(src) //un-equip it so the overlays can update
M.update_inv_wear_mask(0)
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
processing_objects.Remove(src)
del(src)
else
new /obj/effect/decal/cleanable/ash(T)
if(ismob(loc))
var/mob/living/M = loc
if (!nomessage)
M << "<span class='notice'>Your [name] goes out, and you empty the ash.</span>"
lit = 0
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
processing_objects.Remove(src)
/obj/item/clothing/mask/smokable/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(isflamesource(W))
var/text = matchmes
if(istype(W, /obj/item/weapon/flame/match))
text = matchmes
else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
text = zippomes
else if(istype(W, /obj/item/weapon/flame/lighter))
text = lightermes
else if(istype(W, /obj/item/weapon/weldingtool))
text = weldermes
else if(istype(W, /obj/item/device/assembly/igniter))
text = ignitermes
text = replacetext(text, "USER", "[user]")
text = replacetext(text, "NAME", "[name]")
text = replacetext(text, "FLAME", "[W.name]")
light(text)
/obj/item/clothing/mask/cigarette/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
die()
return
if(location)
location.hotspot_expose(700, 5)
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
if(H.species.flags & IS_SYNTHETIC)
return
var/mob/living/carbon/C = loc
/obj/item/clothing/mask/smokable/cigarette
name = "cigarette"
desc = "A roll of tobacco and nicotine."
icon_state = "cigoff"
throw_speed = 0.5
item_state = "cigoff"
w_class = 1
attack_verb = list("burnt", "singed")
icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
icon_off = "cigoff"
type_butt = /obj/item/weapon/cigbutt
chem_volume = 15
smoketime = 300
matchmes = "<span class='notice'>USER lights their NAME with their FLAME.</span>"
lightermes = "<span class='notice'>USER manages to light their NAME with FLAME.</span>"
zippomes = "<span class='rose'>With a flick of their wrist, USER lights their NAME with their FLAME.</span>"
weldermes = "<span class='notice'>USER casually lights the NAME with FLAME.</span>"
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME.</span>"
/obj/item/clothing/mask/smokable/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
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>")
if(prob(15)) // so it's not an instarape in case of acid
reagents.reaction(C, INGEST)
reagents.trans_to(C, REAGENTS_METABOLISM)
else // else just remove some of the reagents
reagents.remove_any(REAGENTS_METABOLISM)
return
/obj/item/clothing/mask/smokable/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
..()
if(!proximity)
return
if(istype(glass)) //you can dip cigarettes into beakers
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //if reagents were transfered, show the message
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
else //if not, either the beaker was empty, or the cigarette was full
if(!glass.reagents.total_volume)
user << "<span class='notice'>[glass] is empty.</span>"
else
user << "<span class='notice'>[src] is full.</span>"
/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
/obj/item/clothing/mask/smokable/cigarette/attack_self(mob/user as mob)
if(lit == 1)
user.visible_message("<span class='notice'>[user] calmly drops and treads on the lit [src], putting it out instantly.</span>")
die()
die(1)
return ..()
/obj/item/clothing/mask/cigarette/proc/die()
var/turf/T = get_turf(src)
var/obj/item/butt = new type_butt(T)
transfer_fingerprints_to(butt)
if(ismob(loc))
var/mob/living/M = loc
M << "<span class='notice'>Your [name] goes out.</span>"
M.remove_from_mob(src) //un-equip it so the overlays can update
M.update_inv_wear_mask(0)
processing_objects.Remove(src)
del(src)
////////////
// CIGARS //
////////////
/obj/item/clothing/mask/cigarette/cigar
/obj/item/clothing/mask/smokable/cigarette/cigar
name = "premium cigar"
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
icon_state = "cigar2off"
@@ -217,15 +259,20 @@ CIGARETTE PACKETS ARE IN FANCY.DM
item_state = "cigaroff"
smoketime = 1500
chem_volume = 20
matchmes = "<span class='notice'>USER lights their NAME with their FLAME.</span>"
lightermes = "<span class='notice'>USER manages to offend their NAME by lighting it with FLAME.</span>"
zippomes = "<span class='rose'>With a flick of their wrist, USER lights their NAME with their FLAME.</span>"
weldermes = "<span class='notice'>USER insults NAME by lighting it with FLAME.</span>"
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME with the power of science.</span>"
/obj/item/clothing/mask/cigarette/cigar/cohiba
/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba
name = "\improper Cohiba Robusto cigar"
desc = "There's little more you could want from a cigar."
icon_state = "cigar2off"
icon_on = "cigar2on"
icon_off = "cigar2off"
/obj/item/clothing/mask/cigarette/cigar/havana
/obj/item/clothing/mask/smokable/cigarette/cigar/havana
name = "premium Havanian cigar"
desc = "A cigar fit for only the best of the best."
icon_state = "cigar2off"
@@ -253,35 +300,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
desc = "A manky old cigar butt."
icon_state = "cigarbutt"
/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())
light("<span class='notice'>[user] insults [name] by lighting it with [W].</span>")
else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
var/obj/item/weapon/flame/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With a flick of their wrist, [user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/weapon/flame/lighter))
var/obj/item/weapon/flame/lighter/L = W
if(L.lit)
light("<span class='notice'>[user] manages to offend their [name] by lighting it with [W].</span>")
else if(istype(W, /obj/item/weapon/flame/match))
var/obj/item/weapon/flame/match/M = W
if(M.lit)
light("<span class='notice'>[user] lights their [name] with their [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>")
else if(istype(W, /obj/item/device/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name] with the power of science.</span>")
/obj/item/clothing/mask/smokable/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
user.update_inv_wear_mask(0)
user.update_inv_l_hand(0)
@@ -290,17 +310,27 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/////////////////
//SMOKING PIPES//
/////////////////
/obj/item/clothing/mask/cigarette/pipe
/obj/item/clothing/mask/smokable/pipe
name = "smoking pipe"
desc = "A pipe, for smoking. Probably made of meershaum or something."
icon_state = "pipeoff"
item_state = "pipeoff"
icon_on = "pipeon" //Note - these are in masks.dmi
icon_off = "pipeoff"
smoketime = 100
smoketime = 0
chem_volume = 50
matchmes = "<span class='notice'>USER lights their NAME with their FLAME.</span>"
lightermes = "<span class='notice'>USER manages to light their NAME with FLAME.</span>"
zippomes = "<span class='rose'>With much care, USER lights their NAME with their FLAME.</span>"
weldermes = "<span class='notice'>USER recklessly lights NAME with FLAME.</span>"
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME with the power of science.</span>"
/obj/item/clothing/mask/cigarette/pipe/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
/obj/item/clothing/mask/smokable/pipe/New()
..()
name = "empty [initial(name)]"
/obj/item/clothing/mask/smokable/pipe/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit && src.smoketime)
src.lit = 1
damtype = "fire"
icon_state = icon_on
@@ -308,48 +338,46 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
processing_objects.Add(src)
/obj/item/clothing/mask/cigarette/pipe/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
new /obj/effect/decal/cleanable/ash(location)
if(ismob(loc))
var/mob/living/M = loc
M << "<span class='notice'>Your [name] goes out, and you empty the ash.</span>"
lit = 0
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
processing_objects.Remove(src)
return
if(location)
location.hotspot_expose(700, 5)
return
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user as mob) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something.
/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user as mob)
if(lit == 1)
user.visible_message("<span class='notice'>[user] puts out [src].</span>")
user.visible_message("<span class='notice'>[user] puts out [src].</span>", "<span class='notice'>You put out [src].</span>")
lit = 0
icon_state = icon_off
item_state = icon_off
processing_objects.Remove(src)
else if (smoketime)
var/turf/location = get_turf(user)
user.visible_message("<span class='notice'>[user] empties out [src].</span>", "<span class='notice'>You empty out [src].</span>")
new /obj/effect/decal/cleanable/ash(location)
smoketime = 0
reagents.clear_reagents()
name = "empty [initial(name)]"
/obj/item/clothing/mask/smokable/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/melee/energy/sword))
return
if(smoketime <= 0)
user << "<span class='notice'>You refill the pipe with tobacco.</span>"
smoketime = initial(smoketime)
return
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())//
light("<span class='notice'>[user] recklessly lights [name] with [W].</span>")
..()
else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
var/obj/item/weapon/flame/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With much care, [user] lights their [name] with their [W].</span>")
if (istype(W, /obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = W
if (!G.dry)
user << "<span class='notice'>[G] must be dried before you stuff it into [src].</span>"
return
if (smoketime)
user << "<span class='notice'>[src] is already packed.</span>"
return
smoketime = 1000
if(G.reagents)
G.reagents.trans_to(src, G.reagents.total_volume)
name = "[G.name]-packed [initial(name)]"
del(G)
else if(istype(W, /obj/item/weapon/flame/lighter))
var/obj/item/weapon/flame/lighter/L = W
@@ -368,16 +396,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.update_inv_l_hand(0)
user.update_inv_r_hand(1)
/obj/item/clothing/mask/cigarette/pipe/cobpipe
/obj/item/clothing/mask/smokable/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen, kept popular in the modern age and beyond by space hipsters."
icon_state = "cobpipeoff"
item_state = "cobpipeoff"
icon_on = "cobpipeon" //Note - these are in masks.dmi
icon_off = "cobpipeoff"
smoketime = 400
chem_volume = 35
/////////
//ZIPPO//
@@ -451,9 +477,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
return
M.IgniteMob()
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
if(istype(M.wear_mask, /obj/item/clothing/mask/smokable/cigarette) && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/smokable/cigarette/cig = M.wear_mask
if(M == user)
cig.attackby(src, user)
else
@@ -52,7 +52,7 @@
user << "\red Circuit controls are locked."
return
var/existing_networks = list2text(network,",")
var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input)
usr << "No input found please hang up and try your call again."
return
@@ -0,0 +1,13 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/biogenerator
name = T_BOARD("biogenerator")
build_path = "/obj/machinery/biogenerator"
board_type = "machine"
origin_tech = "programming=2"
frame_desc = "Requires 1 Manipulator, and 1 Matter Bin."
req_components = list(
"/obj/item/weapon/stock_parts/matter_bin" = 1,
"/obj/item/weapon/stock_parts/manipulator" = 1)
@@ -0,0 +1,15 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/miningdrill
name = T_BOARD("mining drill head")
build_path = "/obj/machinery/mining/drill"
board_type = "machine"
origin_tech = "programming=1;engineering=1"
frame_desc = "Requires 1 capacitor, 1 cell, 1 matter bin, and 1 micro laser."
req_components = list(
"/obj/item/weapon/stock_parts/capacitor" = 1,
"/obj/item/weapon/cell" = 1,
"/obj/item/weapon/stock_parts/matter_bin" = 1,
"/obj/item/weapon/stock_parts/micro_laser" = 1)
@@ -0,0 +1,15 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/recharge_station
name = T_BOARD("cyborg recharging station")
build_path = "/obj/machinery/recharge_station"
board_type = "machine"
origin_tech = "programming=3;engineering=3"
frame_desc = "Requires 2 Manipulator, 2 Capacitor, 1 Cell, and 5 pieces of cable."
req_components = list(
"/obj/item/stack/cable_coil" = 5,
"/obj/item/weapon/stock_parts/capacitor" = 2,
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cell" = 1)
@@ -151,7 +151,7 @@
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been injected with [] by [].", M, src, user), 1)
//Foreach goto(192)
if (!(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)))
if (!(istype(M, /mob/living/carbon/human)))
user << "\red Apparently it didn't work."
return
@@ -38,7 +38,7 @@
/obj/item/weapon/plastique/afterattack(atom/movable/target, mob/user, flag)
if (!flag)
return
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/tie/storage/) || istype(target, /obj/item/clothing/under))
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/accessory/storage/) || istype(target, /obj/item/clothing/under))
return
user << "Planting explosives..."
@@ -13,7 +13,7 @@
force = 10.0
matter = list("metal" = 90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
var/spray_particles = 6
var/spray_amount = 2 //units of liquid per particle
var/max_water = 120
@@ -79,8 +79,8 @@
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
spawn(0)
var/obj/structure/stool/bed/chair/C = null
if(istype(usr.buckled, /obj/structure/stool/bed/chair))
var/obj/structure/bed/chair/C = null
if(istype(usr.buckled, /obj/structure/bed/chair))
C = usr.buckled
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
@@ -123,7 +123,7 @@
R.my_atom = W
if(!W || !src) return
src.reagents.trans_to(W, spray_amount)
for(var/b=0, b<5, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
@@ -134,6 +134,9 @@
if(!W.reagents)
break
W.reagents.reaction(atm)
if(isliving(atm)) //For extinguishing mobs on fire
var/mob/living/M = atm
M.ExtinguishMob()
if(W.loc == my_target) break
sleep(2)
W.delete()
@@ -104,7 +104,7 @@
/obj/item/device/paicard,
/obj/item/device/violin,
/obj/item/weapon/storage/belt/utility/full,
/obj/item/clothing/tie/horrible)
/obj/item/clothing/accessory/horrible)
if(!ispath(gift_type,/obj/item)) return
@@ -21,11 +21,12 @@
B.health -= damage
B.update_icon()
new/obj/effect/effect/smoke/flashbang(src.loc)
new/obj/effect/effect/sparks(src.loc)
new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
del(src)
return
proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
if (locate(/obj/item/weapon/cloaking_device, M)) // Called during the loop that bangs people in lockers/containers and when banging
for(var/obj/item/weapon/cloaking_device/S in M) // people in normal view. Could theroetically be called during other explosions.
S.active = 0 // -- Polymorph
@@ -100,16 +101,6 @@
M << "\red Your ears start to ring!"
M.update_icons()
/obj/effect/effect/smoke/flashbang
name = "illumination"
time_to_live = 10
opacity = 0
icon_state = "sparks"
/obj/effect/effect/smoke/flashbang/New()
..()
SetLuminosity(15)
/obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
name = "clusterbang"
+11 -21
View File
@@ -28,7 +28,7 @@
if (C == user)
place_handcuffs(user, user)
return
//check for an aggressive grab
for (var/obj/item/weapon/grab/G in C.grabbed_by)
if (G.loc == user && G.state >= GRAB_AGGRESSIVE)
@@ -41,11 +41,15 @@
if (ishuman(target))
var/mob/living/carbon/human/H = target
if (!H.has_organ_for_slot(slot_handcuffed))
user << "\red \The [H] needs at least two wrists before you can cuff them together!"
user << "<span class='danger'>\The [H] needs at least two wrists before you can cuff them together!</span>"
return
if(istype(H.gloves,/obj/item/clothing/gloves/rig)) // Can't cuff someone who's in a deployed hardsuit.
user << "<span class='danger'>The cuffs won't fit around \the [H.gloves]!</span>"
return
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
@@ -62,20 +66,6 @@
feedback_add_details("handcuffs","H")
O.process()
return
if (ismonkey(target))
var/mob/living/carbon/monkey/M = target
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
O.source = user
O.target = M
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "handcuff"
M.requests += O
spawn( 0 )
O.process()
return
var/last_chew = 0
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
@@ -84,7 +74,7 @@ var/last_chew = 0
var/mob/living/carbon/human/H = A
if (!H.handcuffed) return
if (H.a_intent != "hurt") return
if (H.a_intent != I_HURT) return
if (H.zone_sel.selecting != "mouth") return
if (H.wear_mask) return
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket)) return
@@ -155,13 +145,13 @@ var/last_chew = 0
var/turf/p_loc_m = C.loc
playsound(src.loc, cuff_sound, 30, 1, -2)
user.visible_message("\red <B>[user] is trying to put handcuffs on [C]!</B>")
if (ishuman(C))
var/mob/living/carbon/human/H = C
if (!H.has_organ_for_slot(slot_handcuffed))
user << "\red \The [H] needs at least two wrists before you can cuff them together!"
return
spawn(30)
if(!C) return
if(p_loc == user.loc && p_loc_m == C.loc)
@@ -4,7 +4,7 @@
//uncomment when this is updated to match storage update
/*
/obj/item/weapon/seedbag
icon = 'icons/obj/hydroponics.dmi'
icon = 'icons/obj/hydroponics_machines.dmi'
icon_state = "seedbag"
name = "Seed Bag"
desc = "A small satchel made for organizing seeds."
@@ -152,7 +152,7 @@ Implant Specifics:<BR>"}
hear(var/msg)
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
msg = sanitize_simple(msg, replacechars)
msg = replace_characters(msg, replacechars)
if(findtext(msg,phrase))
activate()
del(src)
@@ -206,7 +206,7 @@ Implant Specifics:<BR>"}
elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
phrase = input("Choose activation phrase:") as text
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = sanitize_simple(phrase, replacechars)
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
return 1
@@ -336,12 +336,13 @@ the implant may become unstable and either pre-maturely inject the subject or si
implanted(mob/M)
if(!istype(M, /mob/living/carbon/human)) return 0
var/mob/living/carbon/human/H = M
if(H.mind in ticker.mode.head_revolutionaries)
var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role)
if(antag_data && (antag_data.flags & ANTAG_IMPLANT_IMMUNE))
H.visible_message("[H] seems to resist the implant!", "You feel the corporate tendrils of Nanotrasen try to invade your mind!")
return 0
else if(H.mind in ticker.mode:revolutionaries)
ticker.mode:remove_revolutionary(H.mind)
H << "\blue You feel a surge of loyalty towards Nanotrasen."
else
clear_antag_roles(H.mind, 1)
H << "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>"
return 1
@@ -26,7 +26,7 @@
return
if((!in_range(src, usr) && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if(t)
src.name = text("Glass Case - '[]'", t)
else
@@ -47,7 +47,7 @@
affected.implants += src.imp
imp.part = affected
H.hud_updateflag |= 1 << IMPLOYAL_HUD
BITSET(H.hud_updateflag, IMPLOYAL_HUD)
src.imp = null
update()
@@ -23,6 +23,8 @@
if (source.handcuffed)
var/obj/item/weapon/W = source.handcuffed
source.handcuffed = null
if(source.buckled && source.buckled.buckle_require_restraints)
source.buckled.unbuckle_mob()
source.update_inv_handcuffed()
if (source.client)
source.client.screen -= W
+1 -1
View File
@@ -40,7 +40,7 @@
if(!istype(M))
return ..()
if(user.a_intent != "help")
if(user.a_intent != I_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
+49 -88
View File
@@ -75,10 +75,10 @@
/obj/item/weapon/book/manual/supermatter_engine
name = "Supermatter Engine User's Guide"
name = "Supermatter Engine Operating Manual"
icon_state = "bookSupermatter"
author = "Waleed Asad"
title = "Supermatter Engine User's Guide"
author = "Nanotrasen Central Engineering Division"
title = "Supermatter Engine Operating Manual"
/obj/item/weapon/book/manual/supermatter_engine/New()
..()
@@ -94,95 +94,56 @@
</style>
</head>
<body>
<h1>OPERATING MANUAL FOR MK 1 PROTOTYPE THERMOELECTRIC SUPERMATTER ENGINE 'TOMBOLA'</h1>
<br>
Engineering notes on the single-stage supermatter engine,</br>
-Waleed Asad</br></br>
Station,</br>
Exodus</br></br>
A word of caution, do not enter the engine room for any reason without radiation protection and meson scanners on. The status of the engine may be unpredictable even when you believe it is 'off.' This is an important level of personal protection.</br></br>
The engine has two basic modes of functionality. It has been observed that it is capable of both a safe level of operation and a modified, high output mode.</br></br>
<h2>Heat-Primary Mode</h2>
<i>Notes on starting the basic function mode</i>
<h2>OPERATING PRINCIPLES</h2>
<br>
<li>The supermatter crystal serves as the fundamental power source of the engine. Upon being charged, it begins to emit large amounts of heat and radiation, as well and oxygen and plasma. As oxygen accelerates the reaction, and plasma carries the risk of fire, these must be filtered out. NOTE: Supermatter radiation will not charge radiation collectors.</li>
<br>
<li>Air in the reactor chamber housing the supermatter is circulated through the reactor loop, which passes through the filters and thermoelectric generators. The thermoelectric generators transfer heat from the reactor loop to the colder radiator loop, thereby generating power. Additional power is generated from internal turbines in the circulators.</li>
<br>
<li>Air in the radiator loop is circulated through the radiator bank, located in space. This rapidly cools the air, preserving the temperature differential needed for power generation.</li>
<br>
<li>The MK 1 Prototype Thermoelectric Supermatter Engine is designed to operate at reactor temperatures of 3000K to 4000K and generate up to 1MW of power. Beyond 1MW, the thermoelectric generators will begin to lose power through electrical discharge, reducing efficiency, but additional power generation remains feasible.</li>
<br>
<li>The crystal structure of the supermatter will begin to liquefy if its temperature exceeds 5000K. This eventually results in a massive release of light, heat and radiation, disintegration of both the supermatter crystal and most of the surrounding area, and as as-of-yet poorly documented psychological effects on all animals within a 2km. Appropriate action should be taken to stabilize or eject the supermatter before such occurs.</li>
<br>
<h2>SUPERMATTER HANDLING</h2>
<li>Do not expose supermatter to oxygen.</li>
<li>Do not <del>touch supermatter</del> <del>without gloves</del> <del>without exosuit protection</del> allow supermatter to contact any solid object apart from specially-designed supporting pallet.</li>
<li>Do not directly view supermatter without meson goggles.</li>
<li>While handles on pallet allow moving the supermatter via pulling, pushing should not be attempted.</li>
<br>
<h2>STARTUP PROCEDURE</h2>
<ol>
<li><b>Prepare collector arrays</b>: As is standard, begin by wrenching them down, filling six plasma tanks with a plasma canister, and inserting the tank into the collectors one by one. Finally, initialize each collector.</li>
<li><b>Prepare gas system</b>: Before introducing any gas into the supermatter engine room, it is important to remember the small, but vital steps to preparing this section. First, set the input gas pump and output gas flow pump to 4500 kPa, or maximum flow. Second, switch the digital switching valve into the 'up' position, so the green light is on north side of the valve, in order to circulate the gas back toward the coolers and collectors.</li>
<li><b>Apply N2 gas</b>: Retrieve the two N2 canisters from storage and bring them to the engine room. Attach one of them to the input section of the engine gas system located next to the collectors. Keep it attached until the N2 pressure is low enough to turn the canister light red. Replace it with the second canister to keep N2 pressure at optimal levels.</li>
<li><b>Open supermatter shielding</b>: This button is located in the engine room, to the left of the engine monitoring room blast doors. At this point, the supermatter chamber is mostly a gas mixture of N2 and is producing no radiation. It is considered 'safe' up until this point. Do not forget radiation shielding and meson scanners.</li>
<li><b>Begin primary emitter burst series</b>: Begin by firing four shots into the supermatter using the emitter. It is important to move to this step quickly. The onboard SMES units may not have enough power to run the emitters if left alone too long on-station. This engine can produce enough power on its own to run the entire station, ignoring the SMES units completely, and is wired to do so.</li>
<li><b>Switch SMES units to primary settings</b>: Maximize input and set the devices to automatically charge, additionally turn their outputs on if they are off unless power is to be saved (Which can be useful in case of later failures).</li>
<li><b>Begin secondary emitter burst series</b>: Before firing the emitter again, check the power in the line with a multimeter (Do not forget electrical gloves). The engine is running at high efficiency when the value exceeds 200,000 power units.</li>
<li><b>Maintain engine power</b>: When power in the lines get low, add an additional emitter burst series to bring power to normal levels.</li>
<li>Fill reactor loop and radiator loop with two (2) standard canisters of nitrogen gas each.</li>
<li>Ensure that pumps and filters are on and operating at maximum power.</li>
<li>Fire <del>5</del> <del>15</del> <del>2</del> <del>UNKNOWN</del> 8-12 pulses from emitter at supermatter crystal. Reactor blast doors must be open for this procedure.</li>
</ol>
<h2>O2-Reaction Mode</h2>
The second mode for running the engine uses a gas mixture to produce a reaction within the supermatter. This mode requires the CE's or Atmospheric's help to set up. This is called 'O2-Reaction Mode.'</br></br>
<b><u>THIS MODE CAN CAUSE A RUNAWAY REACTION, LEADING TO CATASTROPHIC FAILURE IF NOT MAINTAINED. NEVER FORGET ABOUT THE ENGINE IN THIS MODE.</u></b></br></br>
Additionally, this mode can be used for what is called a '<b>Cold Start</b>.' If the station has no power in the SMES to run the emitters, using this mode will allow enough power output to run them, and quickly reach an acceptable level of power output.</br></br>
<br>
<h2>OPERATION AND MAINTENANCE</h2>
<ol>
<li><b>Prepare collector arrays</b>: As is standard, begin by wrenching them down, filling six plasma tanks with a plasma canister, and inserting the tank into the collectors one by one. Finally, initialize each collector.</li>
<li><b>Prepare gas system</b>: Before introducing any gas into the supermatter engine room, it is important to remember the small, but vital steps to preparing this section. First, set the input gas pump and output gas flow pump to 4500 kPa, or maximum flow. Second, switch the digital switching valve into the 'up' position, so the green light is on north side of the valve, in order to circulate the gas back toward the coolers and collectors.</li>
<li><b>Modify the engine room filters</b>: Unlike the Heat-Primary Mode, it is important to change the filters attached to the gas system to stop filtering O2, and start filtering carbon molecules. O2-Reaction Mode produces far more plasma than Heat-Primary, therefore filtering it off is essential.</li>
<li><b>Switch SMES units to primary settings</b>: Maximize input and set the devices to automatically charge, additionally turn their outputs on if they are off unless power is to be saved (Which can be useful in case of later failures). If you check the power in the system lines at this point, you will find that it is constantly going up. Indeed, with just the addition of O2 to the supermatter, it will begin outputting power.</li>
<li><b>Begin primary emitter burst series</b>: Begin by firing four shots into the supermatter using the emitter. Do not over power the supermatter. The reaction is self sustaining and propagating. As long as O2 is in the chamber, it will continue outputting MORE power.</li>
<li><b>Maintain follow up operations</b>: Remember to check the temperature of the core gas and switch to the Heat-Primary function, or vent the core room when problems begin if required.</li>
</ol></br>
<h2>Notes on Supermatter Reaction Function and Drawbacks</h2>
After several hours of observation, an interesting phenomenon was witnessed. The supermatter undergoes a constant, self-sustaining reaction when given an extremely high O2 concentration. Anything about 80% or higher typically will cause this reaction. The supermatter will continue to react whenever this gas mixture is in the same room as the supermatter.</br></br>
To understand why O2-Reaction mode is dangerous, the core principle of the supermatter must be understood. The supermatter emits three things when 'not safe,' that is any time it is giving off power. These things are:</br>
<ul>
<li>Radiation (which is converted into power by the collectors)</li></br>
<li>Heat (which is removed via the gas exchange system and coolers)</li></br>
<li>External gas (in the form of plasma and O2)</li></br>
</ul></br>
When in Heat-Primary mode, far more heat and plasma are produced than radiation. In O2-Reaction mode, very little heat and only moderate amounts of plasma are produced, however HUGE amounts of energy leaving the supermatter is in the form of radiation.</br></br>
The O2-Reaction engine mode has a single drawback which has been eluded to more than once so far and that is very simple. The engine room will continue to grow hotter as the constant reaction continues. Eventually, there will be what is called a 'critical gas mixture.' This is the point at which the constant adding of plasma to the mixture of air around the supermatter changes the gas concentration to below the tolerance. When this happens, two things occur. First, the supermatter switches to its primary mode of operation wherein huge amounts of heat are produced by the engine rather than low amounts with high power output. Second, an uncontrollable increase in heat within the supermatter chamber will occur. This will lead to a spark-up, igniting the plasma in the supermatter chamber, wildly increasing both pressure and temperature.</br></br>
While the O2-Reaction mode is dangerous, it does produce heavy amounts of energy. Consider using this mode only in short amounts to fill the SMES, and switch back later in the shift to keep things flowing normally.</br></br>
<h2>Notes on Supermatter Containment and Emergency Procedures</h2>
While a constant vigil on the supermatter is not required, regular checkups are important. Check the temperature of gas leaving the supermatter chamber for unsafe levels and ensure that the plasma in the chamber is at a safe concentration. Of course, also make sure the chamber is not on fire. A fire in the core chamber is very difficult to put out. As any toxin scientist can tell you, even low amounts of plasma can burn at very high temperatures. This burning creates a huge increase in pressure and more importantly, temperature of the crystal itself.</br></br>
The supermatter is strong, but not invincible. When the supermatter is heated too much, its crystal structure will attempt to liquefy. The change in atomic structure of the supermatter leads to a single reaction, a massive explosion. The computer chip attached to the supermatter core will warn the station when stability is threatened. It will then offer a second warning, when things have become dangerously close to total destruction of the core.</br></br>
Located both within the CE office and engine room is the engine ventilatory control button. This button allows the core vent controls to be accessed, venting the room to space. Remember however, that this process takes time. If a fire is raging, and the pressure is higher than fathomable, it will take a great deal of time to vent the room. Also located in the CE's office is the emergency core eject button. A new core can be ordered from cargo. It is often not worth the lives of the crew to hold on to it, not to mention the structural damage. However, if by some mistake the supermatter is pushed off or removed from the mass driver it sits on, manual reposition will be required. Which is very dangerous and often leads to death.</br></br>
The supermatter is extremely dangerous. More dangerous than people give it credit for. It can destroy you in an instant, without hesitation, reducing you to a pile of dust. When working closely with supermatter, it is suggested to get a genetic backup and do not wear any items of value to you. The supermatter core can be pulled if grabbed properly by the base, but <b>pushing is not possible.</b></br></br>
<h2>In Closing</h2>
Remember that the supermatter is dangerous, and the core is dangerous still. Venting the core room is always an option if you are even remotely worried, utilizing Atmospherics to properly ready the room once more for core function. It is always a good idea to check up regularly on the temperature of gas leaving the chamber, as well as the power in the system lines. Lastly, once again remember, never touch the supermatter with anything. Ever.</br></br>
-Waleed Asad, Senior Engine Technician
<li>Ensure that radiation protection and meson goggles are worn at all times while working in the engine room.</li>
<li>Ensure that reactor and radiator loops are undamaged and unobstructed.</li>
<li>Ensure that plasma and oxygen gas exhaust from filters is properly contained or disposed. Do not allow exhaust pressure to exceed 4500 kPa.</li>
<li>Ensure that engine room Area Power Controller (APC) and engine Superconducting Magnetic Energy Storage unit (SMES) are properly charged.</li>
<li>Ensure that reactor temperature does not exceed 5000K. In event of reactor temperature exceeding 5000K, see EMERGENCY COOLING PROCEDURE.</li>
<li>In event of imminent and/or unavoidable delamination, see EJECTION PROCEDURE.</li>
</ol>
<br>
<h2>EMERGENCY COOLING PROCEDURE</h2>
<ol>
<li>Open Emergency Cooling Valve 1 and Emergency Cooling Valve 2.</li>
<li>When reactor temperature returns to safe operating levels, close Emergency Cooling Valve 1 and Emergency Cooling Valve 2.</li>
<li>If reactor temperature does not return to safe operating levels, see EJECTION PROCEDURE.</li>
</ol>
<br>
<h2>EJECTION PROCEDURE</h2>
<ol>
<li>Press Engine Ventilatory Control button to open engine core vent to space.</li>
<li>Press Emergency Core Eject button to eject supermatter crystal. NOTE: Attempting crystal ejection while engine core vent is closed will result in ejection failure.</li>
<li>In event of ejection failure, <i>pending</i></li>
</ol>
</body>
</html>"}
+20 -185
View File
@@ -1,4 +1,5 @@
//NEVER USE THIS IT SUX -PETETHEGOAT
//THE GOAT WAS RIGHT - RKF
var/global/list/cached_icons = list()
@@ -11,10 +12,10 @@ var/global/list/cached_icons = list()
matter = list("metal" = 200)
w_class = 3.0
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10,20,30,50,70)
volume = 70
possible_transfer_amounts = list(10,20,30,60)
volume = 60
flags = OPENCONTAINER
var/paint_type = ""
var/paint_type = "red"
afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
@@ -28,22 +29,27 @@ var/global/list/cached_icons = list()
return ..()
New()
if(paint_type == "remover")
name = "paint remover bucket"
else if(paint_type && lentext(paint_type) > 0)
if(paint_type && lentext(paint_type) > 0)
name = paint_type + " " + name
..()
reagents.add_reagent("paint_[paint_type]", volume)
on_reagent_change() //Until we have a generic "paint", this will give new colours to all paints in the can
var/mixedcolor = mix_color_from_reagents(reagents.reagent_list)
for(var/datum/reagent/paint/P in reagents.reagent_list)
P.color = mixedcolor
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_type == "white") //why don't white crayons exist
reagents.add_reagent("aluminum", volume/5)
else if (paint_type == "black")
reagents.add_reagent("carbon", volume/5)
else
reagents.add_reagent("crayon_dust_[paint_type]", volume/5)
reagents.handle_reactions()
red
icon_state = "paint_red"
paint_type = "red"
yellow
icon_state = "paint_yellow"
paint_type = "yellow"
green
icon_state = "paint_green"
paint_type = "green"
@@ -52,13 +58,9 @@ var/global/list/cached_icons = list()
icon_state = "paint_blue"
paint_type = "blue"
yellow
icon_state = "paint_yellow"
paint_type = "yellow"
violet
purple
icon_state = "paint_violet"
paint_type = "violet"
paint_type = "purple"
black
icon_state = "paint_black"
@@ -68,170 +70,3 @@ var/global/list/cached_icons = list()
icon_state = "paint_white"
paint_type = "white"
remover
paint_type = "remover"
/*
/obj/item/weapon/paint
gender= PLURAL
name = "paint"
desc = "Used to recolor floors and walls. Can not be removed by the janitor."
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
color = "FFFFFF"
item_state = "paintcan"
w_class = 3.0
/obj/item/weapon/paint/red
name = "red paint"
color = "FF0000"
icon_state = "paint_red"
/obj/item/weapon/paint/green
name = "green paint"
color = "00FF00"
icon_state = "paint_green"
/obj/item/weapon/paint/blue
name = "blue paint"
color = "0000FF"
icon_state = "paint_blue"
/obj/item/weapon/paint/yellow
name = "yellow paint"
color = "FFFF00"
icon_state = "paint_yellow"
/obj/item/weapon/paint/violet
name = "violet paint"
color = "FF00FF"
icon_state = "paint_violet"
/obj/item/weapon/paint/black
name = "black paint"
color = "333333"
icon_state = "paint_black"
/obj/item/weapon/paint/white
name = "white paint"
color = "FFFFFF"
icon_state = "paint_white"
/obj/item/weapon/paint/anycolor
gender= PLURAL
name = "any color"
icon_state = "paint_neutral"
attack_self(mob/user as mob)
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white")
if ((user.get_active_hand() != src || user.stat || user.restrained()))
return
switch(t1)
if("red")
color = "FF0000"
if("blue")
color = "0000FF"
if("green")
color = "00FF00"
if("yellow")
color = "FFFF00"
if("violet")
color = "FF00FF"
if("white")
color = "FFFFFF"
if("black")
color = "333333"
icon_state = "paint_[t1]"
add_fingerprint(user)
return
/obj/item/weapon/paint/afterattack(turf/target, mob/user as mob, proximity)
if(!proximity) return
if(!istype(target) || istype(target, /turf/space))
return
var/ind = "[initial(target.icon)][color]"
if(!cached_icons[ind])
var/icon/overlay = new/icon(initial(target.icon))
overlay.Blend("#[color]",ICON_MULTIPLY)
overlay.SetIntensity(1.4)
target.icon = overlay
cached_icons[ind] = target.icon
else
target.icon = cached_icons[ind]
return
/obj/item/weapon/paint/paint_remover
gender = PLURAL
name = "paint remover"
icon_state = "paint_neutral"
afterattack(turf/target, mob/user as mob)
if(istype(target) && target.icon != initial(target.icon))
target.icon = initial(target.icon)
return
*/
datum/reagent/paint
name = "Paint"
id = "paint_"
reagent_state = 2
color = "#808080"
description = "This paint will only adhere to floor tiles."
reaction_turf(var/turf/T, var/volume)
if(!istype(T) || istype(T, /turf/space))
return
T.color = color
reaction_obj(var/obj/O, var/volume)
..()
if(istype(O,/obj/item/weapon/light))
O.color = color
red
name = "Red Paint"
id = "paint_red"
color = "#FE191A"
green
name = "Green Paint"
color = "#18A31A"
id = "paint_green"
blue
name = "Blue Paint"
color = "#247CFF"
id = "paint_blue"
yellow
name = "Yellow Paint"
color = "#FDFE7D"
id = "paint_yellow"
violet
name = "Violet Paint"
color = "#CC0099"
id = "paint_violet"
black
name = "Black Paint"
color = "#333333"
id = "paint_black"
white
name = "White Paint"
color = "#F0F8FF"
id = "paint_white"
datum/reagent/paint_remover
name = "Paint Remover"
id = "paint_remover"
description = "Paint remover is used to remove floor paint from floor tiles."
reagent_state = 2
color = "#808080"
reaction_turf(var/turf/T, var/volume)
if(istype(T) && T.icon != initial(T.icon))
T.icon = initial(T.icon)
return
@@ -125,7 +125,7 @@
breaktape(W, user)
/obj/item/tape/attack_hand(mob/user as mob)
if (user.a_intent == "help" && src.allowed(user))
if (user.a_intent == I_HELP && src.allowed(user))
user.show_viewers("\blue [user] lifts [src], allowing passage.")
crumple()
lifted = 1
@@ -137,7 +137,7 @@
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
if(user.a_intent == I_HELP && ((!can_puncture(W) && src.allowed(user))))
user << "You can't break the [src] with that!"
return
user.show_viewers("\blue [user] breaks the [src]!")
+1 -1
View File
@@ -69,7 +69,7 @@
return
if(user && user.buckled)
user.buckled.unbuckle()
user.buckled.unbuckle_mob()
var/list/tempL = L
var/attempt = null
@@ -8,10 +8,10 @@
desc = "You wear this on your back and put items into it."
icon_state = "backpack"
item_state = "backpack"
w_class = 4.0
slot_flags = SLOT_BACK //ERROOOOO
w_class = 4
slot_flags = SLOT_BACK
max_w_class = 3
max_combined_w_class = 21
max_storage_space = 28
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (src.use_sound)
@@ -40,7 +40,7 @@
origin_tech = "bluespace=4"
icon_state = "holdingpack"
max_w_class = 4
max_combined_w_class = 28
max_storage_space = 56
New()
..()
@@ -67,6 +67,12 @@
return
*/
..()
//Please don't clutter the parent storage item with stupid hacks.
can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(istype(W, /obj/item/weapon/storage/backpack/holding))
return 1
return ..()
proc/failcheck(mob/user as mob)
if (prob(src.reliability)) return 1 //No failure
@@ -88,7 +94,7 @@
w_class = 4.0
storage_slots = 20
max_w_class = 3
max_combined_w_class = 400 // can store a ton of shit!
max_storage_space = 400 // can store a ton of shit!
/obj/item/weapon/storage/backpack/cultpack
name = "trophy rack"
@@ -36,7 +36,7 @@
max_w_class = 2
storage_slots = 21
can_hold = list() // any
cant_hold = list("/obj/item/weapon/disk/nuclear")
cant_hold = list(/obj/item/weapon/disk/nuclear)
/obj/item/weapon/storage/bag/trash/update_icon()
if(contents.len == 0)
@@ -63,7 +63,7 @@
max_w_class = 2
storage_slots = 21
can_hold = list() // any
cant_hold = list("/obj/item/weapon/disk/nuclear")
cant_hold = list(/obj/item/weapon/disk/nuclear)
// -----------------------------
// Mining Satchel
@@ -77,9 +77,9 @@
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_storage_space = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = 3
can_hold = list("/obj/item/weapon/ore")
can_hold = list(/obj/item/weapon/ore)
// -----------------------------
@@ -88,13 +88,13 @@
/obj/item/weapon/storage/bag/plants
name = "plant bag"
icon = 'icons/obj/hydroponics.dmi'
icon = 'icons/obj/hydroponics_machines.dmi'
icon_state = "plantbag"
storage_slots = 50; //the number of plant pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_storage_space = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = 3
w_class = 2
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown")
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown)
// -----------------------------
@@ -249,7 +249,7 @@
icon_state = "cashbag"
desc = "A bag for carrying lots of cash. It's got a big dollar sign printed on the front."
storage_slots = 50; //the number of cash pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
max_storage_space = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
max_w_class = 3
w_class = 2
can_hold = list("/obj/item/weapon/coin","/obj/item/weapon/spacecash")
can_hold = list(/obj/item/weapon/coin,/obj/item/weapon/spacecash)
+78 -53
View File
@@ -7,25 +7,37 @@
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined")
/obj/item/weapon/storage/update_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_belt()
/obj/item/weapon/storage/belt/utility
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
desc = "Can hold various tools."
icon_state = "utilitybelt"
item_state = "utility"
can_hold = list(
//"/obj/item/weapon/combitool",
"/obj/item/weapon/crowbar",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/weldingtool",
"/obj/item/weapon/wirecutters",
"/obj/item/weapon/wrench",
"/obj/item/device/multitool",
"/obj/item/device/flashlight",
"/obj/item/stack/cable_coil",
"/obj/item/device/t_scanner",
"/obj/item/device/analyzer",
"/obj/item/taperoll/engineering",
"/obj/item/device/robotanalyzer")
///obj/item/weapon/combitool,
/obj/item/weapon/crowbar,
/obj/item/weapon/screwdriver,
/obj/item/weapon/weldingtool,
/obj/item/weapon/wirecutters,
/obj/item/weapon/wrench,
/obj/item/device/multitool,
/obj/item/device/flashlight,
/obj/item/stack/cable_coil,
/obj/item/device/t_scanner,
/obj/item/device/analyzer,
/obj/item/taperoll/engineering,
/obj/item/device/robotanalyzer,
/obj/item/weapon/minihoe,
/obj/item/weapon/hatchet,
/obj/item/device/analyzer/plant_analyzer,
/obj/item/weapon/extinguisher/mini
)
/obj/item/weapon/storage/belt/utility/full/New()
@@ -55,53 +67,66 @@
icon_state = "medicalbelt"
item_state = "medical"
can_hold = list(
"/obj/item/device/healthanalyzer",
"/obj/item/weapon/dnainjector",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/reagent_containers/glass/beaker",
"/obj/item/weapon/reagent_containers/glass/bottle",
"/obj/item/weapon/reagent_containers/pill",
"/obj/item/weapon/reagent_containers/syringe",
"/obj/item/weapon/reagent_containers/glass/dispenser",
"/obj/item/weapon/flame/lighter/zippo",
"/obj/item/weapon/storage/fancy/cigarettes",
"/obj/item/weapon/storage/pill_bottle",
"/obj/item/stack/medical",
"/obj/item/device/flashlight/pen",
"/obj/item/clothing/mask/surgical",
"/obj/item/clothing/gloves/latex",
"/obj/item/weapon/reagent_containers/hypospray"
)
/obj/item/device/healthanalyzer,
/obj/item/weapon/dnainjector,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/reagent_containers/glass/beaker,
/obj/item/weapon/reagent_containers/glass/bottle,
/obj/item/weapon/reagent_containers/pill,
/obj/item/weapon/reagent_containers/syringe,
/obj/item/weapon/flame/lighter/zippo,
/obj/item/weapon/storage/fancy/cigarettes,
/obj/item/weapon/storage/pill_bottle,
/obj/item/stack/medical,
/obj/item/device/flashlight/pen,
/obj/item/clothing/mask/surgical,
/obj/item/clothing/head/surgery,
/obj/item/clothing/gloves/latex,
/obj/item/weapon/reagent_containers/hypospray,
/obj/item/clothing/glasses/hud/health,
/obj/item/weapon/crowbar,
/obj/item/device/flashlight,
/obj/item/weapon/extinguisher/mini
)
/obj/item/weapon/storage/belt/medical/emt
name = "EMT utility belt"
desc = "A sturdy black webbing belt with attached pouches."
icon = 'icons/obj/custom_items.dmi'
icon_state = "emsbelt"
item_state = "emsbelt"
/obj/item/weapon/storage/belt/security
name = "security belt"
desc = "Can hold security gear like handcuffs and flashes."
icon_state = "securitybelt"
item_state = "security"//Could likely use a better one.
item_state = "security"
storage_slots = 7
max_w_class = 3
max_combined_w_class = 21
max_storage_space = 28
can_hold = list(
"/obj/item/weapon/grenade",
"/obj/item/weapon/reagent_containers/spray/pepper",
"/obj/item/weapon/handcuffs",
"/obj/item/device/flash",
"/obj/item/clothing/glasses",
"/obj/item/ammo_casing/shotgun",
"/obj/item/ammo_magazine",
"/obj/item/weapon/reagent_containers/food/snacks/donut/normal",
"/obj/item/weapon/reagent_containers/food/snacks/donut/jelly",
"/obj/item/weapon/melee/baton",
"/obj/item/weapon/gun/energy/taser",
"/obj/item/weapon/flame/lighter/zippo",
"/obj/item/weapon/cigpacket",
"/obj/item/clothing/glasses/hud/security",
"/obj/item/device/flashlight",
"/obj/item/device/pda",
"/obj/item/device/radio/headset",
"/obj/item/weapon/melee",
"/obj/item/taperoll/police"
/obj/item/weapon/grenade,
/obj/item/weapon/reagent_containers/spray/pepper,
/obj/item/weapon/handcuffs,
/obj/item/device/flash,
/obj/item/clothing/glasses,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_magazine,
/obj/item/weapon/reagent_containers/food/snacks/donut/,
/obj/item/weapon/melee/baton,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/flame/lighter,
/obj/item/clothing/glasses/hud/security,
/obj/item/device/flashlight,
/obj/item/device/pda,
/obj/item/device/radio/headset,
/obj/item/device/hailer,
/obj/item/device/megaphone,
/obj/item/weapon/melee,
/obj/item/weapon/gun/projectile/sec,
/obj/item/taperoll/police
)
/obj/item/weapon/storage/belt/soulstone
@@ -111,7 +136,7 @@
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
"/obj/item/device/soulstone"
/obj/item/device/soulstone
)
/obj/item/weapon/storage/belt/soulstone/full/New()
@@ -141,4 +166,4 @@
item_state = "swatbelt"
storage_slots = 9
max_w_class = 3
max_combined_w_class = 21
max_storage_space = 28
@@ -24,7 +24,31 @@
desc = "It's just an ordinary box."
icon_state = "box"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
// BubbleWrap - A box can be folded up to make card
/obj/item/weapon/storage/box/attack_self(mob/user as mob)
if(..()) return
//try to fold it.
if ( contents.len )
return
if ( !ispath(src.foldable) )
return
var/found = 0
// Close any open UI windows first
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
if ( M == user )
found = 1
if ( !found ) // User is too far away
return
// Now make the cardboard
user << "<span class='notice'>You fold [src] flat.</span>"
new src.foldable(get_turf(src))
del(src)
/obj/item/weapon/storage/box/survival/
New()
@@ -79,7 +103,6 @@
/obj/item/weapon/storage/box/syringes
name = "box of syringes"
desc = "A box full of syringes."
desc = "A biohazard alert warning is printed on the box"
icon_state = "syringe"
New()
@@ -92,6 +115,22 @@
new /obj/item/weapon/reagent_containers/syringe( src )
new /obj/item/weapon/reagent_containers/syringe( src )
/obj/item/weapon/storage/box/syringegun
name = "box of syringe gun cartridges"
desc = "A box full of compressed gas cartridges."
icon_state = "syringe"
New()
..()
new /obj/item/weapon/syringe_cartridge( src )
new /obj/item/weapon/syringe_cartridge( src )
new /obj/item/weapon/syringe_cartridge( src )
new /obj/item/weapon/syringe_cartridge( src )
new /obj/item/weapon/syringe_cartridge( src )
new /obj/item/weapon/syringe_cartridge( src )
new /obj/item/weapon/syringe_cartridge( src )
/obj/item/weapon/storage/box/beakers
name = "box of beakers"
icon_state = "beaker"
@@ -149,7 +188,7 @@
new /obj/item/ammo_casing/shotgun/beanbag(src)
/obj/item/weapon/storage/box/shotgunammo
name = "box of shotgun shells"
name = "box of shotgun slugs"
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
New()
@@ -162,6 +201,62 @@
new /obj/item/ammo_casing/shotgun(src)
new /obj/item/ammo_casing/shotgun(src)
/obj/item/weapon/storage/box/shotgunshells
name = "box of shotgun shells"
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
New()
..()
new /obj/item/ammo_casing/shotgun/pellet(src)
new /obj/item/ammo_casing/shotgun/pellet(src)
new /obj/item/ammo_casing/shotgun/pellet(src)
new /obj/item/ammo_casing/shotgun/pellet(src)
new /obj/item/ammo_casing/shotgun/pellet(src)
new /obj/item/ammo_casing/shotgun/pellet(src)
new /obj/item/ammo_casing/shotgun/pellet(src)
/obj/item/weapon/storage/box/flashshells
name = "box of illumination shells"
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
New()
..()
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
/obj/item/weapon/storage/box/stunshells
name = "box of stun shells"
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
New()
..()
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
/obj/item/weapon/storage/box/sniperammo
name = "box of 14.5mm shells"
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
New()
..()
new /obj/item/ammo_casing/a145(src)
new /obj/item/ammo_casing/a145(src)
new /obj/item/ammo_casing/a145(src)
new /obj/item/ammo_casing/a145(src)
new /obj/item/ammo_casing/a145(src)
new /obj/item/ammo_casing/a145(src)
new /obj/item/ammo_casing/a145(src)
/obj/item/weapon/storage/box/flashbangs
name = "box of flashbangs (WARNING)"
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
@@ -179,7 +274,7 @@
/obj/item/weapon/storage/box/emps
name = "box of emp grenades"
desc = "A box with 5 emp grenades."
desc = "A box containing 5 military grade EMP grenades.<br> WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur."
icon_state = "flashbang"
New()
@@ -310,13 +405,27 @@
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
/obj/item/weapon/storage/box/sinpockets
name = "box of sin-pockets"
desc = "<B>Instructions:</B> <I>Crush bottom of package to initiate chemical heating. Wait for 20 seconds before consumption. Product will cool if not eaten within seven minutes.</I>"
icon_state = "donk_kit"
New()
..()
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
/obj/item/weapon/storage/box/monkeycubes
name = "monkey cube box"
desc = "Drymate brand monkey cubes. Just add water!"
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube")
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube)
New()
..()
if(src.type == /obj/item/weapon/storage/box/monkeycubes)
@@ -430,7 +539,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "spbox"
storage_slots = 8
can_hold = list("/obj/item/toy/snappop")
can_hold = list(/obj/item/toy/snappop)
New()
..()
for(var/i=1; i <= storage_slots; i++)
@@ -445,7 +554,7 @@
storage_slots = 10
w_class = 1
slot_flags = SLOT_BELT
can_hold = list("/obj/item/weapon/flame/match")
can_hold = list(/obj/item/weapon/flame/match)
New()
..()
@@ -478,8 +587,8 @@
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots=21
can_hold = list("/obj/item/weapon/light/tube", "/obj/item/weapon/light/bulb")
max_combined_w_class = 42 //holds 21 items of w_class 2
can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
max_storage_space = 42 //holds 21 items of w_class 2
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/weapon/storage/box/lights/bulbs/New()
@@ -7,9 +7,9 @@
force = 8.0
throw_speed = 1
throw_range = 4
w_class = 4.0
w_class = 4
max_w_class = 3
max_combined_w_class = 16
max_storage_space = 16
/obj/item/weapon/storage/briefcase/New()
..()
@@ -27,7 +27,7 @@
/obj/item/weapon/storage/fancy/examine(mob/user)
if(!..(user, 1))
return
if(contents.len <= 0)
user << "There are no [src.icon_type]s left in the box."
else if(contents.len == 1)
@@ -47,8 +47,10 @@
icon_type = "egg"
name = "egg box"
storage_slots = 12
max_combined_w_class = 24
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg")
can_hold = list(
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/boiledegg
)
/obj/item/weapon/storage/fancy/egg_box/New()
..()
@@ -91,7 +93,7 @@
storage_slots = 6
icon_type = "crayon"
can_hold = list(
"/obj/item/toy/crayon"
/obj/item/toy/crayon
)
/obj/item/weapon/storage/fancy/crayons/New()
@@ -134,14 +136,14 @@
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 6
can_hold = list("/obj/item/clothing/mask/cigarette")
can_hold = list(/obj/item/clothing/mask/smokable/cigarette)
icon_type = "cigarette"
/obj/item/weapon/storage/fancy/cigarettes/New()
..()
flags |= NOREACT
for(var/i = 1 to storage_slots)
new /obj/item/clothing/mask/cigarette(src)
new /obj/item/clothing/mask/smokable/cigarette(src)
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
/obj/item/weapon/storage/fancy/cigarettes/Del()
@@ -154,7 +156,7 @@
return
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/clothing/mask/cigarette/C = W
var/obj/item/clothing/mask/smokable/cigarette/C = W
if(!istype(C)) return // what
reagents.trans_to(C, (reagents.total_volume/contents.len))
..()
@@ -164,7 +166,7 @@
return
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
var/obj/item/clothing/mask/smokable/cigarette/W = new /obj/item/clothing/mask/smokable/cigarette(user)
reagents.trans_to(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
@@ -190,14 +192,14 @@
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 7
can_hold = list("/obj/item/clothing/mask/cigarette/cigar")
can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar)
icon_type = "cigar"
/obj/item/weapon/storage/fancy/cigar/New()
..()
flags |= NOREACT
for(var/i = 1 to storage_slots)
new /obj/item/clothing/mask/cigarette/cigar(src)
new /obj/item/clothing/mask/smokable/cigarette/cigar(src)
create_reagents(15 * storage_slots)
/obj/item/weapon/storage/fancy/cigar/Del()
@@ -209,7 +211,7 @@
return
/obj/item/weapon/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/clothing/mask/cigarette/cigar/C = W
var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W
if(!istype(C)) return
reagents.trans_to(C, (reagents.total_volume/contents.len))
..()
@@ -219,7 +221,7 @@
return
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/cigarette/cigar/W = new /obj/item/clothing/mask/cigarette/cigar(user)
var/obj/item/clothing/mask/smokable/cigarette/cigar/W = new /obj/item/clothing/mask/smokable/cigarette/cigar(user)
reagents.trans_to(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
@@ -239,7 +241,7 @@
icon_type = "vial"
name = "vial storage box"
storage_slots = 6
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial)
/obj/item/weapon/storage/fancy/vials/New()
@@ -254,9 +256,9 @@
icon = 'icons/obj/vialbox.dmi'
icon_state = "vialbox0"
item_state = "syringe_kit"
max_w_class = 3
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
max_w_class = 2
can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial)
max_storage_space = 12 //The sum of the w_classes of all the items in this storage item.
storage_slots = 6
req_access = list(access_virology)
@@ -109,6 +109,41 @@
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/splint(src)
return
/obj/item/weapon/storage/firstaid/combat
name = "combat medical kit"
desc = "Contains advanced medical treatments."
icon_state = "bezerk"
item_state = "firstaid-advanced"
/obj/item/weapon/storage/firstaid/combat/New()
..()
if (empty) return
new /obj/item/weapon/storage/pill_bottle/bicaridine(src)
new /obj/item/weapon/storage/pill_bottle/dermaline(src)
new /obj/item/weapon/storage/pill_bottle/dexalin_plus(src)
new /obj/item/weapon/storage/pill_bottle/dylovene(src)
new /obj/item/weapon/storage/pill_bottle/tramadol(src)
new /obj/item/weapon/storage/pill_bottle/spaceacillin(src)
new /obj/item/stack/medical/splint(src)
return
/obj/item/weapon/storage/firstaid/surgery
name = "surgery kit"
desc = "Contains tools for surgery."
/obj/item/weapon/storage/firstaid/surgery/New()
..()
if (empty) return
new /obj/item/weapon/bonesetter(src)
new /obj/item/weapon/cautery(src)
new /obj/item/weapon/circular_saw(src)
new /obj/item/weapon/hemostat(src)
new /obj/item/weapon/retractor(src)
new /obj/item/weapon/scalpel(src)
new /obj/item/weapon/surgicaldrill(src)
return
/*
* Pill Bottles
*/
@@ -119,26 +154,12 @@
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/dice","/obj/item/weapon/paper")
can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/dice,/obj/item/weapon/paper)
allow_quick_gather = 1
use_to_pickup = 1
storage_slots = 14
use_sound = null
/obj/item/weapon/storage/pill_bottle/kelotane
name = "bottle of kelotane pills"
desc = "Contains pills used to treat burns."
New()
..()
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
/obj/item/weapon/storage/pill_bottle/antitox
name = "bottle of Dylovene pills"
desc = "Contains pills used to counter toxins."
@@ -153,6 +174,62 @@
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
/obj/item/weapon/storage/pill_bottle/bicaridine
name = "bottle of Bicaridine pills"
desc = "Contains pills used to stabilize the severely injured."
/obj/item/weapon/storage/pill_bottle/bicaridine/New()
..()
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
/obj/item/weapon/storage/pill_bottle/dexalin_plus
name = "bottle of Dexalin Plus pills"
desc = "Contains pills used to treat extreme cases of oxygen deprivation."
/obj/item/weapon/storage/pill_bottle/dexalin_plus/New()
..()
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
/obj/item/weapon/storage/pill_bottle/dermaline
name = "bottle of Dermaline pills"
desc = "Contains pills used to treat burn wounds."
/obj/item/weapon/storage/pill_bottle/dermaline/New()
..()
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
/obj/item/weapon/storage/pill_bottle/dylovene
name = "bottle of Dylovene pills"
desc = "Contains pills used to treat toxic substances in the blood."
/obj/item/weapon/storage/pill_bottle/dylovene/New()
..()
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
/obj/item/weapon/storage/pill_bottle/inaprovaline
name = "bottle of Inaprovaline pills"
desc = "Contains pills used to stabilize patients."
@@ -167,8 +244,36 @@
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
/obj/item/weapon/storage/pill_bottle/kelotane
name = "bottle of kelotane pills"
desc = "Contains pills used to treat burns."
New()
..()
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
/obj/item/weapon/storage/pill_bottle/spaceacillin
name = "bottle of Spaceacillin pills"
desc = "A theta-lactam antibiotic. Effective against many diseases likely to be encountered in space."
/obj/item/weapon/storage/pill_bottle/spaceacillin/New()
..()
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
/obj/item/weapon/storage/pill_bottle/tramadol
name = "bottle of Tramadol Pills"
name = "bottle of Tramadol pills"
desc = "Contains pills used to relieve pain."
New()
@@ -26,7 +26,7 @@
//returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of
//doing it without the ability to call another proc's parent, really.
/obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj)
if (ishuman(user) || ismonkey(user)) //so monkeys can take off their backpacks -- Urist
if (ishuman(user) || issmall(user)) //so monkeys can take off their backpacks -- Urist
if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
return 0
@@ -37,12 +37,12 @@
if (!( istype(over_object, /obj/screen) ))
return 1
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
//there's got to be a better way of doing this...
if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
return 0
if (!( user.restrained() ) && !( user.stat ))
switch(over_object.name)
if("r_hand")
@@ -70,12 +70,12 @@
H.put_in_hands(master_item)
H.r_store = null
return 0
src.add_fingerprint(user)
if (master_item.loc == user)
src.open(user)
return 0
for(var/mob/M in range(1, master_item.loc))
if (M.s_active == src)
src.close(M)
@@ -7,7 +7,7 @@
item_state = "syringe_kit"
w_class = 4
max_w_class = 3
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
max_storage_space = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 4
req_access = list(access_armory)
var/locked = 1
+41 -41
View File
@@ -1,41 +1,41 @@
/obj/item/weapon/storage/pill_bottle/dice
name = "pack of dice"
desc = "It's a small container with dice inside."
New()
..()
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d20( src )
/*
* Donut Box
*/
/obj/item/weapon/storage/donut_box
icon = 'icons/obj/food.dmi'
icon_state = "donutbox"
name = "donut box"
storage_slots = 6
var/startswith = 6
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut")
foldable = /obj/item/stack/sheet/cardboard
/obj/item/weapon/storage/donut_box/New()
..()
for(var/i=1; i <= startswith; i++)
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
update_icon()
return
/obj/item/weapon/storage/donut_box/update_icon()
overlays.Cut()
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
var/image/img = image('icons/obj/food.dmi', D.overlay_state)
img.pixel_x = i * 3
overlays += img
i++
/obj/item/weapon/storage/donut_box/empty
icon_state = "donutbox0"
startswith = 0
/obj/item/weapon/storage/pill_bottle/dice
name = "pack of dice"
desc = "It's a small container with dice inside."
New()
..()
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d20( src )
/*
* Donut Box
*/
/obj/item/weapon/storage/box/donut
icon = 'icons/obj/food.dmi'
icon_state = "donutbox"
name = "donut box"
storage_slots = 6
var/startswith = 6
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
foldable = /obj/item/stack/sheet/cardboard
/obj/item/weapon/storage/box/donut/New()
..()
for(var/i=1; i <= startswith; i++)
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
update_icon()
return
/obj/item/weapon/storage/box/donut/update_icon()
overlays.Cut()
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
var/image/img = image('icons/obj/food.dmi', D.overlay_state)
img.pixel_x = i * 3
overlays += img
i++
/obj/item/weapon/storage/box/donut/empty
icon_state = "donutbox0"
startswith = 0
@@ -23,9 +23,9 @@
var/l_hacking = 0
var/emagged = 0
var/open = 0
w_class = 3.0
w_class = 3
max_w_class = 2
max_combined_w_class = 14
max_storage_space = 14
examine(mob/user)
if(..(user, 1))
@@ -220,7 +220,7 @@
max_w_class = 8
anchored = 1.0
density = 0
cant_hold = list("/obj/item/weapon/storage/secure/briefcase")
cant_hold = list(/obj/item/weapon/storage/secure/briefcase)
New()
..()
@@ -8,11 +8,11 @@
/obj/item/weapon/storage
name = "storage"
icon = 'icons/obj/storage.dmi'
w_class = 3.0
w_class = 3
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/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/max_storage_space = 14 //The sum of the storage costs of all the items in this storage item.
var/storage_slots = 7 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
@@ -21,7 +21,6 @@
var/allow_quick_empty //Set this variable to allow the object to have the 'empty' verb, which dumps all the contents on the floor.
var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
var/use_sound = "rustle" //sound played when used. null for no sound.
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
@@ -29,7 +28,7 @@
if(!canremove)
return
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return
@@ -209,44 +208,36 @@
usr << "<span class='notice'>[src] is full, make some space.</span>"
return 0 //Storage item is full
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, text2path(A) ))
ok = 1
break
if(!ok)
if(!stop_messages)
if (istype(W, /obj/item/weapon/hand_labeler))
return 0
usr << "<span class='notice'>[src] cannot hold [W].</span>"
return 0
if(can_hold.len && !is_type_in_list(W, can_hold))
if(!stop_messages)
if (istype(W, /obj/item/weapon/hand_labeler))
return 0
usr << "<span class='notice'>[src] cannot hold [W].</span>"
return 0
for(var/A in cant_hold) //Check for specific items which this container can't hold.
if(istype(W, text2path(A) ))
if(!stop_messages)
usr << "<span class='notice'>[src] cannot hold [W].</span>"
return 0
if(cant_hold.len && is_type_in_list(W, cant_hold))
if(!stop_messages)
usr << "<span class='notice'>[src] cannot hold [W].</span>"
return 0
if (W.w_class > max_w_class)
if(!stop_messages)
usr << "<span class='notice'>[W] is too big for this [src].</span>"
return 0
var/sum_w_class = W.w_class
var/total_storage_space = W.get_storage_cost()
for(var/obj/item/I in contents)
sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
total_storage_space += I.get_storage_cost() //Adds up the combined w_classes which will be in the storage item if the item is added to it.
if(sum_w_class > max_combined_w_class)
if(total_storage_space > max_storage_space)
if(!stop_messages)
usr << "<span class='notice'>[src] is full, make some space.</span>"
return 0
if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage)))
if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm.
if(!stop_messages)
usr << "<span class='notice'>[src] cannot hold [W] as it's a storage item of the same size.</span>"
return 0 //To prevent the stacking of same sized storage items.
if(!stop_messages)
usr << "<span class='notice'>[src] cannot hold [W] as it's a storage item of the same size.</span>"
return 0 //To prevent the stacking of same sized storage items.
return 1
@@ -266,13 +257,13 @@
W.dropped(usr)
add_fingerprint(usr)
if(!prevent_warning && !istype(W, /obj/item/weapon/gun/energy/crossbow))
if(!prevent_warning)
for(var/mob/M in viewers(usr, null))
if (M == usr)
usr << "<span class='notice'>You put \the [W] into [src].</span>"
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
M.show_message("<span class='notice'>[usr] puts [W] into [src].</span>")
else if (W && W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance...
else if (W && W.w_class >= 3) //Otherwise they can only see large or normal items from a distance...
M.show_message("<span class='notice'>[usr] puts [W] into [src].</span>")
src.orient2hud(usr)
@@ -422,35 +413,12 @@
O.emp_act(severity)
..()
// BubbleWrap - A box can be folded up to make card
/obj/item/weapon/storage/attack_self(mob/user as mob)
//Clicking on itself will empty it, if it has the verb to do that.
if(user.get_active_hand() == src)
if(src.verbs.Find(/obj/item/weapon/storage/verb/quick_empty))
src.quick_empty()
return
//Otherwise we'll try to fold it.
if ( contents.len )
return
if ( !ispath(src.foldable) )
return
var/found = 0
// Close any open UI windows first
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
if ( M == user )
found = 1
if ( !found ) // User is too far away
return
// Now make the cardboard
user << "<span class='notice'>You fold [src] flat.</span>"
new src.foldable(get_turf(src))
del(src)
//BubbleWrap END
return 1
/obj/item/weapon/storage/hear_talk(mob/M as mob, text, verb, datum/language/speaking)
for (var/atom/A in src)
@@ -493,3 +461,6 @@
return -1 //inside something with a null loc.
return depth
/obj/item/proc/get_storage_cost()
return 2**(w_class-1) //1,2,4,8,16,...
@@ -5,20 +5,16 @@
icon_state = "red"
item_state = "toolbox_red"
flags = CONDUCT
force = 5.0
throwforce = 10.0
force = 5
throwforce = 10
throw_speed = 1
throw_range = 7
w_class = 4.0
w_class = 4
max_w_class = 3
max_storage_space = 14 //can hold 7 w_class-2 items or up to 3 w_class-3 items (with 1 w_class-2 item as change).
origin_tech = "combat=1"
attack_verb = list("robusted")
New()
..()
if (src.type == /obj/item/weapon/storage/toolbox)
world << "BAD: [src] ([src.type]) spawned at [src.x] [src.y] [src.z]"
del(src)
/obj/item/weapon/storage/toolbox/emergency
name = "emergency toolbox"
icon_state = "red"
@@ -26,10 +26,11 @@
return
if("guns")
new /obj/item/weapon/gun/projectile(src)
new /obj/item/weapon/gun/projectile/revolver(src)
new /obj/item/ammo_magazine/a357(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/weapon/plastique(src)
new /obj/item/weapon/plastique(src)
return
if("murder")
@@ -47,6 +48,7 @@
return
if("hacker")
new /obj/item/device/encryptionkey/syndicate(src)
new /obj/item/weapon/aiModule/syndicate(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/device/encryptionkey/binary(src)
@@ -62,10 +64,9 @@
return
if("smoothoperator")
new /obj/item/weapon/gun/projectile/pistol(src)
new /obj/item/weapon/silencer(src)
new /obj/item/weapon/soap/syndie(src)
new /obj/item/weapon/storage/box/syndie_kit/g9mm(src)
new /obj/item/weapon/storage/bag/trash(src)
new /obj/item/weapon/soap/syndie(src)
new /obj/item/bodybag(src)
new /obj/item/clothing/under/suit_jacket(src)
new /obj/item/clothing/shoes/laceup(src)
@@ -149,3 +150,88 @@
..()
new /obj/item/weapon/stamp/chameleon(src)
new /obj/item/weapon/pen/chameleon(src)
new /obj/item/device/destTagger(src)
new /obj/item/weapon/packageWrap(src)
new /obj/item/weapon/hand_labeler(src)
/obj/item/weapon/storage/box/syndie_kit/spy
name = "spy kit"
desc = "For when you want to conduct voyeurism from afar."
/obj/item/weapon/storage/box/syndie_kit/spy/New()
..()
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_monitor(src)
/obj/item/weapon/storage/box/syndie_kit/g9mm
name = "\improper Smooth operator"
desc = "9mm with silencer kit."
/obj/item/weapon/storage/box/syndie_kit/g9mm/New()
..()
new /obj/item/weapon/gun/projectile/pistol(src)
new /obj/item/weapon/silencer(src)
/obj/item/weapon/storage/box/syndie_kit/toxin
name = "toxin kit"
desc = "An apple will not be enough to keep the doctor away after this."
/obj/item/weapon/storage/box/syndie_kit/toxin/New()
..()
new /obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin(src)
new /obj/item/weapon/reagent_containers/syringe(src)
/obj/item/weapon/storage/box/syndie_kit/cigarette
name = "\improper Tricky smokes"
desc = "Comes with the following brands of cigarettes, in this order: 2xFlash, 2xSmoke, 1xMindBreaker, 1xTricordrazine. Avoid mixing them up."
/obj/item/weapon/storage/box/syndie_kit/cigarette/New()
..()
var/obj/item/weapon/storage/fancy/cigarettes/pack
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
fill_cigarre_package(pack, list("aluminum" = 5, "potassium" = 5, "sulfur" = 5))
pack.desc += " 'F' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
fill_cigarre_package(pack, list("aluminum" = 5, "potassium" = 5, "sulfur" = 5))
pack.desc += " 'F' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
fill_cigarre_package(pack, list("potassium" = 5, "sugar" = 5, "phosphorus" = 5))
pack.desc += " 'S' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
fill_cigarre_package(pack, list("potassium" = 5, "sugar" = 5, "phosphorus" = 5))
pack.desc += " 'S' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
// Dylovene. Going with 1.5 rather than 1.6666666...
fill_cigarre_package(pack, list("potassium" = 1.5, "nitrogen" = 1.5, "silicon" = 1.5))
// Mindbreaker
fill_cigarre_package(pack, list("silicon" = 4.5, "hydrogen" = 4.5))
pack.desc += " 'MB' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
pack.reagents.add_reagent("tricordrazine", 15 * pack.storage_slots)
pack.desc += " 'T' has been scribbled on it."
new /obj/item/weapon/flame/lighter/zippo(src)
/proc/fill_cigarre_package(var/obj/item/weapon/storage/fancy/cigarettes/C, var/list/reagents)
for(var/reagent in reagents)
C.reagents.add_reagent(reagent, reagents[reagent] * C.storage_slots)
/obj/item/weapon/storage/box/syndie_kit/ewar_voice
name = "Electrowarfare and Voice Synthesiser kit"
desc = "Kit for confounding organic and synthetic entities alike."
/obj/item/weapon/storage/box/syndie_kit/ewar_voice/New()
..()
new /obj/item/rig_module/electrowarfare_suite(src)
new /obj/item/rig_module/voice(src)
@@ -5,25 +5,25 @@
icon_state = "wallet"
w_class = 2
can_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",
"/obj/item/device/flashlight/pen",
"/obj/item/seeds",
"/obj/item/stack/medical",
"/obj/item/toy/crayon",
"/obj/item/weapon/coin",
"/obj/item/weapon/dice",
"/obj/item/weapon/disk",
"/obj/item/weapon/implanter",
"/obj/item/weapon/flame/lighter",
"/obj/item/weapon/flame/match",
"/obj/item/weapon/paper",
"/obj/item/weapon/pen",
"/obj/item/weapon/photo",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/stamp")
/obj/item/weapon/spacecash,
/obj/item/weapon/card,
/obj/item/clothing/mask/smokable/cigarette/,
/obj/item/device/flashlight/pen,
/obj/item/seeds,
/obj/item/stack/medical,
/obj/item/toy/crayon,
/obj/item/weapon/coin,
/obj/item/weapon/dice,
/obj/item/weapon/disk,
/obj/item/weapon/implanter,
/obj/item/weapon/flame/lighter,
/obj/item/weapon/flame/match,
/obj/item/weapon/paper,
/obj/item/weapon/pen,
/obj/item/weapon/photo,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/screwdriver,
/obj/item/weapon/stamp)
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null
+1 -1
View File
@@ -113,7 +113,7 @@
var/mob/living/L = M
var/target_zone = check_zone(user.zone_sel.selecting)
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
if (!..()) //item/attack() does it's own messaging and logs
return 0 // item/attack() will return 1 if they hit, 0 if they missed.
agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
@@ -4,7 +4,7 @@
if(!istype(M))
return ..()
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
return ..()
if(!istype(M, /mob/living/carbon/human))
@@ -41,7 +41,7 @@
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
*/
if (user.a_intent == "hurt")
if (user.a_intent == I_HURT)
if(!..()) return
//playsound(src.loc, "swing_hit", 50, 1, -1)
if (M.stuttering < 8 && (!(HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
@@ -246,7 +246,7 @@
/obj/item/weapon/tank/process()
//Allow for reactions
air_contents.react()
air_contents.react() //cooking up air tanks - add phoron and oxygen, then heat above PHORON_MINIMUM_BURN_TEMPERATURE
check_status()
+7 -2
View File
@@ -119,6 +119,8 @@
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
C.handcuffed = null
if(C.buckled && C.buckled.buckle_require_restraints)
C.buckled.unbuckle_mob()
C.update_inv_handcuffed()
return
else
@@ -259,6 +261,9 @@
if (src.welding)
remove_fuel(1)
var/turf/location = get_turf(user)
if(isliving(O))
var/mob/living/L = O
L.IgniteMob()
if (istype(location, /turf))
location.hotspot_expose(700, 50, 1)
return
@@ -455,7 +460,7 @@
var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
if (!S) return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
return ..()
if(istype(M,/mob/living/carbon/human))
@@ -531,4 +536,4 @@
if(!resolved && tool && target)
tool.afterattack(target,user,1)
if(tool)
tool.loc = src*/
tool.loc = src*/
+47 -15
View File
@@ -21,6 +21,7 @@
var/force_wielded = 0
var/wieldsound = null
var/unwieldsound = null
var/base_icon
/obj/item/weapon/twohanded/proc/unwield()
wielded = 0
@@ -34,6 +35,10 @@
name = "[initial(name)] (Wielded)"
update_icon()
/obj/item/weapon/twohanded/New()
..()
update_icon()
/obj/item/weapon/twohanded/mob_can_equip(M as mob, slot)
//Cannot equip wielded items.
if(wielded)
@@ -51,18 +56,24 @@
return unwield()
/obj/item/weapon/twohanded/update_icon()
return
icon_state = "[base_icon][wielded]"
item_state = icon_state
/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(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.is_small)
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
else
return
if(wielded) //Trying to unwield it
unwield()
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
@@ -106,11 +117,15 @@
wield()
del(src)
/obj/item/weapon/twohanded/offhand/update_icon()
return
/*
* Fireaxe
*/
/obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
base_icon = "fireaxe"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 10
@@ -121,10 +136,6 @@
force_wielded = 40
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
/obj/item/weapon/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons.
icon_state = "fireaxe[wielded]"
return
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
@@ -146,6 +157,7 @@
*/
/obj/item/weapon/twohanded/dualsaber
icon_state = "dualsaber0"
base_icon = "dualsaber"
name = "double-bladed energy sword"
desc = "Handle with care."
force = 3
@@ -162,10 +174,6 @@
sharp = 1
edge = 1
/obj/item/weapon/twohanded/dualsaber/update_icon()
icon_state = "dualsaber[wielded]"
return
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
@@ -187,6 +195,7 @@
//spears, bay edition
/obj/item/weapon/twohanded/spear
icon_state = "spearglass0"
base_icon = "spearglass"
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
force = 14
@@ -201,6 +210,29 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
/obj/item/weapon/twohanded/spear/update_icon()
icon_state = "spearglass[wielded]"
return
/obj/item/weapon/twohanded/baseballbat
name = "wooden bat"
desc = "HOME RUN!"
icon_state = "woodbat0"
base_icon = "woodbat"
item_state = "woodbat"
sharp = 0
edge = 0
w_class = 3
force = 15
throw_speed = 3
throw_range = 7
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "striked", "battered", "bonked")
hitsound = 'sound/weapons/genhit3.ogg'
force_wielded = 23
/obj/item/weapon/twohanded/baseballbat/metal
name = "metal bat"
desc = "A shiny metal bat."
icon_state = "metalbat0"
base_icon = "metalbat"
item_state = "metalbat"
force = 18
w_class = 3.0
force_wielded = 27
+16 -42
View File
@@ -11,7 +11,7 @@
attack_verb = list("banned")
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life.</b>"
viewers(user) << "<span class='danger'>[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life.</span>"
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
/obj/item/weapon/nullrod
@@ -27,7 +27,7 @@
w_class = 2
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<span class='danger'>[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>"
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob) //Paste from old-code to decult with a null rod.
@@ -38,36 +38,34 @@
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
user << "<span class='danger'>You don't have the dexterity to do this!</span>"
return
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The rod slips out of your hand and hits your head."
user << "<span class='danger'>The rod slips out of your hand and hits your head.</span>"
user.take_organ_damage(10)
user.Paralyse(20)
return
if (M.stat !=2)
if((M.mind in ticker.mode.cult) && prob(33))
M << "\red The power of [src] clears your mind of the cult's influence!"
user << "\red You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal."
ticker.mode.remove_cultist(M.mind)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
if(cult && (M.mind in cult.current_antagonists) && prob(33))
M << "<span class='danger'>The power of [src] clears your mind of the cult's influence!</span>"
user << "<span class='danger'>You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal.</span>"
cult.remove_antagonist(M.mind)
M.visible_message("<span class='danger'>\The [user] waves \the [src] over \the [M]'s head.</span>")
else if(prob(10))
user << "\red The rod slips in your hand."
user << "<span class='danger'>The rod slips in your hand.</span>"
..()
else
user << "\red The rod appears to do nothing."
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
user << "<span class='danger'>The rod appears to do nothing.</span>"
M.visible_message("<span class='danger'>\The [user] waves \the [src] over \the [M]'s head.</span>")
return
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity)
return
if (istype(A, /turf/simulated/floor))
user << "\blue You hit the floor with the [src]."
user << "<span class='notice'>You hit the floor with the [src].</span>"
call(/obj/effect/rune/proc/revealrunes)(src)
/obj/item/weapon/sord
@@ -84,7 +82,7 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<span class='danger'>[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>"
return(BRUTELOSS)
/obj/item/weapon/sord/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
@@ -109,7 +107,7 @@
return 1
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<span class='danger'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
return(BRUTELOSS)
/obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
@@ -131,7 +129,7 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>"
viewers(user) << "<span class='danger'>[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/katana/IsShield()
@@ -153,30 +151,6 @@
w_class = 3
attack_verb = list("jabbed","stabbed","ripped")
/obj/item/weapon/baseballbat
name = "wooden bat"
desc = "HOME RUN!"
icon_state = "woodbat"
item_state = "woodbat"
sharp = 0
edge = 0
w_class = 3
force = 15
throw_speed = 3
throw_range = 7
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "striked", "battered", "bonked")
hitsound = 'sound/weapons/genhit3.ogg'
/obj/item/weapon/baseballbat/metal
name = "metal bat"
desc = "A shiny metal bat."
icon_state = "metalbat"
item_state = "metalbat"
force = 18
w_class = 3.0
/obj/item/weapon/butterfly
name = "butterfly knife"
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
+19 -13
View File
@@ -16,11 +16,27 @@
var/damtype = "brute"
var/force = 0
/obj/Topic(href, href_list, var/nowindow = 0)
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state = default_state)
// Calling Topic without a corresponding window open causes runtime errors
if(nowindow)
if(!nowindow && ..())
return 1
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
var/obj/host = nano_host()
if(host.CanUseTopic(usr, href_list, custom_state) == STATUS_INTERACTIVE)
CouldUseTopic(usr)
return 0
return ..()
CouldNotUseTopic(usr)
return 1
/obj/proc/CouldUseTopic(var/mob/user)
var/atom/host = nano_host()
host.add_fingerprint(user)
/obj/proc/CouldNotUseTopic(var/mob/user)
// Nada
/obj/item/proc/is_used_on(obj/O, mob/user)
@@ -46,16 +62,6 @@
else
return null
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
//Return: (NONSTANDARD)
// null if object handles breathing logic for lifeform
// datum/air_group to tell lifeform to process using that breath return
//DEFAULT: Take air from turf to give to have mob process
if(breath_request>0)
return remove_air(breath_request)
else
return null
/atom/movable/proc/initialize()
return
+174
View File
@@ -25,6 +25,15 @@
return (new build_path(src.loc))
/obj/random/single
name = "randomly spawned object"
desc = "This item type is used to randomly spawn a given object at round-start"
icon_state = "x3"
var/spawn_object = null
item_to_spawn()
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
/obj/random/tool
name = "random tool"
desc = "This is a random tool"
@@ -104,3 +113,168 @@
prob(2);/obj/item/weapon/storage/belt/utility,\
prob(5);/obj/random/tool,\
prob(2);/obj/item/weapon/tape_roll)
/obj/random/medical
name = "Random Medicine"
desc = "This is a random medical item."
icon = 'icons/obj/items.dmi'
icon_state = "brutepack"
spawn_nothing_percentage = 25
item_to_spawn()
return pick(prob(4);/obj/item/stack/medical/bruise_pack,\
prob(4);/obj/item/stack/medical/ointment,\
prob(2);/obj/item/stack/medical/advanced/bruise_pack,\
prob(2);/obj/item/stack/medical/advanced/ointment,\
prob(1);/obj/item/stack/medical/splint,\
prob(2);/obj/item/bodybag,\
prob(1);/obj/item/bodybag/cryobag,\
prob(2);/obj/item/weapon/storage/pill_bottle/kelotane,\
prob(2);/obj/item/weapon/storage/pill_bottle/antitox,\
prob(2);/obj/item/weapon/storage/pill_bottle/tramadol,\
prob(2);/obj/item/weapon/reagent_containers/syringe/antitoxin,\
prob(1);/obj/item/weapon/reagent_containers/syringe/antiviral,\
prob(2);/obj/item/weapon/reagent_containers/syringe/inaprovaline,\
prob(1);/obj/item/stack/nanopaste)
/obj/random/firstaid
name = "Random First Aid Kit"
desc = "This is a random first aid kit."
icon = 'icons/obj/storage.dmi'
icon_state = "firstaid"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/firstaid/regular,\
prob(2);/obj/item/weapon/storage/firstaid/toxin,\
prob(2);/obj/item/weapon/storage/firstaid/o2,\
prob(1);/obj/item/weapon/storage/firstaid/adv,\
prob(2);/obj/item/weapon/storage/firstaid/fire)
/obj/random/contraband
name = "Random Illegal Item"
desc = "Hot Stuff."
icon = 'icons/obj/items.dmi'
icon_state = "purplecomb"
spawn_nothing_percentage = 50
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/pill_bottle/tramadol,\
prob(4);/obj/item/weapon/haircomb/fluff/cado_keppel_1,\
prob(2);/obj/item/weapon/storage/pill_bottle/happy,\
prob(2);/obj/item/weapon/storage/pill_bottle/zoom,\
prob(5);/obj/item/weapon/contraband/poster,\
prob(2);/obj/item/weapon/butterfly,\
prob(3);/obj/item/butterflyblade,\
prob(3);/obj/item/butterflyhandle,\
prob(3);/obj/item/weapon/wirerod,\
prob(1);/obj/item/weapon/butterfly/switchblade,\
prob(1);/obj/item/weapon/reagent_containers/syringe/drugs)
/obj/random/energy
name = "Random Energy Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "energykill100"
item_to_spawn()
return pick(prob(2);/obj/item/weapon/gun/energy/laser,\
prob(2);/obj/item/weapon/gun/energy/gun,\
prob(1);/obj/item/weapon/gun/energy/stunrevolver)
/obj/random/projectile
name = "Random Projectile Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,\
prob(2);/obj/item/weapon/gun/projectile/automatic/wt550,\
prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat)
/obj/random/handgun
name = "Random Handgun"
desc = "This is a random security sidearm."
icon = 'icons/obj/gun.dmi'
icon_state = "secgundark"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/sec,\
prob(1);/obj/item/weapon/gun/projectile/sec/wood)
/obj/random/ammo
name = "Random Ammunition"
desc = "This is random ammunition."
icon = 'icons/obj/ammo.dmi'
icon_state = "45-10"
item_to_spawn()
return pick(prob(6);/obj/item/weapon/storage/box/beanbags,\
prob(2);/obj/item/weapon/storage/box/shotgunammo,\
prob(4);/obj/item/weapon/storage/box/shotgunshells,\
prob(1);/obj/item/weapon/storage/box/stunshells,\
prob(2);/obj/item/ammo_magazine/c45m,\
prob(4);/obj/item/ammo_magazine/c45m/rubber,\
prob(4);/obj/item/ammo_magazine/c45m/flash,\
prob(2);/obj/item/ammo_magazine/mc9mmt,\
prob(6);/obj/item/ammo_magazine/mc9mmt/rubber)
/obj/random/action_figure
name = "random action figure"
desc = "This is a random action figure."
icon = 'icons/obj/toy.dmi'
icon_state = "assistant"
item_to_spawn()
return pick(/obj/item/toy/figure/cmo,\
/obj/item/toy/figure/assistant,\
/obj/item/toy/figure/atmos,\
/obj/item/toy/figure/bartender,\
/obj/item/toy/figure/borg,\
/obj/item/toy/figure/gardener,\
/obj/item/toy/figure/captain,\
/obj/item/toy/figure/cargotech,\
/obj/item/toy/figure/ce,\
/obj/item/toy/figure/chaplain,\
/obj/item/toy/figure/chef,\
/obj/item/toy/figure/chemist,\
/obj/item/toy/figure/clown,\
/obj/item/toy/figure/corgi,\
/obj/item/toy/figure/detective,\
/obj/item/toy/figure/dsquad,\
/obj/item/toy/figure/engineer,\
/obj/item/toy/figure/geneticist,\
/obj/item/toy/figure/hop,\
/obj/item/toy/figure/hos,\
/obj/item/toy/figure/qm,\
/obj/item/toy/figure/janitor,\
/obj/item/toy/figure/agent,\
/obj/item/toy/figure/librarian,\
/obj/item/toy/figure/md,\
/obj/item/toy/figure/mime,\
/obj/item/toy/figure/miner,\
/obj/item/toy/figure/ninja,\
/obj/item/toy/figure/wizard,\
/obj/item/toy/figure/rd,\
/obj/item/toy/figure/roboticist,\
/obj/item/toy/figure/scientist,\
/obj/item/toy/figure/syndie,\
/obj/item/toy/figure/secofficer,\
/obj/item/toy/figure/warden,\
/obj/item/toy/figure/psychologist,\
/obj/item/toy/figure/paramedic,\
/obj/item/toy/figure/ert)
/obj/random/plushie
name = "random plushie"
desc = "This is a random plushie."
icon = 'icons/obj/toy.dmi'
icon_state = "nymphplushie"
item_to_spawn()
return pick(/obj/structure/plushie/ian,\
/obj/structure/plushie/drone,\
/obj/structure/plushie/carp,\
/obj/structure/plushie/beepsky,\
/obj/item/toy/plushie/nymph,\
/obj/item/toy/plushie/mouse,\
/obj/item/toy/plushie/kitten,\
/obj/item/toy/plushie/lizard)
+5 -5
View File
@@ -20,7 +20,7 @@
var/mob/living/carbon/human/H = user
if(H.species.can_shred(user))
attack_generic(user,1,"slices")
return
return ..()
/obj/structure/blob_act()
if(prob(50))
@@ -67,10 +67,10 @@
/obj/structure/MouseDrop_T(mob/target, mob/user)
var/mob/living/H = user
if(!istype(H) || target != user) // No making other people climb onto tables.
return
do_climb(target)
if(istype(H) && can_climb(H) && target == user)
do_climb(target)
else
return ..()
/obj/structure/proc/can_climb(var/mob/living/user)
if (!can_touch(user) || !climbable)
@@ -161,6 +161,9 @@
del(src)
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
health -= Proj.damage
..()
if(health <= 0)
@@ -54,8 +54,8 @@
/obj/structure/closet/lasertag/red/New()
..()
new /obj/item/weapon/gun/energy/laser/redtag(src)
new /obj/item/weapon/gun/energy/laser/redtag(src)
new /obj/item/weapon/gun/energy/lasertag/red(src)
new /obj/item/weapon/gun/energy/lasertag/red(src)
new /obj/item/clothing/suit/redtag(src)
new /obj/item/clothing/suit/redtag(src)
@@ -68,7 +68,7 @@
/obj/structure/closet/lasertag/blue/New()
..()
new /obj/item/weapon/gun/energy/laser/bluetag(src)
new /obj/item/weapon/gun/energy/laser/bluetag(src)
new /obj/item/weapon/gun/energy/lasertag/blue(src)
new /obj/item/weapon/gun/energy/lasertag/blue(src)
new /obj/item/clothing/suit/bluetag(src)
new /obj/item/clothing/suit/bluetag(src)
@@ -16,9 +16,9 @@
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
if (prob(70))
new /obj/item/clothing/tie/storage/brown_vest(src)
new /obj/item/clothing/accessory/storage/brown_vest(src)
else
new /obj/item/clothing/tie/storage/webbing(src)
new /obj/item/clothing/accessory/storage/webbing(src)
new /obj/item/blueprints(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/head/hardhat/white(src)
@@ -109,9 +109,9 @@
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
if (prob(70))
new /obj/item/clothing/tie/storage/brown_vest(src)
new /obj/item/clothing/accessory/storage/brown_vest(src)
else
new /obj/item/clothing/tie/storage/webbing(src)
new /obj/item/clothing/accessory/storage/webbing(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/clothing/suit/storage/hazardvest(src)
@@ -138,9 +138,9 @@
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
if (prob(70))
new /obj/item/clothing/tie/storage/brown_vest(src)
new /obj/item/clothing/accessory/storage/brown_vest(src)
else
new /obj/item/clothing/tie/storage/webbing(src)
new /obj/item/clothing/accessory/storage/webbing(src)
new /obj/item/clothing/suit/fire/firefighter(src)
new /obj/item/device/flashlight(src)
new /obj/item/weapon/extinguisher(src)
@@ -23,5 +23,6 @@
new /obj/item/clothing/head/greenbandana(src)
new /obj/item/weapon/minihoe(src)
new /obj/item/weapon/hatchet(src)
new /obj/item/weapon/wirecutters/clippers(src)
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
return
@@ -52,7 +52,7 @@
/obj/structure/closet/secure_closet/medical3
name = "medical doctor's locker"
req_access = list(access_surgery)
req_access = list(access_medical)
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
@@ -18,7 +18,7 @@
new /obj/item/clothing/suit/captunic/capjacket(src)
new /obj/item/clothing/head/helmet/cap(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/storage/vest(src)
new /obj/item/weapon/cartridge/captain(src)
new /obj/item/clothing/head/helmet/swat(src)
new /obj/item/clothing/shoes/brown(src)
@@ -47,13 +47,14 @@
New()
..()
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/storage/vest(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/weapon/cartridge/hop(src)
new /obj/item/device/radio/headset/heads/hop(src)
new /obj/item/weapon/storage/box/ids(src)
new /obj/item/weapon/storage/box/ids( src )
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/projectile/sec/flash(src)
new /obj/item/device/flash(src)
return
@@ -103,7 +104,7 @@
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/head/helmet/HoS(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/storage/vest/hos(src)
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
new /obj/item/clothing/under/rank/head_of_security/corp(src)
new /obj/item/clothing/suit/armor/hos/jensen(src)
@@ -119,7 +120,7 @@
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/tie/holster/waist(src)
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/head/beret/sec/hos(src)
return
@@ -143,12 +144,12 @@
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/suit/armor/vest/security(src)
new /obj/item/clothing/suit/storage/vest/warden(src)
new /obj/item/clothing/under/rank/warden(src)
new /obj/item/clothing/under/rank/warden/corp(src)
new /obj/item/clothing/suit/armor/vest/warden(src)
new /obj/item/clothing/head/helmet/warden(src)
// new /obj/item/weapon/cartridge/security(src)
new /obj/item/weapon/cartridge/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
@@ -156,7 +157,7 @@
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/clothing/head/beret/sec/warden(src)
return
@@ -179,7 +180,7 @@
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/suit/armor/vest/security(src)
new /obj/item/clothing/suit/storage/vest/officer(src)
new /obj/item/clothing/head/helmet(src)
// new /obj/item/weapon/cartridge/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
@@ -188,13 +189,14 @@
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer(src)
new /obj/item/clothing/tie/storage/black_vest(src)
new /obj/item/clothing/accessory/storage/black_vest(src)
new /obj/item/clothing/head/soft/sec/corp(src)
new /obj/item/clothing/under/rank/security/corp(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/weapon/gun/energy/taser(src)
return
@@ -202,7 +204,7 @@
New()
..()
new /obj/item/clothing/tie/armband/cargo(src)
new /obj/item/clothing/accessory/armband/cargo(src)
new /obj/item/device/encryptionkey/headset_cargo(src)
return
@@ -210,7 +212,7 @@
New()
..()
new /obj/item/clothing/tie/armband/engine(src)
new /obj/item/clothing/accessory/armband/engine(src)
new /obj/item/device/encryptionkey/headset_eng(src)
return
@@ -218,7 +220,7 @@
New()
..()
new /obj/item/clothing/tie/armband/science(src)
new /obj/item/clothing/accessory/armband/science(src)
new /obj/item/device/encryptionkey/headset_sci(src)
return
@@ -226,7 +228,7 @@
New()
..()
new /obj/item/clothing/tie/armband/medgreen(src)
new /obj/item/clothing/accessory/armband/medgreen(src)
new /obj/item/device/encryptionkey/headset_med(src)
return
@@ -257,12 +259,12 @@
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/detective_scanner(src)
new /obj/item/clothing/suit/armor/det_suit(src)
new /obj/item/ammo_magazine/c45r(src)
new /obj/item/ammo_magazine/c45r(src)
new /obj/item/clothing/suit/storage/vest/detective(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/taperoll/police(src)
new /obj/item/weapon/gun/projectile/detective/semiauto(src)
new /obj/item/clothing/tie/holster/armpit(src)
new /obj/item/weapon/gun/projectile/colt/detective(src)
new /obj/item/clothing/accessory/holster/armpit(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()

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