Merge tgstation13 r4570 into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/defines/obj.dm
	code/defines/procs/helpers.dm
	code/defines/turf.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/gamemodes/cult/cult_structures.dm
	code/game/gamemodes/events.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/master_controller.dm
	code/game/objects/items/blueprints.dm
	code/game/objects/items/devices/uplinks.dm
	code/game/objects/items/item.dm
	code/game/objects/items/weapons/gift_wrappaper.dm
	code/game/objects/items/weapons/wires.dm
	code/game/objects/weapons.dm
	code/game/turfs/turf.dm
	code/modules/clothing/head/hardhat.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mine_turfs.dm
	code/modules/mob/living/silicon/robot/life.dm
	code/modules/mob/mob_defines.dm
	code/modules/mob/new_player/login.dm
	code/modules/paperwork/pen.dm
	code/modules/paperwork/stamps.dm
	code/unused/toilets.dm
	html/changelog.html
	icons/effects/alert.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-08-28 19:57:11 +10:00
269 changed files with 14389 additions and 13349 deletions
-70
View File
@@ -1,70 +0,0 @@
/obj/item/device/infra_sensor/process()
if (src.passive)
for(var/obj/effect/beam/i_beam/I in range(2, src.loc))
I.left = 2
return 1
else
processing_objects.Remove(src)
return null
/obj/item/device/infra_sensor/proc/burst()
for(var/obj/effect/beam/i_beam/I in range(src.loc))
I.left = 8
/* for(var/obj/item/device/infra/I in range(src.loc))ugh will have to fix this
I.visible = 1
spawn( 0 )
if ((I && I.first))
I.first.vis_spread(1)
return
for(var/obj/item/assembly/rad_infra/I in range(src.loc))
I.part2.visible = 1
spawn( 0 )
if ((I.part2 && I.part2.first))
I.part2.first.vis_spread(1)
return*/
return
/obj/item/device/infra_sensor/attack_self(mob/user as mob)
user.machine = src
var/dat = text("<TT><B>Infrared Sensor</B><BR>\n<B>Passive Emitter</B>: []<BR>\n<B>Active Emitter</B>: <A href='?src=\ref[];active=0'>Burst Fire</A>\n</TT>", (src.passive ? text("<A href='?src=\ref[];passive=0'>On</A>", src) : text("<A href='?src=\ref[];passive=1'>Off</A>", src)), src)
user << browse(dat, "window=infra_sensor")
onclose(user, "infra_sensor")
return
/obj/item/device/infra_sensor/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
if ((usr.contents.Find(src) || (usr.contents.Find(src.master) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))))
usr.machine = src
if (href_list["passive"])
src.passive = !( src.passive )
if(passive)
processing_objects.Add(src)
if (href_list["active"])
spawn( 0 )
src.burst()
return
if (!( src.master ))
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
else
if (istype(src.master.loc, /mob))
src.attack_self(src.master.loc)
else
for(var/mob/M in viewers(1, src.master))
if (M.client)
src.attack_self(M)
src.add_fingerprint(usr)
else
usr << browse(null, "window=infra_sensor")
onclose(usr, "infra_sensor")
return
return
-58
View File
@@ -1,58 +0,0 @@
/*/obj/item/device/shield I have not see this thing used in quite some time and it just clutters up some of the mob code, also I am fairly sure it makes you invis with the newer cloaking icons
name = "shield"
desc = "This is an item which is specially crafted to shield you. It is much like a visible version of the outdated cloaking device."
icon_state = "shield0"
var/active = 0.0
flags = FPRINT | TABLEPASS| CONDUCT
item_state = "electronic"
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
/obj/item/device/shield/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The shield is now active."
src.icon_state = "shield1"
else
user << "\blue The shield is now inactive."
src.icon_state = "shield0"
src.add_fingerprint(user)
return
*/
/obj/item/weapon/cloaking_device
name = "cloaking device"
desc = "Use this to become invisible to the human eyesocket."
icon = 'icons/obj/device.dmi'
icon_state = "shield0"
var/active = 0.0
flags = FPRINT | TABLEPASS| CONDUCT
item_state = "electronic"
throwforce = 10.0
throw_speed = 2
throw_range = 10
w_class = 2.0
origin_tech = "magnets=3;syndicate=4"
/obj/item/weapon/cloaking_device/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The cloaking device is now active."
src.icon_state = "shield1"
else
user << "\blue The cloaking device is now inactive."
src.icon_state = "shield0"
src.add_fingerprint(user)
return
/obj/item/weapon/cloaking_device/emp_act(severity)
active = 0
icon_state = "shield0"
if(ismob(loc))
loc:update_icons()
..()
+1 -5
View File
@@ -175,6 +175,7 @@
icon_state = "weednode"
name = "purple sac"
desc = "Weird purple octopus-like thing."
luminosity = NODERANGE
/obj/effect/alien/weeds/New()
..()
@@ -187,11 +188,6 @@
Life()
return
/obj/effect/alien/weeds/node/New()
..()
sd_SetLuminosity(NODERANGE)
return
/obj/effect/alien/weeds/proc/Life()
set background = 1
var/turf/U = get_turf(src)
@@ -60,7 +60,5 @@
New()
..()
sd_SetLuminosity(1)
spawn(1200) // 2 minutes
del(src)
@@ -0,0 +1,35 @@
/obj/effect/decal/cleanable/crayon
name = "rune"
desc = "A rune drawn in crayon."
icon = 'icons/obj/rune.dmi'
layer = 2.1
anchored = 1
examine()
set src in view(2)
..()
return
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
name = type
desc = "A [type] drawn in crayon."
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
overlays += mainOverlay
overlays += shadeOverlay
+4 -4
View File
@@ -936,7 +936,7 @@ steam.start() -- spawns the effect
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
density = 1
opacity = 0 // changed in New()
opacity = 1 // changed in New()
anchored = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
@@ -945,11 +945,11 @@ steam.start() -- spawns the effect
New()
..()
update_nearby_tiles(1)
spawn(1)
sd_NewOpacity(1)
Del()
sd_NewOpacity(0)
density = 0
update_nearby_tiles(1)
..()
+1 -38
View File
@@ -62,41 +62,4 @@
if(directions.len)
gib.streak(directions)
del(src)
/obj/effect/gibspawner
generic
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(2,2,1)
New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/up,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/body,/obj/effect/decal/cleanable/blood/gibs/limb,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
xeno
gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
robot
sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb)
gibamounts = list(1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
gibamounts[6] = pick(0,1,2)
..()
del(src)
+4 -6
View File
@@ -21,7 +21,7 @@
spreadChance = 0
/obj/effect/glowshroom/New()
set background = 1
..()
dir = CalcDir()
@@ -40,11 +40,9 @@
else //if on the floor, glowshroom on-floor sprite
icon_state = "glowshroomf"
spawn(2) //allows the luminosity and spread rate to be affected by potency at the moment of creation
sd_SetLuminosity(potency/10)
spawn(delay)
if(src)
Spread()
spawn(delay)
SetLuminosity(round(potency/10))
Spread()
/obj/effect/glowshroom/proc/Spread()
set background = 1
+17
View File
@@ -0,0 +1,17 @@
/obj/effect/manifest/New()
src.invisibility = 101
return
/obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in mob_list)
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
P.info = dat
P.name = "paper- 'Crew Manifest'"
//SN src = null
del(src)
return
+180 -1
View File
@@ -33,4 +33,183 @@
/obj/effect/sign/blob_act()
del(src)
return
return
/obj/effect/sign/map
desc = "A framed picture of the station."
name = "station map"
icon = 'icons/obj/decals.dmi'
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/map/left
icon_state = "map-left"
/obj/effect/sign/map/right
icon_state = "map-right"
/obj/effect/sign/securearea
desc = "A warning sign which reads 'SECURE AREA'. This obviously applies to a nun-Clown."
name = "SECURE AREA"
icon = 'icons/obj/decals.dmi'
icon_state = "securearea"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/biohazard
desc = "A warning sign which reads 'BIOHAZARD'"
name = "BIOHAZARD"
icon = 'icons/obj/decals.dmi'
icon_state = "bio"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/electricshock
desc = "A warning sign which reads 'HIGH VOLTAGE'"
name = "HIGH VOLTAGE"
icon = 'icons/obj/decals.dmi'
icon_state = "shock"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/examroom
desc = "A guidance sign which reads 'EXAM ROOM'"
name = "EXAM"
icon = 'icons/obj/decals.dmi'
icon_state = "examroom"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/vacuum
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
name = "HARD VACUUM AHEAD"
icon = 'icons/obj/decals.dmi'
icon_state = "space"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/deathsposal
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
name = "DISPOSAL LEADS TO SPACE"
icon = 'icons/obj/decals.dmi'
icon_state = "deathsposal"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/pods
desc = "A warning sign which reads 'ESCAPE PODS'"
name = "ESCAPE PODS"
icon = 'icons/obj/decals.dmi'
icon_state = "pods"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/fire
desc = "A warning sign which reads 'DANGER: FIRE'"
name = "DANGER: FIRE"
icon = 'icons/obj/decals.dmi'
icon_state = "fire"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/nosmoking_1
desc = "A warning sign which reads 'NO SMOKING'"
name = "NO SMOKING"
icon = 'icons/obj/decals.dmi'
icon_state = "nosmoking"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/nosmoking_2
desc = "A warning sign which reads 'NO SMOKING'"
name = "NO SMOKING"
icon = 'icons/obj/decals.dmi'
icon_state = "nosmoking2"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/redcross
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
name = "Med-Bay"
icon = 'icons/obj/decals.dmi'
icon_state = "redcross"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/goldenplaque
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
name = "The Most Robust Men Award for Robustness"
icon = 'icons/obj/decals.dmi'
icon_state = "goldenplaque"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/atmosplaque
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
name = "FEA Atmospherics Division"
icon = 'icons/obj/decals.dmi'
icon_state = "atmosplaque"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
icon = 'icons/obj/decals.dmi'
icon_state = "maltesefalcon1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/maltesefalcon2
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
icon = 'icons/obj/decals.dmi'
icon_state = "maltesefalcon2"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/science//These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
desc = "A warning sign which reads 'SCIENCE!'"
name = "SCIENCE!"
icon = 'icons/obj/decals.dmi'
icon_state = "science1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/chemistry
desc = "A warning sign which reads 'CHEMISTY'"
name = "CHEMISTRY"
icon = 'icons/obj/decals.dmi'
icon_state = "chemistry1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/botany
desc = "A warning sign which reads 'HYDROPONICS'"
name = "HYDROPONICS"
icon = 'icons/obj/decals.dmi'
icon_state = "hydro1"
anchored = 1.0
opacity = 0
density = 0
@@ -0,0 +1,36 @@
/obj/effect/gibspawner
generic
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(2,2,1)
New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/up,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/body,/obj/effect/decal/cleanable/blood/gibs/limb,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
xeno
gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
robot
sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb)
gibamounts = list(1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
gibamounts[6] = pick(0,1,2)
..()
+20 -14
View File
@@ -8,6 +8,7 @@
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
src = null
spawn(0)
var/start = world.timeofday
epicenter = get_turf(epicenter)
@@ -20,6 +21,10 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
lighting_controller.processing = 0
var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
@@ -35,25 +40,26 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
for(var/turf/T in range(epicenter, max(devastation_range, heavy_impact_range, light_impact_range)))
var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(dist < devastation_range)
dist = 1
else if(dist < heavy_impact_range)
dist = 2
else if(dist < light_impact_range)
dist = 3
else
continue
if(dist < devastation_range) dist = 1
else if(dist < heavy_impact_range) dist = 2
else if(dist < light_impact_range) dist = 3
else continue
T.ex_act(dist)
if(T)
for(var/atom/object in T.contents)
object.ex_act(dist)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
for(var/atom_movable in T.contents)
var/atom/movable/AM = atom_movable
AM.ex_act(dist)
//here util we get explosions to be less laggy, might help us identify issues after changes to splosions (because let's face it we've had a few)
world.log << "## Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [(world.timeofday-start)/10] seconds."
world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [(world.timeofday-start)/10] seconds."
sleep(8)
if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
if(!powernet_rebuild_was_deferred_already)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
return 1
+2
View File
@@ -1,4 +1,6 @@
//TODO: Flash range does nothing currently
//NOTE: This has not yet been updated with the lighting deferal stuff. ~Carn
//Needs some work anyway.
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
spawn(0)
-258
View File
@@ -1,258 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
//Moving this here for now.. it might end up in modules/mob/ later
var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone
var/const/MAX_IMPREGNATION_TIME = 150
var/const/MIN_ACTIVE_TIME = 300 //time between being dropped and going idle
var/const/MAX_ACTIVE_TIME = 600
/obj/item/clothing/mask/facehugger
name = "alien"
desc = "It has some sort of a tube at the end of its tail."
icon_state = "facehugger"
item_state = "facehugger"
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH|MASKCOVERSEYES
var/stat = UNCONSCIOUS //UNCONSCIOUS is the idle state in this case
var/sterile = 0
var/strength = 5
var/attached = 0
attack_paw(user as mob) //can be picked up by aliens
if(isalien(user))
attack_hand(user)
return
else
..()
return
attack_hand(user as mob)
if(stat == CONSCIOUS && !isalien(user))
Attach(user)
return
else
..()
return
attack(mob/living/M as mob, mob/user as mob)
..()
user.drop_from_inventory(src)
Attach(M)
New()
if(aliens_allowed)
..()
else
del(src)
examine()
..()
switch(stat)
if(DEAD,UNCONSCIOUS)
usr << "\red \b [src] is not moving."
if(CONSCIOUS)
usr << "\red \b [src] seems to be active."
if (sterile)
usr << "\red \b It looks like the proboscis has been removed."
return
attackby()
Die()
return
bullet_act()
Die()
return
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
Die()
return
equipped(mob/M)
Attach(M)
HasEntered(atom/target)
Attach(target)
return
dropped()
..()
GoActive()
return
throw_impact(atom/hit_atom)
Attach(hit_atom)
return
proc/Attach(M as mob)
if(!isliving(M) || isalien(M))
return
if(attached)
return
else
attached++
spawn(MAX_IMPREGNATION_TIME)
attached = 0
var/mob/living/L = M //just so I don't need to use :
if(stat != CONSCIOUS) return
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
if(issilicon(L))
for(var/mob/O in viewers(src, null))
O.show_message("\red \b [src] smashes against [L]'s frame!", 1)
Die()
return
var/mob/living/carbon/target = L
for(var/mob/O in viewers(target, null))
O.show_message("\red \b [src] leaps at [target]'s face!", 1)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.head && H.head.flags & HEADCOVERSMOUTH)
for(var/mob/O in viewers(H, null))
O.show_message("\red \b [src] smashes against [H]'s [H.head]!", 1)
Die()
return
if(target.wear_mask)
if(prob(20)) return
var/obj/item/clothing/W = target.wear_mask
if(!W.canremove) return
target.drop_from_inventory(W)
for(var/mob/O in viewers(target, null))
O.show_message("\red \b [src] tears [W] off of [target]'s face!", 1)
loc = target
layer = 20
target.wear_mask = src
target.update_inv_wear_mask()
GoIdle() //so it doesn't jump the people that tear it off
if(!sterile) target.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
Impregnate(target)
return
proc/Impregnate(mob/living/carbon/target as mob)
if(!target || target.wear_mask != src || target.stat == DEAD) //was taken off or something
return
if(!sterile)
target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
for(var/datum/disease/alien_embryo/A in target.viruses)
target.status_flags |= XENO_HOST
break
for(var/mob/O in viewers(target,null))
O.show_message("\red \b [src] falls limp after violating [target]'s face!", 1)
Die()
else
for(var/mob/O in viewers(target,null))
O.show_message("\red \b [src] violates [target]'s face!", 1)
target.update_inv_wear_mask()
return
proc/GoActive()
if(stat == DEAD || stat == CONSCIOUS)
return
stat = CONSCIOUS
/* for(var/mob/living/carbon/alien/alien in world)
var/image/activeIndicator = image('icons/mob/alien.dmi', loc = src, icon_state = "facehugger_active")
activeIndicator.override = 1
if(alien && alien.client)
alien.client.images += activeIndicator */
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
GoIdle()
return
proc/GoIdle()
if(stat == DEAD || stat == UNCONSCIOUS)
return
/* RemoveActiveIndicators() */
stat = UNCONSCIOUS
return
proc/Die()
if(stat == DEAD)
return
/* RemoveActiveIndicators() */
icon_state = "facehugger_dead"
stat = DEAD
for(var/mob/O in viewers(src, null))
O.show_message("\red \b[src] curls up into a ball!", 1)
return
/* proc/RemoveActiveIndicators() //removes the "active" facehugger indicator from all aliens in the world for this hugger
for(var/mob/living/carbon/alien/alien in world)
if(alien.client)
for(var/image/image in alien.client.images)
if(image.icon_state == "facehugger_active" && image.loc == src)
del(image)
return */
/obj/item/clothing/mask/facehugger/angry
stat = CONSCIOUS
/obj/item/clothing/mask/facehugger/angry/HasProximity(atom/movable/AM as mob|obj)
if(istype(AM , /mob/living/))
Attach(AM)
/*
/obj/item/clothing/mask/facehugger/angry/New()
processing_objects.Add(src)
/obj/item/clothing/mask/facehugger/angry/process()
if(!src || src.stat == (DEAD))
return
for(var/mob/living/carbon/C in range(1,src))
Attach(C)
return
for(var/mob/living/carbon/C in range(5,src))
if(isInSight(C,src))
step_to(src,C,0)
spawn(5)
if(C in range(1,src))
Attach(C)
return
step_rand(src)
return
/obj/item/clothing/mask/facehugger/angry/Attach(var/mob/M as mob)
..(M)
processing_objects.Remove(src)
*/
+628 -555
View File
File diff suppressed because it is too large Load Diff
+1 -30
View File
@@ -235,33 +235,4 @@ move an amendment</a> to the drawing.</p>
if(BORDER_SPACE)
return ROOM_ERR_SPACE
found+=T
return found
/*
/proc/check_apc(var/area/A)
for(var/area/RA in A.related)
for(var/obj/machinery/power/apc/FINDME in RA)
return 1
return 0
/proc/fuckingfreemachinery()
for(var/obj/machinery/machine in machines)
if (istype(machine,/obj/machinery/power/solar))
continue
var/area/A = machine.loc.loc // make sure it's in an area
if (istype(A,/area/tdome))
continue
if (istype(A,/area/shuttle))
continue
if(!A || !isarea(A))
world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) hasnt area!"
continue
A = A.master
if (A.name=="Space")
world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) work in space!"
continue
if (!check_apc(A))
world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) work without APC!"
world << "\red END ====="
*/
return found
@@ -1,3 +1,5 @@
//Also contains /obj/structure/closet/body_bag because I doubt anyone would think to look for bodybags in /object/structures
/obj/item/bodybag
name = "body bag"
desc = "A folded bag designed to contain dead things."
+7 -11
View File
@@ -1,7 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
#define CANDLE_LUM 3
/obj/item/candle
name = "red candle"
desc = "a candle"
@@ -52,7 +48,7 @@
//src.damtype = "fire"
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
sd_SetLuminosity(CANDLE_LUM)
SetLuminosity(CANDLE_LUM)
processing_objects.Add(src)
@@ -75,17 +71,17 @@
if(lit)
lit = 0
update_icon()
sd_SetLuminosity(0)
user.total_luminosity -= CANDLE_LUM
SetLuminosity(0)
user.SetLuminosity(user.luminosity - CANDLE_LUM)
pickup(mob/user)
if(lit)
src.sd_SetLuminosity(0)
user.total_luminosity += CANDLE_LUM
SetLuminosity(0)
user.SetLuminosity(user.luminosity + CANDLE_LUM)
dropped(mob/user)
if(lit)
user.total_luminosity -= CANDLE_LUM
src.sd_SetLuminosity(CANDLE_LUM)
user.SetLuminosity(user.luminosity - CANDLE_LUM)
SetLuminosity(CANDLE_LUM)
@@ -1,34 +1,3 @@
/*--------
//CONTAINS
CRAYONS
--------*/
/obj/item/weapon/storage/crayonbox/New()
..()
new /obj/item/toy/crayon/red(src)
new /obj/item/toy/crayon/orange(src)
new /obj/item/toy/crayon/yellow(src)
new /obj/item/toy/crayon/green(src)
new /obj/item/toy/crayon/blue(src)
new /obj/item/toy/crayon/purple(src)
update_icon()
/obj/item/weapon/storage/crayonbox/update_icon()
overlays = list() //resets list
overlays += image('icons/obj/crayons.dmi',"crayonbox")
for(var/obj/item/toy/crayon/crayon in contents)
overlays += image('icons/obj/crayons.dmi',crayon.colourName)
/obj/item/weapon/storage/crayonbox/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/toy/crayon))
switch(W:colourName)
if("mime")
usr << "This crayon is too sad to be contained in this box."
return
if("rainbow")
usr << "This crayon is too powerful to be contained in this box."
return
..()
/obj/item/toy/crayon/red
icon_state = "crayonred"
colour = "#DA0000"
@@ -127,40 +96,4 @@ CRAYONS
user << "\red You ate your crayon!"
del(src)
else
..()
/obj/effect/decal/cleanable/crayon
name = "rune"
desc = "A rune drawn in crayon."
icon = 'icons/obj/rune.dmi'
layer = 2.1
anchored = 1
examine()
set src in view(2)
..()
return
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
name = type
desc = "A [type] drawn in crayon."
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
overlays += mainOverlay
overlays += shadeOverlay
..()
@@ -193,20 +193,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
* The Actual PDA
*/
/obj/item/device/pda/pickup(mob/user)
if (fon)
sd_SetLuminosity(0)
user.total_luminosity += f_lum
if(fon)
SetLuminosity(0)
user.SetLuminosity(user.luminosity + f_lum)
/obj/item/device/pda/dropped(mob/user)
if (fon)
user.total_luminosity -= f_lum
sd_SetLuminosity(f_lum)
if(fon)
user.SetLuminosity(user.luminosity - f_lum)
SetLuminosity(f_lum)
/obj/item/device/pda/New()
..()
PDAs += src
spawn(3)
if (default_cartridge)
if(default_cartridge)
cartridge = new default_cartridge(src)
/obj/item/device/pda/proc/can_use()
@@ -496,14 +495,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
//MAIN FUNCTIONS===================================
if("Light")
fon = (!fon)
if (src in U.contents)
if (fon)
U.total_luminosity += f_lum
else
U.total_luminosity -= f_lum
if(fon)
fon = 0
if(src in U.contents) U.SetLuminosity(U.luminosity - f_lum)
else SetLuminosity(0)
else
sd_SetLuminosity(fon * f_lum)
fon = 1
if(src in U.contents) U.SetLuminosity(U.luminosity + f_lum)
else SetLuminosity(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
@@ -468,17 +468,17 @@ Code:
menu = "<h4><img src=pda_crate.png> Supply Record Interlink</h4>"
menu += "<BR><B>Supply shuttle</B><BR>"
menu += "Location: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"]<BR>"
menu += "Location: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Dock"]<BR>"
menu += "Current approved orders: <BR><ol>"
for(var/S in supply_shuttle_shoppinglist)
for(var/S in supply_shuttle.shoppinglist)
var/datum/supply_order/SO = S
menu += "<li>[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]</li>"
menu += "<li>#[SO.ordernum] - [SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]</li>"
menu += "</ol>"
menu += "Current requests: <BR><ol>"
for(var/S in supply_shuttle_requestlist)
for(var/S in supply_shuttle.requestlist)
var/datum/supply_order/SO = S
menu += "<li>[SO.object.name] requested by [SO.orderedby]</li>"
menu += "<li>#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]</li>"
menu += "</ol><font size=\"-3\">Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management."
if (48) //mulebot control
@@ -1,46 +1,3 @@
/obj/effect/dummy/chameleon
name = ""
desc = ""
density = 0
anchored = 1
var/can_move = 1
var/obj/item/device/chameleon/master = null
attackby()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
attack_hand()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
ex_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
bullet_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
..()
master.disrupt()
relaymove(var/mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement!
if(can_move)
can_move = 0
switch(usr.bodytemperature)
if(300 to INFINITY)
spawn(10) can_move = 1
if(295 to 300)
spawn(13) can_move = 1
if(280 to 295)
spawn(16) can_move = 1
if(260 to 280)
spawn(20) can_move = 1
else
spawn(25) can_move = 1
step(src,direction)
return
/obj/item/device/chameleon
name = "chameleon-projector"
icon_state = "shield0"
@@ -119,3 +76,47 @@
active_dummy = null
can_use = 0
spawn(100) can_use = 1
/obj/effect/dummy/chameleon
name = ""
desc = ""
density = 0
anchored = 1
var/can_move = 1
var/obj/item/device/chameleon/master = null
attackby()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
attack_hand()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
ex_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
bullet_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
..()
master.disrupt()
relaymove(var/mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement!
if(can_move)
can_move = 0
switch(usr.bodytemperature)
if(300 to INFINITY)
spawn(10) can_move = 1
if(295 to 300)
spawn(13) can_move = 1
if(280 to 295)
spawn(16) can_move = 1
if(260 to 280)
spawn(20) can_move = 1
else
spawn(25) can_move = 1
step(src,direction)
return
@@ -18,25 +18,24 @@
..()
if (on)
icon_state = icon_on
src.sd_SetLuminosity(brightness_on)
src.SetLuminosity(brightness_on)
else
icon_state = icon_off
src.sd_SetLuminosity(0)
src.SetLuminosity(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
if (on)
if(on)
icon_state = icon_on
if(src.loc == user)
user.total_luminosity += brightness_on
else if (isturf(src.loc))
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity + brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
else
icon_state = icon_off
if(src.loc == user)
user.total_luminosity -= brightness_on
else if (isturf(src.loc))
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity - brightness_on)
else if(isturf(loc))
SetLuminosity(0)
/obj/item/device/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
@@ -85,14 +84,14 @@
/obj/item/device/flashlight/pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity + brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity - brightness_on)
SetLuminosity(brightness_on)
/obj/item/device/flashlight/pen
@@ -50,7 +50,7 @@
for(var/mob/M in viewers(user))
if(M == user) continue
M << "[user] detaches the power sink from the cable."
sd_SetLuminosity(0)
SetLuminosity(0)
icon_state = "powersink0"
return
@@ -85,7 +85,7 @@
if(M == user) continue
M << "[user] deactivates the power sink!"
mode = 1
sd_SetLuminosity(0)
SetLuminosity(0)
icon_state = "powersink0"
processing_objects.Remove(src)
@@ -93,9 +93,7 @@
if(attached)
var/datum/powernet/PN = attached.get_powernet()
if(PN)
if(!luminosity)
sd_SetLuminosity(12)
SetLuminosity(12)
// found a powernet, so drain up to max power from it
@@ -0,0 +1,32 @@
/obj/item/weapon/cloaking_device
name = "cloaking device"
desc = "Use this to become invisible to the human eyesocket."
icon = 'icons/obj/device.dmi'
icon_state = "shield0"
var/active = 0.0
flags = FPRINT | TABLEPASS| CONDUCT
item_state = "electronic"
throwforce = 10.0
throw_speed = 2
throw_range = 10
w_class = 2.0
origin_tech = "magnets=3;syndicate=4"
/obj/item/weapon/cloaking_device/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The cloaking device is now active."
src.icon_state = "shield1"
else
user << "\blue The cloaking device is now inactive."
src.icon_state = "shield0"
src.add_fingerprint(user)
return
/obj/item/weapon/cloaking_device/emp_act(severity)
active = 0
icon_state = "shield0"
if(ismob(loc))
loc:update_icons()
..()
@@ -276,6 +276,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
name = "Hidden Uplink."
desc = "There is something wrong if you're examining this."
var/active = 0
var/list/purchase_log = list()
// The hidden uplink MUST be inside an obj/item's contents.
/obj/item/device/uplink/hidden/New()
@@ -336,6 +337,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
if(ishuman(usr))
var/mob/living/carbon/human/A = usr
A.put_in_any_hand_if_possible(I)
purchase_log += "[usr] ([usr.ckey]) bought [I]."
interact(usr)
return
-120
View File
@@ -1,120 +0,0 @@
/proc/parse_zone(zone)
if(zone == "r_hand") return "right hand"
else if (zone == "l_hand") return "left hand"
else if (zone == "l_arm") return "left arm"
else if (zone == "r_arm") return "right arm"
else if (zone == "l_leg") return "left leg"
else if (zone == "r_leg") return "right leg"
else if (zone == "l_foot") return "left foot"
else if (zone == "r_foot") return "right foot"
else return zone
/proc/text2dir(direction)
switch(uppertext(direction))
if("NORTH")
return 1
if("SOUTH")
return 2
if("EAST")
return 4
if("WEST")
return 8
if("NORTHEAST")
return 5
if("NORTHWEST")
return 9
if("SOUTHEAST")
return 6
if("SOUTHWEST")
return 10
else
return
/proc/get_turf(turf/location)
while(location)
if(isturf(location))
return location
location = location.loc
return null
/proc/get_turf_or_move(turf/location)
return get_turf(location)
/proc/dir2text(direction)
switch(direction)
if(1.0)
return "north"
if(2.0)
return "south"
if(4.0)
return "east"
if(8.0)
return "west"
if(5.0)
return "northeast"
if(6.0)
return "southeast"
if(9.0)
return "northwest"
if(10.0)
return "southwest"
else
return
/proc/is_type_in_list(var/atom/A, var/list/L)
for(var/type in L)
if(istype(A, type))
return 1
return 0
//Quick type checks for some tools
var/global/list/common_tools = list(
/obj/item/weapon/cable_coil,
/obj/item/weapon/wrench,
/obj/item/weapon/weldingtool,
/obj/item/weapon/screwdriver,
/obj/item/weapon/wirecutters,
/obj/item/device/multitool,
/obj/item/weapon/crowbar)
/proc/istool(O)
if(O && is_type_in_list(O, common_tools))
return 1
return 0
/proc/iswrench(O)
if(istype(O, /obj/item/weapon/wrench))
return 1
return 0
/proc/iswelder(O)
if(istype(O, /obj/item/weapon/weldingtool))
return 1
return 0
/proc/iscoil(O)
if(istype(O, /obj/item/weapon/cable_coil))
return 1
return 0
/proc/iswirecutter(O)
if(istype(O, /obj/item/weapon/wirecutters))
return 1
return 0
/proc/isscrewdriver(O)
if(istype(O, /obj/item/weapon/screwdriver))
return 1
return 0
/proc/ismultitool(O)
if(istype(O, /obj/item/device/multitool))
return 1
return 0
/proc/iscrowbar(O)
if(istype(O, /obj/item/weapon/crowbar))
return 1
return 0
+48
View File
@@ -0,0 +1,48 @@
/obj/item/latexballon
name = "Latex glove"
desc = "" //todo
icon_state = "latexballon"
item_state = "lgloves"
force = 0
throwforce = 0
w_class = 1.0
throw_speed = 1
throw_range = 15
var/state
var/datum/gas_mixture/air_contents = null
/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank)
if (icon_state == "latexballon_bursted")
return
src.air_contents = tank.remove_air_volume(3)
icon_state = "latexballon_blow"
item_state = "latexballon"
/obj/item/latexballon/proc/burst()
if (!air_contents)
return
playsound(src, 'sound/weapons/Gunshot.ogg', 100, 1)
icon_state = "latexballon_bursted"
item_state = "lgloves"
loc.assume_air(air_contents)
/obj/item/latexballon/ex_act(severity)
burst()
switch(severity)
if (1)
del(src)
if (2)
if (prob(50))
del(src)
/obj/item/latexballon/bullet_act()
burst()
/obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume)
if(temperature > T0C+100)
burst()
return
/obj/item/latexballon/attackby(obj/item/W as obj, mob/user as mob)
if (is_sharp(W))
burst()
-56
View File
@@ -1,56 +0,0 @@
/obj/item/assembly/shock_kit
name = "Shock Kit"
desc = "This appears to be made from both an Electric Pack and a Helmet."
icon_state = "shock_kit"
var/obj/item/clothing/head/helmet/part1 = null
var/obj/item/device/radio/electropack/part2 = null
var/status = 0.0
w_class = 5.0
flags = FPRINT | TABLEPASS| CONDUCT
/obj/item/assembly/shock_kit/Del()
//src.part1 = null
del(src.part1)
//src.part2 = null
del(src.part2)
..()
return
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if ((istype(W, /obj/item/weapon/wrench) && !( src.status )))
var/turf/T = src.loc
if (ismob(T))
T = T.loc
src.part1.loc = T
src.part2.loc = T
src.part1.master = null
src.part2.master = null
src.part1 = null
src.part2 = null
del(src)
return
if (!( istype(W, /obj/item/weapon/screwdriver) ))
return
src.status = !( src.status )
if (!src.status)
user.show_message("\blue The shock pack is now secured!", 1)
else
user.show_message("\blue The shock pack is now unsecured!", 1)
src.add_fingerprint(user)
return
/obj/item/assembly/shock_kit/attack_self(mob/user as mob)
src.part1.attack_self(user, src.status)
src.part2.attack_self(user, src.status)
src.add_fingerprint(user)
return
/obj/item/assembly/shock_kit/receive_signal()
//*****
//world << "Shock kit got r_signal"
if (istype(src.loc, /obj/structure/stool/bed/chair/e_chair))
var/obj/structure/stool/bed/chair/e_chair/C = src.loc
//world << "Shock kit sending shock to EC"
C.shock()
return
@@ -1,10 +1,3 @@
/*
CONTAINS:
MEDICAL
*/
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
if (M.stat == 2)
+4 -77
View File
@@ -1,3 +1,6 @@
//Items labled as 'trash' for the trash bag.
//TODO: Make this an item var or something...
//Added by Jack Rost
/obj/item/trash
icon = 'icons/obj/trash.dmi'
@@ -51,80 +54,4 @@
icon_state = "liquidfood"
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
return
/obj/item/weapon/trashbag
icon = 'icons/obj/trash.dmi'
icon_state = "trashbag0"
item_state = "trashbag"
name = "Trash bag"
desc = "A heavy-duty, no fun allowed trash bag."
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 25; //the number of trash it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2.0
/obj/item/weapon/trashbag/update_icon()
if(contents.len == 0)
icon_state = "trashbag0"
else if(contents.len < 12)
icon_state = "trashbag1"
else if(contents.len < 25)
icon_state = "trashbag2"
else icon_state = "trashbag3"
/obj/item/weapon/trashbag/attackby(obj/item/W as obj, mob/living/user as mob)
..()
if (contents.len < capacity)
if (istype(W, /obj/item))
if (W.w_class <= 2)
var/obj/item/O = W
src.contents += O
else
user << "\blue The bag is full!"
/obj/item/weapon/trashbag/attack_self(mob/living/user as mob)
if(contents.len > 0)
for(var/obj/item/I in src.contents)
I.loc = user.loc
update_icon()
user << "\blue You drop all the trash onto the floor."
/obj/item/weapon/trashbag/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
if(istype(target, /obj/item))
var/obj/item/W = target
if(W.w_class <= 2)
if(mode == 1)
if(contents.len < capacity) //slightly redundant, but it makes it prettier in the chatbox. -Pete
user << "\blue You pick up all the trash."
for(var/obj/item/O in get_turf(W))
if(istype(O, /obj/item/weapon/disk/nuclear)) continue //No nuke disks - Nodrak
if(contents.len < capacity)
if(O.w_class <= 2)
contents += O;
else
user << "\blue The bag is full!"
break
else
user << "\blue The bag is full!"
else
if(istype(W, /obj/item/weapon/disk/nuclear)) return //No nuke disks - Nodrak
if(contents.len < capacity)
contents += W;
else
user << "\blue The bag is full!"
update_icon()
return
/obj/item/weapon/trashbag/verb/toggle_mode()
set name = "Switch Bag Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The bag now picks up all trash in a tile at once."
else
usr << "The bag now picks up one piece of trash at a time."
return
@@ -0,0 +1,14 @@
/obj/item/weapon/bedsheet/ex_act(severity)
if (severity <= 2)
del(src)
return
return
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
user.drop_item()
if(layer == initial(layer))
layer = 5
else
layer = initial(layer)
add_fingerprint(user)
return
+21 -42
View File
@@ -1,17 +1,16 @@
/* Cards
* Contains:
* DATA CARD
* ID CARD
* FINGERPRINT CARD HOLDER
* FINGERPRINT CARD
*/
/*
CONTAINS:
DATA CARD
ID CARD
FINGERPRINT CARD HOLDER
FINGERPRINT CARD
*/
// DATA CARDS
* DATA CARDS - Used for the teleporter
*/
/obj/item/weapon/card/data/verb/label(t as text)
set name = "Label Disk"
set category = "Object"
@@ -25,10 +24,9 @@ FINGERPRINT CARD
return
// ID CARDS
/*
* ID CARDS
*/
/obj/item/weapon/card/id/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
O.show_message(text("[] shows you: \icon[] []: assignment: []", user, src, src.name, src.assignment), 1)
@@ -73,8 +71,9 @@ FINGERPRINT CARD
..()
// FINGERPRINT HOLDER
/*
* FINGERPRINT HOLDER
*/
/obj/item/weapon/fcardholder/attack_self(mob/user as mob)
var/dat = "<B>Clipboard</B><BR>"
for(var/obj/item/weapon/f_card/P in src)
@@ -168,10 +167,9 @@ FINGERPRINT CARD
// FINGERPRINT CARD
/*
* FINGERPRINT CARD
*/
/obj/item/weapon/f_card/examine()
set src in view(2)
@@ -191,25 +189,6 @@ FINGERPRINT CARD
return dat
return
/*
/obj/item/weapon/f_card/attack_hand(mob/user as mob)
if ((user.r_hand == src || user.l_hand == src))
src.add_fingerprint(user)
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user )
F.amount = 1
src.amount--
user.put_in_hands(F)
F.add_fingerprint(user)
if (src.amount < 1)
//SN src = null
del(src)
return
else
..()
return
*/
/obj/item/weapon/f_card/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/f_card))
@@ -106,9 +106,6 @@ ZIPPO
if(M.lit > 0)
light("\red [user] lights their [name] with their [W].")
else if(istype(W, /obj/item/device/assembly/igniter))
light("\red [user] fiddles with [W], and manages to light their [name].")
//can't think of any other way to update the overlays :<
user.update_inv_wear_mask(0)
user.update_inv_l_hand(0)
@@ -456,7 +453,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red After a few attempts, [user] manages to light the [src], they however burn their finger in the process.", 1)
user.total_luminosity += 2
user.SetLuminosity(user.luminosity + 2)
processing_objects.Add(src)
else
src.lit = 0
@@ -469,7 +466,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red [user] quietly shuts off the [src].", 1)
user.total_luminosity -= 2
user.SetLuminosity(user.luminosity - 2)
processing_objects.Remove(src)
else
return ..()
@@ -498,13 +495,13 @@ ZIPPO
pickup(mob/user)
if(lit)
src.sd_SetLuminosity(0)
user.total_luminosity += 2
src.SetLuminosity(0)
user.SetLuminosity(user.luminosity+2)
return
dropped(mob/user)
if(lit)
user.total_luminosity -= 2
src.sd_SetLuminosity(2)
user.SetLuminosity(user.luminosity-2)
src.SetLuminosity(2)
return
+15 -8
View File
@@ -1,12 +1,13 @@
/* Clown Items
* Contains:
* Banana Peels
* Soap
* Bike Horns
*/
/*
CONTAINS:
NO MORE BANANA, NOW YOU CAN EAT IT. GO SEE OTHER FOOD STUFFS.
BANANA PEEL
SOAP
BIKE HORN
*/
* Banana Peals
*/
/obj/item/weapon/bananapeel/HasEntered(AM as mob|obj)
if (istype(AM, /mob/living/carbon))
var/mob/M = AM
@@ -19,6 +20,9 @@ BIKE HORN
M.Stun(4)
M.Weaken(2)
/*
* Soap
*/
/obj/item/weapon/soap/HasEntered(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
if (istype(AM, /mob/living/carbon))
var/mob/M = AM
@@ -50,6 +54,9 @@ BIKE HORN
return
..()
/*
* Bike Horns
*/
/obj/item/weapon/bikehorn/attack_self(mob/user as mob)
if (spam_flag == 0)
spam_flag = 1
+27
View File
@@ -0,0 +1,27 @@
/obj/item/weapon/dice
name = "d6"
desc = "A dice with six sides."
var/sides = 6
icon = 'icons/obj/dice.dmi'
icon_state = "d66"
/obj/item/weapon/dice/New()
icon_state = "[name][rand(sides)]"
/obj/item/weapon/dice/d20
name = "d20"
desc = "A dice with twenty sides."
sides = 20
icon_state = "d2020"
/obj/item/weapon/dice/attack_self(mob/user as mob)
var/result = rand(1, sides)
var/comment = ""
if(sides == 20 && result == 20)
comment = "Nat 20!"
else if(sides == 20 && result == 1)
comment = "Ouch, bad luck."
icon_state = "[name][result]"
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [result]. [comment]</span>", \
"<span class='notice'>You throw [src]. It lands on a [result]. [comment]</span>", \
"<span class='notice'>You hear [src] landing on a [result]. [comment]</span>")
@@ -0,0 +1,132 @@
/obj/item/weapon/extinguisher
name = "fire extinguisher"
desc = "A traditional red fire extinguisher."
icon = 'icons/obj/items.dmi'
icon_state = "fire_extinguisher0"
item_state = "fire_extinguisher"
hitsound = 'sound/weapons/smash.ogg'
flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT
throwforce = 10
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 10.0
m_amt = 90
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
var/max_water = 50
var/last_use = 1.0
var/safety = 1
var/sprite_name = "fire_extinguisher"
/obj/item/weapon/extinguisher/mini
name = "fire extinguisher"
desc = "A light and compact fibreglass-framed model fire extinguisher."
icon_state = "miniFE0"
item_state = "miniFE"
hitsound = null //it is much lighter, after all.
flags = FPRINT | USEDELAY | TABLEPASS
throwforce = 2
w_class = 2.0
force = 3.0
m_amt = 0
max_water = 30
sprite_name = "miniFE"
/obj/item/weapon/extinguisher/New()
var/datum/reagents/R = new/datum/reagents(max_water)
reagents = R
R.my_atom = src
R.add_reagent("water", max_water)
/obj/item/weapon/extinguisher/examine()
set src in usr
usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
..()
return
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
safety = !safety
src.icon_state = "[sprite_name][!safety]"
src.desc = "The safety is [safety ? "on" : "off"]."
user << "The safety is [safety ? "on" : "off"]."
return
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
//TODO; Add support for reagents in water.
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1)
var/obj/o = target
o.reagents.trans_to(src, 50)
user << "\blue \The [src] is now refilled"
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
return
if (!safety)
if (src.reagents.total_volume < 1)
usr << "\red \The [src] is empty."
return
if (world.time < src.last_use + 20)
return
src.last_use = world.time
playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3)
var/direction = get_dir(src,target)
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
spawn(0)
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
var/turf/T = get_turf(target)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
for(var/a=0, a<5, a++)
spawn(0)
var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) )
var/turf/my_target = pick(the_targets)
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
W.reagents = R
R.my_atom = W
if(!W || !src) return
src.reagents.trans_to(W,1)
for(var/b=0, b<5, b++)
step_towards(W,my_target)
if(!W) return
W.reagents.reaction(get_turf(W))
for(var/atom/atm in get_turf(W))
if(!W) return
W.reagents.reaction(atm)
if(W.loc == my_target) break
sleep(2)
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
user.inertia_dir = get_dir(target, user)
step(user, user.inertia_dir)
else
return ..()
return
+11 -12
View File
@@ -1,17 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
weldtool = new/obj/item/weapon/weldingtool(src)
weldtool.status = 0
igniter = new/obj/item/device/assembly/igniter(src)
igniter.secured = 0
src.status = 1
update_icon()
return
/obj/item/weapon/flamethrower
name = "flamethrower"
icon = 'icons/obj/flamethrower.dmi'
@@ -245,3 +233,14 @@
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
//location.hotspot_expose(1000,500,1)
return
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
weldtool = new/obj/item/weapon/weldingtool(src)
weldtool.status = 0
igniter = new/obj/item/device/assembly/igniter(src)
igniter.secured = 0
src.status = 1
update_icon()
return
@@ -1,86 +1,12 @@
/* Gifts and wrapping paper
* Contains:
* Gifts
* Wrapping Paper
*/
/*
CONTAINS:
WRAPPING PAPER
GIFTS
BEDSHEET BIN
PHOTOGRAPHS
*/
// WRAPPING PAPER
/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (!( locate(/obj/structure/table, src.loc) ))
user << "\blue You MUST put the paper on a table!"
if (W.w_class < 4)
if ((istype(user.l_hand, /obj/item/weapon/wirecutters) || istype(user.r_hand, /obj/item/weapon/wirecutters)))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
user << "\blue You need more paper!"
return
else
if(istype(W, /obj/item/smallDelivery) || istype(W, /obj/item/weapon/gift)) //No gift wrapping gifts!
return
src.amount -= a_used
user.drop_item()
var/obj/item/weapon/gift/G = new /obj/item/weapon/gift( src.loc )
G.size = W.w_class
G.w_class = G.size + 1
G.icon_state = text("gift[]", G.size)
G.gift = W
W.loc = G
G.add_fingerprint(user)
W.add_fingerprint(user)
src.add_fingerprint(user)
if (src.amount <= 0)
new /obj/item/weapon/c_tube( src.loc )
del(src)
return
else
user << "\blue You need scissors!"
else
user << "\blue The object is FAR too large!"
return
/obj/item/weapon/wrapping_paper/examine()
set src in oview(1)
..()
usr << text("There is about [] square units of paper left!", src.amount)
return
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
if (!istype(target, /mob/living/carbon/human)) return
var/mob/living/carbon/human/H = target
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || H.stat)
if (src.amount > 2)
var/obj/effect/spresent/present = new /obj/effect/spresent (H.loc)
src.amount -= 2
if (H.client)
H.client.perspective = EYE_PERSPECTIVE
H.client.eye = present
H.loc = present
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to wrap [H.name] ([H.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to wrap [H.name] ([H.ckey])</font>")
else
user << "\blue You need more paper."
else
user << "Theyre moving around too much. a Straitjacket would help."
// GIFTS
* Gifts
*/
/obj/item/weapon/gift/attack_self(mob/user as mob)
user.drop_item()
if(src.gift)
@@ -154,50 +80,72 @@ PHOTOGRAPHS
else
return
// BEDSHEET BIN
/*
* Wrapping Paper
*/
/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (!( locate(/obj/structure/table, src.loc) ))
user << "\blue You MUST put the paper on a table!"
if (W.w_class < 4)
if ((istype(user.l_hand, /obj/item/weapon/wirecutters) || istype(user.r_hand, /obj/item/weapon/wirecutters)))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
user << "\blue You need more paper!"
return
else
if(istype(W, /obj/item/smallDelivery) || istype(W, /obj/item/weapon/gift)) //No gift wrapping gifts!
return
/obj/structure/bedsheetbin/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/bedsheet))
del(W)
src.amount++
src.amount -= a_used
user.drop_item()
var/obj/item/weapon/gift/G = new /obj/item/weapon/gift( src.loc )
G.size = W.w_class
G.w_class = G.size + 1
G.icon_state = text("gift[]", G.size)
G.gift = W
W.loc = G
G.add_fingerprint(user)
W.add_fingerprint(user)
src.add_fingerprint(user)
if (src.amount <= 0)
new /obj/item/weapon/c_tube( src.loc )
del(src)
return
else
user << "\blue You need scissors!"
else
user << "\blue The object is FAR too large!"
return
/obj/structure/bedsheetbin/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/bedsheetbin/attack_hand(mob/user as mob)
if (src.amount >= 1)
src.amount--
new /obj/item/weapon/bedsheet( src.loc )
add_fingerprint(user)
/obj/structure/bedsheetbin/examine()
/obj/item/weapon/wrapping_paper/examine()
set src in oview(1)
src.amount = round(src.amount)
if (src.amount <= 0)
src.amount = 0
usr << "There are no bed sheets in the bin."
else
if (src.amount == 1)
usr << "There is one bed sheet in the bin."
else
usr << text("There are [] bed sheets in the bin.", src.amount)
return
// PHOTOGRAPH
/obj/item/weapon/paper/photograph/New()
..()
src.pixel_y = 0
src.pixel_x = 0
usr << text("There is about [] square units of paper left!", src.amount)
return
/obj/item/weapon/paper/photograph/attack_self(mob/user as mob)
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
if (!istype(target, /mob/living/carbon/human)) return
var/mob/living/carbon/human/H = target
var/n_name = copytext(sanitize(input(user, "What would you like to label the photo?", "Paper Labelling", null) as text),1,32)
if ((src.loc == user && user.stat == 0))
src.name = text("photo[]", (n_name ? text("- '[]'", n_name) : null))
src.add_fingerprint(user)
return
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || H.stat)
if (src.amount > 2)
var/obj/effect/spresent/present = new /obj/effect/spresent (H.loc)
src.amount -= 2
if (H.client)
H.client.perspective = EYE_PERSPECTIVE
H.client.eye = present
H.loc = present
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to wrap [H.name] ([H.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to wrap [H.name] ([H.ckey])</font>")
else
user << "\blue You need more paper."
else
user << "Theyre moving around too much. a Straitjacket would help."
@@ -0,0 +1,76 @@
/obj/item/weapon/handcuffs/attack(mob/M as mob, mob/user as mob)
if(istype(src, /obj/item/weapon/handcuffs/cyborg) && isrobot(user))
if(!M.handcuffed)
var/turf/p_loc = user.loc
var/turf/p_loc_m = M.loc
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
for(var/mob/O in viewers(user, null))
O.show_message("\red <B>[user] is trying to put handcuffs on [M]!</B>", 1)
spawn(30)
if(!M) return
if(p_loc == user.loc && p_loc_m == M.loc)
M.handcuffed = new /obj/item/weapon/handcuffs(M)
M.update_inv_handcuffed()
else
if ((CLUMSY in usr.mutations) && prob(50))
usr << "\red Uh ... how do those things work?!"
if (istype(M, /mob/living/carbon/human))
if(!M.handcuffed)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = user
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = user.loc
O.place = "handcuff"
M.requests += O
spawn( 0 )
O.process()
return
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
return
if (istype(M, /mob/living/carbon/human))
if(!M.handcuffed)
M.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 [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Attempted to handcuff [M.name] ([M.ckey])</font>")
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
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 )
if(istype(src, /obj/item/weapon/handcuffs/cable))
feedback_add_details("handcuffs","C")
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
else
feedback_add_details("handcuffs","H")
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
O.process()
return
else
if(!M.handcuffed)
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 )
if(istype(src, /obj/item/weapon/handcuffs/cable))
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
else
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
O.process()
return
return
+48 -10
View File
@@ -1,22 +1,56 @@
/* Hydroponic stuff
* Contains:
* Plant Bags
* Sunflowers
* Nettle
* Deathnettle
* Corbcob
*/
/*
* Plant Bags
*/
/obj/item/weapon/plantbag
icon = 'icons/obj/hydroponics.dmi'
icon_state = "plantbag"
name = "Plant Bag"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of plant pieces it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
CONTAINS:
Plant-B-Gone
Nettle
Deathnettle
Craftables (Cob pipes, potato batteries, pumpkinheads)
/obj/item/weapon/plantbag/attack_self(mob/user as mob)
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/O in contents)
contents -= O
O.loc = user.loc
user << "\blue You empty the plant bag."
return
*/
/obj/item/weapon/plantbag/verb/toggle_mode()
set name = "Switch Bagging Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The bag now picks up all plants in a tile at once."
if(0)
usr << "The bag now picks up one plant at a time."
/*
* Sunflower
*/
// Sunflower
/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
M << "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
user << "<font color='green'> Your sunflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
// Nettle
/*
* Nettle
*/
/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
user << "\red The nettle burns your bare hand!"
@@ -39,8 +73,10 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
potency = newValue
force = round((5+potency/5), 1)
/*
* Deathnettle
*/
// Deathnettle
/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
if(istype(user, /mob/living/carbon/human))
@@ -82,7 +118,9 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
force = round((5+potency/2.5), 1)
//Crafting
/*
* Corncob
*/
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife))
+25 -27
View File
@@ -1,10 +1,10 @@
/*
CONTAINS:
FORK
ROLLING PIN
KNIFE
*/
/* Kitchen tools
* Contains:
* Forks
* Knives
* Rolling Pins
* Trays
*/
/obj/item/weapon/kitchen/utensil/New()
@@ -15,8 +15,9 @@ KNIFE
// FORK
/*
* Forks
*/
/obj/item/weapon/kitchen/utensil/fork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
@@ -41,10 +42,19 @@ KNIFE
M = user
return eyestab(M,user)
/*
* Knives
*/
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with the [src]."
user.take_organ_damage(20)
return
return ..()
// ROLLING PIN
/*
* Rolling Pins
*/
/obj/item/weapon/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
@@ -80,21 +90,9 @@ KNIFE
return
// KNIFE
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with the [src]."
user.take_organ_damage(20)
return
return ..()
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// TRAY -Agouri :3 ///////////////////////////////////////////////
/*
* Trays - Agouri
*/
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
// Drop all the things. All of them.
@@ -1,37 +1,13 @@
/obj/item/weapon/storage/photo_album
name = "Photo album"
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return
/obj/item/weapon/storage/photo_album/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
/* Photography!
* Contains:
* Camera
* Photos
* Photo Albums
*/
/*
* Camera
*/
/obj/item/weapon/camera_test
name = "camera"
icon = 'icons/obj/items.dmi'
@@ -160,3 +136,59 @@
can_use = 0
spawn(50) can_use = 1
/*
* Photos
*/
/obj/item/weapon/paper/photograph/New()
..()
src.pixel_y = 0
src.pixel_x = 0
return
/obj/item/weapon/paper/photograph/attack_self(mob/user as mob)
var/n_name = copytext(sanitize(input(user, "What would you like to label the photo?", "Paper Labelling", null) as text),1,32)
if ((src.loc == user && user.stat == 0))
src.name = text("photo[]", (n_name ? text("- '[]'", n_name) : null))
src.add_fingerprint(user)
return
/*
* Photo Albums
*/
/obj/item/weapon/storage/photo_album
name = "Photo album"
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return
/obj/item/weapon/storage/photo_album/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -1,176 +0,0 @@
/**********************Plant Bag**************************/
/obj/item/weapon/plantbag
icon = 'icons/obj/hydroponics.dmi'
icon_state = "plantbag"
name = "Plant Bag"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of plant pieces it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
/obj/item/weapon/plantbag/attack_self(mob/user as mob)
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/O in contents)
contents -= O
O.loc = user.loc
user << "\blue You empty the plant bag."
return
/obj/item/weapon/plantbag/verb/toggle_mode()
set name = "Switch Bagging Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The bag now picks up all plants in a tile at once."
if(0)
usr << "The bag now picks up one plant at a time."
/obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if (istype(O, /obj/item/weapon/plantbag))
src.attack_hand(user)
var/obj/item/weapon/plantbag/S = O
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
if (S.contents.len < S.capacity)
S.contents += G;
else
user << "\blue The plant bag is full."
return
/* SmartFridge. Much todo
*/
/obj/machinery/smartfridge
name = "\improper SmartFridge"
icon = 'icons/obj/vending.dmi'
icon_state = "smartfridge"
layer = 2.9
density = 1
anchored = 1
use_power = 1
idle_power_usage = 5
active_power_usage = 100
flags = NOREACT
var/global/max_n_of_items = 200
var/item_quants = list()
var/ispowered = 1 //starts powered
var/isbroken = 0
/obj/machinery/smartfridge/power_change()
if( powered() )
src.ispowered = 1
stat &= ~NOPOWER
if(!isbroken)
icon_state = "smartfridge"
else
spawn(rand(0, 15))
src.ispowered = 0
stat |= NOPOWER
if(!isbroken)
icon_state = "smartfridge-off"
/*******************
* Item Adding
********************/
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(!src.ispowered)
user << "<span class='notice'>\The [src] is unpowered and useless.</span>"
return
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/))
if(contents.len >= max_n_of_items)
user << "<span class='notice'>\The [src] is full.</span>"
return 1
else
user.before_take_item(O)
O.loc = src
if(item_quants[O.name])
item_quants[O.name]++
else
item_quants[O.name] = 1
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].", \
"<span class='notice'>You add \the [O] to \the [src].")
else if(istype(O, /obj/item/weapon/plantbag))
user.visible_message("<span class='notice'>[user] loads \the [src] with \the [O].</span>", \
"<span class='notice'>You load \the [src] with \the [O].</span>")
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
if(contents.len >= max_n_of_items)
user << "<span class='notice'>\The [src] is full.</span>"
return 1
else
O.contents -= G
G.loc = src
if(item_quants[G.name])
item_quants[G.name]++
else
item_quants[G.name] = 1
else
user << "<span class='notice'>\The [src] smartly refuses [O].</span>"
return 1
updateUsrDialog()
/obj/machinery/smartfridge/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
return 0
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
user.machine = src
interact(user)
/*******************
* SmartFridge Menu
********************/
/obj/machinery/smartfridge/proc/interact(mob/user as mob)
if(!src.ispowered)
return
var/dat = "<TT><b>Select an item:</b><br>"
if (contents.len == 0)
dat += "<font color = 'red'>No product loaded!</font>"
else
for (var/O in item_quants)
if(item_quants[O] > 0)
var/N = item_quants[O]
dat += "<FONT color = 'blue'><B>[capitalize(O)]</B>:"
dat += " [N] </font>"
dat += "<a href='byond://?src=\ref[src];vend=[O]'>Vend</A>"
dat += "<br>"
dat += "</TT>"
user << browse("<HEAD><TITLE>SmartFridge Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=smartfridge")
onclose(user, "smartfridge")
return
/obj/machinery/smartfridge/Topic(href, href_list)
if(..())
return
usr.machine = src
var/N = href_list["vend"]
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
return
item_quants[N] -= 1
for(var/obj/O in contents)
if(O.name == N)
O.loc = src.loc
break
src.updateUsrDialog()
return
@@ -0,0 +1,32 @@
/obj/item/weapon/teleportation_scroll/attack_self(mob/user as mob)
user.machine = src
var/dat = "<B>Teleportation Scroll:</B><BR>"
dat += "Number of uses: [src.uses]<BR>"
dat += "<HR>"
dat += "<B>Four uses use them wisely:</B><BR>"
dat += "<A href='byond://?src=\ref[src];spell_teleport=1'>Teleport</A><BR>"
dat += "Kind regards,<br>Wizards Federation<br><br>P.S. Don't forget to bring your gear, you'll need it to cast most spells.<HR>"
user << browse(dat, "window=scroll")
onclose(user, "scroll")
return
/obj/item/weapon/teleportation_scroll/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
var/mob/living/carbon/human/H = usr
if (!( istype(H, /mob/living/carbon/human)))
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
if (href_list["spell_teleport"])
if (src.uses >= 1)
src.uses -= 1
usr.teleportscroll()
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
return
-197
View File
@@ -1,197 +0,0 @@
/obj/item/weapon/reagent_containers/spray
name = "spray bottle"
desc = "A spray bottle, with an unscrewable top."
icon = 'icons/obj/janitor.dmi'
icon_state = "cleaner"
item_state = "cleaner"
flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
slot_flags = SLOT_BELT
throwforce = 3
w_class = 2.0
throw_speed = 2
throw_range = 10
amount_per_transfer_from_this = 5
volume = 250
possible_transfer_amounts = null
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob)
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink))
return
if(istype(A, /obj/effect/proc_holder/spell))
return
if(istype(A, /obj/structure/reagent_dispensers)) //this block copypasted from reagent_containers/glass, for lack of a better solution
if(!A.reagents.total_volume && A.reagents)
user << "<span class='notice'>\The [A] is empty.</span>"
return
if(reagents.total_volume >= reagents.maximum_volume)
user << "<span class='notice'>\The [src] is full.</span>"
return
var/trans = A.reagents.trans_to(src, A:amount_per_transfer_from_this)
user << "<span class='notice'>You fill \the [src] with [trans] units of the contents of \the [A].</span>"
return
if(reagents.total_volume < amount_per_transfer_from_this)
user << "<span class='notice'>\The [src] is empty!</span>"
return
var/obj/effect/decal/D = new/obj/effect/decal(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this)
D.name = "chemicals"
D.icon = 'icons/obj/chempuff.dmi'
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
spawn(0)
for(var/i=0, i<3, i++)
step_towards(D,A)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
sleep(3)
del(D)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
if(reagents.has_reagent("sacid"))
message_admins("[key_name_admin(user)] fired sulphuric acid from a spray bottle.")
log_game("[key_name(user)] fired sulphuric acid from a spray bottle.")
if(reagents.has_reagent("pacid"))
message_admins("[key_name_admin(user)] fired Polyacid from a spray bottle.")
log_game("[key_name(user)] fired Polyacid from a spray bottle.")
if(reagents.has_reagent("lube"))
message_admins("[key_name_admin(user)] fired Space lube from a spray bottle.")
log_game("[key_name(user)] fired Space lube from a spray bottle.")
return
/obj/item/weapon/reagent_containers/spray/examine()
set src in usr
..()
for(var/datum/reagent/R in reagents.reagent_list)
usr << "[round(R.volume)] units of [R.name] left."
return
//space cleaner
/obj/item/weapon/reagent_containers/spray/cleaner
name = "space cleaner"
desc = "BLAM!-brand non-foaming space cleaner!"
/obj/item/weapon/reagent_containers/spray/cleaner/New()
..()
reagents.add_reagent("cleaner", 250)
//pepperspray
/obj/item/weapon/reagent_containers/spray/pepper
name = "pepperspray"
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
icon = 'icons/obj/weapons.dmi'
icon_state = "pepperspray"
item_state = "pepperspray"
volume = 40
amount_per_transfer_from_this = 10
/obj/item/weapon/reagent_containers/spray/pepper/New()
..()
reagents.add_reagent("condensedcapsaicin", 40)
//chemsprayer
/obj/item/weapon/reagent_containers/spray/chemsprayer
name = "chem sprayer"
desc = "A utility used to spray large amounts of reagent in a given area."
icon = 'icons/obj/gun.dmi'
icon_state = "chemsprayer"
item_state = "chemsprayer"
throwforce = 3
w_class = 3.0
volume = 600
origin_tech = "combat=3;materials=3;engineering=3"
//this is a big copypasta clusterfuck, but it's still better than it used to be!
/obj/item/weapon/reagent_containers/spray/chemsprayer/afterattack(atom/A as mob|obj, mob/user as mob)
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink))
return
if(istype(A, /obj/effect/proc_holder/spell))
return
if(istype(A, /obj/structure/reagent_dispensers)) //this block copypasted from reagent_containers/glass, for lack of a better solution
if(!A.reagents.total_volume && A.reagents)
user << "<span class='notice'>\The [A] is empty.</span>"
return
if(reagents.total_volume >= reagents.maximum_volume)
user << "<span class='notice'>\The [src] is full.</span>"
return
var/trans = A.reagents.trans_to(src, A:amount_per_transfer_from_this)
user << "<span class='notice'>You fill \the [src] with [trans] units of the contents of \the [A].</span>"
return
if(reagents.total_volume < amount_per_transfer_from_this)
user << "<span class='notice'>\The [src] is empty!</span>"
return
var/Sprays[3]
for(var/i=1, i<=3, i++) // intialize sprays
if(src.reagents.total_volume < 1) break
var/obj/effect/decal/D = new/obj/effect/decal(get_turf(src))
D.name = "chemicals"
D.icon = 'icons/obj/chempuff.dmi'
D.create_reagents(amount_per_transfer_from_this)
src.reagents.trans_to(D, amount_per_transfer_from_this)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
Sprays[i] = D
var/direction = get_dir(src, A)
var/turf/T = get_turf(A)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
for(var/i=1, i<=Sprays.len, i++)
spawn()
var/obj/effect/decal/D = Sprays[i]
if(!D) continue
// Spreads the sprays a little bit
var/turf/my_target = pick(the_targets)
the_targets -= my_target
for(var/j=1, j<=rand(6,8), j++)
step_towards(D, my_target)
D.reagents.reaction(get_turf(D))
for(var/atom/t in get_turf(D))
D.reagents.reaction(t)
sleep(2)
del(D)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
if(reagents.has_reagent("sacid"))
message_admins("[key_name_admin(user)] fired sulphuric acid from a chem sprayer.")
log_game("[key_name(user)] fired sulphuric acid from a chem sprayer.")
if(reagents.has_reagent("pacid"))
message_admins("[key_name_admin(user)] fired Polyacid from a chem sprayer.")
log_game("[key_name(user)] fired Polyacid from a chem sprayer.")
if(reagents.has_reagent("lube"))
message_admins("[key_name_admin(user)] fired Space lube from a chem sprayer.")
log_game("[key_name(user)] fired Space lube from a chem sprayer.")
return
//looking for plant-b-gone? it's in code/game/objects/items/weapons/hydroponics.dm
@@ -3,6 +3,7 @@
* Monkey Cube Box
* Candle Packs
* Snap Pop Box
* Crayon Box
*/
/*
@@ -69,4 +70,35 @@
W.icon_state = "match_lit"
processing_objects.Add(W)
W.update_icon()
return
return
/*
* Crayon Box
*/
/obj/item/weapon/storage/crayonbox/New()
..()
new /obj/item/toy/crayon/red(src)
new /obj/item/toy/crayon/orange(src)
new /obj/item/toy/crayon/yellow(src)
new /obj/item/toy/crayon/green(src)
new /obj/item/toy/crayon/blue(src)
new /obj/item/toy/crayon/purple(src)
update_icon()
/obj/item/weapon/storage/crayonbox/update_icon()
overlays = list() //resets list
overlays += image('icons/obj/crayons.dmi',"crayonbox")
for(var/obj/item/toy/crayon/crayon in contents)
overlays += image('icons/obj/crayons.dmi',crayon.colourName)
/obj/item/weapon/storage/crayonbox/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/toy/crayon))
switch(W:colourName)
if("mime")
usr << "This crayon is too sad to be contained in this box."
return
if("rainbow")
usr << "This crayon is too powerful to be contained in this box."
return
..()
@@ -1,54 +0,0 @@
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
if(istype(src, /obj/item/clothing/gloves/boxing)) //quick fix for stunglove overlay not working nicely with boxing gloves.
user << "<span class='notice'>That won't work.</span>" //i'm not putting my lips on that!
..()
return
if(istype(W, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/C = W
if(!wired)
if(C.amount >= 2)
C.amount -= 2
wired = 1
siemens_coefficient = 1
user << "<span class='notice'>You wrap some wires around [src].</span>"
update_icon()
else
user << "<span class='notice'>There is not enough wire to cover [src].</span>"
else
user << "<span class='notice'>[src] are already wired.</span>"
else if(istype(W, /obj/item/weapon/cell))
if(!wired)
user << "<span class='notice'>[src] need to be wired first.</span>"
else if(!cell)
user.drop_item()
W.loc = src
cell = W
user << "<span class='notice'>You attach a cell to [src].</span>"
update_icon()
else
user << "<span class='notice'>[src] already have a cell.</span>"
else if(istype(W, /obj/item/weapon/wirecutters))
if(cell)
cell.updateicon()
cell.loc = get_turf(src.loc)
cell = null
user << "<span class='notice'>You cut the cell away from [src].</span>"
update_icon()
return
if(wired) //wires disappear into the void because fuck that shit
wired = 0
siemens_coefficient = initial(siemens_coefficient)
user << "<span class='notice'>You cut the wires away from [src].</span>"
update_icon()
..()
return
/obj/item/clothing/gloves/update_icon()
..()
overlays = null
if(wired)
overlays += "gloves_wire"
if(cell)
overlays += "gloves_cell"
@@ -1,17 +1,16 @@
/* Surgery Tools
* Contains:
* Retractor
* Hemostat
* Cautery
* Surgical Drill - MIA!
* Scalpel
* Circular Saw
*/
/*
CONTAINS:
RETRACTOR
HEMOSTAT
CAUTERY
SURGICAL DRILL
SCALPEL
CIRCULAR SAW
*/
/////////////
//RETRACTOR//
/////////////
* Retractor
*/
/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
@@ -82,10 +81,9 @@ CIRCULAR SAW
return
////////////
//Hemostat//
////////////
/*
* Hemostat
*/
/obj/item/weapon/hemostat/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
@@ -168,10 +166,9 @@ CIRCULAR SAW
return
///////////
//Cautery//
///////////
/*
* Cautery
*/
/obj/item/weapon/cautery/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
@@ -246,13 +243,15 @@ CIRCULAR SAW
return
/*
* Surgical Drill
*/
//obj/item/weapon/surgicaldrill
///////////
//SCALPEL//
///////////
/*
* Scalpel
*/
/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
@@ -452,9 +451,9 @@ CIRCULAR SAW
return
////////////////
//CIRCULAR SAW//
////////////////
/*
* Circular Saw
*/
/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
@@ -1,19 +1,23 @@
/*
CONTAINS:
BANHAMMER
SWORD
BLADE
AXE
CLASSIC BATON
ENERGY SHIELD (where else should i even put this)
*/
/* Weapons
* Contains:
* Banhammer
* Sword
* Classic Baton
* Energy Blade
* Energy Axe
* Energy Shield
*/
//BANHAMMER
/*
* Banhammer
*/
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
// SWORD
/*
* Sword
*/
/obj/item/weapon/melee/energy/sword/IsShield()
if(active)
return 1
@@ -51,52 +55,9 @@ ENERGY SHIELD (where else should i even put this)
add_fingerprint(user)
return
/obj/item/weapon/melee/energy/sword/green
New()
color = "green"
/obj/item/weapon/melee/energy/sword/red
New()
color = "red"
// BLADE
//Most of the other special functions are handled in their own files.
/obj/item/weapon/melee/energy/blade/New()
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
return
/obj/item/weapon/melee/energy/blade/dropped()
del(src)
return
/obj/item/weapon/melee/energy/blade/proc/throw()
del(src)
return
// AXE
/obj/item/weapon/melee/energy/axe/attack(target as mob, mob/user as mob)
..()
/obj/item/weapon/melee/energy/axe/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The axe is now energised."
src.force = 150
src.icon_state = "axe1"
src.w_class = 5
else
user << "\blue The axe can now be concealed."
src.force = 40
src.icon_state = "axe0"
src.w_class = 5
src.add_fingerprint(user)
return
// CLASSIC BATON
/*
* Classic Baton
*/
/obj/item/weapon/melee/classic_baton
name = "police baton"
desc = "A wooden truncheon for beating criminal scum."
@@ -141,7 +102,58 @@ ENERGY SHIELD (where else should i even put this)
for(var/mob/O in viewers(M))
if (O.client) O.show_message("\red <B>[M] has been stunned with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
//ENERGY SHIELD
/*
*Energy Blade
*/
//Most of the other special functions are handled in their own files.
/obj/item/weapon/melee/energy/sword/green
New()
color = "green"
/obj/item/weapon/melee/energy/sword/red
New()
color = "red"
/obj/item/weapon/melee/energy/blade/New()
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
return
/obj/item/weapon/melee/energy/blade/dropped()
del(src)
return
/obj/item/weapon/melee/energy/blade/proc/throw()
del(src)
return
/*
* Energy Axe
*/
/obj/item/weapon/melee/energy/axe/attack(target as mob, mob/user as mob)
..()
/obj/item/weapon/melee/energy/axe/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The axe is now energised."
src.force = 150
src.icon_state = "axe1"
src.w_class = 5
else
user << "\blue The axe can now be concealed."
src.force = 40
src.icon_state = "axe0"
src.w_class = 5
src.add_fingerprint(user)
return
/*
* Energy Shield
*/
/obj/item/weapon/shield/energy/IsShield()
if(active)
return 1
@@ -1,15 +1,16 @@
/* Table parts and rack parts
* Contains:
* Table Parts
* Reinforced Table Parts
* Wooden Table Parts
* Rack Parts
*/
/*
CONTAINS:
TABLE PARTS
REINFORCED TABLE PARTS
WOODEN TABLE PARTS
RACK PARTS
*/
// TABLE PARTS
* Table Parts
*/
/obj/item/weapon/table_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
@@ -31,20 +32,10 @@ RACK PARTS
del(src)
return
// WOODEN TABLE PARTS
/obj/item/weapon/table_parts/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/wood( src.loc )
del(src)
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
new /obj/structure/table/woodentable( user.loc )
user.drop_item()
del(src)
return
// REINFORCED TABLE PARTS
/*
* Reinforced Table Parts
*/
/obj/item/weapon/table_parts/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( src.loc )
@@ -57,11 +48,23 @@ RACK PARTS
del(src)
return
/*
* Wooden Table Parts
*/
/obj/item/weapon/table_parts/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/wood( src.loc )
del(src)
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
new /obj/structure/table/woodentable( user.loc )
user.drop_item()
del(src)
return
// RACK PARTS
/*
* Rack Parts
*/
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
@@ -4,6 +4,7 @@
* Anesthetic
* Air
* Plasma
* Emergency Oxygen
*/
/*
@@ -149,3 +150,41 @@
user.before_take_item(src)
src.loc = F
return
/*
* Emergency Oxygen
*/
/obj/item/weapon/tank/emergency_oxygen
name = "emergency oxygen tank"
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
icon_state = "emergency"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0
force = 4.0
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
examine()
set src in usr
..()
if(air_contents.oxygen < 0.2 && loc==usr)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/emergency_oxygen/engi
icon_state = "emergency_engi"
name = "extended-capacity emergency oxygen tank"
volume = 6
/obj/item/weapon/tank/emergency_oxygen/double
icon_state = "emergency_double"
name = "Double Emergency Oxygen Tank"
volume = 10

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