mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +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:
@@ -0,0 +1,56 @@
|
||||
/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
|
||||
@@ -0,0 +1,258 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
//TODO: Make these simple_animals
|
||||
|
||||
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)
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,61 @@
|
||||
/obj/item/brain/examine() // -- TLE
|
||||
set src in oview(12)
|
||||
if (!( usr ))
|
||||
return
|
||||
usr << "This is \icon[src] \an [name]."
|
||||
|
||||
if(brainmob)//if thar be a brain inside... the brain.
|
||||
usr << "You can feel the small spark of life still left in this one."
|
||||
else
|
||||
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later. Probably not."
|
||||
|
||||
/obj/item/brain/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(!(user.zone_sel.selecting == ("head")) || !istype(M, /mob/living/carbon/human))
|
||||
return ..()
|
||||
|
||||
if( !(locate(/obj/machinery/optable, M.loc) && M.resting) && ( !(locate(/obj/structure/table/, M.loc) && M.lying) && prob(50) ) )
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(M, /mob/living/carbon/human) && ((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 << "\blue You're going to need to remove their head cover first."
|
||||
return
|
||||
|
||||
//since these people will be dead M != usr
|
||||
|
||||
if(M:brain_op_stage == 4.0)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if(O == (user || M))
|
||||
continue
|
||||
if(M == user)
|
||||
O.show_message(text("\red [user] inserts [src] into his head!"), 1)
|
||||
else
|
||||
O.show_message(text("\red [M] has [src] inserted into his head by [user]."), 1)
|
||||
|
||||
if(M != user)
|
||||
M << "\red [user] inserts [src] into your head!"
|
||||
user << "\red You insert [src] into [M]'s head!"
|
||||
else
|
||||
user << "\red You insert [src] into your head!"
|
||||
|
||||
//this might actually be outdated since barring badminnery, a debrain'd body will have any client sucked out to the brain's internal mob. Leaving it anyway to be safe. --NEO
|
||||
if(M.key)//Revised. /N
|
||||
M.ghostize()
|
||||
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.transfer_to(M)
|
||||
else
|
||||
M.key = brainmob.key
|
||||
|
||||
M:brain_op_stage = 3.0
|
||||
|
||||
del(src)
|
||||
else
|
||||
..()
|
||||
return
|
||||
+27
-25
@@ -26,9 +26,6 @@
|
||||
|
||||
usr.show_message(t, 1)
|
||||
|
||||
/atom/proc/relaymove()
|
||||
return
|
||||
|
||||
/mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||
if(!client) return
|
||||
if (type)
|
||||
@@ -75,6 +72,33 @@
|
||||
M.show_message( message, 1, blind_message, 2)
|
||||
|
||||
|
||||
//What the fuck is this code
|
||||
/mob/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (user.intent != "harm")
|
||||
if (istype(src.l_hand,/obj/item/latexballon) && src.l_hand:air_contents && is_sharp(W))
|
||||
return src.l_hand.attackby(W)
|
||||
if (istype(src.r_hand,/obj/item/latexballon) && src.r_hand:air_contents && is_sharp(W))
|
||||
return src.r_hand.attackby(W)
|
||||
var/shielded = 0
|
||||
if (locate(/obj/item/weapon/grab, src))
|
||||
var/mob/safe = null
|
||||
if (istype(src.l_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = src.l_hand
|
||||
if ((G.state == 3 && get_dir(src, user) == src.dir))
|
||||
safe = G.affecting
|
||||
if (istype(src.r_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = src.r_hand
|
||||
if ((G.state == 3 && get_dir(src, user) == src.dir))
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.attackby(W, user)
|
||||
if ((!( shielded ) || !( W.flags ) & 32))
|
||||
spawn( 0 )
|
||||
if (W)
|
||||
W.attack(src, user)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/proc/findname(msg)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.real_name == text("[]", msg))
|
||||
@@ -515,16 +539,6 @@ var/list/slot_equipment_priority = list( \
|
||||
if(LinkBlocked(usr.loc,loc)) return
|
||||
show_inv(usr)
|
||||
|
||||
/atom/movable
|
||||
var/mob/pulledby = null
|
||||
|
||||
/atom/movable/verb/pull()
|
||||
set name = "Pull"
|
||||
set category = "IC"
|
||||
set src in oview(1)
|
||||
|
||||
usr.start_pulling(src)
|
||||
return
|
||||
|
||||
/mob/proc/stop_pulling()
|
||||
if(pulling)
|
||||
@@ -548,18 +562,6 @@ var/list/slot_equipment_priority = list( \
|
||||
else
|
||||
M.LAssailant = usr
|
||||
|
||||
/atom/verb/examine()
|
||||
set name = "Examine"
|
||||
set category = "IC"
|
||||
set src in oview(12) //make it work from farther away
|
||||
|
||||
if (!( usr ))
|
||||
return
|
||||
usr << "That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn
|
||||
usr << desc
|
||||
// *****RM
|
||||
//usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]"
|
||||
return
|
||||
|
||||
/mob/proc/can_use_hands()
|
||||
if(handcuffed)
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/* Pens!
|
||||
* Contains:
|
||||
* Pens
|
||||
* Sleepy Pens
|
||||
* Parapens
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Pens
|
||||
*/
|
||||
/obj/item/weapon/pen
|
||||
desc = "It's a normal black ink pen."
|
||||
name = "pen"
|
||||
@@ -32,4 +43,69 @@
|
||||
/obj/item/weapon/pen/invisble
|
||||
desc = "It's an invisble pen marker."
|
||||
icon_state = "pen"
|
||||
colour = "white"
|
||||
colour = "white"
|
||||
|
||||
|
||||
/obj/item/weapon/pen/attack(mob/M as mob, mob/user as mob)
|
||||
if(!ismob(M))
|
||||
return
|
||||
user << "\red You stab [M] with the pen."
|
||||
M << "\red You feel a tiny prick!"
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to stab [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])</font>")
|
||||
return
|
||||
|
||||
/*
|
||||
* Sleepy Pens
|
||||
*/
|
||||
/obj/item/weapon/pen/sleepypen
|
||||
origin_tech = "syndicate=5"
|
||||
|
||||
/obj/item/weapon/pen/sleepypen/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/sleepypen/New()
|
||||
var/datum/reagents/R = new/datum/reagents(30) //Used to be 300
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/sleepypen/attack(mob/M as mob, mob/user as mob)
|
||||
if(!(istype(M,/mob)))
|
||||
return
|
||||
..()
|
||||
if(reagents.total_volume)
|
||||
if(M.reagents) reagents.trans_to(M, 50) //used to be 150
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Parapens
|
||||
*/
|
||||
|
||||
/obj/item/weapon/pen/paralysis/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/paralysis/attack(mob/M as mob, mob/user as mob)
|
||||
if(!(istype(M,/mob)))
|
||||
return
|
||||
..()
|
||||
if(reagents.total_volume)
|
||||
if(M.reagents) reagents.trans_to(M, 50)
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/paralysis/New()
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("zombiepowder", 10)
|
||||
R.add_reagent("impedrezene", 25)
|
||||
R.add_reagent("cryptobiolin", 15)
|
||||
..()
|
||||
return
|
||||
@@ -52,4 +52,8 @@
|
||||
/obj/item/weapon/stamp/clown
|
||||
name = "clown's rubber stamp"
|
||||
icon_state = "stamp-clown"
|
||||
color = "clown"
|
||||
color = "clown"
|
||||
|
||||
|
||||
/obj/item/weapon/stamp/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
Reference in New Issue
Block a user