Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/game/objects/effects/chem/chemsmoke.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
This commit is contained in:
Kelenius
2015-05-04 22:36:35 +03:00
85 changed files with 1620 additions and 1132 deletions

View File

@@ -747,20 +747,43 @@ var/global/floorIsLava = 0
set category = "Server"
set desc="Globally Toggles OOC"
set name="Toggle OOC"
if(!check_rights(R_ADMIN))
return
config.ooc_allowed = !(config.ooc_allowed)
if (config.ooc_allowed)
world << "<B>The OOC channel has been globally enabled!</B>"
else
world << "<B>The OOC channel has been globally disabled!</B>"
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
log_and_message_admins("toggled OOC.")
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglelooc()
set category = "Server"
set desc="Globally Toggles LOOC"
set name="Toggle LOOC"
if(!check_rights(R_ADMIN))
return
config.looc_allowed = !(config.looc_allowed)
if (config.looc_allowed)
world << "<B>The LOOC channel has been globally enabled!</B>"
else
world << "<B>The LOOC channel has been globally disabled!</B>"
log_and_message_admins("toggled LOOC.")
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggledsay()
set category = "Server"
set desc="Globally Toggles DSAY"
set name="Toggle DSAY"
if(!check_rights(R_ADMIN))
return
config.dsay_allowed = !(config.dsay_allowed)
if (config.dsay_allowed)
world << "<B>Deadchat has been globally enabled!</B>"
@@ -774,6 +797,10 @@ var/global/floorIsLava = 0
set category = "Server"
set desc="Toggle Dead OOC."
set name="Toggle Dead OOC"
if(!check_rights(R_ADMIN))
return
config.dooc_allowed = !( config.dooc_allowed )
log_admin("[key_name(usr)] toggled Dead OOC.")
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)

View File

@@ -58,6 +58,7 @@ var/list/admin_verbs_admin = list(
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
/client/proc/secrets,
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/togglelooc, /*toggles looc on/off for everyone*/
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
/datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/

View File

@@ -163,6 +163,12 @@ var/global/list/gear_datums = list()
cost = 1
slot = slot_head
/datum/gear/wcap
display_name = "cap, white"
path = /obj/item/clothing/head/soft/mime
cost = 1
slot = slot_head
/datum/gear/hairflower
display_name = "hair flower pin"
path = /obj/item/clothing/head/hairflower
@@ -181,6 +187,12 @@ var/global/list/gear_datums = list()
cost = 2
slot = slot_head
/datum/gear/rhardhat
display_name = "hardhat, red"
path = /obj/item/clothing/head/hardhat/red
cost = 2
slot = slot_head
/datum/gear/yhardhat
display_name = "hardhat, yellow"
path = /obj/item/clothing/head/hardhat
@@ -205,6 +217,12 @@ var/global/list/gear_datums = list()
cost = 1
slot = slot_head
/datum/gear/tophat
display_name = "hat, tophat"
path = /obj/item/clothing/head/that
cost = 1
slot = slot_head
// Wig by Earthcrusher, blame him.
/datum/gear/philosopher_wig
display_name = "natural philosopher's wig"
@@ -239,12 +257,37 @@ var/global/list/gear_datums = list()
display_name = "Glasses, green"
path = /obj/item/clothing/glasses/gglasses
cost = 1
slot = slot_glasses
/datum/gear/prescriptionhipster
display_name = "Glasses, hipster"
path = /obj/item/clothing/glasses/regular/hipster
cost = 1
slot = slot_glasses
/datum/gear/prescription
display_name = "Glasses, prescription"
path = /obj/item/clothing/glasses/regular
cost = 1
slot = slot_glasses
/datum/gear/monocle
display_name = "Monocle"
path = /obj/item/clothing/glasses/monocle
cost = 1
slot = slot_glasses
/datum/gear/scanning_goggles
display_name = "scanning goggles"
path = /obj/item/clothing/glasses/fluff/uzenwa_sissra_1
cost = 1
// allowed_roles = list("Roboticist", "Scientist", "Research Director")
slot = slot_glasses
/datum/gear/sciencegoggles
display_name = "Science Goggles"
path = /obj/item/clothing/glasses/science
cost = 1
slot = slot_glasses
/datum/gear/security
display_name = "Security HUD"
@@ -260,7 +303,7 @@ var/global/list/gear_datums = list()
slot = slot_glasses
allowed_roles = list("Security Officer","Head of Security","Warden")
/datum/gear/prescription
/datum/gear/prescriptionsun
display_name = "sunglasses, presciption"
path = /obj/item/clothing/glasses/sunglasses/prescription
cost = 2
@@ -276,18 +319,18 @@ var/global/list/gear_datums = list()
// Uniform slot
/datum/gear/exec_suit
display_name = "executive suit"
path = /obj/item/clothing/under/suit_jacket/really_black
slot = slot_w_uniform
cost = 1
/datum/gear/blazer_blue
display_name = "blazer, blue"
path = /obj/item/clothing/under/blazer
slot = slot_w_uniform
cost = 1
/datum/gear/cheongsam
display_name = "cheongsam, white"
path = /obj/item/clothing/under/cheongsam
slot = slot_w_uniform
cost = 1
/datum/gear/kilt
display_name = "kilt"
path = /obj/item/clothing/under/kilt
@@ -300,6 +343,17 @@ var/global/list/gear_datums = list()
slot = slot_w_uniform
cost = 1
/datum/gear/blackfjumpsuit
display_name = "jumpsuit, female-black"
path = /obj/item/clothing/under/color/blackf
slot = slot_w_uniform
cost = 1
/datum/gear/blackfjumpsuit
display_name = "jumpsuit, rainbow"
path = /obj/item/clothing/under/rainbow
slot = slot_w_uniform
cost = 1
/datum/gear/skirt_blue
display_name = "plaid skirt, blue"
path = /obj/item/clothing/under/dress/plaid_blue
@@ -324,6 +378,114 @@ var/global/list/gear_datums = list()
slot = slot_w_uniform
cost = 1
/datum/gear/amishsuit
display_name = "suit, amish"
path = /obj/item/clothing/under/sl_suit
slot = slot_w_uniform
cost = 1
/datum/gear/blacksuit
display_name = "suit, black"
path = /obj/item/clothing/under/suit_jacket
slot = slot_w_uniform
cost = 1
/datum/gear/shinyblacksuit
display_name = "suit, shiny-black"
path = /obj/item/clothing/under/lawyer/black
slot = slot_w_uniform
cost = 1
/datum/gear/bluesuit
display_name = "suit, blue"
path = /obj/item/clothing/under/lawyer/blue
slot = slot_w_uniform
cost = 1
/datum/gear/burgundysuit
display_name = "suit, burgundy"
path = /obj/item/clothing/under/suit_jacket/burgundy
slot = slot_w_uniform
cost = 1
/datum/gear/checkeredsuit
display_name = "suit, checkered"
path = /obj/item/clothing/under/suit_jacket/checkered
slot = slot_w_uniform
cost = 1
/datum/gear/charcoalsuit
display_name = "suit, charcoal"
path = /obj/item/clothing/under/suit_jacket/charcoal
slot = slot_w_uniform
cost = 1
/datum/gear/execsuit
display_name = "suit, executive"
path = /obj/item/clothing/under/suit_jacket/really_black
slot = slot_w_uniform
cost = 1
/datum/gear/femaleexecsuit
display_name = "suit, female-executive"
path = /obj/item/clothing/under/suit_jacket/female
slot = slot_w_uniform
cost = 1
/datum/gear/gentlesuit
display_name = "suit, gentlemen"
path = /obj/item/clothing/under/gentlesuit
slot = slot_w_uniform
cost = 1
/datum/gear/navysuit
display_name = "suit, navy"
path = /obj/item/clothing/under/suit_jacket/navy
slot = slot_w_uniform
cost = 1
/datum/gear/redsuit
display_name = "suit, red"
path = /obj/item/clothing/under/suit_jacket/red
slot = slot_w_uniform
cost = 1
/datum/gear/redlawyer
display_name = "suit, lawyer-red"
path = /obj/item/clothing/under/lawyer/red
slot = slot_w_uniform
cost = 1
/datum/gear/oldmansuit
display_name = "suit, old-man"
path = /obj/item/clothing/under/lawyer/oldman
slot = slot_w_uniform
cost = 1
/datum/gear/purplesuit
display_name = "suit, purple"
path = /obj/item/clothing/under/lawyer/purpsuit
slot = slot_w_uniform
cost = 1
/datum/gear/tansuit
display_name = "suit, tan"
path = /obj/item/clothing/under/suit_jacket/tan
slot = slot_w_uniform
cost = 1
/datum/gear/whitesuit
display_name = "suit, white"
path = /obj/item/clothing/under/scratch
slot = slot_w_uniform
cost = 1
/datum/gear/whitebluesuit
display_name = "suit, white-blue"
path = /obj/item/clothing/under/lawyer/bluesuit
slot = slot_w_uniform
cost = 1
/datum/gear/sundress
display_name = "sundress"
path = /obj/item/clothing/under/sundress
@@ -336,12 +498,6 @@ var/global/list/gear_datums = list()
slot = slot_w_uniform
cost = 1
/datum/gear/cheongsam
display_name = "cheongsam, white"
path = /obj/item/clothing/under/cheongsam
slot = slot_w_uniform
cost = 1
/datum/gear/uniform_captain
display_name = "uniform, captain's dress"
path = /obj/item/clothing/under/dress/dress_cap
@@ -518,9 +674,9 @@ var/global/list/gear_datums = list()
cost = 2
slot = slot_wear_suit
/datum/gear/blue_lawyer_jacket
display_name = "suit jacket, blue"
path = /obj/item/clothing/suit/storage/toggle/lawyer/bluejacket
/datum/gear/hazard_vest
display_name = "hazard vest"
path = /obj/item/clothing/suit/storage/hazardvest
cost = 2
slot = slot_wear_suit
@@ -548,6 +704,36 @@ var/global/list/gear_datums = list()
cost = 2
slot = slot_wear_suit
/datum/gear/bluelabcoat
display_name = "labcoat, blue"
path = /obj/item/clothing/suit/storage/toggle/labcoat/blue
cost = 2
slot = slot_wear_suit
/datum/gear/greenlabcoat
display_name = "labcoat, green"
path = /obj/item/clothing/suit/storage/toggle/labcoat/green
cost = 2
slot = slot_wear_suit
/datum/gear/orangelabcoat
display_name = "labcoat, orange"
path = /obj/item/clothing/suit/storage/toggle/labcoat/orange
cost = 2
slot = slot_wear_suit
/datum/gear/purplelabcoat
display_name = "labcoat, purple"
path = /obj/item/clothing/suit/storage/toggle/labcoat/purple
cost = 2
slot = slot_wear_suit
/datum/gear/redlabcoat
display_name = "labcoat, red"
path = /obj/item/clothing/suit/storage/toggle/labcoat/red
cost = 2
slot = slot_wear_suit
/datum/gear/overalls
display_name = "overalls"
path = /obj/item/clothing/suit/apron/overalls
@@ -591,6 +777,18 @@ var/global/list/gear_datums = list()
slot = slot_wear_suit
// whitelisted = "Unathi" // You don't have a monopoly on a robe!
/datum/gear/blue_lawyer_jacket
display_name = "suit jacket, blue"
path = /obj/item/clothing/suit/storage/toggle/lawyer/bluejacket
cost = 2
slot = slot_wear_suit
/datum/gear/purple_lawyer_jacket
display_name = "suit jacket, purple"
path = /obj/item/clothing/suit/storage/lawyer/purpjacket
cost = 2
slot = slot_wear_suit
/datum/gear/suspenders
display_name = "suspenders"
path = /obj/item/clothing/suit/suspenders
@@ -630,18 +828,49 @@ var/global/list/gear_datums = list()
cost = 2
slot = slot_gloves
/datum/gear/light_brown_gloves
display_name = "gloves, light-brown"
path = /obj/item/clothing/gloves/light_brown
cost = 2
slot = slot_gloves
/datum/gear/green_gloves
display_name = "gloves, green"
path = /obj/item/clothing/gloves/green
cost = 2
slot = slot_gloves
/datum/gear/grey_gloves
display_name = "gloves, grey"
path = /obj/item/clothing/gloves/grey
cost = 2
slot = slot_gloves
/datum/gear/latex_gloves
display_name = "gloves, latex"
path = /obj/item/clothing/gloves/latex
cost = 2
slot = slot_gloves
/datum/gear/orange_gloves
display_name = "gloves, orange"
path = /obj/item/clothing/gloves/orange
cost = 2
slot = slot_gloves
/datum/gear/purple_gloves
display_name = "gloves, purple"
path = /obj/item/clothing/gloves/purple
cost = 2
slot = slot_gloves
/datum/gear/rainbow_gloves
display_name = "gloves, rainbow"
path = /obj/item/clothing/gloves/rainbow
cost = 2
slot = slot_gloves
/datum/gear/red_gloves
display_name = "gloves, red"
path = /obj/item/clothing/gloves/red
@@ -728,6 +957,12 @@ var/global/list/gear_datums = list()
cost = 1
slot = slot_shoes
/datum/gear/rainbow_shoes
display_name = "shoes, rainbow"
path = /obj/item/clothing/shoes/rainbow
cost = 1
slot = slot_shoes
/datum/gear/red_shoes
display_name = "shoes, red"
path = /obj/item/clothing/shoes/red
@@ -822,6 +1057,17 @@ var/global/list/gear_datums = list()
sort_category = "misc"
cost = 1
/datum/gear/flask
display_name = "flask"
path = /obj/item/weapon/reagent_containers/food/drinks/flask/barflask
sort_category = "misc"
cost = 1
/datum/gear/vacflask
display_name = "vacuum-flask"
path = /obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask
sort_category = "misc"
cost = 1
/datum/gear/blipstick
display_name = "lipstick, black"
path = /obj/item/weapon/lipstick/black
@@ -846,6 +1092,18 @@ var/global/list/gear_datums = list()
sort_category = "misc"
cost = 1
/datum/gear/smokingpipe
display_name = "pipe, smoking"
path = /obj/item/clothing/mask/smokable/pipe
sort_category = "misc"
cost = 1
/datum/gear/cornpipe
display_name = "pipe, corn"
path = /obj/item/clothing/mask/smokable/pipe/cobpipe
sort_category = "misc"
cost = 1
/datum/gear/matchbook
display_name = "matchbook"
path = /obj/item/weapon/storage/box/matches
@@ -858,6 +1116,12 @@ var/global/list/gear_datums = list()
sort_category = "misc"
cost = 1
/datum/gear/zippo
display_name = "zippo"
path = /obj/item/weapon/flame/lighter/zippo
sort_category = "misc"
cost = 1
/*/datum/gear/combitool
display_name = "combi-tool"
path = /obj/item/weapon/combitool
@@ -865,6 +1129,12 @@ var/global/list/gear_datums = list()
// Stuff worn on the ears. Items here go in the "ears" sort_category but they must not use
// the slot_r_ear or slot_l_ear as the slot, or else players will spawn with no headset.
/datum/gear/earmuffs
display_name = "earmuffs"
path = /obj/item/clothing/ears/earmuffs
cost = 1
sort_category = "ears"
/datum/gear/skrell_chain
display_name = "skrell headtail-wear, female, chain"
path = /obj/item/clothing/ears/skrell/chain

View File

@@ -942,6 +942,13 @@
item_state = "gy_suit"
worn_state = "milohachert"
/obj/item/clothing/under/fluff/john_saaland //GA Jumpsuit-John Saaland-Foxeye
name = "GA jumpsuit"
desc = "A tan jumpsuit, robustly constructed, with various velcro strips for name and ranking patches distributed over the torso and shoulders. Only one of these strips is in use, holding a patch with 'J. SAALAND' written on it in block lettering over the right breast pocket."
icon = 'icons/obj/custom_items.dmi'
icon_state = "saaland"
item_state = "saaland_suit"
worn_state = "saaland"
/obj/item/clothing/under/fluff/kaine_kalim_2
name = "Formal Medical Uniform"
@@ -1441,3 +1448,23 @@
friend = M
break
..()
///////////////////////////// Sabess - Maria's Heart-Shaped Locket ///////////////////////////////////
/obj/item/weapon/fluff/mariafontaine
name = "Heart-Shaped Locket"
desc = " A silver, heart-shaped locket. It flips open to reveal two pictures, one of a young red-headed woman and one of a brunette of similar age. Small writing is etched onto the back, reading 'M+L'. Some may regard it as cheesy."
icon = 'icons/obj/custom_items.dmi'
icon_state = "mariaclosed"
item_state = "mariaclosed"
obj/item/weapon/fluff/mariafontaine/attack_self(mob/user as mob)
if(src.icon_state == "mariaclosed")
src.icon_state = "mariaopen"
src.item_state = "mariaopen"
user << "You flip the locket open."
else
src.icon_state = "mariaclosed"
src.item_state = "mariaclosed"
user << "You flip the locket closed."

View File

@@ -1,14 +1,13 @@
/var/global/sent_spiders_to_station = 0
/datum/event/spider_infestation
announceWhen = 400
announceWhen = 90
var/spawncount = 1
/datum/event/spider_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = rand(8, 12) //spiderlings only have a 50% chance to grow big and strong
announceWhen = rand(announceWhen, announceWhen + 60)
spawncount = rand(4 * severity, 6 * severity) //spiderlings only have a 50% chance to grow big and strong
sent_spiders_to_station = 0
/datum/event/spider_infestation/announce()
@@ -26,4 +25,4 @@
var/obj/vent = pick(vents)
new /obj/effect/spider/spiderling(vent.loc)
vents -= vent
spawncount--
spawncount--

View File

@@ -217,7 +217,7 @@
if(building == 1)
I = new /obj/item/stack/tile/plasteel(src)
else
I = new /obj/item/stack/rods(src)
I = PoolOrNew(/obj/item/stack/rods, src)
A.attackby(I, src)
target = null
repairing = 0

View File

@@ -0,0 +1,170 @@
/mob/living/carbon/process_resist()
//drop && roll
if(on_fire)
fire_stacks -= 2 //reduced
Weaken(3)
spin(32,2)
visible_message(
"<span class='danger'>[src] rolls on the floor, trying to put themselves out!</span>",
"<span class='notice'>You stop, drop, and roll!</span>"
)
sleep(30)
if(fire_stacks <= 0)
visible_message(
"<span class='danger'>[src] has successfully extinguished themselves!</span>",
"<span class='notice'>You extinguish yourself.</span>"
)
ExtinguishMob()
return
if(handcuffed)
spawn() escape_handcuffs()
else if(legcuffed)
spawn() escape_legcuffs()
..()
/mob/living/carbon/proc/escape_handcuffs()
if(!(last_special <= world.time)) return
next_move = world.time + 100
last_special = world.time + 100
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
break_handcuffs()
return
var/obj/item/weapon/handcuffs/HC = handcuffed
//A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
var/breakouttime = 1200
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
//If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
if(istype(HC))
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
visible_message(
"<span class='danger'>[src] attempts to remove \the [HC]!</span>",
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
)
if(do_after(src, breakouttime))
if(!handcuffed || buckled)
return
visible_message(
"<span class='danger'>[src] manages to remove \the [handcuffed]!</span>",
"<span class='notice'>You successfully remove \the [handcuffed].</span>"
)
drop_from_inventory(handcuffed)
/mob/living/carbon/proc/escape_legcuffs()
if(!(last_special <= world.time)) return
next_move = world.time + 100
last_special = world.time + 100
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
break_legcuffs()
return
var/obj/item/weapon/legcuffs/HC = legcuffed
//A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
var/breakouttime = 1200
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
//If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future...
if(istype(HC))
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
visible_message(
"<span class='danger'>[usr] attempts to remove \the [HC]!</span>",
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
)
if(do_after(src, breakouttime))
if(!legcuffed || buckled)
return
visible_message(
"<span class='danger'>[src] manages to remove \the [legcuffed]!</span>",
"<span class='notice'>You successfully remove \the [legcuffed].</span>"
)
drop_from_inventory(legcuffed)
legcuffed = null
update_inv_legcuffed()
/mob/living/carbon/proc/can_break_cuffs()
if(HULK in mutations)
return 1
/mob/living/carbon/proc/break_handcuffs()
visible_message(
"<span class='danger'>[src] is trying to break \the [handcuffed]!</span>",
"<span class='warning'>You attempt to break your [handcuffed.name]. (This will take around 5 seconds and you need to stand still)</span>"
)
if(do_after(src, 50))
if(!handcuffed || buckled)
return
visible_message(
"<span class='danger'>[src] manages to break \the [handcuffed]!</span>",
"<span class='warning'>You successfully break your [handcuffed.name].</span>"
)
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(handcuffed)
handcuffed = null
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
update_inv_handcuffed()
/mob/living/carbon/proc/break_legcuffs()
src << "<span class='warning'>You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)</span>"
visible_message("<span class='danger'>[src] is trying to break the legcuffs!</span>")
if(do_after(src, 50))
if(!legcuffed || buckled)
return
visible_message(
"<span class='danger'>[src] manages to break the legcuffs!</span>",
"<span class='warning'>You successfully break your legcuffs.</span>"
)
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(legcuffed)
legcuffed = null
update_inv_legcuffed()
/mob/living/carbon/human/can_break_cuffs()
if(species.can_shred(src,1))
return 1
return ..()
/mob/living/carbon/escape_buckle()
if(!buckled) return
if(!(last_special <= world.time)) return
if(!restrained())
..()
else
next_move = world.time + 100
last_special = world.time + 100
visible_message(
"<span class='danger'>[usr] attempts to unbuckle themself!</span>",
"<span class='warning'>You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)</span>"
)
if(do_after(usr, 1200))
if(!buckled)
return
visible_message("<span class='danger'>[usr] manages to unbuckle themself!</span>",
"<span class='notice'>You successfully unbuckle yourself.</span>")
buckled.user_unbuckle_mob(src)

View File

@@ -571,284 +571,84 @@ default behaviour is:
set name = "Resist"
set category = "IC"
if(usr.stat || !isliving(usr) || usr.next_move > world.time)
return
if(can_resist())
next_move = world.time + 20
process_resist()
usr.next_move = world.time + 20
var/mob/living/L = usr
/mob/living/proc/can_resist()
//need to allow !canmove, or otherwise neck grabs can't be resisted
//so just check weakened instead.
if(stat || weakened)
return 0
if(next_move > world.time)
return 0
return 1
/mob/living/proc/process_resist()
//Getting out of someone's inventory.
if(istype(src.loc,/obj/item/weapon/holder))
var/obj/item/weapon/holder/H = src.loc //Get our item holder.
var/mob/M = H.loc //Get our mob holder (if any).
if(istype(M))
M.drop_from_inventory(H)
M << "[H] wriggles out of your grip!"
src << "You wriggle out of [M]'s grip!"
else if(istype(H.loc,/obj/item))
src << "You struggle free of [H.loc]."
H.loc = get_turf(H)
if(istype(M))
for(var/atom/A in M.contents)
if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder))
return
M.status_flags &= ~PASSEMOTES
if(istype(src.loc, /obj/item/weapon/holder))
escape_inventory(src.loc)
return
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/B = src.loc
var/mob/living/captive_brain/H = src
H << "<span class='danger'>You begin doggedly resisting the parasite's control (this will take approximately sixty seconds).</span>"
B.host << "<span class='danger'>You feel the captive mind of [src] begin to resist your control.</span>"
spawn(rand(200,250)+B.host.brainloss)
if(!B || !B.controlling)
return
B.host.adjustBrainLoss(rand(5,10))
H << "<span class='danger'>With an immense exertion of will, you regain control of your body!</span>"
B.host << "<span class='danger'>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</span>"
B.detatch()
verbs -= /mob/living/carbon/proc/release_control
verbs -= /mob/living/carbon/proc/punish_host
verbs -= /mob/living/carbon/proc/spawn_larvae
return
//resisting grabs (as if it helps anyone...)
if ((!( L.stat ) && !( L.restrained() )))
var/resisting = 0
for(var/obj/O in L.requests)
L.requests.Remove(O)
qdel(O)
resisting++
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
resisting++
switch(G.state)
if(GRAB_PASSIVE)
qdel(G)
if(GRAB_AGGRESSIVE)
if(prob(60)) //same chance of breaking the grab as disarm
L.visible_message("<span class='warning'>[L] has broken free of [G.assailant]'s grip!</span>")
qdel(G)
if(GRAB_NECK)
//If the you move when grabbing someone then it's easier for them to break free. Same if the affected mob is immune to stun.
if (((world.time - G.assailant.l_move_time < 30 || !L.stunned) && prob(15)) || prob(3))
L.visible_message("<span class='warning'>[L] has broken free of [G.assailant]'s headlock!</span>")
qdel(G)
if(resisting)
L.visible_message("<span class='danger'>[L] resists!</span>")
if (!restrained())
resist_grab()
//unbuckling yourself
if(L.buckled && (L.last_special <= world.time) )
if(iscarbon(L))
var/mob/living/carbon/C = L
if( C.handcuffed )
C.next_move = world.time + 100
C.last_special = world.time + 100
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(L))
O.show_message("\red <B>[usr] attempts to unbuckle themself!</B>", 1)
spawn(0)
if(do_after(usr, 1200))
if(!C.buckled)
return
for(var/mob/O in viewers(C))
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
C << "\blue You successfully unbuckle yourself."
C.buckled.user_unbuckle_mob(C)
else
L.buckled.user_unbuckle_mob(L)
if(buckled)
spawn() escape_buckle()
//Breaking out of a locker?
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
var/breakout_time = 2 //2 minutes by default
if( src.loc && (istype(src.loc, /obj/structure/closet)) )
var/obj/structure/closet/C = loc
spawn() C.mob_breakout(src)
var/obj/structure/closet/C = L.loc
if(C.opened)
return //Door's open... wait, why are you in it's contents then?
if(istype(L.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
if(!SC.locked && !SC.welded)
return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist'
else
if(!C.welded)
return //closed but not welded...
// else Meh, lets just keep it at 2 minutes for now
// breakout_time++ //Harder to get out of welded lockers than locked lockers
/mob/living/proc/escape_inventory(obj/item/weapon/holder/H)
if(H != src.loc) return
var/mob/M = H.loc //Get our mob holder (if any).
//okay, so the closet is either welded or locked... resist!!!
usr.next_move = world.time + 100
L.last_special = world.time + 100
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
for(var/mob/O in viewers(usr.loc))
O.show_message("\red <B>The [L.loc] begins to shake violently!</B>", 1)
if(istype(M))
M.drop_from_inventory(H)
M << "<span class='warning'>[H] wriggles out of your grip!</span>"
src << "<span class='warning'>You wriggle out of [M]'s grip!</span>"
else if(istype(H.loc,/obj/item))
src << "<span class='warning'>You struggle free of [H.loc].</span>"
H.loc = get_turf(H)
if(istype(M))
for(var/atom/A in M.contents)
if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder))
return
spawn(0)
if(do_after(usr,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
return
M.status_flags &= ~PASSEMOTES
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
if(istype(L.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
if(!SC.locked && !SC.welded)
return
else
if(!C.welded)
return
/mob/living/proc/escape_buckle()
if(buckled)
buckled.user_unbuckle_mob(src)
//Well then break it!
if(istype(usr.loc, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = L.loc
SC.desc = "It appears to be broken."
SC.icon_state = SC.icon_off
flick(SC.icon_broken, SC)
sleep(10)
flick(SC.icon_broken, SC)
sleep(10)
SC.broken = 1
SC.locked = 0
SC.update_icon()
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [SC]!</B>", 1)
if(istype(SC.loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
var/obj/structure/bigDelivery/BD = SC.loc
BD.attack_hand(usr)
SC.open()
else
C.welded = 0
C.update_icon()
usr << "\red You successfully break out!"
for(var/mob/O in viewers(L.loc))
O.show_message("\red <B>\the [usr] successfully broke out of \the [C]!</B>", 1)
if(istype(C.loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
var/obj/structure/bigDelivery/BD = C.loc
BD.attack_hand(usr)
C.open()
//drop && roll or breaking out of handcuffs
else if(iscarbon(L))
var/mob/living/carbon/CM = L
if(CM.on_fire && CM.canmove)
CM.fire_stacks -= 5
CM.Weaken(3)
CM.spin(32,2)
CM.visible_message("<span class='danger'>[CM] rolls on the floor, trying to put themselves out!</span>", \
"<span class='notice'>You stop, drop, and roll!</span>")
sleep(30)
if(fire_stacks <= 0)
CM.visible_message("<span class='danger'>[CM] has successfully extinguished themselves!</span>", \
"<span class='notice'>You extinguish yourself.</span>")
ExtinguishMob()
return
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
var/can_break_cuffs
if(HULK in usr.mutations)
can_break_cuffs = 1
else if(istype(CM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = CM
if(H.species.can_shred(H,1))
can_break_cuffs = 1
if(can_break_cuffs) //Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", CM), 1)
spawn(0)
if(do_after(CM, 50))
if(!CM.handcuffed || CM.buckled)
return
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", CM), 1)
CM << "\red You successfully break your handcuffs."
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
qdel(CM.handcuffed)
CM.handcuffed = null
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
CM.update_inv_handcuffed()
else
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
spawn(0)
if(do_after(CM, breakouttime))
if(!CM.handcuffed || CM.buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the handcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.handcuffed]."
CM.drop_from_inventory(CM.handcuffed)
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
var/can_break_cuffs
if(HULK in usr.mutations)
can_break_cuffs = 1
else if(istype(CM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = CM
if(H.species.can_shred(H,1))
can_break_cuffs = 1
if(can_break_cuffs) //Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
spawn(0)
if(do_after(CM, 50))
if(!CM.legcuffed || CM.buckled)
return
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] manages to break the legcuffs!</B>", CM), 1)
CM << "\red You successfully break your legcuffs."
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
qdel(CM.legcuffed)
CM.legcuffed = null
CM.update_inv_legcuffed()
else
var/obj/item/weapon/legcuffs/HC = CM.legcuffed
var/breakouttime = 1200 //A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
if(istype(HC)) //If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future...
breakouttime = HC.breakouttime
displaytime = breakouttime / 600 //Minutes
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
spawn(0)
if(do_after(CM, breakouttime))
if(!CM.legcuffed || CM.buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.legcuffed]."
CM.drop_from_inventory(CM.legcuffed)
CM.legcuffed = null
CM.update_inv_legcuffed()
/mob/living/proc/resist_grab()
var/resisting = 0
for(var/obj/O in requests)
requests.Remove(O)
qdel(O)
resisting++
for(var/obj/item/weapon/grab/G in grabbed_by)
resisting++
switch(G.state)
if(GRAB_PASSIVE)
qdel(G)
if(GRAB_AGGRESSIVE)
if(prob(60)) //same chance of breaking the grab as disarm
visible_message("<span class='warning'>[src] has broken free of [G.assailant]'s grip!</span>")
qdel(G)
if(GRAB_NECK)
//If the you move when grabbing someone then it's easier for them to break free. Same if the affected mob is immune to stun.
if (((world.time - G.assailant.l_move_time < 30 || !stunned) && prob(15)) || prob(3))
visible_message("<span class='warning'>[src] has broken free of [G.assailant]'s headlock!</span>")
qdel(G)
if(resisting)
visible_message("<span class='danger'>[src] resists!</span>")
/mob/living/verb/lay_down()
set name = "Rest"

View File

@@ -32,4 +32,31 @@
M << "The captive mind of [src] whispers, \"[message]\""
/mob/living/captive_brain/emote(var/message)
return
return
/mob/living/captive_brain/can_resist()
return !(stat || next_move > world.time)
/mob/living/captive_brain/process_resist()
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/B = src.loc
var/mob/living/captive_brain/H = src
H << "<span class='danger'>You begin doggedly resisting the parasite's control (this will take approximately sixty seconds).</span>"
B.host << "<span class='danger'>You feel the captive mind of [src] begin to resist your control.</span>"
spawn(rand(200,250)+B.host.brainloss)
if(!B || !B.controlling) return
B.host.adjustBrainLoss(rand(5,10))
H << "<span class='danger'>With an immense exertion of will, you regain control of your body!</span>"
B.host << "<span class='danger'>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</span>"
B.detatch()
verbs -= /mob/living/carbon/proc/release_control
verbs -= /mob/living/carbon/proc/punish_host
verbs -= /mob/living/carbon/proc/spawn_larvae
return
..()

View File

@@ -56,7 +56,10 @@
verbs += /mob/living/proc/ventcrawl
verbs += /mob/living/proc/hide
name = "[name] ([rand(1, 1000)])"
if(name == initial(name))
name = "[name] ([rand(1, 1000)])"
real_name = name
if(!body_color)
body_color = pick( list("brown","gray","white") )
icon_state = "mouse_[body_color]"
@@ -112,5 +115,10 @@
name = "Tom"
desc = "Jerry the cat is not amused."
/mob/living/simple_animal/mouse/brown/Tom/New()
..()
// Change my name back, don't want to be named Tom (666)
name = initial(name)
/mob/living/simple_animal/mouse/can_use_vents()
return
return

View File

@@ -183,16 +183,16 @@
step_to(O, get_turf(pick(view(7, src))))
//rods
O = new /obj/item/stack/rods(src.loc)
O = PoolOrNew(/obj/item/stack/rods, src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(75))
O = new /obj/item/stack/rods(src.loc)
O = PoolOrNew(/obj/item/stack/rods, src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(50))
O = new /obj/item/stack/rods(src.loc)
O = PoolOrNew(/obj/item/stack/rods, src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(25))
O = new /obj/item/stack/rods(src.loc)
O = PoolOrNew(/obj/item/stack/rods, src.loc)
step_to(O, get_turf(pick(view(7, src))))
//plasteel

View File

@@ -103,7 +103,7 @@
affecting.loc = assailant.loc
if(state >= GRAB_NECK)
affecting.Stun(1)
affecting.Stun(3)
if(isliving(affecting))
var/mob/living/L = affecting
L.adjustOxyLoss(1)

View File

@@ -68,7 +68,7 @@
if(!new_text)
return
free_space -= length(strip_html_properly(new_text, 0))
free_space -= length(strip_html_properly(new_text))
/obj/item/weapon/paper/examine(mob/user)
..()
@@ -95,15 +95,15 @@
usr << "<span class='warning'>You cut yourself on the paper.</span>"
return
var/n_name = sanitizeSafe(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text, MAX_NAME_LEN)
// We check loc one level up, so we can rename in clipboards and such. See also: /obj/item/weapon/photo/rename()
if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == 0 && n_name)
name = n_name
if(n_name != "paper")
desc = "This is a paper titled '" + name + "'."
add_fingerprint(usr)
return
return
/obj/item/weapon/paper/attack_self(mob/living/user as mob)
user.examinate(src)
@@ -343,7 +343,7 @@
usr << "<span class='info'>There isn't enough space left on \the [src] to write anything.</span>"
return
var/t = strip_html_properly(input("Enter what you want to write:", "Write", null, null) as message)
var/t = sanitize(input("Enter what you want to write:", "Write", null, null) as message, free_space, extra = 0)
if(!t)
return
@@ -450,7 +450,7 @@
user << "<span class='notice'>You clip the [P.name] to [(src.name == "paper") ? "the paper" : src.name].</span>"
src.loc = B
P.loc = B
B.pages.Add(src)
B.pages.Add(P)
B.update_icon()

View File

@@ -308,12 +308,6 @@ var/list/solars_list = list()
/obj/machinery/power/solar_control/drain_power()
return -1
/obj/machinery/power/solar_control/New()
..()
if(ticker)
initialize()
connect_to_network()
/obj/machinery/power/solar_control/Destroy()
for(var/obj/machinery/power/solar/M in connected_panels)
M.unset_control()
@@ -368,6 +362,7 @@ var/list/solars_list = list()
..()
if(!powernet) return
set_panels(cdir)
connect_to_network()
/obj/machinery/power/solar_control/update_icon()
if(stat & BROKEN)

View File

@@ -1,12 +1,12 @@
/*
Defines a firing mode for a gun.
burst number of shots fired when the gun is used
burst_delay tick delay between shots in a burst
fire_delay tick delay after the last shot before the gun may be used again
move_delay tick delay after the last shot before the player may move
dispersion dispersion of each shot in the burst measured in tiles per 7 tiles angle ratio
accuracy accuracy modifier applied to each shot in tiles.
accuracy accuracy modifier applied to each shot in tiles.
applied on top of the base weapon accuracy.
*/
/datum/firemode
@@ -18,7 +18,7 @@
var/list/accuracy = list(0)
var/list/dispersion = list(0)
//using a list makes defining fire modes for new guns much nicer,
//using a list makes defining fire modes for new guns much nicer,
//however we convert the lists to datums in part so that firemodes can be VVed if necessary.
/datum/firemode/New(list/properties = null)
..()
@@ -65,7 +65,7 @@
var/sel_mode = 1 //index of the currently selected mode
var/list/firemodes = list()
var/firemode_type = /datum/firemode //for subtypes that need custom firemode data
//aiming system stuff
var/keep_aim = 1 //1 for keep shooting until aim is lowered
//0 for one bullet after tarrget moves and aim is lowered
@@ -82,7 +82,7 @@
else
for(var/i in 1 to firemodes.len)
firemodes[i] = new firemode_type(firemodes[i])
if(isnull(scoped_accuracy))
scoped_accuracy = accuracy
@@ -94,9 +94,9 @@
return 0
if(!user.IsAdvancedToolUser())
return 0
var/mob/living/M = user
if(HULK in M.mutations)
M << "<span class='danger'>Your fingers are much too large for the trigger guard!</span>"
return 0
@@ -106,7 +106,7 @@
if(process_projectile(P, user, user, pick("l_foot", "r_foot")))
handle_post_fire(user, user)
user.visible_message(
"<span class='danger'>[user] shoots \himself in the foot with \the [src]!</span>",
"<span class='danger'>[user] shoots \himself in the foot with \the [src]!</span>",
"<span class='danger'>You shoot yourself in the foot with \the [src]!</span>"
)
M.drop_item()
@@ -159,7 +159,7 @@
if (world.time % 3) //to prevent spam
user << "<span class='warning'>[src] is not ready to fire again!"
return
//unpack firemode data
var/datum/firemode/firemode = firemodes[sel_mode]
var/_burst = firemode.burst
@@ -179,27 +179,27 @@
if(!projectile)
handle_click_empty(user)
break
var/acc = firemode.accuracy[min(i, firemode.accuracy.len)]
var/disp = firemode.dispersion[min(i, firemode.dispersion.len)]
process_accuracy(projectile, user, target, acc, disp)
if(pointblank)
if(pointblank)
process_point_blank(projectile, user, target)
if(process_projectile(projectile, user, target, user.zone_sel.selecting, clickparams))
handle_post_fire(user, target, pointblank, reflex)
update_icon()
if(i < _burst)
sleep(_burst_delay)
if(!target)
if(!(target && target.loc))
target = targloc
pointblank = 0
update_held_icon()
//update timing
user.next_move = world.time + 4
if(user.client) user.client.move_delay = world.time + _move_delay
@@ -213,7 +213,7 @@
/obj/item/weapon/gun/proc/can_hit(atom/target as mob, var/mob/living/user as mob)
if(!special_check(user))
return 2
//just assume we can shoot through glass and stuff. No big deal, the player can just choose to not target someone
//just assume we can shoot through glass and stuff. No big deal, the player can just choose to not target someone
//on the other side of a window if it makes a difference. Or if they run behind a window, too bad.
return check_trajectory(target, user)
@@ -231,7 +231,7 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
if(reflex)
user.visible_message(
"<span class='reflex_shoot'><b>\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""] by reflex!<b></span>",
@@ -244,7 +244,7 @@
"<span class='warning'>You fire \the [src]!</span>",
"You hear a [fire_sound_text]!"
)
if(recoil)
spawn()
shake_camera(user, recoil+1, recoil)
@@ -258,7 +258,7 @@
//default point blank multiplier
var/damage_mult = 1.3
//determine multiplier due to the target being grabbed
if(ismob(target))
var/mob/M = target
@@ -276,11 +276,11 @@
var/obj/item/projectile/P = projectile
if(!istype(P))
return //default behaviour only applies to true projectiles
//Accuracy modifiers
P.accuracy = accuracy + acc_mod
P.dispersion = dispersion
//accuracy bonus from aiming
if (aim_targets && (target in aim_targets))
//If you aim at someone beforehead, it'll hit more often.
@@ -293,10 +293,10 @@
var/obj/item/projectile/P = projectile
if(!istype(P))
return 0 //default behaviour only applies to true projectiles
if(params)
P.set_clickpoint(params)
//shooting while in shock
var/x_offset = 0
var/y_offset = 0
@@ -317,7 +317,7 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/M = user
mouthshoot = 1
M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...")
if(!do_after(user, 40))
@@ -357,7 +357,7 @@
var/zoom_offset = round(world.view * zoom_amount)
var/view_size = round(world.view + zoom_amount)
var/scoped_accuracy_mod = zoom_offset
zoom(zoom_offset, view_size)
if(zoom)
accuracy = scoped_accuracy + scoped_accuracy_mod

View File

@@ -35,7 +35,7 @@
var/accuracy = 0
var/dispersion = 0.0
var/damage = 10
var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
var/nodamage = 0 //Determines if the projectile will skip any damage inflictions
@@ -103,7 +103,7 @@
p_x = text2num(mouse_control["icon-x"])
if(mouse_control["icon-y"])
p_y = text2num(mouse_control["icon-y"])
//randomize clickpoint a bit based on dispersion
if(dispersion)
var/radius = round((dispersion*0.443)*world.icon_size*0.8) //0.443 = sqrt(pi)/4 = 2a, where a is the side length of a square that shares the same area as a circle with diameter = dispersion
@@ -274,7 +274,7 @@
//plot the initial trajectory
setup_trajectory()
spawn while(src)
spawn while(src && src.loc)
if(kill_count-- < 1)
on_impact(src.loc) //for any final impact behaviours
qdel(src)
@@ -304,8 +304,8 @@
if(!bumped && !isturf(original))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original)
if(Bump(original))
return
if(!hitscan)
sleep(step_delay) //add delay between movement iterations if it's not a hitscan weapon
@@ -325,7 +325,7 @@
// plot the initial trajectory
trajectory = new()
trajectory.setup(starting, original, pixel_x, pixel_y, angle_offset=offset)
// generate this now since all visual effects the projectile makes can use it
effect_transform = new()
effect_transform.Scale(trajectory.return_hypotenuse(), 1)

View File

@@ -1,11 +1,11 @@
/datum/reagent
var/name = "Reagent"
var/id = "reagent"
var/description = "A non-descript chemical."
var/description = "A non-descript chemical."
var/datum/reagents/holder = null
var/reagent_state = SOLID
var/list/data = null
var/volume = 0
var/volume = 0
var/metabolism = REM // This would be 0.2 normally
var/ingest_met = 0
var/touch_met = 0
@@ -13,11 +13,11 @@
var/max_dose = 0
var/overdose = 0
var/scannable = 0 // Shows up on health analyzers.
var/affects_dead = 0
var/affects_dead = 0
var/glass_icon_state = null
var/glass_name = null
var/glass_desc = null
var/glass_center_of_mass = null
var/glass_center_of_mass = null
var/color = "#000000"
var/color_weight = 1
@@ -86,11 +86,11 @@
return data.Copy()
else if(data)
return data
return null
return null
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
..()
holder = null
holder = null
/* DEPRECATED - TODO: REMOVE EVERYWHERE */
@@ -102,3 +102,10 @@
/datum/reagent/proc/reaction_mob(var/mob/target)
touch_mob(target)
/datum/reagent/woodpulp
name = "Wood Pulp"
id = "woodpulp"
description = "A mass of wood fibers."
reagent_state = LIQUID
color = "#B97A57"

View File

@@ -558,7 +558,6 @@
glass_name = "cup of coffee"
glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere."
/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location)
..()
if(alien == IS_DIONA)
@@ -1012,7 +1011,7 @@
M.dizziness = max(0, M.dizziness - 5)
M.drowsyness = max(0, M.drowsyness - 3)
M.sleeping = max(0, M.sleeping - 2)
if (M.bodytemperature > 310)
if(M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.make_jittery(5)
@@ -1363,9 +1362,9 @@
glass_name = "glass of Changeling Sting"
glass_desc = "A stingy drink."
/datum/reagent/ethanol/classicmartini
/datum/reagent/ethanol/martini
name = "Classic Martini"
id = "classicmartini"
id = "martini"
description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious."
color = "#664300"
strength = 25
@@ -1562,16 +1561,16 @@
glass_center_of_mass = list("x"=15, "y"=10)
/datum/reagent/ethanol/irish_cream
name = "Irish Cream"
id = "irishcream"
description = "Whiskey-imbued cream, what else would you expect from the Irish."
color = "#664300"
strength = 25
name = "Irish Cream"
id = "irishcream"
description = "Whiskey-imbued cream, what else would you expect from the Irish."
color = "#664300"
strength = 25
glass_icon_state = "irishcreamglass"
glass_name = "glass of Irish cream"
glass_desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?"
glass_center_of_mass = list("x"=16, "y"=9)
glass_icon_state = "irishcreamglass"
glass_name = "glass of Irish cream"
glass_desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?"
glass_center_of_mass = list("x"=16, "y"=9)
/datum/reagent/ethanol/longislandicedtea
name = "Long Island Iced Tea"

View File

@@ -94,7 +94,7 @@
overdose = REAGENTS_OVERDOSE * 0.5
scannable = 1
/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location)
/datum/reagent/dexalinp/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location)
if(alien == IS_VOX)
M.adjustToxLoss(removed * 9)
else if(alien != IS_DIONA)

View File

@@ -215,6 +215,11 @@
if(M.mind && cult.is_antagonist(M.mind) && prob(10))
cult.remove_antagonist(M.mind)
/datum/reagent/water/holywater/touch_turf(var/turf/T)
if(volume >= 5)
T.holy = 1
return
/datum/reagent/ammonia
name = "Ammonia"
id = "ammonia"

View File

@@ -1,4 +1,5 @@
/* Toxins, poisons, venoms */
/datum/reagent/toxin
name = "Toxin"
id = "toxin"

View File

@@ -15,13 +15,15 @@
var/tag_x
attack_hand(mob/user as mob)
unwrap()
proc/unwrap()
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
wrapped.loc = (get_turf(src.loc))
if(istype(wrapped, /obj/structure/closet))
var/obj/structure/closet/O = wrapped
O.welded = 0
qdel(src)
return
attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/destTagger))

View File

@@ -323,7 +323,7 @@
apply_material_decorations = 0
if(23)
apply_prefix = 0
new_item = new /obj/item/stack/rods(src.loc)
new_item = PoolOrNew(/obj/item/stack/rods, src.loc)
apply_image_decorations = 0
apply_material_decorations = 0
if(24)

View File

@@ -201,8 +201,8 @@
src.visible_message("\red <B>[src] blows apart!</B>", 1)
var/turf/Tsec = get_turf(src)
new /obj/item/stack/rods(Tsec)
new /obj/item/stack/rods(Tsec)
PoolOrNew(/obj/item/stack/rods, Tsec)
PoolOrNew(/obj/item/stack/rods, Tsec)
new /obj/item/stack/cable_coil/cut(Tsec)
if(cell)