Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into Kungfu

This commit is contained in:
Aurorablade
2016-04-22 21:45:18 -04:00
198 changed files with 7925 additions and 5103 deletions
@@ -20,10 +20,15 @@
/obj/item/device/radio/headset/New()
..()
internal_channels.Cut()
/obj/item/device/radio/headset/initialize()
..()
if(ks1type)
keyslot1 = new ks1type(src)
if(ks2type)
keyslot2 = new ks2type(src)
recalculateChannels(1)
/obj/item/device/radio/headset/Destroy()
@@ -383,8 +388,6 @@
for (var/ch_name in channels)
if(!radio_controller)
sleep(30) // Waiting for the radio_controller to be created.
if(!radio_controller)
src.name = "broken radio headset"
return
+3 -7
View File
@@ -152,7 +152,6 @@
New()
..()
sleep(2)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
@@ -169,7 +168,6 @@
new/obj/item/weapon/storage/pill_bottle/random_meds(src)
while(prob(25))
new/obj/item/weapon/storage/pill_bottle/random_meds(src)
return
/obj/structure/closet/crate/secure/chemicals
name = "chemical supply kit"
@@ -178,7 +176,6 @@
New()
..()
sleep(2)
for(var/chem in standard_chemicals)
var/obj/item/weapon/reagent_containers/glass/bottle/B = new(src)
B.reagents.add_reagent(chem,B.volume)
@@ -240,7 +237,6 @@
New()
..()
sleep(2)
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
@@ -248,7 +244,6 @@
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
while(prob(25))
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent(src)
return
// -------------------------------------
@@ -276,8 +271,9 @@
while(prob(15))
new menace(get_step_rand(src.loc))
..()
return 1
else
..()
return ..()
//
@@ -307,7 +303,7 @@
qdel(Cat1)
else
qdel(Cat2)
..()
return ..()
// --------------------------------------
// Collen's box of wonder and mystery
@@ -193,3 +193,31 @@ var/global/list/datum/stack_recipe/mime_recipes = list ( \
icon_state = "sheet-enruranium"
origin_tech = "materials=6"
materials = list(MAT_URANIUM=3000)
/*
* Alien Alloy
*/
/obj/item/stack/sheet/mineral/abductor
name = "alien alloy"
icon = 'icons/obj/abductor.dmi'
icon_state = "sheet-abductor"
singular_name = "alien alloy sheet"
force = 5
throwforce = 5
w_class = 3
throw_speed = 1
throw_range = 3
origin_tech = "materials=6;abductor=1"
sheettype = "abductor"
var/global/list/datum/stack_recipe/abductor_recipes = list ( \
new/datum/stack_recipe("alien bed", /obj/structure/stool/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien locker", /obj/structure/closet/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien table frame", /obj/structure/abductor_tableframe, 1, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \
)
/obj/item/stack/sheet/mineral/abductor/New(var/loc, var/amount=null)
recipes = abductor_recipes
..()
@@ -0,0 +1,9 @@
/obj/item/stack/tile/mineral/abductor
name = "alien floor tile"
singular_name = "alien floor tile"
desc = "A tile made out of alien alloy."
icon = 'icons/obj/abductor.dmi'
icon_state = "tile_abductor"
origin_tech = "materials=6;abductor=1"
turf_type = /turf/simulated/floor/mineral/abductor
mineralType = "abductor"
+55 -58
View File
@@ -3,20 +3,20 @@
desc = "This injects the person with DNA."
icon = 'icons/obj/items.dmi'
icon_state = "dnainjector"
var/block=0
item_state = "dnainjector"
var/block = 0
var/datum/dna2/record/buf=null
var/s_time = 10.0
throw_speed = 1
throw_speed = 3
throw_range = 5
w_class = 1.0
var/uses = 1
var/nofail
var/is_bullet = 0
var/inuse = 0
w_class = 1
origin_tech = "biotech=1"
var/damage_coeff = 1
var/used = 0
// USE ONLY IN PREMADE SYRINGES. WILL NOT WORK OTHERWISE.
var/datatype=0
var/value=0
var/datatype = 0
var/value = 0
/obj/item/weapon/dnainjector/New()
if(datatype && block)
@@ -61,50 +61,47 @@
return buf.dna.SetUIValue(real_block,val)
/obj/item/weapon/dnainjector/proc/inject(mob/living/M as mob, mob/user as mob)
if(used)
return
if(istype(M,/mob/living))
M.apply_effect(rand(10,25),IRRADIATE,0,1)
M.apply_effect(rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)),IRRADIATE,0,1)
var/mob/living/carbon/human/H
if(istype(M, /mob/living/carbon/human))
H = M
if (!(NOCLONE in M.mutations) && !(H && (H.species.flags & NO_DNA))) // prevents drained people from having their DNA changed
var/prev_ue = M.dna.unique_enzymes
// UI in syringe.
if (buf.types & DNA2_BUF_UI)
if (!block) //isolated block?
M.dna.UI = buf.dna.UI.Copy()
M.dna.UpdateUI()
M.UpdateAppearance()
if (buf.types & DNA2_BUF_UE) //unique enzymes? yes
spawn(0) //Some mutations have sleeps in them, like monkey
if(!(NOCLONE in M.mutations) && !(H && (H.species.flags & NO_DNA))) // prevents drained people from having their DNA changed
var/prev_ue = M.dna.unique_enzymes
// UI in syringe.
if (buf.types & DNA2_BUF_UI)
if (!block) //isolated block?
M.dna.UI = buf.dna.UI.Copy()
M.dna.UpdateUI()
M.UpdateAppearance()
if (buf.types & DNA2_BUF_UE) //unique enzymes? yes
M.real_name = buf.dna.real_name
M.name = buf.dna.real_name
M.dna.real_name = buf.dna.real_name
M.dna.unique_enzymes = buf.dna.unique_enzymes
uses--
else
M.dna.SetUIValue(block,src.GetValue())
M.UpdateAppearance()
uses--
if (buf.types & DNA2_BUF_SE)
if (!block) //isolated block?
M.dna.SE = buf.dna.SE.Copy()
M.dna.UpdateSE()
else
M.dna.SetSEValue(block,src.GetValue())
domutcheck(M, null, block!=null)
uses--
M.update_mutations()
if(H)
H.sync_organ_dna(assimilate = 0, old_ue = prev_ue)
spawn(0)//this prevents the collapse of space-time continuum
if (user)
user.unEquip(src)
qdel(src)
return uses
M.real_name = buf.dna.real_name
M.name = buf.dna.real_name
M.dna.real_name = buf.dna.real_name
M.dna.unique_enzymes = buf.dna.unique_enzymes
else
M.dna.SetUIValue(block,src.GetValue())
M.UpdateAppearance()
if (buf.types & DNA2_BUF_SE)
if (!block) //isolated block?
M.dna.SE = buf.dna.SE.Copy()
M.dna.UpdateSE()
else
M.dna.SetSEValue(block,src.GetValue())
domutcheck(M, null, block!=null)
M.update_mutations()
if(H)
H.sync_organ_dna(assimilate = 0, old_ue = prev_ue)
/obj/item/weapon/dnainjector/attack(mob/M as mob, mob/user as mob)
if(used)
user << "<span class='warning'>This injector is used up!</span>"
return
if(!M.dna) //You know what would be nice? If the mob you're injecting has DNA, and so doesn't cause runtimes.
return 0
@@ -116,9 +113,6 @@
if (!user.IsAdvancedToolUser())
return 0
if(inuse)
return 0
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
@@ -149,17 +143,20 @@
else
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
user.visible_message("<span class='danger'>\The [user] starts injecting \the [M] with \the [src]!</span>", "<span class='notice'>You start injecting \the [M] with \the [src].</span>")
if(do_after(user, 50, target = M))
inject(M, user)//Now we actually do the heavy lifting
user.visible_message("<span class='danger'>\The [user] injects \the [M] with \the [src]!</span>", "<span class='danger'>You inject \the [M] with \the [src].</span>")
if(M != user)
M.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [M] with [src]!</span>")
if(!do_mob(user, M))
return
M.visible_message("<span class='danger'>[user] injects [M] with the syringe with [src]!", \
"<span class='userdanger'>[user] injects [M] with the syringe with [src]!")
if(user)//If the user still exists. Their mob may not.
if(M)//Runtime fix: If the mob doesn't exist, mob.name doesnt work. - Nodrak
user.show_message("<span class='alert'>You inject [M.name]</span>")
else
user.show_message("<span class='alert'>You finish the injection.</span>")
else
user << "<span class='notice'>You inject yourself with [src].</span>"
inject(M, user)
used = 1
icon_state = "dnainjector0"
desc += " This one is used up."
/obj/item/weapon/dnainjector/hulkmut
name = "DNA-Injector (Hulk)"
+6 -110
View File
@@ -12,7 +12,7 @@
throw_range = 5
materials = list(MAT_METAL=500)
origin_tech = "materials=1"
var/breakouttime = 600 //Deciseconds = 60s = 1 minutes
breakouttime = 600 //Deciseconds = 60s = 1 minutes
var/cuffsound = 'sound/weapons/handcuffs.ogg'
var/trashtype = null //For disposable cuffs
@@ -50,7 +50,7 @@
else
loc = target
target.handcuffed = src
target.update_inv_handcuffed(1)
target.update_handcuffed()
return
/obj/item/weapon/restraints/handcuffs/cable
@@ -85,6 +85,9 @@
/obj/item/weapon/restraints/handcuffs/cable/white
color = COLOR_WHITE
/obj/item/weapon/restraints/handcuffs/alien
icon_state = "handcuffAlien"
/obj/item/weapon/restraints/handcuffs/pinkcuffs
name = "fluffy pink handcuffs"
desc = "Use this to keep prisoners in line. Or you know, your significant other."
@@ -121,7 +124,7 @@
if(do_mob(user, C, 30))
if(!C.handcuffed)
C.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(C)
C.update_inv_handcuffed(1)
C.update_handcuffed()
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
add_logs(C, user, "ziptie-cuffed")
else
@@ -133,110 +136,3 @@
/obj/item/weapon/restraints/handcuffs/cable/zipties/used/attack()
return
//Legcuffs
/obj/item/weapon/restraints/legcuffs
name = "leg cuffs"
desc = "Use this to keep prisoners in line."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "handcuff"
flags = CONDUCT
throwforce = 0
w_class = 3.0
origin_tech = "materials=1"
slowdown = 7
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
/obj/item/weapon/restraints/legcuffs/beartrap
name = "bear trap"
throw_speed = 1
throw_range = 1
icon_state = "beartrap0"
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
var/obj/item/weapon/grenade/iedcasing/IED = null
/obj/item/weapon/restraints/legcuffs/beartrap/Destroy()
if(IED)
qdel(IED)
IED = null
return ..()
/obj/item/weapon/restraints/legcuffs/beartrap/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is sticking \his head in the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/restraints/legcuffs/beartrap/attack_self(mob/user as mob)
..()
if(ishuman(user) && !user.stat && !user.restrained())
armed = !armed
icon_state = "beartrap[armed]"
to_chat(user, "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>")
/obj/item/weapon/restraints/legcuffs/beartrap/attackby(var/obj/item/I, mob/user as mob) //Let's get explosive.
if(istype(I, /obj/item/weapon/grenade/iedcasing))
if(IED)
to_chat(user, "<span class='warning'>This beartrap already has an IED hooked up to it!</span>")
return
IED = I
switch(IED.assembled)
if(0,1) //if it's not fueled/hooked up
to_chat(user, "<span class='warning'>You haven't prepared this IED yet!</span>")
IED = null
return
if(2,3)
user.drop_item(src)
I.forceMove(src)
message_admins("[key_name_admin(user)] has rigged a beartrap with an IED.")
log_game("[key_name(user)] has rigged a beartrap with an IED.")
to_chat(user, "<span class='notice'>You sneak the [IED] underneath the pressure plate and connect the trigger wire.</span>")
desc = "A trap used to catch bears and other legged creatures. <span class='warning'>There is an IED hooked up to it.</span>"
else
to_chat(user, "<span class='danger'>You shouldn't be reading this message! Contact a coder or someone, something broke!</span>")
IED = null
return
if(istype(I, /obj/item/weapon/screwdriver))
if(IED)
IED.forceMove(get_turf(src))
IED = null
to_chat(user, "<span class='notice'>You remove the IED from the [src].</span>")
return
..()
/obj/item/weapon/restraints/legcuffs/beartrap/Crossed(AM as mob|obj)
if(armed && isturf(src.loc))
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
var/mob/living/L = AM
armed = 0
icon_state = "beartrap0"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
L.visible_message("<span class='danger'>[L] triggers \the [src].</span>", \
"<span class='userdanger'>You trigger \the [src]!</span>")
if(IED && isturf(src.loc))
IED.active = 1
IED.overlays -= image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled")
IED.icon_state = initial(icon_state) + "_active"
IED.assembled = 3
message_admins("[key_name_admin(usr)] has triggered an IED-rigged [name].")
log_game("[key_name(usr)] has triggered an IED-rigged [name].")
spawn(IED.det_time)
IED.prime()
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.lying)
H.apply_damage(20,BRUTE,"chest")
else
H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg")))
if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs.
H.legcuffed = src
src.loc = H
H.update_inv_legcuffed(0)
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
else
L.apply_damage(20,BRUTE)
..()
+98 -3
View File
@@ -1,5 +1,5 @@
/obj/item/weapon/legcuffs
name = "legcuffs"
/obj/item/weapon/restraints/legcuffs
name = "leg cuffs"
desc = "Use this to keep prisoners in line."
gender = PLURAL
icon = 'icons/obj/items.dmi'
@@ -8,7 +8,102 @@
throwforce = 0
w_class = 3.0
origin_tech = "materials=1"
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
slowdown = 7
breakouttime = 300 //Deciseconds = 30s = 0.5 minute
/obj/item/weapon/restraints/legcuffs/beartrap
name = "bear trap"
throw_speed = 1
throw_range = 1
icon_state = "beartrap0"
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
var/obj/item/weapon/grenade/iedcasing/IED = null
/obj/item/weapon/restraints/legcuffs/beartrap/Destroy()
if(IED)
qdel(IED)
IED = null
return ..()
/obj/item/weapon/restraints/legcuffs/beartrap/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is sticking \his head in the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/restraints/legcuffs/beartrap/attack_self(mob/user as mob)
..()
if(ishuman(user) && !user.stat && !user.restrained())
armed = !armed
icon_state = "beartrap[armed]"
to_chat(user, "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>")
/obj/item/weapon/restraints/legcuffs/beartrap/attackby(var/obj/item/I, mob/user as mob) //Let's get explosive.
if(istype(I, /obj/item/weapon/grenade/iedcasing))
if(IED)
to_chat(user, "<span class='warning'>This beartrap already has an IED hooked up to it!</span>")
return
IED = I
switch(IED.assembled)
if(0,1) //if it's not fueled/hooked up
to_chat(user, "<span class='warning'>You haven't prepared this IED yet!</span>")
IED = null
return
if(2,3)
user.drop_item(src)
I.forceMove(src)
message_admins("[key_name_admin(user)] has rigged a beartrap with an IED.")
log_game("[key_name(user)] has rigged a beartrap with an IED.")
to_chat(user, "<span class='notice'>You sneak the [IED] underneath the pressure plate and connect the trigger wire.</span>")
desc = "A trap used to catch bears and other legged creatures. <span class='warning'>There is an IED hooked up to it.</span>"
else
to_chat(user, "<span class='danger'>You shouldn't be reading this message! Contact a coder or someone, something broke!</span>")
IED = null
return
if(istype(I, /obj/item/weapon/screwdriver))
if(IED)
IED.forceMove(get_turf(src))
IED = null
to_chat(user, "<span class='notice'>You remove the IED from the [src].</span>")
return
..()
/obj/item/weapon/restraints/legcuffs/beartrap/Crossed(AM as mob|obj)
if(armed && isturf(src.loc))
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
var/mob/living/L = AM
armed = 0
icon_state = "beartrap0"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
L.visible_message("<span class='danger'>[L] triggers \the [src].</span>", \
"<span class='userdanger'>You trigger \the [src]!</span>")
if(IED && isturf(src.loc))
IED.active = 1
IED.overlays -= image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled")
IED.icon_state = initial(icon_state) + "_active"
IED.assembled = 3
message_admins("[key_name_admin(usr)] has triggered an IED-rigged [name].")
log_game("[key_name(usr)] has triggered an IED-rigged [name].")
spawn(IED.det_time)
IED.prime()
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.lying)
H.apply_damage(20,BRUTE,"chest")
else
H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg")))
if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs.
H.legcuffed = src
src.loc = H
H.update_inv_legcuffed(0)
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
else
L.apply_damage(20,BRUTE)
..()
/obj/item/weapon/legcuffs/bolas
name = "bolas"
@@ -137,37 +137,3 @@
H.update_inv_r_hand()
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 = 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)
to_chat(user, "\blue The cloaking device is now active.")
src.icon_state = "shield1"
else
to_chat(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()
..()
@@ -512,6 +512,16 @@
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
/obj/item/weapon/storage/box/alienhandcuffs
name = "box of spare handcuffs"
desc = "A box full of handcuffs."
icon_state = "alienboxCuffs"
New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/restraints/handcuffs/alien(src)
/obj/item/weapon/storage/box/fakesyndiesuit
name = "boxed space suit and helmet"
desc = "A sleek, sturdy box used to hold replica spacesuits."
+1 -1
View File
@@ -127,7 +127,7 @@
C.handcuffed = null
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob()
C.update_inv_handcuffed()
C.update_handcuffed()
return
else
..()