Merge branch 'master' of https://github.com/PolarisSS13/Polaris into 12/16/2015_newwizard

This commit is contained in:
Neerti
2016-07-08 21:00:12 -04:00
162 changed files with 3024 additions and 935 deletions

View File

@@ -6,6 +6,7 @@
var/list/nanoui_items // List of items for NanoUI use
var/nanoui_menu = 0 // The current menu we are in
var/list/nanoui_data = new // Additional data for NanoUI use
var/faction = "" //Antag faction holder.
var/list/purchase_log = new
var/datum/mind/uplink_owner = null
@@ -96,6 +97,9 @@
var/title = "Remote Uplink"
var/data[0]
uses = user.mind.tcrystals
if(ishuman(user))
var/mob/living/carbon/human/H = user
faction = H.antag_faction
data["welcome"] = welcome
data["crystals"] = uses
@@ -188,7 +192,10 @@
nanoui_data["exploit"]["faction"] = html_encode(L.fields["faction"])
nanoui_data["exploit"]["religion"] = html_encode(L.fields["religion"])
nanoui_data["exploit"]["fingerprint"] = html_encode(L.fields["fingerprint"])
if(L.fields["antagvis"] == ANTAG_KNOWN || (faction == L.fields["antagfac"] && (L.fields["antagvis"] == ANTAG_SHARED)))
nanoui_data["exploit"]["antagfaction"] = html_encode(L.fields["antagfac"])
else
nanoui_data["exploit"]["antagfaction"] = html_encode("None")
nanoui_data["exploit_exists"] = 1
break

View File

@@ -298,14 +298,16 @@
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
var/obj/item/stack/F = src.split(1)
if (F)
user.put_in_hands(F)
src.add_fingerprint(user)
F.add_fingerprint(user)
spawn(0)
if (src && usr.machine==src)
src.interact(usr)
var/N = input("How many stacks of [src] would you like to split off?", "Split stacks", 1) as num|null
if(N)
var/obj/item/stack/F = src.split(N)
if (F)
user.put_in_hands(F)
src.add_fingerprint(user)
F.add_fingerprint(user)
spawn(0)
if (src && usr.machine==src)
src.interact(usr)
else
..()
return
@@ -313,10 +315,7 @@
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/stack))
var/obj/item/stack/S = W
if (user.get_inactive_hand()==src)
src.transfer_to(S, 1)
else
src.transfer_to(S)
src.transfer_to(S)
spawn(0) //give the stacks a chance to delete themselves if necessary
if (S && usr.machine==S)

View File

@@ -350,4 +350,11 @@
desc = "A card which represents common sense and responsibility."
icon_state = "civGold"
primary_color = rgb(0,94,142)
secondary_color = rgb(255,223,127)
secondary_color = rgb(255,223,127)
/obj/item/weapon/card/id/external
name = "identification card"
desc = "An identification card of some sort. It does not look like it is issued by NT."
icon_state = "permit"
primary_color = rgb(142,94,0)
secondary_color = rgb(191,159,95)

View File

@@ -10,12 +10,42 @@
/obj/item/weapon/dice/New()
icon_state = "[name][rand(1,sides)]"
/obj/item/weapon/dice/d4
name = "d4"
desc = "A dice with four sides."
icon_state = "d44"
sides = 4
/obj/item/weapon/dice/d8
name = "d8"
desc = "A dice with eight sides."
icon_state = "d88"
sides = 8
/obj/item/weapon/dice/d10
name = "d10"
desc = "A dice with ten sides."
icon_state = "d1010"
sides = 10
/obj/item/weapon/dice/d12
name = "d12"
desc = "A dice with twelve sides."
icon_state = "d1212"
sides = 12
/obj/item/weapon/dice/d20
name = "d20"
desc = "A dice with twenty sides."
icon_state = "d2020"
sides = 20
/obj/item/weapon/dice/d100
name = "d100"
desc = "A dice with ten sides. This one is for the tens digit."
icon_state = "d10010"
sides = 10
/obj/item/weapon/dice/attack_self(mob/user as mob)
var/result = rand(1, sides)
var/comment = ""

View File

@@ -60,7 +60,7 @@
user << "<span class='danger'>\The [H] needs at least two wrists before you can cuff them together!</span>"
return 0
if(istype(H.gloves,/obj/item/clothing/gloves/rig) && !elastic) // Can't cuff someone who's in a deployed hardsuit.
if(istype(H.gloves,/obj/item/clothing/gloves/gauntlets/rig) && !elastic) // Can't cuff someone who's in a deployed hardsuit.
user << "<span class='danger'>\The [src] won't fit around \the [H.gloves]!</span>"
return 0
@@ -76,7 +76,7 @@
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(H)
user.visible_message("<span class='danger'>\The [user] has put [cuff_type] on \the [H]!</span>")
// Apply cuffs.
@@ -169,4 +169,4 @@ var/last_chew = 0
item_state = null
icon = 'icons/obj/bureaucracy.dmi'
breakouttime = 200
cuff_type = "duct tape"
cuff_type = "duct tape"

View File

@@ -15,43 +15,44 @@
var/malfunction = 0
show_messages = 1
proc/trigger(emote, source as mob)
return
/obj/item/weapon/implant/proc/trigger(emote, source as mob)
return
proc/activate()
return
/obj/item/weapon/implant/proc/activate()
return
// What does the implant do upon injection?
// return 0 if the implant fails (ex. Revhead and loyalty implant.)
// return 1 if the implant succeeds (ex. Nonrevhead and loyalty implant.)
proc/implanted(var/mob/source)
return 1
/obj/item/weapon/implant/proc/implanted(var/mob/source)
listening_objects |= src
return 1
proc/get_data()
return "No information available"
/obj/item/weapon/implant/proc/get_data()
return "No information available"
proc/hear(message, source as mob)
return
/obj/item/weapon/implant/proc/hear(message, source as mob)
return
proc/islegal()
return 0
/obj/item/weapon/implant/proc/islegal()
return 0
proc/meltdown() //breaks it down, making implant unrecongizible
imp_in << "<span class='warning'>You feel something melting inside [part ? "your [part.name]" : "you"]!</span>"
if (part)
part.take_damage(burn = 15, used_weapon = "Electronics meltdown")
else
var/mob/living/M = imp_in
M.apply_damage(15,BURN)
name = "melted implant"
desc = "Charred circuit in melted plastic case. Wonder what that used to be..."
icon_state = "implant_melted"
malfunction = MALFUNCTION_PERMANENT
/obj/item/weapon/implant/proc/meltdown() //breaks it down, making implant unrecongizible
imp_in << "<span class='warning'>You feel something melting inside [part ? "your [part.name]" : "you"]!</span>"
if (part)
part.take_damage(burn = 15, used_weapon = "Electronics meltdown")
else
var/mob/living/M = imp_in
M.apply_damage(15,BURN)
name = "melted implant"
desc = "Charred circuit in melted plastic case. Wonder what that used to be..."
icon_state = "implant_melted"
malfunction = MALFUNCTION_PERMANENT
Destroy()
if(part)
part.implants.Remove(src)
..()
/obj/item/weapon/implant/Destroy()
if(part)
part.implants.Remove(src)
..()
/obj/item/weapon/implant/tracking
name = "tracking implant"
@@ -59,8 +60,8 @@
var/id = 1.0
get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
/obj/item/weapon/implant/tracking/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Tracking Beacon<BR>
<b>Life:</b> 10 minutes after death of host<BR>
<b>Important Notes:</b> None<BR>
@@ -74,23 +75,23 @@ disintegrate into bio-safe elements.<BR>
<b>Integrity:</b> Gradient creates slight risk of being overcharged and frying the
circuitry. As a result neurotoxins can cause massive damage.<HR>
Implant Specifics:<BR>"}
return dat
return dat
emp_act(severity)
if (malfunction) //no, dawg, you can't malfunction while you are malfunctioning
return
malfunction = MALFUNCTION_TEMPORARY
/obj/item/weapon/implant/tracking/emp_act(severity)
if (malfunction) //no, dawg, you can't malfunction while you are malfunctioning
return
malfunction = MALFUNCTION_TEMPORARY
var/delay = 20
switch(severity)
if(1)
if(prob(60))
meltdown()
if(2)
delay = rand(5*60*10,15*60*10) //from 5 to 15 minutes of free time
var/delay = 20
switch(severity)
if(1)
if(prob(60))
meltdown()
if(2)
delay = rand(5*60*10,15*60*10) //from 5 to 15 minutes of free time
spawn(delay)
malfunction--
spawn(delay)
malfunction--
/obj/item/weapon/implant/dexplosive
@@ -98,8 +99,8 @@ Implant Specifics:<BR>"}
desc = "And boom goes the weasel."
icon_state = "implant_evil"
get_data()
var/dat = {"
/obj/item/weapon/implant/dexplosive/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp RX-78 Employee Management Implant<BR>
<b>Life:</b> Activates upon death.<BR>
@@ -109,23 +110,23 @@ Implant Specifics:<BR>"}
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.<BR>
<b>Special Features:</b> Explodes<BR>
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
return dat
return dat
trigger(emote, source as mob)
if(emote == "deathgasp")
src.activate("death")
return
/obj/item/weapon/implant/dexplosive/trigger(emote, source as mob)
if(emote == "deathgasp")
src.activate("death")
return
activate(var/cause)
if((!cause) || (!src.imp_in)) return 0
explosion(src, -1, 0, 2, 3, 0)//This might be a bit much, dono will have to see.
if(src.imp_in)
src.imp_in.gib()
/obj/item/weapon/implant/dexplosive/activate(var/cause)
if((!cause) || (!src.imp_in)) return 0
explosion(src, -1, 0, 2, 3, 0)//This might be a bit much, dono will have to see.
if(src.imp_in)
src.imp_in.gib()
islegal()
return 0
/obj/item/weapon/implant/dexplosive/islegal()
return 0
//BS12 Explosive
/obj/item/weapon/implant/explosive
@@ -135,8 +136,8 @@ Implant Specifics:<BR>"}
var/phrase = "supercalifragilisticexpialidocious"
icon_state = "implant_evil"
get_data()
var/dat = {"
/obj/item/weapon/implant/explosive/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp RX-78 Intimidation Class Implant<BR>
<b>Life:</b> Activates upon codephrase.<BR>
@@ -146,120 +147,121 @@ Implant Specifics:<BR>"}
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.<BR>
<b>Special Features:</b> Explodes<BR>
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
return dat
return dat
hear_talk(mob/M as mob, msg)
hear(msg)
/obj/item/weapon/implant/explosive/hear_talk(mob/M as mob, msg)
hear(msg)
return
/obj/item/weapon/implant/explosive/hear(var/msg)
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
msg = replace_characters(msg, replacechars)
if(findtext(msg,phrase))
activate()
qdel(src)
/obj/item/weapon/implant/explosive/activate()
if (malfunction == MALFUNCTION_PERMANENT)
return
hear(var/msg)
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
msg = replace_characters(msg, replacechars)
if(findtext(msg,phrase))
activate()
qdel(src)
var/need_gib = null
if(istype(imp_in, /mob/))
var/mob/T = imp_in
message_admins("Explosive implant triggered in [T] ([T.key]). (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>) ")
log_game("Explosive implant triggered in [T] ([T.key]).")
need_gib = 1
activate()
if (malfunction == MALFUNCTION_PERMANENT)
return
var/need_gib = null
if(istype(imp_in, /mob/))
var/mob/T = imp_in
message_admins("Explosive implant triggered in [T] ([T.key]). (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>) ")
log_game("Explosive implant triggered in [T] ([T.key]).")
need_gib = 1
if(ishuman(imp_in))
if (elevel == "Localized Limb")
if(part) //For some reason, small_boom() didn't work. So have this bit of working copypaste.
imp_in.visible_message("<span class='warning'>Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!</span>")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
sleep(25)
if (istype(part,/obj/item/organ/external/chest) || \
istype(part,/obj/item/organ/external/groin) || \
istype(part,/obj/item/organ/external/head))
part.createwound(BRUISE, 60) //mangle them instead
explosion(get_turf(imp_in), -1, -1, 2, 3)
qdel(src)
else
explosion(get_turf(imp_in), -1, -1, 2, 3)
part.droplimb(0,DROPLIMB_BLUNT)
qdel(src)
if (elevel == "Destroy Body")
explosion(get_turf(T), -1, 0, 1, 6)
T.gib()
if (elevel == "Full Explosion")
explosion(get_turf(T), 0, 1, 3, 6)
T.gib()
else
explosion(get_turf(imp_in), 0, 1, 3, 6)
if(need_gib)
imp_in.gib()
var/turf/t = get_turf(imp_in)
if(t)
t.hotspot_expose(3500,125)
implanted(mob/source as mob)
elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
phrase = input("Choose activation phrase:") as text
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
return 1
emp_act(severity)
if (malfunction)
return
malfunction = MALFUNCTION_TEMPORARY
switch (severity)
if (2.0) //Weak EMP will make implant tear limbs off.
if (prob(50))
small_boom()
if (1.0) //strong EMP will melt implant either making it go off, or disarming it
if (prob(70))
if (prob(50))
small_boom()
else
if (prob(50))
activate() //50% chance of bye bye
else
meltdown() //50% chance of implant disarming
spawn (20)
malfunction--
islegal()
return 0
proc/small_boom()
if (ishuman(imp_in) && part)
imp_in.visible_message("<span class='warning'>Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!</span>")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
if (ishuman(imp_in) && part)
//No tearing off these parts since it's pretty much killing
//and you can't replace groins
if(ishuman(imp_in))
if (elevel == "Localized Limb")
if(part) //For some reason, small_boom() didn't work. So have this bit of working copypaste.
imp_in.visible_message("<span class='warning'>Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!</span>")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
sleep(25)
if (istype(part,/obj/item/organ/external/chest) || \
istype(part,/obj/item/organ/external/groin) || \
istype(part,/obj/item/organ/external/head))
part.createwound(BRUISE, 60) //mangle them instead
explosion(get_turf(imp_in), -1, -1, 2, 3)
qdel(src)
else
explosion(get_turf(imp_in), -1, -1, 2, 3)
part.droplimb(0,DROPLIMB_BLUNT)
explosion(get_turf(imp_in), -1, -1, 2, 3)
qdel(src)
qdel(src)
if (elevel == "Destroy Body")
explosion(get_turf(T), -1, 0, 1, 6)
T.gib()
if (elevel == "Full Explosion")
explosion(get_turf(T), 0, 1, 3, 6)
T.gib()
else
explosion(get_turf(imp_in), 0, 1, 3, 6)
if(need_gib)
imp_in.gib()
var/turf/t = get_turf(imp_in)
if(t)
t.hotspot_expose(3500,125)
/obj/item/weapon/implant/explosive/implanted(mob/source as mob)
elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
phrase = input("Choose activation phrase:") as text
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
listening_objects |= src
return 1
/obj/item/weapon/implant/explosive/emp_act(severity)
if (malfunction)
return
malfunction = MALFUNCTION_TEMPORARY
switch (severity)
if (2.0) //Weak EMP will make implant tear limbs off.
if (prob(50))
small_boom()
if (1.0) //strong EMP will melt implant either making it go off, or disarming it
if (prob(70))
if (prob(50))
small_boom()
else
if (prob(50))
activate() //50% chance of bye bye
else
meltdown() //50% chance of implant disarming
spawn (20)
malfunction--
/obj/item/weapon/implant/explosive/islegal()
return 0
/obj/item/weapon/implant/explosive/proc/small_boom()
if (ishuman(imp_in) && part)
imp_in.visible_message("<span class='warning'>Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!</span>")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
if (ishuman(imp_in) && part)
//No tearing off these parts since it's pretty much killing
//and you can't replace groins
if (istype(part,/obj/item/organ/external/chest) || \
istype(part,/obj/item/organ/external/groin) || \
istype(part,/obj/item/organ/external/head))
part.createwound(BRUISE, 60) //mangle them instead
else
part.droplimb(0,DROPLIMB_BLUNT)
explosion(get_turf(imp_in), -1, -1, 2, 3)
qdel(src)
/obj/item/weapon/implant/chem
name = "chemical implant"
desc = "Injects things."
allow_reagents = 1
get_data()
var/dat = {"
/obj/item/weapon/implant/chem/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp MJ-420 Prisoner Management Implant<BR>
<b>Life:</b> Deactivates upon death but remains within the body.<BR>
@@ -274,55 +276,55 @@ the implant releases the chemicals directly into the blood stream.<BR>
Can only be loaded while still in its original case.<BR>
<b>Integrity:</b> Implant will last so long as the subject is alive. However, if the subject suffers from malnutrition,<BR>
the implant may become unstable and either pre-maturely inject the subject or simply break."}
return dat
return dat
New()
..()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R
R.my_atom = src
/obj/item/weapon/implant/chem/New()
..()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R
R.my_atom = src
trigger(emote, source as mob)
if(emote == "deathgasp")
src.activate(src.reagents.total_volume)
/obj/item/weapon/implant/chem/trigger(emote, source as mob)
if(emote == "deathgasp")
src.activate(src.reagents.total_volume)
return
/obj/item/weapon/implant/chem/activate(var/cause)
if((!cause) || (!src.imp_in)) return 0
var/mob/living/carbon/R = src.imp_in
src.reagents.trans_to_mob(R, cause, CHEM_BLOOD)
R << "You hear a faint *beep*."
if(!src.reagents.total_volume)
R << "You hear a faint click from your chest."
spawn(0)
qdel(src)
return
/obj/item/weapon/implant/chem/emp_act(severity)
if (malfunction)
return
malfunction = MALFUNCTION_TEMPORARY
switch(severity)
if(1)
if(prob(60))
activate(20)
if(2)
if(prob(30))
activate(5)
activate(var/cause)
if((!cause) || (!src.imp_in)) return 0
var/mob/living/carbon/R = src.imp_in
src.reagents.trans_to_mob(R, cause, CHEM_BLOOD)
R << "You hear a faint *beep*."
if(!src.reagents.total_volume)
R << "You hear a faint click from your chest."
spawn(0)
qdel(src)
return
emp_act(severity)
if (malfunction)
return
malfunction = MALFUNCTION_TEMPORARY
switch(severity)
if(1)
if(prob(60))
activate(20)
if(2)
if(prob(30))
activate(5)
spawn(20)
malfunction--
spawn(20)
malfunction--
/obj/item/weapon/implant/loyalty
name = "loyalty implant"
desc = "Makes you loyal or such."
get_data()
var/dat = {"
/obj/item/weapon/implant/loyalty/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> [company_name] Employee Management Implant<BR>
<b>Life:</b> Ten years.<BR>
@@ -332,20 +334,20 @@ the implant may become unstable and either pre-maturely inject the subject or si
<b>Function:</b> Contains a small pod of nanobots that manipulate the host's mental functions.<BR>
<b>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat
return dat
implanted(mob/M)
if(!istype(M, /mob/living/carbon/human)) return 0
var/mob/living/carbon/human/H = M
var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role)
if(antag_data && (antag_data.flags & ANTAG_IMPLANT_IMMUNE))
H.visible_message("[H] seems to resist the implant!", "You feel the corporate tendrils of [company_name] try to invade your mind!")
return 0
else
clear_antag_roles(H.mind, 1)
H << "<span class='notice'>You feel a surge of loyalty towards [company_name].</span>"
return 1
/obj/item/weapon/implant/loyalty/implanted(mob/M)
if(!istype(M, /mob/living/carbon/human)) return 0
var/mob/living/carbon/human/H = M
var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role)
if(antag_data && (antag_data.flags & ANTAG_IMPLANT_IMMUNE))
H.visible_message("[H] seems to resist the implant!", "You feel the corporate tendrils of [company_name] try to invade your mind!")
return 0
else
clear_antag_roles(H.mind, 1)
H << "<span class='notice'>You feel a surge of loyalty towards [company_name].</span>"
return 1
/obj/item/weapon/implant/adrenalin
@@ -353,8 +355,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
desc = "Removes all stuns and knockdowns."
var/uses
get_data()
var/dat = {"
/obj/item/weapon/implant/adrenalin/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Cybersun Industries Adrenalin Implant<BR>
<b>Life:</b> Five days.<BR>
@@ -364,25 +366,26 @@ the implant may become unstable and either pre-maturely inject the subject or si
<b>Function:</b> Contains nanobots to stimulate body to mass-produce Adrenalin.<BR>
<b>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
<b>Integrity:</b> Implant can only be used three times before the nanobots are depleted."}
return dat
return dat
trigger(emote, mob/source as mob)
if (src.uses < 1) return 0
if (emote == "pale")
src.uses--
source << "<span class='notice'>You feel a sudden surge of energy!</span>"
source.SetStunned(0)
source.SetWeakened(0)
source.SetParalysis(0)
/obj/item/weapon/implant/adrenalin/trigger(emote, mob/source as mob)
if (src.uses < 1) return 0
if (emote == "pale")
src.uses--
source << "<span class='notice'>You feel a sudden surge of energy!</span>"
source.SetStunned(0)
source.SetWeakened(0)
source.SetParalysis(0)
return
return
implanted(mob/source)
source.mind.store_memory("A implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate.", 0, 0)
source << "The implanted freedom implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate."
return 1
/obj/item/weapon/implant/adrenalin/implanted(mob/source)
source.mind.store_memory("A implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate.", 0, 0)
source << "The implanted freedom implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate."
listening_objects |= src
return 1
/obj/item/weapon/implant/death_alarm
@@ -390,8 +393,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
var/mobname = "Will Robinson"
get_data()
var/dat = {"
/obj/item/weapon/implant/death_alarm/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> [company_name] \"Profit Margin\" Class Employee Lifesign Sensor<BR>
<b>Life:</b> Activates upon death.<BR>
@@ -401,65 +404,65 @@ the implant may become unstable and either pre-maturely inject the subject or si
<b>Function:</b> Contains a compact radio signaler that triggers when the host's lifesigns cease.<BR>
<b>Special Features:</b> Alerts crew to crewmember death.<BR>
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
return dat
return dat
process()
if (!implanted) return
var/mob/M = imp_in
/obj/item/weapon/implant/death_alarm/process()
if (!implanted) return
var/mob/M = imp_in
if(isnull(M)) // If the mob got gibbed
activate()
else if(M.stat == 2)
activate("death")
if(isnull(M)) // If the mob got gibbed
activate()
else if(M.stat == 2)
activate("death")
activate(var/cause)
var/mob/M = imp_in
var/area/t = get_area(M)
switch (cause)
if("death")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
//give the syndies a bit of stealth
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Security")
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Medical")
else
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Security")
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Medical")
qdel(a)
processing_objects.Remove(src)
if ("emp")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
var/name = prob(50) ? t.name : pick(teleportlocs)
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Security")
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Medical")
qdel(a)
/obj/item/weapon/implant/death_alarm/activate(var/cause)
var/mob/M = imp_in
var/area/t = get_area(M)
switch (cause)
if("death")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
//give the syndies a bit of stealth
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Security")
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Medical")
else
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Security")
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Medical")
qdel(a)
processing_objects.Remove(src)
emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
if (malfunction) //so I'm just going to add a meltdown chance here
return
malfunction = MALFUNCTION_TEMPORARY
activate("emp") //let's shout that this dude is dead
if(severity == 1)
if(prob(40)) //small chance of obvious meltdown
meltdown()
else if (prob(60)) //but more likely it will just quietly die
malfunction = MALFUNCTION_PERMANENT
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Security")
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Medical")
qdel(a)
processing_objects.Remove(src)
if ("emp")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
var/name = prob(50) ? t.name : pick(teleportlocs)
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Security")
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Medical")
qdel(a)
else
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Security")
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Medical")
qdel(a)
processing_objects.Remove(src)
spawn(20)
malfunction--
/obj/item/weapon/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
if (malfunction) //so I'm just going to add a meltdown chance here
return
malfunction = MALFUNCTION_TEMPORARY
implanted(mob/source as mob)
mobname = source.real_name
processing_objects.Add(src)
return 1
activate("emp") //let's shout that this dude is dead
if(severity == 1)
if(prob(40)) //small chance of obvious meltdown
meltdown()
else if (prob(60)) //but more likely it will just quietly die
malfunction = MALFUNCTION_PERMANENT
processing_objects.Remove(src)
spawn(20)
malfunction--
/obj/item/weapon/implant/death_alarm/implanted(mob/source as mob)
mobname = source.real_name
processing_objects.Add(src)
return 1
/obj/item/weapon/implant/compressed
name = "compressed matter implant"
@@ -468,8 +471,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
var/activation_emote = "sigh"
var/obj/item/scanned = null
get_data()
var/dat = {"
/obj/item/weapon/implant/compressed/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> [company_name] \"Profit Margin\" Class Employee Lifesign Sensor<BR>
<b>Life:</b> Activates upon death.<BR>
@@ -479,30 +482,31 @@ the implant may become unstable and either pre-maturely inject the subject or si
<b>Function:</b> Contains a compact radio signaler that triggers when the host's lifesigns cease.<BR>
<b>Special Features:</b> Alerts crew to crewmember death.<BR>
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
return dat
return dat
trigger(emote, mob/source as mob)
if (src.scanned == null)
return 0
if (emote == src.activation_emote)
source << "The air glows as \the [src.scanned.name] uncompresses."
activate()
activate()
var/turf/t = get_turf(src)
if (imp_in)
imp_in.put_in_hands(scanned)
else
scanned.loc = t
qdel(src)
implanted(mob/source as mob)
src.activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
if (source.mind)
source.mind.store_memory("Compressed matter implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted compressed matter implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
return 1
islegal()
/obj/item/weapon/implant/compressed/trigger(emote, mob/source as mob)
if (src.scanned == null)
return 0
if (emote == src.activation_emote)
source << "The air glows as \the [src.scanned.name] uncompresses."
activate()
/obj/item/weapon/implant/compressed/activate()
var/turf/t = get_turf(src)
if (imp_in)
imp_in.put_in_hands(scanned)
else
scanned.loc = t
qdel(src)
/obj/item/weapon/implant/compressed/implanted(mob/source as mob)
src.activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
if (source.mind)
source.mind.store_memory("Compressed matter implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted compressed matter implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
listening_objects |= src
return 1
/obj/item/weapon/implant/compressed/islegal()
return 0

View File

@@ -8,53 +8,54 @@
var/uses = 1.0
New()
src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
src.uses = rand(1, 5)
..()
return
/obj/item/weapon/implant/freedom/New()
src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
src.uses = rand(1, 5)
..()
return
trigger(emote, mob/living/carbon/source as mob)
if (src.uses < 1) return 0
if (emote == src.activation_emote)
src.uses--
source << "You feel a faint click."
if (source.handcuffed)
var/obj/item/weapon/W = source.handcuffed
source.handcuffed = null
if(source.buckled && source.buckled.buckle_require_restraints)
source.buckled.unbuckle_mob()
source.update_inv_handcuffed()
if (source.client)
source.client.screen -= W
/obj/item/weapon/implant/freedom/trigger(emote, mob/living/carbon/source as mob)
if (src.uses < 1) return 0
if (emote == src.activation_emote)
src.uses--
source << "You feel a faint click."
if (source.handcuffed)
var/obj/item/weapon/W = source.handcuffed
source.handcuffed = null
if(source.buckled && source.buckled.buckle_require_restraints)
source.buckled.unbuckle_mob()
source.update_inv_handcuffed()
if (source.client)
source.client.screen -= W
if (W)
W.loc = source.loc
dropped(source)
if (W)
W.loc = source.loc
dropped(source)
if (W)
W.layer = initial(W.layer)
if (source.legcuffed)
var/obj/item/weapon/W = source.legcuffed
source.legcuffed = null
source.update_inv_legcuffed()
if (source.client)
source.client.screen -= W
W.layer = initial(W.layer)
if (source.legcuffed)
var/obj/item/weapon/W = source.legcuffed
source.legcuffed = null
source.update_inv_legcuffed()
if (source.client)
source.client.screen -= W
if (W)
W.loc = source.loc
dropped(source)
if (W)
W.loc = source.loc
dropped(source)
if (W)
W.layer = initial(W.layer)
return
W.layer = initial(W.layer)
return
implanted(mob/living/carbon/source)
source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
return 1
/obj/item/weapon/implant/freedom/implanted(mob/living/carbon/source)
source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
listening_objects |= src
return 1
get_data()
var/dat = {"
/obj/item/weapon/implant/freedom/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Freedom Beacon<BR>
<b>Life:</b> optimum 5 uses<BR>
@@ -68,4 +69,4 @@ mechanisms<BR>
<b>Integrity:</b> The battery is extremely weak and commonly after injection its
life can drive down to only 1 use.<HR>
No Implant Specifics"}
return dat
return dat

View File

@@ -15,6 +15,7 @@
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
listening_objects |= src
return 1

View File

@@ -1,11 +1,29 @@
/obj/item/weapon/storage/pill_bottle/dice
name = "pack of dice"
desc = "It's a small container with dice inside."
/obj/item/weapon/storage/pill_bottle/dice //7d6
name = "bag of dice"
desc = "It's a small bag with dice inside."
icon = 'icons/obj/dice.dmi'
icon_state = "dicebag"
New()
..()
/obj/item/weapon/storage/pill_bottle/dice/New()
..()
for(var/i = 1 to 7)
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d20( src )
/obj/item/weapon/storage/pill_bottle/dice_nerd //DnD dice
name = "bag of gaming dice"
desc = "It's a small bag with gaming dice inside."
icon = 'icons/obj/dice.dmi'
icon_state = "magicdicebag"
/obj/item/weapon/storage/pill_bottle/dice_nerd/New()
..()
new /obj/item/weapon/dice/d4( src )
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d8( src )
new /obj/item/weapon/dice/d10( src )
new /obj/item/weapon/dice/d12( src )
new /obj/item/weapon/dice/d20( src )
new /obj/item/weapon/dice/d100( src )
/*
* Donut Box