mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
More file structure stuff!
Cleaned up the files themselves. Everything in code/game/objects should now be in proper files or places with the exception of the files in the /weapons/ sub-folder. There's two instances of me not following the exact file structure. - /obj/item/brain has been moved to a file in mob/living/carbon/brain - /obj/item/clothing/mask/facehugger has been moved into mob/living/carbon/alien/special Both of these may not make sense according to the object structure, but they do make sense logically. If it's a problem just move them. Next up: Finish the files in the weapon folder, then start moving defines down. My god I hope I havent broken everything. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4547 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -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)
|
||||
@@ -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
|
||||
@@ -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)
|
||||
..()
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
@@ -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."
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
@@ -1,29 +1,3 @@
|
||||
/*/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."
|
||||
|
||||
@@ -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
|
||||
@@ -1,392 +0,0 @@
|
||||
|
||||
/obj/item/proc/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/proc/talk_into(mob/M as mob, text)
|
||||
return
|
||||
|
||||
/obj/item/proc/moved(mob/user as mob, old_loc as turf)
|
||||
return
|
||||
|
||||
/obj/item/proc/dropped(mob/user as mob)
|
||||
..()
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
return
|
||||
|
||||
// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
|
||||
/obj/item/proc/on_exit_storage(obj/item/weapon/storage/S as obj)
|
||||
return
|
||||
|
||||
// called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
|
||||
/obj/item/proc/on_enter_storage(obj/item/weapon/storage/S as obj)
|
||||
return
|
||||
|
||||
// called after an item is placed in an equipment slot
|
||||
// user is mob that equipped it
|
||||
// slot uses the slot_X defines found in setup.dm
|
||||
// for items that can be placed in multiple slots
|
||||
// note this isn't called during the initial dressing of a player
|
||||
/obj/item/proc/equipped(var/mob/user, var/slot)
|
||||
return
|
||||
|
||||
/obj/item/proc/afterattack()
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/dummy/ex_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/dummy/blob_act()
|
||||
return
|
||||
|
||||
/obj/item/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/item/blob_act()
|
||||
return
|
||||
|
||||
/obj/item/verb/move_to_top()
|
||||
set name = "Move To Top"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!istype(src.loc, /turf) || usr.stat || usr.restrained() )
|
||||
return
|
||||
|
||||
var/turf/T = src.loc
|
||||
|
||||
src.loc = null
|
||||
|
||||
src.loc = T
|
||||
|
||||
/obj/item/examine()
|
||||
set src in view()
|
||||
|
||||
var/t
|
||||
switch(src.w_class)
|
||||
if(1.0)
|
||||
t = "tiny"
|
||||
if(2.0)
|
||||
t = "small"
|
||||
if(3.0)
|
||||
t = "normal-sized"
|
||||
if(4.0)
|
||||
t = "bulky"
|
||||
if(5.0)
|
||||
t = "huge"
|
||||
else
|
||||
if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking"
|
||||
usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t)
|
||||
if(src.desc)
|
||||
usr << src.desc
|
||||
return
|
||||
|
||||
/obj/item/attack_hand(mob/user as mob)
|
||||
if (!user) return
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = src.loc
|
||||
S.remove_from_storage(src)
|
||||
|
||||
src.throwing = 0
|
||||
if (src.loc == user)
|
||||
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
|
||||
if(!src.canremove)
|
||||
return
|
||||
else
|
||||
user.u_equip(src)
|
||||
else
|
||||
if(isliving(src.loc))
|
||||
return
|
||||
src.pickup(user)
|
||||
user.lastDblClick = world.time + 2
|
||||
user.next_move = world.time + 2
|
||||
add_fingerprint(user)
|
||||
user.put_in_active_hand(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/attack_paw(mob/user as mob)
|
||||
|
||||
if(isalien(user)) // -- TLE
|
||||
var/mob/living/carbon/alien/A = user
|
||||
|
||||
if(!A.has_fine_manipulation || w_class >= 4)
|
||||
if(src in A.contents) // To stop Aliens having items stuck in their pockets
|
||||
A.drop_from_inventory(src)
|
||||
user << "Your claws aren't capable of such fine manipulation."
|
||||
return
|
||||
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
for(var/mob/M in range(1, src.loc))
|
||||
if (M.s_active == src.loc)
|
||||
if (M.client)
|
||||
M.client.screen -= src
|
||||
src.throwing = 0
|
||||
if (src.loc == user)
|
||||
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
|
||||
if(istype(src, /obj/item/clothing) && !src:canremove)
|
||||
return
|
||||
else
|
||||
user.u_equip(src)
|
||||
else
|
||||
if(istype(src.loc, /mob/living))
|
||||
return
|
||||
src.pickup(user)
|
||||
user.lastDblClick = world.time + 2
|
||||
user.next_move = world.time + 2
|
||||
|
||||
user.put_in_active_hand(src)
|
||||
return
|
||||
|
||||
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = W
|
||||
if(S.use_to_pickup)
|
||||
if(!S.can_be_inserted(src))
|
||||
return
|
||||
if(S.collection_mode) //Mode is set to collect all items on a tile and we clicked on a valid one.
|
||||
if(isturf(src.loc))
|
||||
for(var/obj/item/I in src.loc)
|
||||
if(I != src) //We'll do the one we clicked on last.
|
||||
if(!S.can_be_inserted(src))
|
||||
continue
|
||||
S.handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
|
||||
S.handle_item_insertion(src)
|
||||
|
||||
|
||||
return
|
||||
|
||||
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
|
||||
if (!istype(M)) // not sure if this is the right thing...
|
||||
return
|
||||
var/messagesource = M
|
||||
|
||||
if (istype(M,/mob/living/carbon/brain))
|
||||
messagesource = M:container
|
||||
if (src.hitsound)
|
||||
playsound(src.loc, hitsound, 50, 1, -1)
|
||||
/////////////////////////
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
|
||||
|
||||
//spawn(1800) // this wont work right
|
||||
// M.lastattacker = null
|
||||
/////////////////////////
|
||||
|
||||
var/power = src.force
|
||||
if((HULK in user.mutations) || (SUPRSTR in user.augmentations))
|
||||
power *= 2
|
||||
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
if(istype(M, /mob/living/carbon/metroid))
|
||||
var/mob/living/carbon/metroid/Metroid = M
|
||||
if(prob(25))
|
||||
user << "\red [src] passes right through [M]!"
|
||||
return
|
||||
|
||||
if(power > 0)
|
||||
Metroid.attacked += 10
|
||||
|
||||
if(Metroid.Discipline && prob(50)) // wow, buddy, why am I getting attacked??
|
||||
Metroid.Discipline = 0
|
||||
|
||||
if(power >= 3)
|
||||
if(istype(Metroid, /mob/living/carbon/metroid/adult))
|
||||
if(prob(5 + round(power/2)))
|
||||
|
||||
if(Metroid.Victim)
|
||||
if(prob(80) && !Metroid.client)
|
||||
Metroid.Discipline++
|
||||
Metroid.Victim = null
|
||||
Metroid.anchored = 0
|
||||
|
||||
spawn()
|
||||
if(Metroid)
|
||||
Metroid.SStun = 1
|
||||
sleep(rand(5,20))
|
||||
if(Metroid)
|
||||
Metroid.SStun = 0
|
||||
|
||||
spawn(0)
|
||||
if(Metroid)
|
||||
Metroid.canmove = 0
|
||||
step_away(Metroid, user)
|
||||
if(prob(25 + power))
|
||||
sleep(2)
|
||||
if(Metroid && user)
|
||||
step_away(Metroid, user)
|
||||
Metroid.canmove = 1
|
||||
|
||||
else
|
||||
if(prob(10 + power*2))
|
||||
if(Metroid)
|
||||
if(Metroid.Victim)
|
||||
if(prob(80) && !Metroid.client)
|
||||
Metroid.Discipline++
|
||||
|
||||
if(Metroid.Discipline == 1)
|
||||
Metroid.attacked = 0
|
||||
|
||||
spawn()
|
||||
if(Metroid)
|
||||
Metroid.SStun = 1
|
||||
sleep(rand(5,20))
|
||||
if(Metroid)
|
||||
Metroid.SStun = 0
|
||||
|
||||
Metroid.Victim = null
|
||||
Metroid.anchored = 0
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(Metroid && user)
|
||||
step_away(Metroid, user)
|
||||
Metroid.canmove = 0
|
||||
if(prob(25 + power*4))
|
||||
sleep(2)
|
||||
if(Metroid && user)
|
||||
step_away(Metroid, user)
|
||||
Metroid.canmove = 1
|
||||
|
||||
|
||||
var/showname = "."
|
||||
if(user)
|
||||
showname = " by [user]."
|
||||
if(!(user in viewers(M, null)))
|
||||
showname = "."
|
||||
|
||||
for(var/mob/O in viewers(messagesource, null))
|
||||
if(src.attack_verb.len)
|
||||
O.show_message("\red <B>[M] has been [pick(src.attack_verb)] with [src][showname] </B>", 1)
|
||||
else
|
||||
O.show_message("\red <B>[M] has been attacked with [src][showname] </B>", 1)
|
||||
|
||||
if(!showname && user)
|
||||
if(user.client)
|
||||
user << "\red <B>You attack [M] with [src]. </B>"
|
||||
|
||||
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
M:attacked_by(src, user, def_zone)
|
||||
else
|
||||
switch(src.damtype)
|
||||
if("brute")
|
||||
if(istype(src, /mob/living/carbon/metroid))
|
||||
M.adjustBrainLoss(power)
|
||||
|
||||
else
|
||||
|
||||
M.take_organ_damage(power)
|
||||
if (prob(33)) // Added blood for whacking non-humans too
|
||||
var/turf/location = M.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood_floor(M)
|
||||
if("fire")
|
||||
if (!(COLD_RESISTANCE in M.mutations))
|
||||
M.take_organ_damage(0, power)
|
||||
M << "Aargh it burns!"
|
||||
M.updatehealth()
|
||||
src.add_fingerprint(user)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/proc/IsShield()
|
||||
return 0
|
||||
|
||||
/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && ( \
|
||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
||||
))
|
||||
// you can't stab someone in the eyes wearing a mask!
|
||||
user << "\red You're going to need to remove that mask/helmet/glasses 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 that mask/helmet/glasses first."
|
||||
return
|
||||
|
||||
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N Metroids also don't have eyes!
|
||||
user << "\red You cannot locate any eyes on this creature!"
|
||||
return
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
|
||||
log_attack("<font color='red'> [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
//if((CLUMSY in user.mutations) && prob(50))
|
||||
// M = user
|
||||
/*
|
||||
M << "\red You stab yourself in the eye."
|
||||
M.sdisabilities |= BLIND
|
||||
M.weakened += 4
|
||||
M.adjustBruteLoss(10)
|
||||
*/
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
O.show_message("\red [M] has been stabbed in the eye with [src] by [user].", 1)
|
||||
M << "\red [user] stabs you in the eye with [src]!"
|
||||
user << "\red You stab [M] in the eye with [src]!"
|
||||
else
|
||||
user.visible_message( \
|
||||
"\red [user] has stabbed themself with [src]!", \
|
||||
"\red You stab yourself in the eyes with [src]!" \
|
||||
)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(7))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
M.eye_blurry += rand(3,4)
|
||||
M.eye_stat += rand(2,4)
|
||||
if (M.eye_stat >= 10)
|
||||
M.eye_blurry += 15+(0.1*M.eye_blurry)
|
||||
M.disabilities |= NEARSIGHTED
|
||||
if(M.stat != 2)
|
||||
M << "\red Your eyes start to bleed profusely!"
|
||||
if(prob(50))
|
||||
if(M.stat != 2)
|
||||
M << "\red You drop what you're holding and clutch at your eyes!"
|
||||
M.drop_item()
|
||||
M.eye_blurry += 10
|
||||
M.Paralyse(1)
|
||||
M.Weaken(4)
|
||||
if (prob(M.eye_stat - 10 + 1))
|
||||
if(M.stat != 2)
|
||||
M << "\red You go blind!"
|
||||
M.sdisabilities |= BLIND
|
||||
return
|
||||
|
||||
|
||||
@@ -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()
|
||||
@@ -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,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'
|
||||
@@ -48,80 +51,4 @@
|
||||
icon_state = "candle4"
|
||||
|
||||
/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
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE
|
||||
var/temp_sides
|
||||
if(src.sides < 1)
|
||||
temp_sides = 2
|
||||
else
|
||||
temp_sides = src.sides
|
||||
var/result = rand(1,temp_sides)
|
||||
var/comment = ""
|
||||
if(temp_sides == 20 && result == 20)
|
||||
comment = "Nat 20!"
|
||||
else if(temp_sides == 20 && result == 1)
|
||||
comment = "Ouch, bad luck."
|
||||
user << text("\red You throw a [src]. It lands on a [result]. [comment]")
|
||||
icon_state = "[name][result]"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(O == (user))
|
||||
continue
|
||||
else
|
||||
O.show_message(text("\red [user] has thrown a [src]. It lands on [result]. [comment]"), 1)
|
||||
@@ -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 = "mini_FE"
|
||||
|
||||
/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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,75 @@
|
||||
/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."
|
||||
@@ -1,26 +1,4 @@
|
||||
//TODO: Move these into atom_procs.dm after carn's finished with it, otherwise it'll conflict - Nodrak
|
||||
|
||||
/atom/proc/ex_act()
|
||||
return
|
||||
|
||||
/atom/proc/blob_act()
|
||||
return
|
||||
|
||||
// bullet_act called when anything is hit buy a projectile (bullet, tazer shot, laser, etc.)
|
||||
// flag is projectile type, can be:
|
||||
//PROJECTILE_TASER = 1 taser gun
|
||||
//PROJECTILE_LASER = 2 laser gun
|
||||
//PROJECTILE_BULLET = 3 traitor pistol
|
||||
//PROJECTILE_PULSE = 4 pulse rifle
|
||||
//PROJECTILE_BOLT = 5 crossbow
|
||||
//PROJECTILE_WEAKBULLET = 6 detective's revolver
|
||||
|
||||
/turf/Entered(atom/A as mob|obj)
|
||||
..()
|
||||
if ((A && A.density && !( istype(A, /obj/effect/beam) )))
|
||||
for(var/obj/effect/beam/i_beam/I in src)
|
||||
spawn( 0 )
|
||||
if (I)
|
||||
I.hit()
|
||||
return
|
||||
/obj/item/weapon/Bump(mob/M as mob)
|
||||
spawn(0)
|
||||
..()
|
||||
return
|
||||
Reference in New Issue
Block a user