Merge branch 'master' of https://github.com/PolarisSS13/Polaris into sifDefenseForce

This commit is contained in:
Anewbe
2017-05-12 16:22:09 -05:00
275 changed files with 3244 additions and 1925 deletions
+5 -1
View File
@@ -249,7 +249,11 @@
"Anything Legal Considered",
"New Toy",
"Me, I'm Always Counting",
"Just Five More Minutes"
"Just Five More Minutes",
"Are You Feeling It",
"Great White Snark",
"No Shirt No Shoes",
"Callsign"
)
@@ -10,6 +10,10 @@
display_name = "dice pack (gaming)"
path = /obj/item/weapon/storage/pill_bottle/dice_nerd
/datum/gear/dice/cup
display_name = "dice cup and dice"
path = /obj/item/weapon/storage/dicecup/loaded
/datum/gear/cards
display_name = "deck of cards"
path = /obj/item/weapon/deck/cards
@@ -5,6 +5,10 @@
slot = slot_w_uniform
sort_category = "Uniforms and Casual Dress"
/datum/gear/uniform/blazerskirt
display_name = "blazer, blue with skirt"
path = /obj/item/clothing/under/blazer/skirt
/datum/gear/uniform/cheongsam
display_name = "cheongsam selection"
@@ -190,26 +194,50 @@
display_name = "suit, shiny-black"
path = /obj/item/clothing/under/lawyer/black
/datum/gear/uniform/suit/shinyblackskirt
display_name = "suit, shiny-black skirt"
path = /obj/item/clothing/under/lawyer/black/skirt
/datum/gear/uniform/suit/blue
display_name = "suit, blue"
path = /obj/item/clothing/under/lawyer/blue
/datum/gear/uniform/suit/blueskirt
display_name = "suit, blue skirt"
path = /obj/item/clothing/under/lawyer/blue/skirt
/datum/gear/uniform/suit/burgundy
display_name = "suit, burgundy"
path = /obj/item/clothing/under/suit_jacket/burgundy
/datum/gear/uniform/suit/burgundyskirt
display_name = "suit, burgundy skirt"
path = /obj/item/clothing/under/suit_jacket/burgundy/skirt
/datum/gear/uniform/suit/checkered
display_name = "suit, checkered"
path = /obj/item/clothing/under/suit_jacket/checkered
/datum/gear/uniform/suit/checkeredskirt
display_name = "suit, checkered skirt"
path = /obj/item/clothing/under/suit_jacket/checkered/skirt
/datum/gear/uniform/suit/charcoal
display_name = "suit, charcoal"
path = /obj/item/clothing/under/suit_jacket/charcoal
/datum/gear/uniform/suit/charcoalskirt
display_name = "suit, charcoal skirt"
path = /obj/item/clothing/under/suit_jacket/charcoal/skirt
/datum/gear/uniform/suit/exec
display_name = "suit, executive"
path = /obj/item/clothing/under/suit_jacket/really_black
/datum/gear/uniform/suit/execskirt
display_name = "suit, executive skirt"
path = /obj/item/clothing/under/suit_jacket/really_black/skirt
/datum/gear/uniform/suit/femaleexec
display_name = "suit, female-executive"
path = /obj/item/clothing/under/suit_jacket/female
@@ -218,18 +246,34 @@
display_name = "suit, gentlemen"
path = /obj/item/clothing/under/gentlesuit
/datum/gear/uniform/suit/gentleskirt
display_name = "suit, lady"
path = /obj/item/clothing/under/gentlesuit/skirt
/datum/gear/uniform/suit/navy
display_name = "suit, navy"
path = /obj/item/clothing/under/suit_jacket/navy
/datum/gear/uniform/suit/navyskirt
display_name = "suit, navy skirt"
path = /obj/item/clothing/under/suit_jacket/navy/skirt
/datum/gear/uniform/suit/red
display_name = "suit, red"
path = /obj/item/clothing/under/suit_jacket/red
/datum/gear/uniform/suit/redskirt
display_name = "suit, red skirt"
path = /obj/item/clothing/under/suit_jacket/red/skirt
/datum/gear/uniform/suit/redlawyer
display_name = "suit, lawyer-red"
path = /obj/item/clothing/under/lawyer/red
/datum/gear/uniform/suit/redlawyerskirt
display_name = "suit, lawyer-red skirt"
path = /obj/item/clothing/under/lawyer/red/skirt
/datum/gear/uniform/suit/oldman
display_name = "suit, old-man"
path = /obj/item/clothing/under/lawyer/oldman
@@ -238,18 +282,49 @@
display_name = "suit, purple"
path = /obj/item/clothing/under/lawyer/purpsuit
/datum/gear/uniform/suit/purpleskirt
display_name = "suit, purple skirt"
path = /obj/item/clothing/under/lawyer/purpsuit/skirt
/datum/gear/uniform/suit/tan
display_name = "suit, tan"
path = /obj/item/clothing/under/suit_jacket/tan
/datum/gear/uniform/suit/tanskirt
display_name = "suit, tan skirt"
path = /obj/item/clothing/under/suit_jacket/tan/skirt
/datum/gear/uniform/suit/white
display_name = "suit, white"
path = /obj/item/clothing/under/scratch
/datum/gear/uniform/suit/whiteskirt
display_name = "suit, white skirt"
path = /obj/item/clothing/under/scratch/skirt
/datum/gear/uniform/suit/whiteblue
display_name = "suit, white-blue"
path = /obj/item/clothing/under/lawyer/bluesuit
/datum/gear/uniform/suit/whiteblueskirt
display_name = "suit, white-blue skirt"
path = /obj/item/clothing/under/lawyer/bluesuit/skirt
/datum/gear/uniform/suit/detectiveskirt
display_name = "suit, detective skirt (Detective)"
path = /obj/item/clothing/under/det/skirt
allowed_roles = list("Detective")
/datum/gear/uniform/suit/iaskirt
display_name = "suit, Internal Affairs skirt (Internal Affairs)"
path = /obj/item/clothing/under/rank/internalaffairs/skirt
allowed_roles = list("Internal Affairs Agent")
/datum/gear/uniform/suit/bartenderskirt
display_name = "suit, bartender skirt (Bartender)"
path = /obj/item/clothing/under/rank/bartender/skirt
allowed_roles = list("Bartender")
/datum/gear/uniform/scrubs
display_name = "scrubs, black"
path = /obj/item/clothing/under/rank/medical/black
@@ -271,6 +346,10 @@
display_name = "scrubs, navy blue"
path = /obj/item/clothing/under/rank/medical/navyblue
/datum/gear/uniform/oldwoman
display_name = "old woman attire"
path = /obj/item/clothing/under/lawyer/oldwoman
/datum/gear/uniform/sundress
display_name = "sundress"
path = /obj/item/clothing/under/sundress
+1
View File
@@ -408,6 +408,7 @@
projectile_type = /obj/item/projectile/chameleon
charge_meter = 0
charge_cost = 48 //uses next to no power, since it's just holograms
battery_lock = 1
var/obj/item/projectile/copy_projectile
var/global/list/gun_choices
+3 -2
View File
@@ -132,7 +132,7 @@ BLIND // can't see anything
eye = !eye
if(eye)
icon_state = "[icon_state]_r"
icon_state = "[icon_state]_1"
else
icon_state = initial(icon_state)
update_clothing_icon()
@@ -395,7 +395,8 @@ BLIND // can't see anything
toggleable = 1
action_button_name = "Toggle Goggles"
vision_flags = SEE_MOBS
see_invisible = INVISIBILITY_LEVEL_TWO
see_invisible = SEE_INVISIBLE_NOLIGHTING
emp_act(severity)
if(istype(src.loc, /mob/living/carbon/human))
+1 -1
View File
@@ -34,7 +34,7 @@
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | PHORONGUARD
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
phoronproof = 1
slowdown = 2
slowdown = 0.5
armor = list(melee = 60, bullet = 50, laser = 40,energy = 15, bomb = 30, bio = 100, rad = 50)
siemens_coefficient = 0.2
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
@@ -183,7 +183,7 @@
/obj/item/rig_module/self_destruct/New()
..()
src.smoke = PoolOrNew(/datum/effect/effect/system/smoke_spread/bad)
src.smoke = new /datum/effect/effect/system/smoke_spread/bad()
src.smoke.attach(src)
/obj/item/rig_module/self_destruct/Destroy()
@@ -257,6 +257,14 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
/obj/item/clothing/suit/straight_jacket/attack_hand(mob/living/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(src == H.wear_suit)
to_chat(H, "<span class='notice'>You need help taking this off!</span>")
return
..()
/obj/item/clothing/suit/ianshirt
name = "worn shirt"
desc = "A worn out, curiously comfortable t-shirt with a picture of Ian. You wouldn't go so far as to say it feels like being hugged when you wear it but it's pretty close. Good for sleeping in."
@@ -107,7 +107,7 @@
if(!H.holstered)
var/obj/item/W = usr.get_active_hand()
if(!istype(W, /obj/item))
usr << "<span class='warning'>You need your gun equiped to holster it.</span>"
usr << "<span class='warning'>You need your gun equipped to holster it.</span>"
return
H.holster(W, usr)
else
+42 -2
View File
@@ -6,6 +6,12 @@
icon_state = "ba_suit"
rolled_sleeves = 0
/obj/item/clothing/under/rank/bartender/skirt
desc = "Short and cute."
name = "bartender's skirt"
icon_state = "ba_suit_skirt"
item_state_slots = list(slot_r_hand_str = "ba_suit", slot_l_hand_str = "ba_suit")
/obj/item/clothing/under/rank/captain //Alright, technically not a 'civilian' but its better then giving a .dm file for a single define.
desc = "It's a blue jumpsuit with some gold markings denoting the rank of \"Colony Director\"."
name = "colony director's jumpsuit"
@@ -97,6 +103,11 @@
rolled_sleeves = 0
starting_accessories = list(/obj/item/clothing/accessory/black)
/obj/item/clothing/under/rank/internalaffairs/skirt
desc = "The plain, professional attire of an Internal Affairs Agent. The top button is sewn shut."
name = "Internal Affairs skirt"
icon_state = "internalaffairs_skirt"
/obj/item/clothing/under/rank/janitor
desc = "It's the official uniform of the station's janitor. It has minor protection from biohazards."
name = "janitor's jumpsuit"
@@ -112,6 +123,11 @@
name = "black Lawyer suit"
icon_state = "lawyer_black"
/obj/item/clothing/under/lawyer/black/skirt
name = "black Lawyer skirt"
icon_state = "lawyer_black_skirt"
item_state_slots = list(slot_r_hand_str = "lawyer_black", slot_l_hand_str = "lawyer_black")
/obj/item/clothing/under/lawyer/female
name = "black Lawyer suit"
icon_state = "black_suit_fem"
@@ -121,28 +137,52 @@
name = "red Lawyer suit"
icon_state = "lawyer_red"
/obj/item/clothing/under/lawyer/red/skirt
name = "red Lawyer skirt"
icon_state = "lawyer_red_skirt"
item_state_slots = list(slot_r_hand_str = "lawyer_red", slot_l_hand_str = "lawyer_red")
/obj/item/clothing/under/lawyer/blue
name = "blue Lawyer suit"
icon_state = "lawyer_blue"
/obj/item/clothing/under/lawyer/blue/skirt
name = "blue Lawyer skirt"
icon_state = "lawyer_blue_skirt"
item_state_slots = list(slot_r_hand_str = "lawyer_blue", slot_l_hand_str = "lawyer_blue")
/obj/item/clothing/under/lawyer/bluesuit
name = "Blue Suit"
name = "blue suit"
desc = "A classy suit."
icon_state = "bluesuit"
item_state_slots = list(slot_r_hand_str = "lawyer_blue", slot_l_hand_str = "lawyer_blue")
starting_accessories = list(/obj/item/clothing/accessory/red)
/obj/item/clothing/under/lawyer/bluesuit/skirt
name = "blue skirt suit"
icon_state = "bluesuit_skirt"
/obj/item/clothing/under/lawyer/purpsuit
name = "Purple Suit"
name = "purple Suit"
icon_state = "lawyer_purp"
item_state_slots = list(slot_r_hand_str = "purple", slot_l_hand_str = "purple")
/obj/item/clothing/under/lawyer/purpsuit/skirt
name = "purple skirt suit"
icon_state = "lawyer_purp_skirt"
/obj/item/clothing/under/lawyer/oldman
name = "Old Man's Suit"
desc = "A classic suit for the older gentleman with built in back support."
icon_state = "oldman"
item_state_slots = list(slot_r_hand_str = "johnny", slot_l_hand_str = "johnny")
/obj/item/clothing/under/lawyer/oldwoman
name = "Old Woman's Attire"
desc = "A typical outfit for the older woman, a lovely cardigan and comfortable skirt."
icon_state = "oldwoman"
item_state_slots = list(slot_r_hand_str = "johnny", slot_l_hand_str = "johnny")
/obj/item/clothing/under/librarian
name = "sensible suit"
desc = "It's very... sensible."
@@ -113,6 +113,12 @@
desc = "A serious-looking tan dress shirt paired with freshly-pressed black slacks, complete with a red striped tie and waistcoat."
starting_accessories = list(/obj/item/clothing/accessory/red_long, /obj/item/clothing/accessory/wcoat)
/obj/item/clothing/under/det/skirt
name = "detective's skirt"
icon_state = "detective_skirt"
desc = "A serious-looking white blouse paired with a formal black pencil skirt."
item_state_slots = list(slot_r_hand_str = "sl_suit", slot_l_hand_str = "sl_suit")
/*
* Head of Security
*/
+59 -1
View File
@@ -21,6 +21,11 @@
desc = "A white suit, suitable for an excellent host"
icon_state = "scratch"
/obj/item/clothing/under/scratch/skirt
name = "white skirt suit"
icon_state = "scratch_skirt"
item_state_slots = list(slot_r_hand_str = "scratch", slot_l_hand_str = "scratch")
/obj/item/clothing/under/sl_suit
desc = "It's a very amish looking suit."
name = "amish suit"
@@ -98,6 +103,11 @@
rolled_sleeves = 0
starting_accessories = list(/obj/item/clothing/accessory/darkgreen)
/obj/item/clothing/under/gov/skirt
name = "Green formal skirt uniform"
desc = "A neat proper uniform of someone on offical business. The top button is sewn shut."
icon_state = "greensuit_skirt"
/obj/item/clothing/under/space
name = "\improper NASA jumpsuit"
desc = "It has a NASA logo on it and is made of space-proofed materials."
@@ -147,24 +157,37 @@
/obj/item/clothing/under/gentlesuit
name = "gentlemans suit"
desc = "A silk black shirt with a white tie and a matching gray vest and slacks. Feels proper."
desc = "A silk black shirt with matching gray slacks. Feels proper."
icon_state = "gentlesuit"
item_state_slots = list(slot_r_hand_str = "grey", slot_l_hand_str = "grey")
rolled_sleeves = 0
starting_accessories = list(/obj/item/clothing/accessory/white, /obj/item/clothing/accessory/wcoat/gentleman)
/obj/item/clothing/under/gentlesuit/skirt
name = "lady's suit"
desc = "A silk black blouse with a matching gray skirt. Feels proper."
icon_state = "gentlesuit_skirt"
/obj/item/clothing/under/gimmick/rank/captain/suit
name = "colony director's suit"
desc = "A green suit and yellow necktie. Exemplifies authority."
icon_state = "green_suit"
item_state_slots = list(slot_r_hand_str = "centcom", slot_l_hand_str = "centcom")
/obj/item/clothing/under/gimmick/rank/captain/suit/skirt
name = "colony director's skirt suit"
icon_state = "green_suit_skirt"
/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit
name = "head of personnel's suit"
desc = "A teal suit and yellow necktie. An authoritative yet tacky ensemble."
icon_state = "teal_suit"
item_state_slots = list(slot_r_hand_str = "green", slot_l_hand_str = "green")
/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit/skirt
name = "head of personnel's skirt suit"
icon_state = "teal_suit_skirt"
/obj/item/clothing/under/suit_jacket
name = "black suit"
desc = "A black suit and red tie. Very formal."
@@ -177,6 +200,11 @@
icon_state = "really_black_suit"
item_state_slots = list(slot_r_hand_str = "lawyer_black", slot_l_hand_str = "lawyer_black")
/obj/item/clothing/under/suit_jacket/really_black/skirt
name = "executive skirt suit"
desc = "A formal black suit and red necktie, intended for the station's finest."
icon_state = "really_black_suit_skirt"
/obj/item/clothing/under/suit_jacket/female
name = "executive suit"
desc = "A formal trouser suit for women, intended for the station's finest."
@@ -196,6 +224,11 @@
icon_state = "red_suit"
item_state_slots = list(slot_r_hand_str = "lawyer_red", slot_l_hand_str = "lawyer_red")
/obj/item/clothing/under/suit_jacket/red/skirt
name = "red skirt suit"
desc = "A red suit and blue necktie. Somewhat formal."
icon_state = "red_suit_skirt"
/obj/item/clothing/under/schoolgirl
name = "schoolgirl uniform"
desc = "It's just like one of my Japanese animes!"
@@ -421,6 +454,10 @@
item_state_slots = list(slot_r_hand_str = "lawyer_black", slot_l_hand_str = "lawyer_black")
starting_accessories = list(/obj/item/clothing/accessory/navy, /obj/item/clothing/accessory/charcoal_jacket)
/obj/item/clothing/under/suit_jacket/charcoal/skirt
name = "charcoal skirt"
icon_state = "charcoal_suit_skirt"
/obj/item/clothing/under/suit_jacket/navy
name = "navy suit"
desc = "A navy suit and red tie, intended for the station's finest."
@@ -428,6 +465,10 @@
item_state_slots = list(slot_r_hand_str = "lawyer_blue", slot_l_hand_str = "lawyer_blue")
starting_accessories = list(/obj/item/clothing/accessory/red, /obj/item/clothing/accessory/navy_jacket)
/obj/item/clothing/under/suit_jacket/navy/skirt
name = "navy skirt"
icon_state = "navy_suit_skirt"
/obj/item/clothing/under/suit_jacket/burgundy
name = "burgundy suit"
desc = "A burgundy suit and black tie. Somewhat formal."
@@ -435,6 +476,10 @@
item_state_slots = list(slot_r_hand_str = "lawyer_red", slot_l_hand_str = "lawyer_red")
starting_accessories = list(/obj/item/clothing/accessory/black, /obj/item/clothing/accessory/burgundy_jacket)
/obj/item/clothing/under/suit_jacket/burgundy/skirt
name = "burgundy skirt"
icon_state = "burgundy_suit_skirt"
/obj/item/clothing/under/suit_jacket/checkered
name = "checkered suit"
desc = "That's a very nice suit you have there. Shame if something were to happen to it, eh?"
@@ -442,6 +487,10 @@
item_state_slots = list(slot_r_hand_str = "lawyer_black", slot_l_hand_str = "lawyer_black")
starting_accessories = list(/obj/item/clothing/accessory/black, /obj/item/clothing/accessory/checkered_jacket)
/obj/item/clothing/under/suit_jacket/checkered/skirt
name = "checkered skirt"
icon_state = "checkered_suit_skirt"
/obj/item/clothing/under/suit_jacket/tan
name = "tan suit"
desc = "A tan suit. Smart, but casual."
@@ -449,6 +498,10 @@
item_state_slots = list(slot_r_hand_str = "tan_suit", slot_l_hand_str = "tan_suit")
starting_accessories = list(/obj/item/clothing/accessory/yellow, /obj/item/clothing/accessory/tan_jacket)
/obj/item/clothing/under/suit_jacket/tan/skirt
name = "tan skirt"
icon_state = "tan_suit_skirt"
/obj/item/clothing/under/serviceoveralls
name = "workman outfit"
desc = "The very image of a working man. Not that you're probably doing work."
@@ -483,6 +536,11 @@
icon_state = "blue_blazer"
item_state_slots = list(slot_r_hand_str = "lawyer_blue", slot_l_hand_str = "lawyer_blue")
/obj/item/clothing/under/blazer/skirt
name = "ladies blue blazer"
desc = "A bold but yet conservative outfit, a red pencil skirt and a navy blazer."
icon_state = "blue_blazer_skirt"
/obj/item/clothing/under/croptop
name = "crop top"
desc = "A shirt that has had the top cropped. This one is NT sponsored."
+157
View File
@@ -0,0 +1,157 @@
/obj/item/weapon/dice
name = "d6"
desc = "A dice with six sides."
icon = 'icons/obj/dice.dmi'
icon_state = "d66"
w_class = ITEMSIZE_TINY
var/sides = 6
var/result = 6
attack_verb = list("diced")
/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
result = 4
/obj/item/weapon/dice/d8
name = "d8"
desc = "A dice with eight sides."
icon_state = "d88"
sides = 8
result = 8
/obj/item/weapon/dice/d10
name = "d10"
desc = "A dice with ten sides."
icon_state = "d1010"
sides = 10
result = 10
/obj/item/weapon/dice/d12
name = "d12"
desc = "A dice with twelve sides."
icon_state = "d1212"
sides = 12
result = 12
/obj/item/weapon/dice/d20
name = "d20"
desc = "A dice with twenty sides."
icon_state = "d2020"
sides = 20
result = 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
result = 10
/obj/item/weapon/dice/attack_self(mob/user as mob)
rollDice(user, 0)
/obj/item/weapon/dice/proc/rollDice(mob/user as mob, var/silent = 0)
result = rand(1, sides)
icon_state = "[name][result]"
if(!silent)
var/comment = ""
if(sides == 20 && result == 20)
comment = "Nat 20!"
else if(sides == 20 && result == 1)
comment = "Ouch, bad luck."
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [result]. [comment]</span>", \
"<span class='notice'>You throw [src]. It lands on a [result]. [comment]</span>", \
"<span class='notice'>You hear [src] landing on a [result]. [comment]</span>")
/*
* Dice packs
*/
/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"
/obj/item/weapon/storage/pill_bottle/dice/New()
..()
for(var/i = 1 to 7)
new /obj/item/weapon/dice( 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 )
/*
*Liar's Dice cup
*/
/obj/item/weapon/storage/dicecup
name = "dice cup"
desc = "A cup used to conceal and hold dice."
icon = 'icons/obj/dice.dmi'
icon_state = "dicecup"
w_class = ITEMSIZE_SMALL
storage_slots = 5
can_hold = list(
/obj/item/weapon/dice,
)
/obj/item/weapon/storage/dicecup/attack_self(mob/user as mob)
user.visible_message("<span class='notice'>[user] shakes [src].</span>", \
"<span class='notice'>You shake [src].</span>", \
"<span class='notice'>You hear dice rolling.</span>")
rollCup(user)
/obj/item/weapon/storage/dicecup/proc/rollCup(mob/user as mob)
for(var/obj/item/weapon/dice/I in src.contents)
var/obj/item/weapon/dice/D = I
D.rollDice(user, 1)
/obj/item/weapon/storage/dicecup/proc/revealDice(var/mob/viewer)
for(var/obj/item/weapon/dice/I in src.contents)
var/obj/item/weapon/dice/D = I
to_chat(viewer, "The [D.name] shows a [D.result].")
/obj/item/weapon/storage/dicecup/verb/peekAtDice()
set category = "Object"
set name = "Peek at Dice"
set desc = "Peek at the dice under your cup."
revealDice(usr)
/obj/item/weapon/storage/dicecup/verb/revealDiceHand()
set category = "Object"
set name = "Reveal Dice"
set desc = "Reveal the dice hidden under your cup."
for(var/mob/living/player in viewers(3))
to_chat(player, "[usr] reveals their dice.")
revealDice(player)
/obj/item/weapon/storage/dicecup/loaded/New()
..()
for(var/i = 1 to 5)
new /obj/item/weapon/dice( src )
+73 -27
View File
@@ -18,23 +18,57 @@
var/mob/last_to_emag = null
var/last_change = 0
var/last_gravity_change = 0
var/list/supported_programs = list( \
"Empty Court" = "emptycourt", \
"Basketball Court" = "basketball", \
"Thunderdome Court" = "thunderdomecourt", \
"Boxing Ring"="boxingcourt", \
"Beach" = "beach", \
"Desert" = "desert", \
"Space" = "space", \
"Picnic Area" = "picnicarea", \
"Snow Field" = "snowfield", \
"Theatre" = "theatre", \
"Meeting Hall" = "meetinghall", \
"Courtroom" = "courtroom", \
"Turn Off" = "turnoff" \
var/area/projection_area = /area/holodeck/alphadeck
var/current_program
var/powerdown_program = "Turn Off"
var/default_program = "Empty Court"
var/list/supported_programs = list(
"Empty Court" = new/datum/holodeck_program(/area/holodeck/source_emptycourt, list('sound/music/THUNDERDOME.ogg')),
"Boxing Ring" = new/datum/holodeck_program(/area/holodeck/source_boxingcourt, list('sound/music/THUNDERDOME.ogg')),
"Basketball" = new/datum/holodeck_program(/area/holodeck/source_basketball, list('sound/music/THUNDERDOME.ogg')),
"Thunderdome" = new/datum/holodeck_program(/area/holodeck/source_thunderdomecourt, list('sound/music/THUNDERDOME.ogg')),
"Beach" = new/datum/holodeck_program(/area/holodeck/source_beach),
"Desert" = new/datum/holodeck_program(/area/holodeck/source_desert,
list(
'sound/effects/wind/wind_2_1.ogg',
'sound/effects/wind/wind_2_2.ogg',
'sound/effects/wind/wind_3_1.ogg',
'sound/effects/wind/wind_4_1.ogg',
'sound/effects/wind/wind_4_2.ogg',
'sound/effects/wind/wind_5_1.ogg'
)
),
"Snowfield" = new/datum/holodeck_program(/area/holodeck/source_snowfield,
list(
'sound/effects/wind/wind_2_1.ogg',
'sound/effects/wind/wind_2_2.ogg',
'sound/effects/wind/wind_3_1.ogg',
'sound/effects/wind/wind_4_1.ogg',
'sound/effects/wind/wind_4_2.ogg',
'sound/effects/wind/wind_5_1.ogg'
)
),
"Space" = new/datum/holodeck_program(/area/holodeck/source_space,
list(
'sound/ambience/ambispace.ogg',
'sound/music/main.ogg',
'sound/music/space.ogg',
'sound/music/traitor.ogg',
)
),
"Picnic Area" = new/datum/holodeck_program(/area/holodeck/source_picnicarea, list('sound/music/title2.ogg')),
"Theatre" = new/datum/holodeck_program(/area/holodeck/source_theatre),
"Meetinghall" = new/datum/holodeck_program(/area/holodeck/source_meetinghall),
"Courtroom" = new/datum/holodeck_program(/area/holodeck/source_courtroom, list('sound/music/traitor.ogg')),
"Turn Off" = new/datum/holodeck_program(/area/holodeck/source_plating, list())
)
var/list/restricted_programs = list(
"Burnoff Test Simulation" = new/datum/holodeck_program(/area/holodeck/source_burntest, list()),
"Wildlife Simulation" = new/datum/holodeck_program(/area/holodeck/source_wildlife, list())
)
var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "Wildlife Simulation" = "wildlifecarp")
var/current_program = "turnoff"
/obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
@@ -59,10 +93,10 @@
var/restricted_program_list[0]
for(var/P in supported_programs)
program_list[++program_list.len] = list("name" = P, "program" = supported_programs[P])
program_list[++program_list.len] = P
for(var/P in restricted_programs)
restricted_program_list[++restricted_program_list.len] = list("name" = P, "program" = restricted_programs[P])
restricted_program_list[++restricted_program_list.len] = P
data["supportedPrograms"] = program_list
data["restrictedPrograms"] = restricted_program_list
@@ -93,9 +127,9 @@
if(href_list["program"])
var/prog = href_list["program"]
if(prog in holodeck_programs)
loadProgram(holodeck_programs[prog])
current_program = href_list["program"]
if(prog in (supported_programs + restricted_programs))
loadProgram(prog)
current_program = prog
else if(href_list["AIoverride"])
if(!issilicon(usr))
@@ -150,7 +184,10 @@
/obj/machinery/computer/HolodeckControl/New()
..()
linkedholodeck = locate(/area/holodeck/alphadeck)
current_program = powerdown_program
linkedholodeck = locate(projection_area)
if(!linkedholodeck)
world << "<span class='danger'>Holodeck computer at [x],[y],[z] failed to locate projection area.</span>"
//This could all be done better, but it works for now.
/obj/machinery/computer/HolodeckControl/Destroy()
@@ -185,7 +222,7 @@
if(!checkInteg(linkedholodeck))
damaged = 1
loadProgram(holodeck_programs["turnoff"], 0)
loadProgram(powerdown_program, 0)
active = 0
use_power = 1
for(var/mob/M in range(10,src))
@@ -227,9 +264,9 @@
//Why is it called toggle if it doesn't toggle?
/obj/machinery/computer/HolodeckControl/proc/togglePower(var/toggleOn = 0)
if(toggleOn)
loadProgram(holodeck_programs["emptycourt"], 0)
loadProgram(default_program, 0)
else
loadProgram(holodeck_programs["turnoff"], 0)
loadProgram(powerdown_program, 0)
if(!linkedholodeck.has_gravity)
linkedholodeck.gravitychange(1,linkedholodeck)
@@ -238,9 +275,18 @@
use_power = 1
/obj/machinery/computer/HolodeckControl/proc/loadProgram(var/datum/holodeck_program/HP, var/check_delay = 1)
/obj/machinery/computer/HolodeckControl/proc/loadProgram(var/prog, var/check_delay = 1)
if(!prog)
return
var/datum/holodeck_program/HP
if(prog in supported_programs)
HP = supported_programs[prog]
else if(prog in restricted_programs)
HP = restricted_programs[prog]
if(!HP)
return
var/area/A = locate(HP.target)
if(!A)
return
@@ -324,7 +370,7 @@
/obj/machinery/computer/HolodeckControl/proc/emergencyShutdown()
//Turn it back to the regular non-holographic room
loadProgram(holodeck_programs["turnoff"], 0)
loadProgram(powerdown_program, 0)
if(!linkedholodeck.has_gravity)
linkedholodeck.gravitychange(1,linkedholodeck)
-43
View File
@@ -1,46 +1,3 @@
var/global/list/holodeck_programs = list(
"emptycourt" = new/datum/holodeck_program(/area/holodeck/source_emptycourt, list('sound/music/THUNDERDOME.ogg')),
"boxingcourt" = new/datum/holodeck_program(/area/holodeck/source_boxingcourt, list('sound/music/THUNDERDOME.ogg')),
"basketball" = new/datum/holodeck_program(/area/holodeck/source_basketball, list('sound/music/THUNDERDOME.ogg')),
"thunderdomecourt" = new/datum/holodeck_program(/area/holodeck/source_thunderdomecourt, list('sound/music/THUNDERDOME.ogg')),
"beach" = new/datum/holodeck_program(/area/holodeck/source_beach),
"desert" = new/datum/holodeck_program(/area/holodeck/source_desert,
list(
'sound/effects/wind/wind_2_1.ogg',
'sound/effects/wind/wind_2_2.ogg',
'sound/effects/wind/wind_3_1.ogg',
'sound/effects/wind/wind_4_1.ogg',
'sound/effects/wind/wind_4_2.ogg',
'sound/effects/wind/wind_5_1.ogg'
)
),
"snowfield" = new/datum/holodeck_program(/area/holodeck/source_snowfield,
list(
'sound/effects/wind/wind_2_1.ogg',
'sound/effects/wind/wind_2_2.ogg',
'sound/effects/wind/wind_3_1.ogg',
'sound/effects/wind/wind_4_1.ogg',
'sound/effects/wind/wind_4_2.ogg',
'sound/effects/wind/wind_5_1.ogg'
)
),
"space" = new/datum/holodeck_program(/area/holodeck/source_space,
list(
'sound/ambience/ambispace.ogg',
'sound/music/main.ogg',
'sound/music/space.ogg',
'sound/music/traitor.ogg',
)
),
"picnicarea" = new/datum/holodeck_program(/area/holodeck/source_picnicarea, list('sound/music/title2.ogg')),
"theatre" = new/datum/holodeck_program(/area/holodeck/source_theatre),
"meetinghall" = new/datum/holodeck_program(/area/holodeck/source_meetinghall),
"courtroom" = new/datum/holodeck_program(/area/holodeck/source_courtroom, list('sound/music/traitor.ogg')),
"burntest" = new/datum/holodeck_program(/area/holodeck/source_burntest, list()),
"wildlifecarp" = new/datum/holodeck_program(/area/holodeck/source_wildlife, list()),
"turnoff" = new/datum/holodeck_program(/area/holodeck/source_plating, list())
)
/datum/holodeck_program
var/target
var/list/ambience = null
+15 -3
View File
@@ -13,11 +13,11 @@
if(!holder) return
if(!plant_controller || !plant_controller.gene_tag_masks)
usr << "Gene masks not set."
to_chat(usr, "Gene masks not set.")
return
for(var/mask in plant_controller.gene_tag_masks)
usr << "[mask]: [plant_controller.gene_tag_masks[mask]]"
to_chat(usr, "[mask]: [plant_controller.gene_tag_masks[mask]]")
var/global/datum/controller/plants/plant_controller // Set in New().
@@ -33,6 +33,8 @@ var/global/datum/controller/plants/plant_controller // Set in New().
var/list/plant_sprites = list() // List of all harvested product sprites.
var/list/plant_product_sprites = list() // List of all growth sprites plus number of growth stages.
var/processing = 0 // Off/on.
var/list/gene_masked_list = list() // Stored gene masked list, rather than recreating it when needed.
var/list/plant_gene_datums = list() // Stored datum versions of the gene masked list.
/datum/controller/plants/New()
if(plant_controller && plant_controller != src)
@@ -83,6 +85,7 @@ var/global/datum/controller/plants/plant_controller // Set in New().
S.update_seed()
//Might as well mask the gene types while we're at it.
var/list/gene_datums = decls_repository.decls_of_subtype(/decl/plantgene)
var/list/used_masks = list()
var/list/plant_traits = ALL_GENES
while(plant_traits && plant_traits.len)
@@ -92,9 +95,18 @@ var/global/datum/controller/plants/plant_controller // Set in New().
while(gene_mask in used_masks)
gene_mask = "[uppertext(num2hex(rand(0,255)))]"
var/decl/plantgene/G
for(var/D in gene_datums)
var/decl/plantgene/P = gene_datums[D]
if(gene_tag == P.gene_tag)
G = P
gene_datums -= D
used_masks += gene_mask
plant_traits -= gene_tag
gene_tag_masks[gene_tag] = gene_mask
plant_gene_datums[gene_mask] = G
gene_masked_list.Add(list(list("tag" = gene_tag, "mask" = gene_mask)))
// Proc for creating a random seed type.
/datum/controller/plants/proc/create_random_seed(var/survive_on_station)
@@ -147,4 +159,4 @@ var/global/datum/controller/plants/plant_controller // Set in New().
plant_queue |= plant
/datum/controller/plants/proc/remove_plant(var/obj/effect/plant/plant)
plant_queue -= plant
plant_queue -= plant
+135
View File
@@ -0,0 +1,135 @@
/datum/seed/proc/diverge_mutate_gene(var/decl/plantgene/G, var/turf/T)
if(!istype(G))
log_debug("Attempted to mutate [src] with a non-plantgene var.")
return src
var/datum/seed/S = diverge() //Let's not modify all of the seeds.
T.visible_message("<span class='notice'>\The [S.display_name] quivers!</span>") //Mimicks the normal mutation.
G.mutate(S, T)
return S
/decl/plantgene
var/gene_tag
/decl/plantgene/biochem
gene_tag = GENE_BIOCHEMISTRY
/decl/plantgene/hardiness
gene_tag = GENE_HARDINESS
/decl/plantgene/environment
gene_tag = GENE_ENVIRONMENT
/decl/plantgene/metabolism
gene_tag = GENE_METABOLISM
/decl/plantgene/structure
gene_tag = GENE_STRUCTURE
/decl/plantgene/diet
gene_tag = GENE_DIET
/decl/plantgene/pigment
gene_tag = GENE_PIGMENT
/decl/plantgene/output
gene_tag = GENE_OUTPUT
/decl/plantgene/atmosphere
gene_tag = GENE_ATMOSPHERE
/decl/plantgene/vigour
gene_tag = GENE_VIGOUR
/decl/plantgene/fruit
gene_tag = GENE_FRUIT
/decl/plantgene/special
gene_tag = GENE_SPECIAL
/decl/plantgene/proc/mutate(var/datum/seed/S)
return
/decl/plantgene/biochem/mutate(var/datum/seed/S)
S.set_trait(TRAIT_POTENCY, S.get_trait(TRAIT_POTENCY)+rand(-20,20),200, 0)
/decl/plantgene/hardiness/mutate(var/datum/seed/S)
if(prob(60))
S.set_trait(TRAIT_TOXINS_TOLERANCE, S.get_trait(TRAIT_TOXINS_TOLERANCE)+rand(-2,2),10,0)
if(prob(60))
S.set_trait(TRAIT_PEST_TOLERANCE, S.get_trait(TRAIT_PEST_TOLERANCE)+rand(-2,2),10,0)
if(prob(60))
S.set_trait(TRAIT_WEED_TOLERANCE, S.get_trait(TRAIT_WEED_TOLERANCE)+rand(-2,2),10,0)
if(prob(60))
S.set_trait(TRAIT_ENDURANCE, S.get_trait(TRAIT_ENDURANCE)+rand(-5,5),100,0)
/decl/plantgene/environment/mutate(var/datum/seed/S)
if(prob(60))
S.set_trait(TRAIT_IDEAL_HEAT, S.get_trait(TRAIT_IDEAL_HEAT)+rand(-2,2),10,0)
if(prob(60))
S.set_trait(TRAIT_IDEAL_LIGHT, S.get_trait(TRAIT_IDEAL_LIGHT)+rand(-2,2),10,0)
if(prob(60))
S.set_trait(TRAIT_LIGHT_TOLERANCE, S.get_trait(TRAIT_LIGHT_TOLERANCE)+rand(-5,5),100,0)
/decl/plantgene/metabolism/mutate(var/datum/seed/S)
if(prob(65))
S.set_trait(TRAIT_REQUIRES_NUTRIENTS, S.get_trait(TRAIT_REQUIRES_NUTRIENTS)+rand(-2,2),10,0)
if(prob(65))
S.set_trait(TRAIT_REQUIRES_WATER, S.get_trait(TRAIT_REQUIRES_WATER)+rand(-2,2),10,0)
if(prob(40))
S.set_trait(TRAIT_ALTER_TEMP, S.get_trait(TRAIT_ALTER_TEMP)+rand(-5,5),100,0)
/decl/plantgene/diet/mutate(var/datum/seed/S)
if(prob(60))
S.set_trait(TRAIT_CARNIVOROUS, S.get_trait(TRAIT_CARNIVOROUS)+rand(-1,1),2,0)
if(prob(60))
S.set_trait(TRAIT_PARASITE, !S.get_trait(TRAIT_PARASITE))
if(prob(65))
S.set_trait(TRAIT_NUTRIENT_CONSUMPTION, S.get_trait(TRAIT_NUTRIENT_CONSUMPTION)+rand(-0.1,0.1),5,0)
if(prob(65))
S.set_trait(TRAIT_WATER_CONSUMPTION, S.get_trait(TRAIT_WATER_CONSUMPTION)+rand(-1,1),50,0)
/decl/plantgene/output/mutate(var/datum/seed/S, var/turf/T)
if(prob(50))
S.set_trait(TRAIT_BIOLUM, !S.get_trait(TRAIT_BIOLUM))
if(S.get_trait(TRAIT_BIOLUM))
T.visible_message("<span class='notice'>\The [S.display_name] begins to glow!</span>")
if(prob(50))
S.set_trait(TRAIT_BIOLUM_COLOUR,get_random_colour(0,75,190))
T.visible_message("<span class='notice'>\The [S.display_name]'s glow </span><font color='[S.get_trait(TRAIT_BIOLUM_COLOUR)]'>changes colour</font>!")
else
T.visible_message("<span class='notice'>\The [S.display_name]'s glow dims...</span>")
if(prob(60))
S.set_trait(TRAIT_PRODUCES_POWER, !S.get_trait(TRAIT_PRODUCES_POWER))
/decl/plantgene/atmosphere/mutate(var/datum/seed/S)
if(prob(60))
S.set_trait(TRAIT_TOXINS_TOLERANCE, S.get_trait(TRAIT_TOXINS_TOLERANCE)+rand(-2,2),10,0)
if(prob(60))
S.set_trait(TRAIT_PEST_TOLERANCE, S.get_trait(TRAIT_PEST_TOLERANCE)+rand(-2,2),10,0)
if(prob(60))
S.set_trait(TRAIT_WEED_TOLERANCE, S.get_trait(TRAIT_WEED_TOLERANCE)+rand(-2,2),10,0)
if(prob(60))
S.set_trait(TRAIT_ENDURANCE, S.get_trait(TRAIT_ENDURANCE)+rand(-5,5),100,0)
/decl/plantgene/vigour/mutate(var/datum/seed/S, var/turf/T)
if(prob(65))
S.set_trait(TRAIT_PRODUCTION, S.get_trait(TRAIT_PRODUCTION)+rand(-1,1),10,0)
if(prob(65))
S.set_trait(TRAIT_MATURATION, S.get_trait(TRAIT_MATURATION)+rand(-1,1),30,0)
if(prob(55))
S.set_trait(TRAIT_SPREAD, S.get_trait(TRAIT_SPREAD)+rand(-1,1),2,0)
T.visible_message("<span class='notice'>\The [S.display_name] spasms visibly, shifting in the tray.</span>")
/decl/plantgene/fruit/mutate(var/datum/seed/S)
if(prob(65))
S.set_trait(TRAIT_STINGS, !S.get_trait(TRAIT_STINGS))
if(prob(65))
S.set_trait(TRAIT_EXPLOSIVE, !S.get_trait(TRAIT_EXPLOSIVE))
if(prob(65))
S.set_trait(TRAIT_JUICY, !S.get_trait(TRAIT_JUICY))
/decl/plantgene/special/mutate(var/datum/seed/S)
if(prob(65))
S.set_trait(TRAIT_TELEPORTING, !S.get_trait(TRAIT_TELEPORTING))
+1 -3
View File
@@ -137,9 +137,7 @@
var/list/data = list()
var/list/geneMasks[0]
for(var/gene_tag in plant_controller.gene_tag_masks)
geneMasks.Add(list(list("tag" = gene_tag, "mask" = plant_controller.gene_tag_masks[gene_tag])))
var/list/geneMasks = plant_controller.gene_masked_list
data["geneMasks"] = geneMasks
data["activity"] = active
+8 -3
View File
@@ -181,9 +181,14 @@
return
//Override for somatoray projectiles.
if(istype(Proj ,/obj/item/projectile/energy/floramut) && prob(20))
mutate(1)
return
if(istype(Proj ,/obj/item/projectile/energy/floramut)&& prob(20))
if(istype(Proj, /obj/item/projectile/energy/floramut/gene))
var/obj/item/projectile/energy/floramut/gene/G = Proj
if(seed)
seed = seed.diverge_mutate_gene(G.gene, get_turf(loc)) //get_turf just in case it's not in a turf.
else
mutate(1)
return
else if(istype(Proj ,/obj/item/projectile/energy/florayield) && prob(20))
yield_mod = min(10,yield_mod+rand(1,2))
return
@@ -8,7 +8,7 @@
#define IC_SPAWN_DEFAULT 1 // If the circuit comes in the default circuit box.
#define IC_SPAWN_RESEARCH 2 // If the circuit design will be autogenerated for RnD.
#define IC_FORMAT_STRING "\<STRING\>"
#define IC_FORMAT_STRING "\<TEXT\>"
#define IC_FORMAT_NUMBER "\<NUM\>"
#define IC_FORMAT_REF "\<REF\>"
#define IC_FORMAT_LIST "\<LIST\>"
@@ -107,6 +107,7 @@
for(var/obj/item/integrated_circuit/circuit in contents)
HTML += "<a href=?src=\ref[circuit];examine=1>[circuit.name]</a> | "
HTML += "<a href=?src=\ref[circuit];rename=1>\[Rename\]</a> | "
HTML += "<a href=?src=\ref[circuit];scan=1>\[Scan with Debugger\]</a> | "
if(circuit.removable)
HTML += "<a href=?src=\ref[circuit];remove=1>\[Remove\]</a>"
HTML += "<br>"
@@ -223,9 +224,10 @@
if(proximity)
var/scanned = FALSE
for(var/obj/item/integrated_circuit/input/sensor/S in contents)
S.set_pin_data(IC_OUTPUT, 1, weakref(target))
S.check_then_do_work()
scanned = TRUE
// S.set_pin_data(IC_OUTPUT, 1, weakref(target))
// S.check_then_do_work()
if(S.scan(target))
scanned = TRUE
if(scanned)
visible_message("<span class='notice'>\The [user] waves \the [src] around [target].</span>")
@@ -6,6 +6,7 @@ a creative player the means to solve many problems. Circuits are held inside an
/obj/item/integrated_circuit/examine(mob/user)
. = ..()
external_examine(user)
interact(user)
// This should be used when someone is examining while the case is opened.
/obj/item/integrated_circuit/proc/internal_examine(mob/user)
@@ -86,16 +87,14 @@ a creative player the means to solve many problems. Circuits are held inside an
var/HTML = list()
HTML += "<html><head><title>[src.name]</title></head><body>"
HTML += "<div align='center'>"
HTML += "<table border='1' style='undefined;table-layout: fixed; width: 424px'>"
HTML += "<table border='1' style='undefined;table-layout: fixed; width: 80%'>"
HTML += "<br><a href='?src=\ref[src];'>\[Refresh\]</a> | "
HTML += "<a href='?src=\ref[src];rename=1'>\[Rename\]</a> | "
HTML += "<a href='?src=\ref[src];scan=1'>\[Scan with Debugger\]</a> | "
HTML += "<a href='?src=\ref[src];remove=1'>\[Remove\]</a><br>"
HTML += "<colgroup>"
//HTML += "<col style='width: 121px'>"
//HTML += "<col style='width: 181px'>"
//HTML += "<col style='width: 122px'>"
HTML += "<col style='width: [table_edge_width]'>"
HTML += "<col style='width: [table_middle_width]'>"
HTML += "<col style='width: [table_edge_width]'>"
@@ -212,6 +211,16 @@ a creative player the means to solve many problems. Circuits are held inside an
if(href_list["rename"])
rename_component(usr)
if(href_list["scan"])
if(istype(held_item, /obj/item/device/integrated_electronics/debugger))
var/obj/item/device/integrated_electronics/debugger/D = held_item
if(D.accepting_refs)
D.afterattack(src, usr, TRUE)
else
to_chat(usr, "<span class='warning'>The Debugger's 'ref scanner' needs to be on.</span>")
else
to_chat(usr, "<span class='warning'>You need a Debugger set to 'ref' mode to do that.</span>")
if(href_list["autopulse"])
if(autopulse != -1)
autopulse = !autopulse
@@ -260,10 +269,10 @@ a creative player the means to solve many problems. Circuits are held inside an
return TRUE // Battery has enough.
return FALSE // Not enough power.
/obj/item/integrated_circuit/proc/check_then_do_work()
/obj/item/integrated_circuit/proc/check_then_do_work(var/ignore_power = FALSE)
if(world.time < next_use) // All intergrated circuits have an internal cooldown, to protect from spam.
return
if(power_draw_per_use)
if(power_draw_per_use && !ignore_power)
if(!check_power())
power_fail()
return
@@ -160,7 +160,7 @@
data_to_show = A.name
to_chat(user, "<span class='notice'>You write '[data_to_write ? data_to_show : "NULL"]' to the '[io]' pin of \the [io.holder].</span>")
else if(io.io_type == PULSE_CHANNEL)
io.holder.check_then_do_work()
io.holder.check_then_do_work(ignore_power = TRUE)
to_chat(user, "<span class='notice'>You pulse \the [io.holder]'s [io].</span>")
io.holder.interact(user) // This is to update the UI.
@@ -1,9 +1,18 @@
//These circuits do simple math.
/obj/item/integrated_circuit/arithmetic
complexity = 1
inputs = list("A","B","C","D","E","F","G","H")
outputs = list("result")
activators = list("compute")
inputs = list(
"\<NUM\> A",
"\<NUM\> B",
"\<NUM\> C",
"\<NUM\> D",
"\<NUM\> E",
"\<NUM\> F",
"\<NUM\> G",
"\<NUM\> H"
)
outputs = list("\<NUM\> result")
activators = list("\<PULSE IN\> compute", "\<PULSE OUT\> on computed")
category_text = "Arithmetic"
autopulse = 1
power_draw_per_use = 5 // Math is pretty cheap.
@@ -30,9 +39,9 @@
if(isnum(I.data))
result = result + I.data
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// -Subtracting- //
@@ -58,9 +67,9 @@
if(isnum(I.data))
result = result - I.data
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// *Multiply* //
@@ -86,9 +95,9 @@
if(isnum(I.data))
result = result * I.data
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// /Division/ //
@@ -114,9 +123,9 @@
if(isnum(I.data) && I.data != 0) //No runtimes here.
result = result / I.data
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
//^ Exponent ^//
@@ -134,9 +143,9 @@
if(isnum(A.data) && isnum(B.data))
result = A.data ** B.data
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// +-Sign-+ //
@@ -159,9 +168,9 @@
else
result = 0
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Round //
@@ -183,9 +192,9 @@
else
result = round(A.data)
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Absolute //
@@ -204,9 +213,9 @@
if(isnum(I.data))
result = abs(I.data)
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Averaging //
@@ -229,9 +238,9 @@
if(inputs_used)
result = result / inputs_used
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Pi, because why the hell not? //
/obj/item/integrated_circuit/arithmetic/pi
@@ -242,9 +251,9 @@
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/arithmetic/pi/do_work()
var/datum/integrated_io/output/O = outputs[1]
O.data = 3.14159
O.push_data()
set_pin_data(IC_OUTPUT, 1, 3.14159)
push_data()
activate_pin(2)
// Random //
/obj/item/integrated_circuit/arithmetic/random
@@ -253,20 +262,20 @@
extended_desc = "'Inclusive' means that the upper bound is included in the range of numbers, e.g. L = 1 and H = 3 will allow \
for outputs of 1, 2, or 3. H being the higher number is not <i>strictly</i> required."
icon_state = "random"
inputs = list("L","H")
inputs = list("\<NUM\> L","\<NUM\> H")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/arithmetic/random/do_work()
var/result = 0
var/datum/integrated_io/L = inputs[1]
var/datum/integrated_io/H = inputs[2]
var/L = get_pin_data(IC_INPUT, 1)
var/H = get_pin_data(IC_INPUT, 2)
if(isnum(L.data) && isnum(H.data))
result = rand(L.data, H.data)
if(isnum(L) && isnum(H))
result = rand(L, H)
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Square Root //
@@ -274,7 +283,7 @@
name = "square root circuit"
desc = "This outputs the square root of a number you put in."
icon_state = "square_root"
inputs = list("A")
inputs = list("\<NUM\> A")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/arithmetic/square_root/do_work()
@@ -284,9 +293,9 @@
if(isnum(I.data))
result = sqrt(I.data)
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// % Modulo % //
@@ -294,17 +303,17 @@
name = "modulo circuit"
desc = "Gets the remainder of A / B."
icon_state = "modulo"
inputs = list("A", "B")
inputs = list("\<NUM\> A", "\<NUM\> B")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/arithmetic/modulo/do_work()
var/result = 0
var/datum/integrated_io/input/A = inputs[1]
var/datum/integrated_io/input/B = inputs[2]
if(isnum(A.data) && isnum(B.data) && B.data != 0)
result = A.data % B.data
var/A = get_pin_data(IC_INPUT, 1)
var/B = get_pin_data(IC_INPUT, 2)
if(isnum(A) && isnum(B) && B != 0)
result = A % B
for(var/datum/integrated_io/output/O in outputs)
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
@@ -3,7 +3,7 @@
complexity = 2
inputs = list("input")
outputs = list("output")
activators = list("convert")
activators = list("\<PULSE IN\> convert", "\<PULSE OUT\> on convert")
category_text = "Converter"
autopulse = 1
power_draw_per_use = 10
@@ -16,89 +16,113 @@
name = "number to string"
desc = "This circuit can convert a number variable into a string."
icon_state = "num-string"
inputs = list("\<NUM\> input")
outputs = list("\<TEXT\> output")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/num2text/do_work()
var/result = null
var/datum/integrated_io/incoming = inputs[1]
var/datum/integrated_io/outgoing = outputs[1]
if(incoming.data && isnum(incoming.data))
result = num2text(incoming.data)
pull_data()
var/incoming = get_pin_data(IC_INPUT, 1)
if(incoming && isnum(incoming))
result = num2text(incoming)
outgoing.data = result
outgoing.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
/obj/item/integrated_circuit/converter/text2num
name = "string to number"
desc = "This circuit can convert a string variable into a number."
icon_state = "string-num"
inputs = list("\<TEXT\> input")
outputs = list("\<NUM\> output")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/text2num/do_work()
var/result = null
var/datum/integrated_io/incoming = inputs[1]
var/datum/integrated_io/outgoing = outputs[1]
if(incoming.data && istext(incoming.data))
result = text2num(incoming.data)
pull_data()
var/incoming = get_pin_data(IC_INPUT, 1)
if(incoming && istext(incoming))
result = text2num(incoming)
outgoing.data = result
outgoing.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
/obj/item/integrated_circuit/converter/ref2text
name = "reference to string"
desc = "This circuit can convert a reference to something else to a string, specifically the name of that reference."
icon_state = "ref-string"
inputs = list("\<REF\> input")
outputs = list("\<TEXT\> output")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/ref2text/do_work()
var/result = null
var/datum/integrated_io/incoming = inputs[1]
var/datum/integrated_io/outgoing = outputs[1]
var/atom/A = incoming.data_as_type(/atom)
result = A && A.name
pull_data()
var/atom/A = get_pin_data(IC_INPUT, 1)
if(A && istype(A))
result = A.name
outgoing.data = result
outgoing.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
/obj/item/integrated_circuit/converter/lowercase
name = "lowercase string converter"
desc = "this will cause a string to come out in all lowercase."
icon_state = "lowercase"
inputs = list("\<TEXT\> input")
outputs = list("\<TEXT\> output")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/lowercase/do_work()
var/result = null
var/datum/integrated_io/incoming = inputs[1]
var/datum/integrated_io/outgoing = outputs[1]
if(incoming.data && istext(incoming.data))
result = lowertext(incoming.data)
pull_data()
var/incoming = get_pin_data(IC_INPUT, 1)
if(incoming && istext(incoming))
result = lowertext(incoming)
outgoing.data = result
outgoing.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
/obj/item/integrated_circuit/converter/uppercase
name = "uppercase string converter"
desc = "THIS WILL CAUSE A STRING TO COME OUT IN ALL UPPERCASE."
icon_state = "uppercase"
inputs = list("\<TEXT\> input")
outputs = list("\<TEXT\> output")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/uppercase/do_work()
var/result = null
var/datum/integrated_io/incoming = inputs[1]
var/datum/integrated_io/outgoing = outputs[1]
if(incoming.data && istext(incoming.data))
result = uppertext(incoming.data)
pull_data()
var/incoming = get_pin_data(IC_INPUT, 1)
if(incoming && istext(incoming))
result = uppertext(incoming)
outgoing.data = result
outgoing.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
/obj/item/integrated_circuit/converter/concatenatior
name = "concatenatior"
desc = "This joins many strings together to get one big string."
desc = "This joins many strings or numbers together to get one big string."
complexity = 4
inputs = list("A","B","C","D","E","F","G","H")
outputs = list("result")
activators = list("concatenate")
inputs = list(
"\<TEXT/NUM\> A",
"\<TEXT/NUM\> B",
"\<TEXT/NUM\> C",
"\<TEXT/NUM\> D",
"\<TEXT/NUM\> E",
"\<TEXT/NUM\> F",
"\<TEXT/NUM\> G",
"\<TEXT/NUM\> H"
)
outputs = list("\<TEXT\> result")
activators = list("\<PULSE IN\> concatenate", "\<PULSE OUT\> on concatenated")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/concatenatior/do_work()
@@ -107,70 +131,70 @@
I.pull_data()
if(istext(I.data))
result = result + I.data
else if(!isnull(I.data) && num2text(I.data))
result = result + num2text(I.data)
var/datum/integrated_io/outgoing = outputs[1]
outgoing.data = result
outgoing.push_data()
activate_pin(2)
/obj/item/integrated_circuit/converter/radians2degrees
name = "radians to degrees converter"
desc = "Converts radians to degrees."
inputs = list("radian")
outputs = list("degrees")
inputs = list("\<NUM\> radian")
outputs = list("\<NUM\> degrees")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/radians2degrees/do_work()
var/result = null
var/datum/integrated_io/incoming = inputs[1]
var/datum/integrated_io/outgoing = outputs[1]
incoming.pull_data()
if(incoming.data && isnum(incoming.data))
result = ToDegrees(incoming.data)
pull_data()
var/incoming = get_pin_data(IC_INPUT, 1)
if(incoming && isnum(incoming))
result = ToDegrees(incoming)
outgoing.data = result
outgoing.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
/obj/item/integrated_circuit/converter/degrees2radians
name = "degrees to radians converter"
desc = "Converts degrees to radians."
inputs = list("degrees")
outputs = list("radians")
inputs = list("\<NUM\> degrees")
outputs = list("\<NUM\> radians")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/degrees2radians/do_work()
var/result = null
var/datum/integrated_io/incoming = inputs[1]
var/datum/integrated_io/outgoing = outputs[1]
incoming.pull_data()
if(incoming.data && isnum(incoming.data))
result = ToRadians(incoming.data)
pull_data()
var/incoming = get_pin_data(IC_INPUT, 1)
if(incoming && isnum(incoming))
result = ToRadians(incoming)
outgoing.data = result
outgoing.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
/obj/item/integrated_circuit/converter/abs_to_rel_coords
name = "abs to rel coordinate converter"
desc = "Easily convert absolute coordinates to relative coordinates with this."
complexity = 4
inputs = list("X1 (abs)", "Y1 (abs)", "X2 (abs)", "Y2 (abs)")
outputs = list("X (rel)", "Y (rel)")
activators = list("compute rel coordinates")
inputs = list("\<NUM\> X1", "\<NUM\> Y1", "\<NUM\> X2", "\<NUM\> Y2")
outputs = list("\<NUM\> X", "\<NUM\> Y")
activators = list("\<PULSE IN\> compute rel coordinates", "\<PULSE OUT\> on convert")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/converter/abs_to_rel_coords/do_work()
var/datum/integrated_io/x1 = inputs[1]
var/datum/integrated_io/y1 = inputs[2]
var/x1 = get_pin_data(IC_INPUT, 1)
var/y1 = get_pin_data(IC_INPUT, 2)
var/datum/integrated_io/x2 = inputs[3]
var/datum/integrated_io/y2 = inputs[4]
var/x2 = get_pin_data(IC_INPUT, 3)
var/y2 = get_pin_data(IC_INPUT, 4)
var/datum/integrated_io/result_x = outputs[1]
var/datum/integrated_io/result_y = outputs[2]
if(x1 && y1 && x2 && y2)
set_pin_data(IC_OUTPUT, 1, x1 - x2)
set_pin_data(IC_OUTPUT, 2, y1 - y2)
if(x1.data && y1.data && x2.data && y2.data)
result_x.data = x1.data - x2.data
result_y.data = y1.data - y2.data
for(var/datum/integrated_io/output/O in outputs)
O.push_data()
push_data()
activate_pin(2)
@@ -14,28 +14,27 @@
can_be_asked_input = 1
inputs = list()
outputs = list()
activators = list("on pressed")
activators = list("\<PULSE OUT\> on pressed")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/input/button/ask_for_input(mob/user) //Bit misleading name for this specific use.
var/datum/integrated_io/A = activators[1]
if(A.linked.len)
for(var/datum/integrated_io/activate/target in A.linked)
target.holder.check_then_do_work()
to_chat(user, "<span class='notice'>You press the button labeled '[src.name]'.</span>")
activate_pin(1)
/obj/item/integrated_circuit/input/toggle_button
name = "toggle button"
desc = "It toggles on, off, on, off..."
icon_state = "toggle_button"
complexity = 1
can_be_asked_input = 1
inputs = list()
outputs = list("on" = 0)
activators = list("on toggle")
outputs = list("\<NUM\> on" = 0)
activators = list("\<PULSE OUT\> on toggle")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/input/toggle_button/ask_for_input(mob/user) // Ditto.
set_pin_data(IC_OUTPUT, 1, !get_pin_data(IC_OUTPUT, 1))
push_data()
activate_pin(1)
to_chat(user, "<span class='notice'>You toggle the button labeled '[src.name]' [get_pin_data(IC_OUTPUT, 1) ? "on" : "off"].</span>")
@@ -46,19 +45,17 @@
complexity = 2
can_be_asked_input = 1
inputs = list()
outputs = list("number entered")
activators = list("on entered")
outputs = list("\<NUM\> number entered")
activators = list("\<PULSE OUT\> on entered")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 4
/obj/item/integrated_circuit/input/numberpad/ask_for_input(mob/user)
var/new_input = input(user, "Enter a number, please.","Number pad") as null|num
if(isnum(new_input) && CanInteract(user, physical_state))
var/datum/integrated_io/O = outputs[1]
O.data = new_input
O.push_data()
var/datum/integrated_io/A = activators[1]
A.push_data()
set_pin_data(IC_OUTPUT, 1, new_input)
push_data()
activate_pin(1)
/obj/item/integrated_circuit/input/textpad
name = "text pad"
@@ -67,49 +64,43 @@
complexity = 2
can_be_asked_input = 1
inputs = list()
outputs = list("string entered")
activators = list("on entered")
outputs = list("\<TEXT\> string entered")
activators = list("\<PULSE OUT\> on entered")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 4
/obj/item/integrated_circuit/input/textpad/ask_for_input(mob/user)
var/new_input = input(user, "Enter some words, please.","Number pad") as null|text
if(istext(new_input) && CanInteract(user, physical_state))
var/datum/integrated_io/O = outputs[1]
O.data = new_input
O.push_data()
var/datum/integrated_io/A = activators[1]
A.push_data()
set_pin_data(IC_OUTPUT, 1, new_input)
push_data()
activate_pin(1)
/obj/item/integrated_circuit/input/med_scanner
name = "integrated medical analyser"
desc = "A very small version of the common medical analyser. This allows the machine to know how healthy someone is."
icon_state = "medscan"
complexity = 4
inputs = list("target ref")
outputs = list("total health %", "total missing health")
activators = list("scan")
inputs = list("\<REF\> target")
outputs = list("\<NUM\> total health %", "\<NUM\> total missing health")
activators = list("\<PULSE IN\> scan", "\<PULSE OUT\> on scanned")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
power_draw_per_use = 40
/obj/item/integrated_circuit/input/med_scanner/do_work()
var/datum/integrated_io/I = inputs[1]
var/mob/living/carbon/human/H = I.data_as_type(/mob/living/carbon/human)
var/mob/living/carbon/human/H = get_pin_data_as_type(IC_INPUT, 1, /mob/living/carbon/human)
if(!istype(H)) //Invalid input
return
if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range.
var/total_health = round(H.health/H.getMaxHealth(), 0.1)*100
var/missing_health = H.getMaxHealth() - H.health
var/datum/integrated_io/total = outputs[1]
var/datum/integrated_io/missing = outputs[2]
set_pin_data(IC_OUTPUT, 1, total_health)
set_pin_data(IC_OUTPUT, 2, missing_health)
total.data = total_health
missing.data = missing_health
for(var/datum/integrated_io/output/O in outputs)
O.push_data()
push_data()
activate_pin(2)
/obj/item/integrated_circuit/input/adv_med_scanner
name = "integrated advanced medical analyser"
@@ -117,48 +108,39 @@
This type is much more precise, allowing the machine to know much more about the target than a normal analyzer."
icon_state = "medscan_adv"
complexity = 12
inputs = list("target ref")
inputs = list("\<REF\> target")
outputs = list(
"total health %",
"total missing health",
"brute damage",
"burn damage",
"tox damage",
"oxy damage",
"clone damage"
"\<NUM\> total health %",
"\<NUM\> total missing health",
"\<NUM\> brute damage",
"\<NUM\> burn damage",
"\<NUM\> tox damage",
"\<NUM\> oxy damage",
"\<NUM\> clone damage"
)
activators = list("scan")
activators = list("\<PULSE IN\> scan", "\<PULSE OUT\> on scanned")
spawn_flags = IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 4)
power_draw_per_use = 80
/obj/item/integrated_circuit/input/adv_med_scanner/do_work()
var/datum/integrated_io/I = inputs[1]
var/mob/living/carbon/human/H = I.data_as_type(/mob/living/carbon/human)
var/mob/living/carbon/human/H = get_pin_data_as_type(IC_INPUT, 1, /mob/living/carbon/human)
if(!istype(H)) //Invalid input
return
if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range.
var/total_health = round(H.health/H.getMaxHealth(), 0.1)*100
var/missing_health = H.getMaxHealth() - H.health
var/datum/integrated_io/total = outputs[1]
var/datum/integrated_io/missing = outputs[2]
var/datum/integrated_io/brute = outputs[3]
var/datum/integrated_io/burn = outputs[4]
var/datum/integrated_io/tox = outputs[5]
var/datum/integrated_io/oxy = outputs[6]
var/datum/integrated_io/clone = outputs[7]
set_pin_data(IC_OUTPUT, 1, total_health)
set_pin_data(IC_OUTPUT, 2, missing_health)
set_pin_data(IC_OUTPUT, 3, H.getBruteLoss())
set_pin_data(IC_OUTPUT, 4, H.getFireLoss())
set_pin_data(IC_OUTPUT, 5, H.getToxLoss())
set_pin_data(IC_OUTPUT, 6, H.getOxyLoss())
set_pin_data(IC_OUTPUT, 7, H.getCloneLoss())
total.data = total_health
missing.data = missing_health
brute.data = H.getBruteLoss()
burn.data = H.getFireLoss()
tox.data = H.getToxLoss()
oxy.data = H.getOxyLoss()
clone.data = H.getCloneLoss()
for(var/datum/integrated_io/output/O in outputs)
O.push_data()
push_data()
activate_pin(2)
/obj/item/integrated_circuit/input/local_locator
name = "local locator"
@@ -222,9 +204,9 @@
Meaning the default frequency is expressed as 1457, not 145.7. To send a signal, pulse the 'send signal' activator pin."
icon_state = "signal"
complexity = 4
inputs = list("frequency","code")
inputs = list("\<NUM\> frequency","\<NUM\> code")
outputs = list()
activators = list("send signal","on signal received")
activators = list("\<PULSE IN\> send signal","\<PULSE OUT\> on signal sent", "\<PULSE OUT\> on signal received")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2)
power_draw_idle = 5
@@ -237,11 +219,9 @@
/obj/item/integrated_circuit/input/signaler/initialize()
..()
set_frequency(frequency)
var/datum/integrated_io/new_freq = inputs[1]
var/datum/integrated_io/new_code = inputs[2]
// Set the pins so when someone sees them, they won't show as null
new_freq.data = frequency
new_code.data = code
set_pin_data(IC_INPUT, 1, frequency)
set_pin_data(IC_INPUT, 2, code)
/obj/item/integrated_circuit/input/signaler/Destroy()
if(radio_controller)
@@ -250,12 +230,12 @@
. = ..()
/obj/item/integrated_circuit/input/signaler/on_data_written()
var/datum/integrated_io/new_freq = inputs[1]
var/datum/integrated_io/new_code = inputs[2]
if(isnum(new_freq.data) && new_freq.data > 0)
set_frequency(new_freq.data)
if(isnum(new_code.data))
code = new_code.data
var/new_freq = get_pin_data(IC_INPUT, 1)
var/new_code = get_pin_data(IC_INPUT, 2)
if(isnum(new_freq) && new_freq > 0)
set_frequency(new_freq)
if(isnum(new_code))
code = new_code
/obj/item/integrated_circuit/input/signaler/do_work() // Sends a signal.
@@ -267,6 +247,7 @@
signal.encryption = code
signal.data["message"] = "ACTIVATE"
radio_connection.post_signal(src, signal)
activate_pin(2)
/obj/item/integrated_circuit/input/signaler/proc/set_frequency(new_frequency)
if(!frequency)
@@ -280,11 +261,11 @@
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
/obj/item/integrated_circuit/input/signaler/receive_signal(datum/signal/signal)
var/datum/integrated_io/new_code = inputs[2]
var/new_code = get_pin_data(IC_INPUT, 2)
var/code = 0
if(isnum(new_code.data))
code = new_code.data
if(isnum(new_code))
code = new_code
if(!signal)
return 0
if(signal.encryption != code)
@@ -292,8 +273,7 @@
if(signal.source == src) // Don't trigger ourselves.
return 0
var/datum/integrated_io/A = activators[2]
A.push_data()
activate_pin(3)
for(var/mob/O in hearers(1, get_turf(src)))
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
@@ -306,9 +286,9 @@
will pulse whatever's connected to it. Pulsing the first activation pin will send a message."
icon_state = "signal"
complexity = 4
inputs = list("target EPv2 address", "data to send", "secondary text")
outputs = list("address received", "data received", "secondary text received")
activators = list("send data", "on data received")
inputs = list("\<TEXT\> target EPv2 address", "\<TEXT\> data to send", "\<TEXT\> secondary text")
outputs = list("\<TEXT\> address received", "\<TEXT\> data received", "\<TEXT\> secondary text received")
activators = list("\<PULSE IN\> send data", "\<PULSE OUT\> on data received")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2)
power_draw_per_use = 50
@@ -318,7 +298,7 @@
..()
exonet = new(src)
exonet.make_address("EPv2_circuit-\ref[src]")
desc += "<br>This circuit's EPv2 address is: [exonet.address]."
desc += "<br>This circuit's EPv2 address is: [exonet.address]"
/obj/item/integrated_circuit/input/EPv2/Destroy()
if(exonet)
@@ -327,64 +307,60 @@
..()
/obj/item/integrated_circuit/input/EPv2/do_work()
var/datum/integrated_io/target_address = inputs[1]
var/datum/integrated_io/message = inputs[2]
var/datum/integrated_io/text = inputs[3]
if(istext(target_address.data))
exonet.send_message(target_address.data, message.data, text.data)
var/target_address = get_pin_data(IC_INPUT, 1)
var/message = get_pin_data(IC_INPUT, 2)
var/text = get_pin_data(IC_INPUT, 3)
if(target_address && istext(target_address))
exonet.send_message(target_address, message, text)
/obj/item/integrated_circuit/input/receive_exonet_message(var/atom/origin_atom, var/origin_address, var/message, var/text)
var/datum/integrated_io/message_received = outputs[1]
var/datum/integrated_io/data_received = outputs[2]
var/datum/integrated_io/text_received = outputs[3]
set_pin_data(IC_OUTPUT, 1, origin_address)
set_pin_data(IC_OUTPUT, 2, message)
set_pin_data(IC_OUTPUT, 3, text)
var/datum/integrated_io/A = activators[2]
A.push_data()
message_received.write_data_to_pin(origin_address)
data_received.write_data_to_pin(message)
text_received.write_data_to_pin(text)
for(var/datum/integrated_io/output/O in outputs)
O.push_data()
push_data()
activate_pin(2)
//This circuit gives information on where the machine is.
/obj/item/integrated_circuit/input/gps
name = "global positioning system"
desc = "This allows you to easily know the position of a machine containing this device."
extended_desc = "The GPS's coordinates it gives is absolute, not relative."
icon_state = "gps"
complexity = 4
inputs = list()
outputs = list("X (abs)", "Y (abs)")
activators = list("get coordinates")
outputs = list("\<NUM\> X", "\<NUM\> Y")
activators = list("\<PULSE IN\> get coordinates", "\<PULSE OUT\> on get coordinates")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 30
/obj/item/integrated_circuit/input/gps/do_work()
var/turf/T = get_turf(src)
var/datum/integrated_io/result_x = outputs[1]
var/datum/integrated_io/result_y = outputs[2]
result_x.data = null
result_y.data = null
set_pin_data(IC_OUTPUT, 1, null)
set_pin_data(IC_OUTPUT, 2, null)
if(!T)
return
result_x.data = T.x
result_y.data = T.y
set_pin_data(IC_OUTPUT, 1, T.x)
set_pin_data(IC_OUTPUT, 2, T.y)
for(var/datum/integrated_io/output/O in outputs)
O.push_data()
push_data()
activate_pin(2)
/obj/item/integrated_circuit/input/microphone
name = "microphone"
desc = "Useful for spying on people or for voice activated machines."
extended_desc = "This will automatically translate most languages it hears to Galactic Common. \
The first activation pin is always pulsed when the circuit hears someone talk, while the second one \
is only triggered if it hears someone speaking a language other than Galactic Common."
icon_state = "recorder"
complexity = 8
inputs = list()
outputs = list("speaker \<String\>", "message \<String\>")
activators = list("on message received")
outputs = list("\<TEXT\> speaker", "\<TEXT\> message")
activators = list("\<PULSE OUT\> on message received", "\<PULSE OUT\> on translation")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 15
@@ -397,42 +373,45 @@
..()
/obj/item/integrated_circuit/input/microphone/hear_talk(mob/living/M, msg, var/verb="says", datum/language/speaking=null)
var/datum/integrated_io/V = outputs[1]
var/datum/integrated_io/O = outputs[2]
var/datum/integrated_io/A = activators[1]
var/translated = FALSE
if(M && msg)
if(speaking)
if(!speaking.machine_understands)
msg = speaking.scramble(msg)
V.data = M.GetVoice()
O.data = msg
A.push_data()
if(!istype(speaking, /datum/language/common))
translated = TRUE
set_pin_data(IC_OUTPUT, 1, M.GetVoice())
set_pin_data(IC_OUTPUT, 2, msg)
for(var/datum/integrated_io/output/out in outputs)
out.push_data()
A.push_data()
push_data()
activate_pin(1)
if(translated)
activate_pin(2)
/obj/item/integrated_circuit/input/sensor
name = "sensor"
desc = "Scans and obtains a reference for any objects or persons near you. All you need to do is shove the machine in their face."
extended_desc = "If 'ignore storage' pin is set to 1, the sensor will disregard scanning various storage containers such as backpacks."
icon_state = "recorder"
complexity = 12
inputs = list()
outputs = list("scanned ref \<Ref\>")
activators = list("on scanned")
inputs = list("\<NUM\> ignore storage" = 1)
outputs = list("\<REF\> scanned")
activators = list("\<PULSE OUT\> on scanned")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 120
/obj/item/integrated_circuit/input/sensor/do_work()
// Because this gets called by attack(), all this needs to do is pulse the activator.
for(var/datum/integrated_io/output/O in outputs)
O.push_data()
var/datum/integrated_io/activate/A = activators[1]
A.push_data()
/obj/item/integrated_circuit/input/sensor/proc/scan(var/atom/A)
var/ignore_bags = get_pin_data(IC_INPUT, 1)
if(ignore_bags)
if(istype(A, /obj/item/weapon/storage))
return FALSE
set_pin_data(IC_OUTPUT, 1, weakref(A))
push_data()
activate_pin(1)
return TRUE
/obj/item/integrated_circuit/output
category_text = "Output"
@@ -441,9 +420,9 @@
name = "small screen"
desc = "This small screen can display a single piece of data, when the machine is examined closely."
icon_state = "screen"
inputs = list("displayed data")
inputs = list("\<TEXT/NUM\> displayed data")
outputs = list()
activators = list("load data")
activators = list("\<PULSE IN\> load data")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 10
autopulse = 1
@@ -497,7 +476,7 @@
complexity = 4
inputs = list()
outputs = list()
activators = list("toggle light")
activators = list("\<PULSE IN\> toggle light")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
var/light_toggled = 0
var/light_brightness = 3
@@ -519,18 +498,18 @@
power_draw_idle = light_toggled ? light_brightness * 2 : 0
/obj/item/integrated_circuit/output/light/advanced/update_lighting()
var/datum/integrated_io/R = inputs[1]
var/datum/integrated_io/G = inputs[2]
var/datum/integrated_io/B = inputs[3]
var/datum/integrated_io/brightness = inputs[4]
var/R = get_pin_data(IC_INPUT, 1)
var/G = get_pin_data(IC_INPUT, 2)
var/B = get_pin_data(IC_INPUT, 3)
var/brightness = get_pin_data(IC_INPUT, 4)
if(isnum(R.data) && isnum(G.data) && isnum(B.data) && isnum(brightness.data))
R.data = Clamp(R.data, 0, 255)
G.data = Clamp(G.data, 0, 255)
B.data = Clamp(B.data, 0, 255)
brightness.data = Clamp(brightness.data, 0, 6)
light_rgb = rgb(R.data, G.data, B.data)
light_brightness = brightness.data
if(isnum(R) && isnum(G) && isnum(B) && isnum(brightness))
R = Clamp(R, 0, 255)
G = Clamp(G, 0, 255)
B = Clamp(B, 0, 255)
brightness = Clamp(brightness, 0, 6)
light_rgb = rgb(R, G, B)
light_brightness = brightness
..()
@@ -544,10 +523,10 @@
icon_state = "light_adv"
complexity = 8
inputs = list(
"R",
"G",
"B",
"Brightness"
"\<NUM\> R",
"\<NUM\> G",
"\<NUM\> B",
"\<NUM\> Brightness"
)
outputs = list()
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
@@ -563,9 +542,9 @@
complexity = 8
cooldown_per_use = 4 SECONDS
inputs = list(
"sound ID",
"volume",
"frequency"
"\<TEXT\> sound ID",
"\<NUM\> volume",
"\<NUM\> frequency"
)
outputs = list()
activators = list("play sound")
@@ -4,7 +4,7 @@
extended_desc = "Logic circuits will treat a null, 0, and a \"\" string value as FALSE and anything else as TRUE."
complexity = 3
outputs = list("result")
activators = list("compare", "on true result", "on false result")
activators = list("\<PULSE IN\> compare")
category_text = "Logic"
autopulse = 1
power_draw_per_use = 1
@@ -14,36 +14,39 @@
check_then_do_work()
/obj/item/integrated_circuit/logic/do_work()
var/datum/integrated_io/O = outputs[1]
var/datum/integrated_io/T = activators[2]
var/datum/integrated_io/F = activators[3]
O.push_data()
if(O.data)
T.push_data()
else
F.push_data()
push_data()
/obj/item/integrated_circuit/logic/binary
inputs = list("A","B")
inputs = list("\<ANY\> A","\<ANY\> B")
activators = list("\<PULSE IN\> compare", "\<PULSE OUT\> on true result", "\<PULSE OUT\> on false result")
/obj/item/integrated_circuit/logic/binary/do_work()
pull_data()
var/datum/integrated_io/A = inputs[1]
var/datum/integrated_io/B = inputs[2]
var/datum/integrated_io/O = outputs[1]
O.data = do_compare(A, B) ? TRUE : FALSE
if(get_pin_data(IC_OUTPUT, 1))
activate_pin(2)
else
activate_pin(3)
..()
/obj/item/integrated_circuit/logic/binary/proc/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B)
return FALSE
/obj/item/integrated_circuit/logic/unary
inputs = list("A")
inputs = list("\<ANY\> A")
activators = list("\<PULSE IN\> compare", "\<PULSE OUT\> on compare")
/obj/item/integrated_circuit/logic/unary/do_work()
pull_data()
var/datum/integrated_io/A = inputs[1]
var/datum/integrated_io/O = outputs[1]
O.data = do_check(A) ? TRUE : FALSE
..()
activate_pin(2)
/obj/item/integrated_circuit/logic/unary/proc/do_check(var/datum/integrated_io/A)
return FALSE
@@ -125,6 +128,7 @@
desc = "This gate inverts what's fed into it."
icon_state = "not"
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
activators = list("\<PULSE IN\> invert", "\<PULSE OUT\> on inverted")
/obj/item/integrated_circuit/logic/unary/not/do_check(var/datum/integrated_io/A)
return !A.data
@@ -11,12 +11,12 @@
complexity = 20
w_class = ITEMSIZE_NORMAL
inputs = list(
"target X rel",
"target Y rel"
"\<NUM\> target X rel",
"\<NUM\> target Y rel"
)
outputs = list()
activators = list(
"fire"
"\<PULSE IN\> fire"
)
var/obj/item/weapon/gun/installed_gun = null
spawn_flags = IC_SPAWN_RESEARCH
@@ -11,9 +11,9 @@
some power is lost due to ineffiency."
w_class = ITEMSIZE_SMALL
complexity = 16
inputs = list("target ref")
outputs = list("target cell charge", "target cell max charge", "target cell percentage")
activators = list("transmit")
inputs = list("\<REF\> target")
outputs = list("\<NUM\> target cell charge", "\<NUM\> target cell max charge", "\<NUM\> target cell percentage")
activators = list("\<PULSE IN\> transmit")
spawn_flags = IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 4, TECH_POWER = 4, TECH_MAGNET = 3)
power_draw_per_use = 500 // Inefficency has to come from somewhere.
@@ -43,39 +43,39 @@
flags = OPENCONTAINER
complexity = 20
cooldown_per_use = 6 SECONDS
inputs = list("target ref", "injection amount" = 5)
inputs = list("\<REF\> target", "\<NUM\> injection amount" = 5)
outputs = list()
activators = list("inject")
activators = list("\<PULSE IN\> inject")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
volume = 30
power_draw_per_use = 15
/obj/item/integrated_circuit/reagent/injector/proc/inject_amount()
var/datum/integrated_io/amount = inputs[2]
if(isnum(amount.data))
return Clamp(amount.data, 0, 30)
var/amount = get_pin_data(IC_INPUT, 2)
if(isnum(amount))
return Clamp(amount, 0, 30)
/obj/item/integrated_circuit/reagent/injector/do_work()
set waitfor = 0 // Don't sleep in a proc that is called by a processor without this set, otherwise it'll delay the entire thing
var/datum/integrated_io/target = inputs[1]
var/atom/movable/AM = target.data_as_type(/atom/movable)
var/atom/movable/AM = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
if(!istype(AM)) //Invalid input
return
if(!reagents.total_volume) // Empty
return
if(AM.can_be_injected_by(src))
if(isliving(AM))
var/mob/living/L = AM
var/turf/T = get_turf(AM)
T.visible_message("<span class='warning'>[src] is trying to inject [AM]!</span>")
T.visible_message("<span class='warning'>[src] is trying to inject [L]!</span>")
sleep(3 SECONDS)
if(!AM.can_be_injected_by(src))
if(!L.can_be_injected_by(src))
return
var/contained = reagents.get_reagents()
var/trans = reagents.trans_to_mob(target, inject_amount(), CHEM_BLOOD)
message_admins("[src] injected \the [AM] with [trans]u of [contained].")
var/trans = reagents.trans_to_mob(L, inject_amount(), CHEM_BLOOD)
message_admins("[src] injected \the [L] with [trans]u of [contained].")
to_chat(AM, "<span class='notice'>You feel a tiny prick!</span>")
visible_message("<span class='warning'>[src] injects [AM]!</span>")
visible_message("<span class='warning'>[src] injects [L]!</span>")
else
reagents.trans_to(AM, inject_amount())
@@ -88,9 +88,9 @@
outside the machine if it is next to the machine. Note that this cannot be used on entities."
flags = OPENCONTAINER
complexity = 8
inputs = list("source ref", "target ref", "injection amount" = 10)
inputs = list("\<REF\> source", "\<REF\> target", "\<NUM\> injection amount" = 10)
outputs = list()
activators = list("transfer reagents")
activators = list("\<PULSE IN\> transfer reagents", "\<PULSE OUT\> on transfer")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
var/transfer_amount = 10
@@ -103,10 +103,9 @@
transfer_amount = amount.data
/obj/item/integrated_circuit/reagent/pump/do_work()
var/datum/integrated_io/A = inputs[1]
var/datum/integrated_io/B = inputs[2]
var/atom/movable/source = A.data_as_type(/atom/movable)
var/atom/movable/target = B.data_as_type(/atom/movable)
var/atom/movable/source = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
var/atom/movable/target = get_pin_data_as_type(IC_INPUT, 2, /atom/movable)
if(!istype(source) || !istype(target)) //Invalid input
return
var/turf/T = get_turf(src)
@@ -117,10 +116,11 @@
return
if(!source.is_open_container() || !target.is_open_container())
return
if(!source.reagents.get_free_space() || !target.reagents.get_free_space())
if(!target.reagents.get_free_space())
return
source.reagents.trans_to(target, transfer_amount)
activate_pin(2)
/obj/item/integrated_circuit/reagent/storage
name = "reagent storage"
@@ -8,17 +8,16 @@
cannot see the target, it will not be able to calculate the correct direction."
icon_state = "numberpad"
complexity = 25
inputs = list("target ref")
outputs = list("dir")
activators = list("calculate dir")
inputs = list("\<REF\> target")
outputs = list("\<NUM\> dir")
activators = list("\<PULSE IN\> calculate dir", "\<PULSE OUT\> on calculated")
spawn_flags = IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 5)
power_draw_per_use = 40
/obj/item/integrated_circuit/smart/basic_pathfinder/do_work()
var/datum/integrated_io/I = inputs[1]
var/datum/integrated_io/O = outputs[1]
O.data = null
set_pin_data(IC_OUTPUT, 1, null)
if(!isweakref(I.data))
return
@@ -28,6 +27,6 @@
if(!(A in view(get_turf(src))))
return // Can't see the target.
var/desired_dir = get_dir(get_turf(src), A)
if(desired_dir)
O.data = desired_dir
O.push_data()
set_pin_data(IC_OUTPUT, 1, desired_dir)
push_data()
@@ -12,16 +12,15 @@
This circuit is set to send a pulse after a delay of two seconds."
icon_state = "delay-20"
var/delay = 2 SECONDS
activators = list("incoming pulse","outgoing pulse")
activators = list("\<PULSE IN\> incoming","\<PULSE OUT\> outgoing")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 2
/obj/item/integrated_circuit/time/delay/do_work()
set waitfor = 0 // Don't sleep in a proc that is called by a processor. It'll delay the entire thing
var/datum/integrated_io/out_pulse = activators[2]
sleep(delay)
out_pulse.push_data()
activate_pin(2)
/obj/item/integrated_circuit/time/delay/five_sec
name = "five-sec delay circuit"
@@ -60,14 +59,13 @@
desc = "This sends a pulse signal out after a delay, critical for ensuring proper control flow in a complex machine. \
This circuit's delay can be customized, between 1/10th of a second to one hour. The delay is updated upon receiving a pulse."
icon_state = "delay"
inputs = list("delay time")
inputs = list("\<NUM\> delay time")
spawn_flags = IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/time/delay/custom/do_work()
var/datum/integrated_io/delay_input = inputs[1]
if(delay_input.data && isnum(delay_input.data) )
var/new_delay = min(delay_input.data, 1)
new_delay = max(new_delay, 36000) //An hour.
var/delay_input = get_pin_data(IC_INPUT, 1)
if(delay_input && isnum(delay_input) )
var/new_delay = between(1, delay_input, 36000) //An hour.
delay = new_delay
..()
@@ -80,8 +78,8 @@
var/ticks_to_pulse = 4
var/ticks_completed = 0
var/is_running = FALSE
inputs = list("enable ticking")
activators = list("outgoing pulse")
inputs = list("\<NUM\> enable ticking" = 0)
activators = list("\<PULSE OUT\> outgoing pulse")
spawn_flags = IC_SPAWN_RESEARCH
power_draw_per_use = 4
@@ -91,8 +89,8 @@
. = ..()
/obj/item/integrated_circuit/time/ticker/on_data_written()
var/datum/integrated_io/do_tick = inputs[1]
if(do_tick.data && !is_running)
var/do_tick = get_pin_data(IC_INPUT, 1)
if(do_tick && !is_running)
is_running = TRUE
processing_objects |= src
else if(is_running)
@@ -108,8 +106,7 @@
ticks_completed -= ticks_to_pulse
else
ticks_completed = 0
var/datum/integrated_io/pulser = activators[1]
pulser.push_data()
activate_pin(1)
/obj/item/integrated_circuit/time/ticker/fast
name = "fast ticker"
@@ -134,20 +131,16 @@
desc = "Tells you what the local time is, specific to your station or planet."
icon_state = "clock"
inputs = list()
outputs = list("time (string)", "hours (number)", "minutes (number)", "seconds (number)")
outputs = list("\<TEXT\> time", "\<NUM\> hours", "\<NUM\> minutes", "\<NUM\> seconds")
activators = list("\<PULSE IN\> get time","\<PULSE OUT\> on time got")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 4
/obj/item/integrated_circuit/time/clock/do_work()
var/datum/integrated_io/time = outputs[1]
var/datum/integrated_io/hour = outputs[2]
var/datum/integrated_io/min = outputs[3]
var/datum/integrated_io/sec = outputs[4]
set_pin_data(IC_OUTPUT, 1, time2text(station_time_in_ticks, "hh:mm:ss") )
set_pin_data(IC_OUTPUT, 2, text2num(time2text(station_time_in_ticks, "hh") ) )
set_pin_data(IC_OUTPUT, 3, text2num(time2text(station_time_in_ticks, "mm") ) )
set_pin_data(IC_OUTPUT, 4, text2num(time2text(station_time_in_ticks, "ss") ) )
time.data = time2text(station_time_in_ticks, "hh:mm:ss")
hour.data = text2num(time2text(station_time_in_ticks, "hh"))
min.data = text2num(time2text(station_time_in_ticks, "mm"))
sec.data = text2num(time2text(station_time_in_ticks, "ss"))
for(var/datum/integrated_io/output/O in outputs)
O.push_data()
push_data()
activate_pin(2)
@@ -1,9 +1,18 @@
//These circuits do not-so-simple math.
/obj/item/integrated_circuit/trig
complexity = 1
inputs = list("A","B","C","D","E","F","G","H")
outputs = list("result")
activators = list("compute")
inputs = list(
"\<NUM\> A",
"\<NUM\> B",
"\<NUM\> C",
"\<NUM\> D",
"\<NUM\> E",
"\<NUM\> F",
"\<NUM\> G",
"\<NUM\> H"
)
outputs = list("\<NUM\> result")
activators = list("\<PULSE IN\> compute", "\<PULSE OUT\> on computed")
category_text = "Trig"
extended_desc = "Input and output are in degrees."
autopulse = 1
@@ -19,19 +28,19 @@
name = "sin circuit"
desc = "Has nothing to do with evil, unless you consider trigonometry to be evil. Outputs the sine of A."
icon_state = "sine"
inputs = list("A")
inputs = list("\<NUM\> A")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/trig/sine/do_work()
pull_data()
var/result = null
var/datum/integrated_io/input/A = inputs[1]
A.pull_data()
if(isnum(A.data))
result = sin(A.data)
var/A = get_pin_data(IC_INPUT, 1)
if(isnum(A))
result = sin(A)
var/datum/integrated_io/output/O = outputs[1]
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Cosine //
@@ -39,19 +48,19 @@
name = "cos circuit"
desc = "Outputs the cosine of A."
icon_state = "cosine"
inputs = list("A")
inputs = list("\<NUM\> A")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/trig/cosine/do_work()
pull_data()
var/result = null
var/datum/integrated_io/input/A = inputs[1]
A.pull_data()
if(isnum(A.data))
result = cos(A.data)
var/A = get_pin_data(IC_INPUT, 1)
if(isnum(A))
result = cos(A)
var/datum/integrated_io/output/O = outputs[1]
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Tangent //
@@ -59,19 +68,19 @@
name = "tan circuit"
desc = "Outputs the tangent of A. Guaranteed to not go on a tangent about its existance."
icon_state = "tangent"
inputs = list("A")
inputs = list("\<NUM\> A")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/trig/tangent/do_work()
pull_data()
var/result = null
var/datum/integrated_io/input/A = inputs[1]
A.pull_data()
if(isnum(A.data))
result = Tan(A.data)
var/A = get_pin_data(IC_INPUT, 1)
if(isnum(A))
result = Tan(A)
var/datum/integrated_io/output/O = outputs[1]
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Cosecant //
@@ -79,19 +88,19 @@
name = "csc circuit"
desc = "Outputs the cosecant of A."
icon_state = "cosecant"
inputs = list("A")
inputs = list("\<NUM\> A")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/trig/cosecant/do_work()
pull_data()
var/result = null
var/datum/integrated_io/input/A = inputs[1]
A.pull_data()
if(isnum(A.data))
result = Csc(A.data)
var/A = get_pin_data(IC_INPUT, 1)
if(isnum(A))
result = Csc(A)
var/datum/integrated_io/output/O = outputs[1]
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Secant //
@@ -100,19 +109,19 @@
name = "sec circuit"
desc = "Outputs the secant of A. Has nothing to do with the security department."
icon_state = "secant"
inputs = list("A")
inputs = list("\<NUM\> A")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/trig/secant/do_work()
pull_data()
var/result = null
var/datum/integrated_io/input/A = inputs[1]
A.pull_data()
if(isnum(A.data))
result = Sec(A.data)
var/A = get_pin_data(IC_INPUT, 1)
if(isnum(A))
result = Sec(A)
var/datum/integrated_io/output/O = outputs[1]
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
// Cotangent //
@@ -121,16 +130,16 @@
name = "cot circuit"
desc = "Outputs the cotangent of A."
icon_state = "cotangent"
inputs = list("A")
inputs = list("\<NUM\> A")
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/trig/cotangent/do_work()
pull_data()
var/result = null
var/datum/integrated_io/input/A = inputs[1]
A.pull_data()
if(isnum(A.data))
result = Cot(A.data)
var/A = get_pin_data(IC_INPUT, 1)
if(isnum(A))
result = Cot(A)
var/datum/integrated_io/output/O = outputs[1]
O.data = result
O.push_data()
set_pin_data(IC_OUTPUT, 1, result)
push_data()
activate_pin(2)
+2 -2
View File
@@ -212,7 +212,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Ghost"
set desc = "Relinquish your life and enter the land of the dead."
if(stat == DEAD)
if(stat == DEAD && !forbid_seeing_deadchat)
announce_ghost_joinleave(ghostize(1))
else
var/response
@@ -223,7 +223,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
src.client.admin_ghost()
else
response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to play this round for another 30 minutes! You can't change your mind so choose wisely!)", "Are you sure you want to ghost?", "Ghost", "Stay in body")
response = alert(src, "Are you -sure- you want to ghost?\n(You are alive, or otherwise have the potential to become alive. If you ghost, you won't be able to play this round until you respawn as a new character! You can't change your mind so choose wisely!)", "Are you sure you want to ghost?", "Ghost", "Stay in body")
if(response != "Ghost")
return
resting = 1
+1 -1
View File
@@ -43,7 +43,7 @@
/mob/living/silicon/ai/proc/create_eyeobj(var/newloc)
if(eyeobj) destroy_eyeobj()
if(!newloc) newloc = src.loc
eyeobj = PoolOrNew(/mob/observer/eye/aiEye, newloc)
eyeobj = new /mob/observer/eye/aiEye(newloc)
eyeobj.owner = src
eyeobj.name = "[src.name] (AI Eye)" // Give it a name
if(client) client.eye = eyeobj
+1 -1
View File
@@ -101,7 +101,7 @@
/mob/living/silicon/ai/special_mentions()
return list("AI") // AI door!
// Converts specific characters, like *, |, and _ to formatted output.
// Converts specific characters, like +, |, and _ to formatted output.
/mob/proc/say_emphasis(var/message)
message = encode_html_emphasis(message, "|", "i")
message = encode_html_emphasis(message, "+", "b")
+1 -1
View File
@@ -60,7 +60,7 @@
flags = WHITELISTED
syllables = list("mrr","rr","tajr","kir","raj","kii","mir","kra","ahk","nal","vah","khaz","jri","ran","darr",
"mi","jri","dynh","manq","rhe","zar","rrhaz","kal","chur","eech","thaa","dra","jurl","mah","sanu","dra","ii'r",
"ka","aasi","far","wa","baq","ara","qara","zir","sam","mak","hrar","nja","rir","khan","jun","dar","rik","kah",
"ka","aasi","far","wa","baq","ara","qara","zir","saam","mak","hrar","nja","rir","khan","jun","dar","rik","kah",
"hal","ket","jurl","mah","tul","cresh","azu","ragh","mro","mra","mrro","mrra")
/datum/language/tajaran/get_random_name(var/gender)
+1 -1
View File
@@ -221,7 +221,7 @@
if(building == 1)
I = new /obj/item/stack/tile/floor(src)
else
I = PoolOrNew(/obj/item/stack/rods, src)
I = new /obj/item/stack/rods(src)
A.attackby(I, src)
target = null
busy = 0
+2 -2
View File
@@ -268,8 +268,8 @@
var/turf/Tsec = get_turf(src)
new /obj/item/device/assembly/prox_sensor(Tsec)
PoolOrNew(/obj/item/stack/rods, Tsec)
PoolOrNew(/obj/item/stack/rods, Tsec)
new /obj/item/stack/rods(Tsec)
new /obj/item/stack/rods(Tsec)
new /obj/item/stack/cable_coil/cut(Tsec)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+3 -3
View File
@@ -1,11 +1,11 @@
/mob/living/carbon/human/verb/give(var/mob/living/target in view(1)-usr)
/mob/living/carbon/human/verb/give(var/mob/living/carbon/target in view(1)-usr)
set category = "IC"
set name = "Give"
// TODO : Change to incapacitated() on merge.
if(src.stat || src.lying || src.resting || src.buckled)
if(src.stat || src.lying || src.resting || src.handcuffed)
return
if(!istype(target) || target.stat || target.lying || target.resting || target.buckled || target.client == null)
if(!istype(target) || target.stat || target.lying || target.resting || target.handcuffed || target.client == null)
return
var/obj/item/I = src.get_active_hand()
@@ -41,6 +41,13 @@
species.handle_death(src)
animate_tail_stop()
//Handle snowflake ling stuff.
if(mind && mind.changeling)
// If the ling is capable of revival, don't allow them to see deadchat.
if(mind.changeling.chem_charges >= CHANGELING_STASIS_COST)
if(mind.changeling.max_geneticpoints >= 0) // Absorbed lings don't count, as they can't revive.
forbid_seeing_deadchat = TRUE
//Handle brain slugs.
var/obj/item/organ/external/Hd = get_organ(BP_HEAD)
var/mob/living/simple_animal/borer/B
@@ -1497,3 +1497,11 @@
/mob/living/carbon/human/is_muzzled()
return (wear_mask && (istype(wear_mask, /obj/item/clothing/mask/muzzle) || istype(src.wear_mask, /obj/item/weapon/grenade)))
// Called by job_controller. Makes drones start with a permit, might be useful for other people later too.
/mob/living/carbon/human/equip_post_job()
var/braintype = get_FBP_type()
if(braintype == FBP_DRONE)
var/turf/T = get_turf(src)
var/obj/item/weapon/permit/drone/permit = new(T)
permit.set_name(real_name)
equip_to_appropriate_slot(permit) // If for some reason it can't find room, it'll still be on the floor.
@@ -207,7 +207,7 @@
miss_type = 1
if(prob(80))
hit_zone = ran_zone(hit_zone)
hit_zone = ran_zone(hit_zone, 70) //70% chance to hit what you're aiming at seems fair?
if(prob(15) && hit_zone != BP_TORSO) // Missed!
if(!src.lying)
attack_message = "[H] attempted to strike [src], but missed!"
@@ -248,13 +248,13 @@
rand_damage *= 2
real_damage = max(1, real_damage)
var/armour = run_armor_check(affecting, "melee")
var/soaked = get_armor_soak(affecting, "melee")
var/armour = run_armor_check(hit_zone, "melee")
var/soaked = get_armor_soak(hit_zone, "melee")
// Apply additional unarmed effects.
attack.apply_effects(H, src, armour, rand_damage, hit_zone)
// Finally, apply damage to target
apply_damage(real_damage, (attack.deal_halloss ? HALLOSS : BRUTE), affecting, armour, soaked, sharp=attack.sharp, edge=attack.edge)
apply_damage(real_damage, (attack.deal_halloss ? HALLOSS : BRUTE), hit_zone, armour, soaked, sharp=attack.sharp, edge=attack.edge)
if(I_DISARM)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
@@ -185,6 +185,26 @@
wearing_rig.notify_ai("<span class='danger'>Warning: user consciousness failure. Mobility control passed to integrated intelligence system.</span>")
..()
/mob/living/carbon/human/proc/Stasis(amount)
if((species.flags & NO_SCAN) || isSynthetic())
in_stasis = 0
else
in_stasis = amount
/mob/living/carbon/human/proc/getStasis()
if((species.flags & NO_SCAN) || isSynthetic())
return 0
return in_stasis
//This determines if, RIGHT NOW, the life() tick is being skipped due to stasis
/mob/living/carbon/human/proc/inStasisNow()
var/stasisValue = getStasis()
if(stasisValue && (life_tick % stasisValue))
return 1
return 0
/mob/living/carbon/human/getCloneLoss()
if((species.flags & NO_SCAN) || isSynthetic())
cloneloss = 0
@@ -90,6 +90,24 @@
return 0
// Returns a string based on what kind of brain the FBP has.
/mob/living/carbon/human/proc/get_FBP_type()
if(!isSynthetic())
return FBP_NONE
var/obj/item/organ/internal/brain/B
B = internal_organs_by_name[O_BRAIN]
if(B) // Incase we lost our brain for some reason, like if we got decapped.
if(istype(B, /obj/item/organ/internal/mmi_holder))
var/obj/item/organ/internal/mmi_holder/mmi_holder = B
if(istype(mmi_holder.stored_mmi, /obj/item/device/mmi/digital/posibrain))
return FBP_POSI
else if(istype(mmi_holder.stored_mmi, /obj/item/device/mmi/digital/robot))
return FBP_DRONE
else if(istype(mmi_holder.stored_mmi, /obj/item/device/mmi)) // This needs to come last because inheritence.
return FBP_CYBORG
return FBP_NONE
#undef HUMAN_EATING_NO_ISSUE
#undef HUMAN_EATING_NO_MOUTH
#undef HUMAN_EATING_BLOCKED_MOUTH
@@ -13,9 +13,11 @@
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
if(force_max_speed)
return -3 // Returning -1 will actually result in a slowdown for Teshari.
return -3
for(var/datum/modifier/M in modifiers)
if(!isnull(M.haste) && M.haste == TRUE)
return -3 // Returning -1 will actually result in a slowdown for Teshari.
if(!isnull(M.slowdown))
tally += M.slowdown
@@ -84,9 +86,7 @@
if(T && T.movement_cost)
tally += T.movement_cost
if(species.item_slowdown_halved)
if(item_tally > 0)
item_tally *= 0.5
item_tally *= species.item_slowdown_mod
tally += item_tally
+9 -6
View File
@@ -62,8 +62,12 @@
voice = GetVoice()
var/stasis = inStasisNow()
if(getStasis() > 2)
Sleeping(20)
//No need to update all of these procs if the guy is dead.
if(stat != DEAD && !in_stasis)
if(stat != DEAD && !stasis)
//Updates the number of stored chemicals for powers
handle_changeling()
@@ -82,7 +86,6 @@
if(!client)
species.handle_npc(src)
if(!handle_some_updates())
return //We go ahead and process them 5 times for HUD images and other stuff though.
@@ -97,7 +100,7 @@
return 1
/mob/living/carbon/human/breathe()
if(!in_stasis)
if(!inStasisNow())
..()
// Calculate how vulnerable the human is to under- and overpressure.
@@ -207,7 +210,7 @@
/mob/living/carbon/human/handle_mutations_and_radiation()
if(in_stasis)
if(inStasisNow())
return
if(getFireLoss())
@@ -789,7 +792,7 @@
/mob/living/carbon/human/handle_chemicals_in_body()
if(in_stasis)
if(inStasisNow())
return
if(reagents)
@@ -1339,7 +1342,7 @@
if(!druggy && !seer) see_invisible = SEE_INVISIBLE_LIVING
/mob/living/carbon/human/handle_random_events()
if(in_stasis)
if(inStasisNow())
return
// Puke if toxloss is too high
@@ -133,7 +133,7 @@
var/appearance_flags = 0 // Appearance/display related features.
var/spawn_flags = 0 // Flags that specify who can spawn as this species
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/item_slowdown_halved = 0 // If this is on, they're not as affected by item weights for slowdown
var/item_slowdown_mod = 1 // How affected by item slowdown the species is.
var/primitive_form // Lesser form, if any (ie. monkey for humans)
var/greater_form // Greater form, if any, ie. human for monkeys.
var/holder_type
@@ -37,7 +37,7 @@
brute_mod = 0.85
burn_mod = 0.85
metabolic_rate = 0.85
item_slowdown_halved = 1
item_slowdown_mod = 0.5
num_alternate_languages = 3
secondary_langs = list(LANGUAGE_UNATHI)
name_language = LANGUAGE_UNATHI
@@ -256,6 +256,7 @@
secondary_langs = list(LANGUAGE_ROOTGLOBAL)
name_language = LANGUAGE_ROOTLOCAL
health_hud_intensity = 2.5
item_slowdown_mod = 0.25
min_age = 1
max_age = 300
@@ -131,10 +131,11 @@ Please contact me on #coderbus IRC. ~Carn x
#define LEGCUFF_LAYER 23
#define L_HAND_LAYER 24
#define R_HAND_LAYER 25
#define FIRE_LAYER 26 //If you're on fire
#define WATER_LAYER 27 //If you're submerged in water.
#define TARGETED_LAYER 28 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 29
#define MODIFIER_EFFECTS_LAYER 26
#define FIRE_LAYER 27 //If you're on fire
#define WATER_LAYER 28 //If you're submerged in water.
#define TARGETED_LAYER 29 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 30
//////////////////////////////////
/mob/living/carbon/human
@@ -1118,6 +1119,18 @@ var/global/list/damage_icon_parts = list()
if(update_icons) update_icons()
/mob/living/carbon/human/update_modifier_visuals(var/update_icons=1)
overlays_standing[MODIFIER_EFFECTS_LAYER] = null
var/image/effects = new()
for(var/datum/modifier/M in modifiers)
if(M.mob_overlay_state)
var/image/I = image("icon" = 'icons/mob/modifier_effects.dmi', "icon_state" = M.mob_overlay_state)
effects.overlays += I
overlays_standing[MODIFIER_EFFECTS_LAYER] = effects
if(update_icons)
update_icons()
/mob/living/carbon/human/update_fire(var/update_icons=1)
overlays_standing[FIRE_LAYER] = null
+9
View File
@@ -958,6 +958,11 @@ default behaviour is:
update_icons()
return canmove
// Adds overlays for specific modifiers.
// You'll have to add your own implementation for non-humans currently, just override this proc.
/mob/living/proc/update_modifier_visuals()
return
/mob/living/proc/update_water() // Involves overlays for humans. Maybe we'll get submerged sprites for borgs in the future?
return
@@ -965,3 +970,7 @@ default behaviour is:
if(isSynthetic())
return FALSE
return TRUE
// Called by job_controller.
/mob/living/proc/equip_post_job()
return
@@ -439,3 +439,11 @@
hud_used.hide_actions_toggle.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number+1)
//hud_used.SetButtonCoords(hud_used.hide_actions_toggle,button_number+1)
client.screen += hud_used.hide_actions_toggle
// Returns a number to determine if something is harder or easier to hit than normal.
/mob/living/proc/get_evasion()
var/result = evasion // First we get the 'base' evasion. Generally this is zero.
for(var/datum/modifier/M in modifiers)
if(!isnull(M.evasion))
result += M.evasion
return result
+2 -2
View File
@@ -141,7 +141,7 @@ proc/get_radio_key_from_channel(var/channel)
//Redirect to say_dead if talker is dead
if(stat)
if(stat == DEAD)
if(stat == DEAD && !forbid_seeing_deadchat)
return say_dead(message)
return
@@ -308,7 +308,7 @@ proc/get_radio_key_from_channel(var/channel)
if(M && src) //If we still exist, when the spawn processes
var/dst = get_dist(get_turf(M),get_turf(src))
if(dst <= message_range || M.stat == DEAD) //Inside normal message range, or dead with ears (handled in the view proc)
if(dst <= message_range || (M.stat == DEAD && !forbid_seeing_deadchat)) //Inside normal message range, or dead with ears (handled in the view proc)
M << speech_bubble
M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol)
@@ -80,7 +80,7 @@
time_last_drone = world.time
if(player.mob && player.mob.mind) player.mob.mind.reset()
var/mob/living/silicon/robot/drone/new_drone = PoolOrNew(drone_type, get_turf(src))
var/mob/living/silicon/robot/drone/new_drone = new drone_type(get_turf(src))
new_drone.transfer_personality(player)
new_drone.master_fabricator = src
@@ -176,16 +176,16 @@
step_to(O, get_turf(pick(view(7, src))))
//rods
O = PoolOrNew(/obj/item/stack/rods, src.loc)
O = new /obj/item/stack/rods(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(75))
O = PoolOrNew(/obj/item/stack/rods, src.loc)
O = new /obj/item/stack/rods(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(50))
O = PoolOrNew(/obj/item/stack/rods, src.loc)
O = new /obj/item/stack/rods(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(25))
O = PoolOrNew(/obj/item/stack/rods, src.loc)
O = new /obj/item/stack/rods(src.loc)
step_to(O, get_turf(pick(view(7, src))))
//plasteel
@@ -103,7 +103,7 @@
if(istype(I, /obj/effect/spider/eggcluster))
eggcount ++
if(!eggcount)
var/eggs = PoolOrNew(/obj/effect/spider/eggcluster/small, list(O, src))
var/eggs = new /obj/effect/spider/eggcluster/small(O, src)
O.implants += eggs
H << "<span class='warning'>The [src] injects something into your [O.name]!</span>"
@@ -172,7 +172,7 @@
if(busy == LAYING_EGGS)
E = locate() in get_turf(src)
if(!E)
PoolOrNew(/obj/effect/spider/eggcluster, list(loc, src))
new /obj/effect/spider/eggcluster(loc, src)
fed--
busy = 0
stop_automated_movement = 0
+1
View File
@@ -207,3 +207,4 @@
var/list/active_genes=list()
var/mob_size = MOB_MEDIUM
var/forbid_seeing_deadchat = FALSE // Used for lings to not see deadchat, and to have ghosting behave as if they were not really dead.
+6
View File
@@ -390,10 +390,16 @@ proc/is_blind(A)
else
name = realname
if(subject && subject.forbid_seeing_deadchat && !subject.client.holder)
return // Can't talk in deadchat if you can't see it.
for(var/mob/M in player_list)
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && !is_mentor(M.client))) && M.is_preference_enabled(/datum/client_preference/show_dsay))
var/follow
var/lname
if(M.forbid_seeing_deadchat && !M.client.holder)
continue
if(subject)
if(M.is_key_ignored(subject.client.key)) // If we're ignored, do nothing.
continue
+1 -1
View File
@@ -199,7 +199,7 @@
if(S.victim == mob)
return
if(mob.stat==DEAD && isliving(mob))
if(mob.stat==DEAD && isliving(mob) && !mob.forbid_seeing_deadchat)
mob.ghostize()
return
+39 -6
View File
@@ -7,6 +7,7 @@
var/desc = null // Ditto.
var/icon_state = null // See above.
var/mob/living/holder = null // The mob that this datum is affecting.
var/weakref/origin = null // A weak reference to whatever caused the modifier to appear. THIS NEEDS TO BE A MOB/LIVING. It's a weakref to not interfere with qdel().
var/expire_at = null // world.time when holder's Life() will remove the datum. If null, it lasts forever or until it gets deleted by something else.
var/on_created_text = null // Text to show to holder upon being created.
var/on_expired_text = null // Text to show to holder when it expires.
@@ -14,6 +15,11 @@
var/stacks = MODIFIER_STACK_FORBID // If true, attempts to add a second instance of this type will refresh expire_at instead.
var/flags = 0 // Flags for the modifier, see mobs.dm defines for more details.
var/light_color = null // If set, the mob possessing the modifier will glow in this color. Not implemented yet.
var/light_range = null // How far the light for the above var goes. Not implemented yet.
var/light_intensity = null // Ditto. Not implemented yet.
var/mob_overlay_state = null // Icon_state for an overlay to apply to a (human) mob while this exists. This is actually implemented.
// Now for all the different effects.
// Percentage modifiers are expressed as a multipler. (e.g. +25% damage should be written as 1.25)
var/max_health_flat // Adjusts max health by a flat (e.g. +20) amount. Note this is added to base health.
@@ -29,9 +35,15 @@
var/incoming_healing_percent // Adjusts amount of healing received.
var/outgoing_melee_damage_percent // Adjusts melee damage inflicted by holder by a percentage. Affects attacks by melee weapons and hand-to-hand.
var/slowdown // Negative numbers speed up, positive numbers slow down movement.
var/haste // If set to 1, the mob will be 'hasted', which makes it ignore slowdown and go really fast.
var/evasion // Positive numbers reduce the odds of being hit by 15% each. Negative numbers increase the odds.
/datum/modifier/New(var/new_holder)
/datum/modifier/New(var/new_holder, var/new_origin)
holder = new_holder
if(new_origin)
origin = weakref(new_origin)
else // We assume the holder caused the modifier if not told otherwise.
origin = weakref(holder)
..()
// Checks to see if this datum should continue existing.
@@ -44,12 +56,18 @@
to_chat(holder, on_expired_text)
on_expire()
holder.modifiers.Remove(src)
if(mob_overlay_state) // We do this after removing ourselves from the list so that the overlay won't remain.
holder.update_modifier_visuals()
qdel(src)
// Override this for special effects when it gets removed.
/datum/modifier/proc/on_expire()
return
// Called every Life() tick. Override for special behaviour.
/datum/modifier/proc/tick()
return
/mob/living
var/list/modifiers = list() // A list of modifier datums, which can adjust certain mob numbers.
@@ -64,13 +82,17 @@
// Get rid of anything we shouldn't have.
for(var/datum/modifier/M in modifiers)
M.check_if_valid()
// Remaining modifiers will now receive a tick(). This is in a second loop for safety in order to not tick() an expired modifier.
for(var/datum/modifier/M in modifiers)
M.tick()
// Call this to add a modifier to a mob. First argument is the modifier type you want, second is how long it should last, in ticks.
// Third argument is the 'source' of the modifier, if it's from someone else. If null, it will default to the mob being applied to.
// The SECONDS/MINUTES macro is very helpful for this. E.g. M.add_modifier(/datum/modifier/example, 5 MINUTES)
/mob/living/proc/add_modifier(var/modifier_type, var/expire_at = null)
/mob/living/proc/add_modifier(var/modifier_type, var/expire_at = null, var/mob/living/origin = null)
// First, check if the mob already has this modifier.
for(var/datum/modifier/M in modifiers)
if(ispath(modifier_type, M.type))
if(istype(modifier_type, M))
switch(M.stacks)
if(MODIFIER_STACK_FORBID)
return // Stop here.
@@ -83,12 +105,16 @@
return
// If we're at this point, the mob doesn't already have it, or it does but stacking is allowed.
var/datum/modifier/mod = new modifier_type(src)
var/datum/modifier/mod = new modifier_type(src, origin)
if(expire_at)
mod.expire_at = world.time + expire_at
if(mod.on_created_text)
to_chat(src, mod.on_created_text)
modifiers.Add(mod)
if(mod.mob_overlay_state)
update_modifier_visuals()
return mod
// Removes a specific instance of modifier
/mob/living/proc/remove_specific_modifier(var/datum/modifier/M, var/silent = FALSE)
@@ -97,10 +123,17 @@
// Removes all modifiers of a type
/mob/living/proc/remove_modifiers_of_type(var/modifier_type, var/silent = FALSE)
for(var/datum/modifier/M in modifiers)
if(ispath(modifier_type, M.type))
if(istype(M, modifier_type))
M.expire(silent)
// Removes all modifiers, useful if the mob's being deleted
/mob/living/proc/remove_all_modifiers(var/silent = FALSE)
for(var/datum/modifier/M in modifiers)
M.expire(silent)
M.expire(silent)
// Checks if the mob has a modifier type.
/mob/living/proc/has_modifier_of_type(var/modifier_type)
for(var/datum/modifier/M in modifiers)
if(istype(M, modifier_type))
return TRUE
return FALSE
@@ -206,6 +206,10 @@
icon_state = "hair_bobcut"
species_allowed = list("Human","Unathi")
bobcutalt
name = "Chin Length Bob"
icon_state = "hair_bobcutalt"
bun
name = "Bun"
icon_state = "hair_bun"
@@ -361,6 +365,14 @@
name = "Hime Cut"
icon_state = "hair_himecut"
shorthime
name = "Short Hime Cut"
icon_state = "hair_shorthime"
grandebraid
name = "Grande Braid"
icon_state = "hair_grande"
mbraid
name = "Medium Braid"
icon_state = "hair_shortbraid"
@@ -369,6 +381,10 @@
name = "Long Braid"
icon_state = "hair_hbraid"
braid
name = "Floorlength Braid"
icon_state = "hair_braid"
odango
name = "Odango"
icon_state = "hair_odango"
@@ -398,6 +414,10 @@
name = "Drillruru"
icon_state = "hair_drillruru"
fringetail
name = "Fringetail"
icon_state = "hair_fringetail"
dandypomp
name = "Dandy Pompadour"
icon_state = "hair_dandypompadour"
@@ -549,7 +569,53 @@
icon_state = "hair_shavedpart"
gender = MALE
hightight
name = "High and Tight"
icon_state = "hair_hightight"
rowbun
name = "Row Bun"
icon_state = "hair_rowbun"
rowdualbraid
name = "Row Dual Braid"
icon_state = "hair_rowdualtail"
rowbraid
name = "Row Braid"
icon_state = "hair_rowbraid"
regulationmohawk
name = "Regulation Mohawk"
icon_state = "hair_shavedmohawk"
topknot
name = "Topknot"
icon_state = "hair_topknot"
ronin
name = "Ronin"
icon_state = "hair_ronin"
bowlcut2
name = "Bowl2"
icon_state = "hair_bowlcut2"
thinning
name = "Thinning"
icon_state = "hair_thinning"
thinningfront
name = "Thinning Front"
icon_state = "hair_thinningfront"
thinningback
name = "Thinning Back"
icon_state = "hair_thinningrear"
manbun
name = "Manbun"
icon_state = "hair_manbun"
/*
///////////////////////////////////
/ =---------------------------= /
@@ -674,6 +740,13 @@
name = "Walrus Moustache"
icon_state = "facial_walrus"
croppedbeard
name = "Full Cropped Beard"
icon_state = "facial_croppedfullbeard"
chinless
name = "Chinless Beard"
icon_state = "facial_chinlessbeard"
/*
///////////////////////////////////
/ =---------------------------= /
+6 -5
View File
@@ -51,7 +51,7 @@ obj/machinery/atmospherics/pipe/zpipe/New()
invisibility = i ? 101 : 0
update_icon()
obj/machinery/atmospherics/pipe/up/process()
obj/machinery/atmospherics/pipe/zpipe/process()
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
..()
else
@@ -81,10 +81,10 @@ obj/machinery/atmospherics/pipe/zpipe/proc/burst()
qdel(src) // NOT qdel.
obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
if(dir==3)
set_dir(1)
else if(dir==12)
set_dir(4)
if(dir == (NORTH|SOUTH))
set_dir(NORTH)
else if(dir == (EAST|WEST))
set_dir(EAST)
obj/machinery/atmospherics/pipe/zpipe/Destroy()
if(node1)
@@ -97,6 +97,7 @@ obj/machinery/atmospherics/pipe/zpipe/pipeline_expansion()
return list(node1, node2)
obj/machinery/atmospherics/pipe/zpipe/update_icon()
color = pipe_color
return
obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/reference)
+1 -1
View File
@@ -37,7 +37,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
// Takes care blood loss and regeneration
/mob/living/carbon/human/handle_blood()
if(in_stasis)
if(inStasisNow())
return
if(!should_have_organ(O_HEART))
+4 -4
View File
@@ -882,7 +882,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(!clean)
// Throw limb around.
if(src && istype(loc,/turf))
throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
dir = 2
if(DROPLIMB_BURN)
new /obj/effect/decal/cleanable/ash(get_turf(victim))
@@ -901,19 +901,19 @@ Note that amputating the affected organ does in fact remove the infection from t
gore.basecolor = use_blood_colour
gore.update_icon()
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
for(var/obj/item/organ/I in internal_organs)
I.removed()
if(istype(loc,/turf))
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
for(var/obj/item/I in src)
if(I.w_class <= ITEMSIZE_SMALL)
qdel(I)
continue
I.loc = get_turf(src)
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
qdel(src)
+8
View File
@@ -44,6 +44,14 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\
var/parts = BP_ALL //Defines what parts said brand can replace on a body.
var/health_hud_intensity = 1 // Intensity modifier for the health GUI indicator.
/datum/robolimb/unbranded_monitor
company = "Unbranded Monitor"
desc = "A generic unbranded interpretation of a popular prosthetic head model. It looks rudimentary and cheaply constructed."
icon = 'icons/mob/human_races/cyberlimbs/unbranded/unbranded_monitor.dmi'
parts = list(BP_HEAD)
monitor_styles = standard_monitor_styles
unavailable_to_build = 1
/datum/robolimb/nanotrasen
company = "NanoTrasen"
desc = "A simple but efficient robotic limb, created by NanoTrasen."
+2 -2
View File
@@ -123,7 +123,7 @@
if(!paperamount)
return
paperamount--
return PoolOrNew(/obj/item/weapon/shreddedp, get_turf(src))
return new /obj/item/weapon/shreddedp(get_turf(src))
/obj/machinery/papershredder/power_change()
..()
@@ -185,5 +185,5 @@
var/mob/living/M = loc
if(istype(M))
M.drop_from_inventory(src)
PoolOrNew(/obj/effect/decal/cleanable/ash,get_turf(src))
new /obj/effect/decal/cleanable/ash(get_turf(src))
qdel(src)
+12 -4
View File
@@ -182,7 +182,11 @@
if (A == user && user.zone_sel.selecting == O_MOUTH && !mouthshoot)
handle_suicide(user)
else if(user.a_intent == I_HURT) //point blank shooting
Fire(A, user, pointblank=1)
if(user && user.client && user.aiming && user.aiming.active && user.aiming.aiming_at != A && A != user)
PreFire(A,user) //They're using the new gun system, locate what they're aiming at.
return
else
Fire(A, user, pointblank=1)
else
return ..() //Pistolwhippin'
@@ -326,6 +330,8 @@
user.setMoveCooldown(move_delay)
next_fire_time = world.time + fire_delay
accuracy = initial(accuracy) //Reset the gun's accuracy
if(muzzle_flash)
set_light(0)
@@ -396,6 +402,8 @@
//update timing
next_fire_time = world.time + fire_delay
accuracy = initial(accuracy) //Reset the gun's accuracy
if(muzzle_flash)
set_light(0)
@@ -482,11 +490,11 @@
// Certain statuses make it harder to aim, blindness especially. Same chances as melee, however guns accuracy uses multiples of 15.
if(user.eye_blind)
accuracy -= 5
P.accuracy -= 5
if(user.eye_blurry)
accuracy -= 2
P.accuracy -= 2
if(user.confused)
accuracy -= 3
P.accuracy -= 3
//accuracy bonus from aiming
if (aim_targets && (target in aim_targets))
@@ -28,6 +28,7 @@
name = "practice laser carbine"
desc = "A modified version of the HI G40E, this one fires less concentrated energy bolts designed for target practice."
projectile_type = /obj/item/projectile/beam/practice
charge_cost = 48
cell_type = /obj/item/weapon/cell/device
@@ -44,10 +44,12 @@
origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3)
modifystate = "floramut"
self_recharge = 1
var/decl/plantgene/gene = null
firemodes = list(
list(mode_name="induce mutations", projectile_type=/obj/item/projectile/energy/floramut, modifystate="floramut"),
list(mode_name="increase yield", projectile_type=/obj/item/projectile/energy/florayield, modifystate="florayield"),
list(mode_name="induce specific mutations", projectile_type=/obj/item/projectile/energy/floramut/gene, modifystate="floramut"),
)
/obj/item/weapon/gun/energy/floragun/afterattack(obj/target, mob/user, adjacent_flag)
@@ -58,6 +60,28 @@
return
..()
/obj/item/weapon/gun/energy/floragun/verb/select_gene()
set name = "Select Gene"
set category = "Object"
set src in view(1)
var/genemask = input("Choose a gene to modify.") as null|anything in plant_controller.plant_gene_datums
if(!genemask)
return
gene = plant_controller.plant_gene_datums[genemask]
to_chat(usr, "<span class='info'>You set the [src]'s targeted genetic area to [genemask].</span>")
return
/obj/item/weapon/gun/energy/floragun/consume_next_projectile()
. = ..()
var/obj/item/projectile/energy/floramut/gene/G = .
if(istype(G))
G.gene = gene
/obj/item/weapon/gun/energy/meteorgun
name = "meteor gun"
desc = "For the love of god, make sure you're aiming this the right way!"
+1 -1
View File
@@ -173,7 +173,7 @@
return
//roll to-hit
miss_modifier = max(15*(distance-2) - round(15*accuracy) + miss_modifier + round(15*target_mob.evasion), 0)
miss_modifier = max(15*(distance-2) - round(15*accuracy) + miss_modifier + round(15*target_mob.get_evasion()), 0)
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob)) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss
var/result = PROJECTILE_FORCE_MISS
@@ -38,7 +38,7 @@
playsound(src, 'sound/effects/snap.ogg', 50, 1)
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
sparks.start()
@@ -121,6 +121,15 @@
else
return 1
/obj/item/projectile/energy/floramut/gene
name = "gamma somatoray"
icon_state = "energy2"
damage = 0
damage_type = TOX
nodamage = 1
check_armour = "energy"
var/decl/plantgene/gene = null
/obj/item/projectile/energy/florayield
name = "beta somatoray"
icon_state = "energy2"
+3 -3
View File
@@ -38,7 +38,7 @@
if(1)
new_growth = 2
var/obj/structure/diona/vines/existing = locate() in T
if(!istype(existing)) existing = PoolOrNew(/obj/structure/diona/vines, T)
if(!istype(existing)) existing = new /obj/structure/diona/vines(T)
if(existing.growth < new_growth)
existing.growth = new_growth
existing.update_icon()
@@ -161,11 +161,11 @@
switch(value)
if(ARTIFACT_CHAR)
PoolOrNew(/obj/structure/diona/bulb,T)
new /obj/structure/diona/bulb(T)
if(MONSTER_CHAR)
spawn_diona_nymph(T)
if(DOOR_CHAR)
var/obj/structure/diona/vines/V = PoolOrNew(/obj/structure/diona/vines,T)
var/obj/structure/diona/vines/V = new /obj/structure/diona/vines(T)
V.growth = 3
V.update_icon()
spawn(1)
@@ -95,7 +95,7 @@
if(alien == IS_SKRELL)
strength_mod *= 5
if(alien == IS_TAJARA)
strength_mod *= 1.75
strength_mod *= 1.25
if(alien == IS_UNATHI)
strength_mod *= 0.75
if(alien == IS_DIONA)
@@ -1799,6 +1799,7 @@
reagent_state = LIQUID
color = "#7F00FF"
strength = 10
druggy = 15
glass_name = "Pan-Galactic Gargle Blaster"
glass_desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy."
@@ -2232,8 +2233,8 @@
glass_name = "special blend whiskey"
glass_desc = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything."
/datum/reagent/ethanol/unathiliquor //Needs a better name
name = "Unathi Liquor"
/datum/reagent/ethanol/unathiliquor
name = "Redeemer's Brew"
id = "unathiliquor"
description = "This barely qualifies as a drink, and could give jetfuel a run for its money. Also known to cause feelings of euphoria and numbness."
taste_description = "spiced numbness"
+1 -1
View File
@@ -384,7 +384,7 @@
name = "Stimm"
id = "stimm"
result = "stimm"
required_reagents = list("sugar" = 1, "fuel" = 1)
required_reagents = list("left4zed" = 1, "fuel" = 1)
catalysts = list("fuel" = 5)
result_amount = 2
@@ -121,7 +121,7 @@
recharge_time = 3
volume = 60
possible_transfer_amounts = list(5, 10, 20, 30)
reagent_ids = list("beer", "kahlua", "whiskey", "specialwhiskey", "wine", "vodka", "gin", "rum", "tequilla", "vermouth", "cognac", "ale", "mead", "water", "sugar", "ice", "tea", "icetea", "cola", "spacemountainwind", "dr_gibb", "space_up", "tonic", "sodawater", "lemon_lime", "orangejuice", "limejuice", "watermelonjuice")
reagent_ids = list("ale", "beer", "berryjuice", "coffee", "cognac", "cola", "dr_gibb", "egg", "gin", "hot_coco", "ice", "icetea", "kahlua", "lemonjuice", "lemon_lime", "limejuice", "mead", "milk", "mint", "orangejuice", "rum", "sodawater", "soymilk", "space_up", "spacemountainwind", "specialwhiskey", "sugar", "tea", "tequilla", "tomatojuice", "tonic", "vermouth", "vodka", "water", "watermelonjuice", "whiskey", "wine")
/obj/item/weapon/reagent_containers/borghypo/service/attack(var/mob/M, var/mob/user)
return
@@ -407,6 +407,16 @@
..()
reagents.add_reagent("pwine", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew
name = "Redeemer's Brew"
desc = "Just opening the top of this bottle makes you feel a bit tipsy. Not for the faint of heart."
icon_state = "redeemersbrew"
center_of_mass = list("x"=16, "y"=3)
/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew/New()
..()
reagents.add_reagent("unathiliquor", 100)
//////////////////////////JUICES AND STUFF ///////////////////////
/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice
@@ -14,11 +14,19 @@
possible_transfer_amounts = null
flags = OPENCONTAINER
slot_flags = SLOT_BELT
var/reusable = 1
var/used = 0
var/filled = 0
var/list/filled_reagents = list()
///obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty
// ..()
// reagents.add_reagent("tricordrazine", 30)
// return
/obj/item/weapon/reagent_containers/hypospray/New()
..()
if(filled)
if(filled_reagents)
for(var/r in filled_reagents)
reagents.add_reagent(r, filled_reagents[r])
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/do_surgery(mob/living/carbon/M, mob/living/user)
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
@@ -53,6 +61,9 @@
admin_inject_log(user, M, src, contained, trans)
user << "<span class='notice'>[trans] units injected. [reagents.total_volume] units remaining in \the [src].</span>"
if(!reusable && !used)
used = !used
return
/obj/item/weapon/reagent_containers/hypospray/autoinjector
@@ -62,59 +73,52 @@
item_state = "autoinjector"
amount_per_transfer_from_this = 5
volume = 5
reusable = 0
filled = 1
filled_reagents = list("inaprovaline" = 5)
/obj/item/weapon/reagent_containers/hypospray/autoinjector/New()
/obj/item/weapon/reagent_containers/hypospray/autoinjector/on_reagent_change()
..()
reagents.add_reagent("inaprovaline", 5)
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/autoinjector/empty
filled = 0
filled_reagents = list()
/obj/item/weapon/reagent_containers/hypospray/autoinjector/used
used = 1
filled_reagents = list()
/obj/item/weapon/reagent_containers/hypospray/autoinjector/attack(mob/M as mob, mob/user as mob)
..()
if(reagents.total_volume <= 0) //Prevents autoinjectors to be refilled.
if(used) //Prevents autoinjectors to be refilled.
flags &= ~OPENCONTAINER
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/autoinjector/update_icon()
if(reagents.total_volume > 0)
if(!used && reagents.reagent_list.len)
icon_state = "[initial(icon_state)]1"
else
else if(used)
icon_state = "[initial(icon_state)]0"
else
icon_state = "[initial(icon_state)]2"
/obj/item/weapon/reagent_containers/hypospray/autoinjector/examine(mob/user)
..(user)
if(reagents && reagents.reagent_list.len)
user << "<span class='notice'>It is currently loaded.</span>"
else
else if(used)
user << "<span class='notice'>It is spent.</span>"
else
user << "<span class='notice'>It is currently unloaded.</span>"
/obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting
/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting
name = "clotting agent"
desc = "A rapid and safe way to administer clotting drugs by untrained or trained personnel."
icon_state = "autoinjector"
item_state = "autoinjector"
amount_per_transfer_from_this = 10
volume = 10
desc = "A refined version of the standard autoinjector, allowing greater capacity. This variant excels at treating bleeding wounds and internal bleeding."
filled_reagents = list("inaprovaline" = 5, "myelamine" = 10)
/obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting/New()
..()
reagents.remove_reagent("inaprovaline", 5)
reagents.add_reagent("myelamine", 10)
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/autoinjector/bonemed
/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/bonemed
name = "bone repair injector"
desc = "A rapid and safe way to administer advanced drugs by untrained or trained personnel."
icon_state = "autoinjector"
item_state = "autoinjector"
amount_per_transfer_from_this = 10
volume = 10
/obj/item/weapon/reagent_containers/hypospray/autoinjector/bonemed/New()
..()
reagents.remove_reagent("inaprovaline", 5)
reagents.add_reagent("osteodaxon", 10)
update_icon()
return
desc = "A refined version of the standard autoinjector, allowing greater capacity. This one excels at treating damage to bones."
filled_reagents = list("inaprovaline" = 5, "osteodaxon" = 10)
+1 -1
View File
@@ -26,7 +26,7 @@
/obj/item/projectile/spell_projectile/before_move()
if(proj_trail && src && src.loc) //pretty trails
var/obj/effect/overlay/trail = PoolOrNew(/obj/effect/overlay, src.loc)
var/obj/effect/overlay/trail = new /obj/effect/overlay(src.loc)
trails += trail
trail.icon = proj_trail_icon
trail.icon_state = proj_trail_icon_state
+7 -1
View File
@@ -249,7 +249,13 @@
env.merge(removed)
for(var/mob/living/carbon/human/l in view(src, min(7, round(sqrt(power/6))))) // If they can see it without mesons on. Bad on them.
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
var/eye_shield = 0 //How protected they are
if(istype(l.glasses, /obj/item/clothing/glasses/meson))
eye_shield += 1
if(istype(l.head, /obj/item/clothing/head/helmet/space))
if(l.run_armor_check(BP_HEAD, "rad") >= 60)
eye_shield += 1
if(eye_shield < 1)
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) )
//adjusted range so that a power of 170 (pretty high) results in 9 tiles, roughly the distance from the core to the engine monitoring room.
+1 -1
View File
@@ -108,7 +108,7 @@
current_floor = next_floor
control_panel_interior.visible_message("The elevator [moving_upwards ? "rises" : "descends"] smoothly.")
return 1
return (next_floor.delay_time || move_delay || 30)
/datum/turbolift/proc/queue_move_to(var/datum/turbolift_floor/floor)
if(!floor || !(floor in floors) || (floor in queued_floors))
@@ -9,3 +9,4 @@
var/lift_floor_name = null
var/lift_announce_str = "Ding!"
var/arrival_sound = 'sound/machines/ding.ogg'
var/delay_time
+1 -1
View File
@@ -123,7 +123,7 @@
dat += "<a href='?src=\ref[src];emergency_stop=1'>Emergency Stop</a>"
dat += "<hr></body></html>"
var/datum/browser/popup = new(user, "turbolift_panel", "Lift Panel", 230, 260)
var/datum/browser/popup = new(user, "turbolift_panel", "Lift Panel", 250, 320)
popup.set_content(jointext(dat, null))
popup.open()
return
@@ -5,6 +5,7 @@
var/name
var/announce_str
var/arrival_sound
var/delay_time
var/list/doors = list()
var/obj/structure/lift/button/ext_panel
@@ -20,6 +21,7 @@
name = A.lift_floor_name ? A.lift_floor_name : A.name
announce_str = A.lift_announce_str
arrival_sound = A.arrival_sound
delay_time = A.delay_time
//called when a lift has queued this floor as a destination
/datum/turbolift_floor/proc/pending_move(var/datum/turbolift/lift)
+5 -4
View File
@@ -20,16 +20,17 @@ var/datum/controller/process/turbolift/turbolift_controller
continue
spawn(0)
lift.busy = 1
if(!lift.do_move())
var/floor_delay
if(!(floor_delay = lift.do_move()))
moving_lifts[liftref] = null
moving_lifts -= liftref
if(lift.target_floor)
lift.target_floor.ext_panel.reset()
lift.target_floor = null
else
lift_is_moving(lift)
lift_is_moving(lift,floor_delay)
lift.busy = 0
SCHECK
/datum/controller/process/turbolift/proc/lift_is_moving(var/datum/turbolift/lift)
moving_lifts["\ref[lift]"] = world.time + lift.move_delay
/datum/controller/process/turbolift/proc/lift_is_moving(var/datum/turbolift/lift,var/floor_delay)
moving_lifts["\ref[lift]"] = world.time + floor_delay
+3 -3
View File
@@ -139,7 +139,7 @@
/obj/vehicle/emp_act(severity)
var/was_on = on
stat |= EMPED
var/obj/effect/overlay/pulse2 = PoolOrNew(/obj/effect/overlay, src.loc)
var/obj/effect/overlay/pulse2 = new /obj/effect/overlay(src.loc)
pulse2.icon = 'icons/effects/effects.dmi'
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
@@ -192,8 +192,8 @@
src.visible_message("\red <B>[src] blows apart!</B>", 1)
var/turf/Tsec = get_turf(src)
PoolOrNew(/obj/item/stack/rods, Tsec)
PoolOrNew(/obj/item/stack/rods, Tsec)
new /obj/item/stack/rods(Tsec)
new /obj/item/stack/rods(Tsec)
new /obj/item/stack/cable_coil/cut(Tsec)
if(cell)
+8 -3
View File
@@ -44,10 +44,15 @@ var/list/ventcrawl_machinery = list(
/mob/living/proc/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(carried_item == ability_master)
return 1
var/list/allowed = list()
for(var/type in can_enter_vent_with)
if(istype(carried_item, can_enter_vent_with))
return get_inventory_slot(carried_item) == 0
return 0
var/list/types = typesof(type)
allowed += types
if(carried_item.type in allowed)
if(get_inventory_slot(carried_item) == 0)
return 1
/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(carried_item in internal_organs)
@@ -244,7 +244,7 @@
apply_material_decorations = 0
if(23)
apply_prefix = 0
new_item = PoolOrNew(/obj/item/stack/rods, src.loc)
new_item = new /obj/item/stack/rods(src.loc)
apply_image_decorations = 0
apply_material_decorations = 0
if(24)
+7
View File
@@ -6,6 +6,7 @@ Proc for metabolism
Proc for mutating
Procs for copying speech, if applicable
Procs for targeting
Divergence proc, used in mutation to make unique datums.
*/
/mob/living/simple_animal/xeno/proc/ProcessTraits()
if(maleable >= MAX_MALEABLE)
@@ -84,8 +85,14 @@ Procs for targeting
return 1 //Everything worked out okay.
return 0
/mob/living/simple_animal/xeno/proc/diverge()
var/datum/xeno/traits/newtraits = new()
newtraits.copy_traits(traitdat)
return newtraits
/mob/living/simple_animal/xeno/proc/Mutate()
traitdat = diverge()
nameVar = "mutated"
if((COLORMUT & mutable))
traitdat.traits[TRAIT_XENO_COLOR] = "#"