There's quite a bit in this revision.

Admin changes:
     Admin attack logs now have a timestamps. Basically, before each log entry there is something that displays [hour:minute:second]. I plan on expanding this functionality to all kinds of logs, as well as creating a global attack log, but this will do for now.


Gloves:
     You can still electrify any gloves with a power cell, however you have to use wires on non-insulated (yellow) gloves to create a "ghetto-insulation" system. I might make these gloves' stun effects more watered-down than normal insulated gloves, but that will probably be for later on.


Bugfixes:
     Fixed some miscellaneous runtime errors, and more importantly, the shotgun. You can dry-pump it by clicking on it, which will eject any used shots or just make that badass "chuck-chick" sound to let everyone know you mean business. Combat shotguns can now shoot twice without the need to pump.

     I also possibly fixed the issue with metroids' AI process locking up. Someone's going to have to PM me on the forums to tell me if this worked or not, because I have not been able to reproduce the bug (although I do know where it's happening in the code).


Chemistry:
     Alright, so this is where the meat of this update is. In a previous revision (r1905) I mentioned the addition of a new "color" variable. This variable now has a use. When you use a spray cleaner, or a chem sprayer which now is significantly more powerful, the color combination of all the reagents inside the sprayer will be displayed instead of the plain old blue-white color. This will allow for people to easily distinguish reagents and colors, for instance, if you see some chemist running around spraying orange or purple stuff chances are that's acid he's spraying, so you should probably subdue him! 

     In addition, you will now be able to see beakers (large ones too) fill up visually. The color of the reagents inside the beaker is overlayed on top of the beaker. The colors may be subject to change to make them brighter or more easily identifiable by "category". Currently, most pharmaceuticals have a light pinkish color. Polytrinic acid has a distinct purple color, etc. However, with due time I can picture chemists mixing other, benign-ish reagents with harmful reagents so passerbys think that a chemist is spraying someone with something harmless, but in reality is spraying them with a bunch of PAcid. There are some consequences, for instance, concentrated acid is more powerful than watered-down acid.


Have fun with that.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1922 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2011-07-25 03:37:21 +00:00
parent 29e89b008b
commit c18a576136
36 changed files with 355 additions and 99 deletions

View File

@@ -363,6 +363,7 @@ datum
S.start()
sleep(10)
S.start()
holder.clear_reagents()
return
chloralhydrate

View File

@@ -1132,8 +1132,8 @@
user << "\blue You inject [M] with the hypospray."
M << "\red You feel a tiny prick!"
M.attack_log += text("<font color='orange'>[world.time] - has been injected with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to inject [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.ckey])</font>")
src.reagents.reaction(M, INGEST)
if(M.reagents)
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
@@ -1244,8 +1244,8 @@
if(!do_mob(user, M)) return
M.attack_log += text("<font color='orange'>[world.time] - has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("<font color='red'>[world.time] - has fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] feeds [M] [src].", 1)
@@ -1400,8 +1400,8 @@
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] feeds [M] [src].", 1)
M.attack_log += text("<font color='orange'>[world.time] - has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("<font color='red'>[world.time] - has fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
if(reagents.total_volume)
@@ -1522,8 +1522,8 @@
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] forces [M] to swallow [src].", 1)
M.attack_log += text("<font color='orange'>[world.time] - has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("<font color='red'>[world.time] - has fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
if(reagents.total_volume)
@@ -1633,11 +1633,62 @@
icon_state = "beaker0"
item_state = "beaker"
on_reagent_change()
pickup(mob/user)
on_reagent_change(user)
dropped(mob/user)
on_reagent_change()
on_reagent_change(var/mob/user)
/*
if(reagents.total_volume)
icon_state = "beaker1"
else
icon_state = "beaker0"
*/
overlays = null
if(reagents.total_volume)
var/obj/overlay = new/obj
overlay.icon = 'beaker1.dmi'
var/percent = round((reagents.total_volume / volume) * 100)
world << percent
switch(percent)
if(0 to 9) overlay.icon_state = "-10"
if(10 to 24) overlay.icon_state = "10"
if(25 to 49) overlay.icon_state = "25"
if(50 to 74) overlay.icon_state = "50"
if(75 to 79) overlay.icon_state = "75"
if(80 to 90) overlay.icon_state = "80"
if(91 to 100) overlay.icon_state = "100"
var/list/rgbcolor = list(0,0,0)
var/finalcolor
for(var/datum/reagent/re in reagents.reagent_list) // natural color mixing bullshit/algorithm
if(!finalcolor)
rgbcolor = GetColors(re.color)
finalcolor = re.color
else
var/newcolor[3]
var/prergbcolor[3]
prergbcolor = rgbcolor
newcolor = GetColors(re.color)
rgbcolor[1] = (prergbcolor[1]+newcolor[1])/2
rgbcolor[2] = (prergbcolor[2]+newcolor[2])/2
rgbcolor[3] = (prergbcolor[3]+newcolor[3])/2
finalcolor = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3])
// This isn't a perfect color mixing system, the more reagents that are inside,
// the darker it gets until it becomes absolutely pitch black! I dunno, maybe
// that's pretty realistic? I don't do a whole lot of color-mixing anyway.
// If you add brighter colors to it it'll eventually get lighter, though.
overlay.icon += finalcolor
if(user || !istype(src.loc, /turf))
overlay.layer = 30
overlays += overlay
/obj/item/weapon/reagent_containers/glass/blender_jug
name = "Blender Jug"
@@ -1657,7 +1708,7 @@
/obj/item/weapon/reagent_containers/glass/large
name = "large reagent glass"
desc = "A large reagent glass."
desc = "A large reagent glass. Can hold up to 100 units."
icon = 'chemical.dmi'
icon_state = "beakerlarge"
item_state = "beaker"
@@ -1666,6 +1717,57 @@
possible_transfer_amounts = list(5,10,15,30,50)
flags = FPRINT | TABLEPASS | OPENCONTAINER
pickup(mob/user)
on_reagent_change(user)
dropped(mob/user)
on_reagent_change()
on_reagent_change(var/mob/user)
overlays = null
if(reagents.total_volume)
var/obj/overlay = new/obj
overlay.icon = 'beaker2.dmi'
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 9) overlay.icon_state = "-10"
if(10 to 24) overlay.icon_state = "10"
if(25 to 49) overlay.icon_state = "25"
if(50 to 74) overlay.icon_state = "50"
if(75 to 79) overlay.icon_state = "75"
if(80 to 90) overlay.icon_state = "80"
if(91 to 100) overlay.icon_state = "100"
var/list/rgbcolor = list(0,0,0)
var/finalcolor
for(var/datum/reagent/re in reagents.reagent_list) // natural color mixing bullshit/algorithm
if(!finalcolor)
rgbcolor = GetColors(re.color)
finalcolor = re.color
else
var/newcolor[3]
var/prergbcolor[3]
prergbcolor = rgbcolor
newcolor = GetColors(re.color)
rgbcolor[1] = (prergbcolor[1]+newcolor[1])/2
rgbcolor[2] = (prergbcolor[2]+newcolor[2])/2
rgbcolor[3] = (prergbcolor[3]+newcolor[3])/2
finalcolor = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3])
// This isn't a perfect color mixing system, the more reagents that are inside,
// the darker it gets until it becomes absolutely pitch black! I dunno, maybe
// that's pretty realistic? I don't do a whole lot of color-mixing anyway.
// If you add brighter colors to it it'll eventually get lighter, though.
overlay.icon += finalcolor
if(user || !istype(src.loc, /turf))
overlay.layer = 30
overlays += overlay
/obj/item/weapon/reagent_containers/glass/bottle
name = "bottle"
desc = "A small bottle."
@@ -1988,8 +2090,8 @@
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] feeds [M] [src].", 1)
M.attack_log += text("<font color='orange'>[world.time] - has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("<font color='red'>[world.time] - has fed [src.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
if(reagents.total_volume)

View File

@@ -61,7 +61,7 @@
attack(target as obj, mob/user as mob)
user.attack_log += text("<font color='blue'>[world.time] - has used [src.name] on \ref[target]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [src.name] on \ref[target]</font>")
if (istype(target, /obj/item))
var/obj/item/O = target

View File

@@ -148,6 +148,11 @@ var
datum/vote/vote = null
datum/sun/sun = null
list/combatlog = list()
list/IClog = list()
list/OOClog = list()
list/adminlog = list()
list/powernets = null

View File

@@ -6,7 +6,7 @@
/obj/item/clothing/head/kitty
name = "Kitty Ears"
desc = "Meow?"
desc = "A pair of kitty ears. Meow!"
icon_state = "kitty"
flags = FPRINT | TABLEPASS | HEADSPACE
var/icon/mob
@@ -49,7 +49,7 @@
/obj/item/clothing/under/owl
name = "Owl uniform"
desc = "Twoooo!"
desc = "A jumpsuit with owl wings. Photorealistic owl feathers! Twooooo!"
icon_state = "owl"
color = "owl"

View File

@@ -9,6 +9,7 @@
siemens_coefficient = 0.50
var/elecgen = 0
var/uses = 0
var/wired = 0
body_parts_covered = HANDS
armor = list(melee = 0, bullet = 0, laser = 2, taser = 2, bomb = 0, bio = 0, rad = 0)

View File

@@ -65,7 +65,7 @@
/obj/item/clothing/under/color/orange
name = "Orange Jumpsuit"
desc = "Standard Nanotrasen prisoner wear. It's suit sensors are stuck in the Fully On position."
desc = "Standard Nanotrasen prisoner wear. Its suit sensors are stuck in the \"Fully On\" position."
icon_state = "orange"
item_state = "o_suit"
color = "orange"
@@ -431,13 +431,6 @@
item_state = "mime"
color = "mime"
/obj/item/clothing/under/sexymime
name = "Sexy Mime Outfit"
desc = "It's not very colourful."
icon_state = "sexymime"
item_state = "sexymime"
color = "sexymime"
/obj/item/clothing/under/waiter
name = "Waiter Outfit"
desc = "There is a special pocket for tip."

View File

@@ -190,4 +190,6 @@
icon_on = "cigar2on"
icon_off = "cigar2off"
icon_butt = "cigarbutt"
smoketime = 7200
smoketime = 7200

View File

@@ -0,0 +1,11 @@
proc/time_stamp()
var/hh = text2num(time2text(world.timeofday, "hh")) // Set the hour
var/mm = text2num(time2text(world.timeofday, "mm")) // Set the minute
var/ss = text2num(time2text(world.timeofday, "ss")) // Set the second
var/ph
var/pm
var/ps
if(hh < 10) ph = "0"
if(mm < 10) pm = "0"
if(ss < 10) ps = "0"
return"[ph][hh]:[pm][mm]:[ps][ss]"

View File

@@ -425,8 +425,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
// usr << browse(null, "window=tank")
attack(mob/living/M as mob, mob/living/user as mob)
M.attack_log += text("<font color='orange'>[world.time] - has had the [name] used on him by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used [name] on [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had the [name] used on him by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [name] on [M.name] ([M.ckey])</font>")
if(istype(M,/mob/dead))
M.invisibility = 0

View File

@@ -695,8 +695,11 @@
user.show_message(text("\red <b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
if(2)
if (!istype(C:dna, /datum/dna) || !isnull(C:gloves))
if (!istype(C:dna, /datum/dna))
user << "\blue No fingerprints found on [C]"
else if(!istype(C, /mob/living/carbon/monkey))
if(!isnull(C:gloves))
user << "\blue No fingerprints found on [C]"
else
user << text("\blue [C]'s Fingerprints: [md5(C:dna.uni_identity)]")
if ( !(C:blood_DNA) )

View File

@@ -13,8 +13,8 @@
if(!istype(M, /mob/living/silicon/ai))//If target is not an AI.
return ..()
M.attack_log += text("<font color='orange'>[world.time] - has been carded with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to card [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been carded with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to card [M.name] ([M.ckey])</font>")
transfer_ai("AICORE", "AICARD", M, user)
return

View File

@@ -5,8 +5,8 @@
usr.drop_item()
return
if (src.shots > 0)
M.attack_log += text("<font color='orange'>[world.time] - has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to flash [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to flash [M.name] ([M.ckey])</font>")
var/safety = null
if (istype(M, /mob/living/carbon/human))

View File

@@ -34,8 +34,8 @@
usr << "\red You don't have the dexterity to do this!"
return
if (istype(M, /mob/living/carbon/human))
M.attack_log += text("<font color='orange'>[world.time] - has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has attempted to handcuff [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [M.name] ([M.ckey])</font>")
var/obj/equip_e/human/O = new /obj/equip_e/human( )
O.source = user
@@ -174,8 +174,8 @@
// O.show_message(text("\red [] has been stabbed with [] by [].", M, src, user), 1)
user << "\red You stab [M] with the pen."
M << "\red You feel a tiny prick!"
M.attack_log += text("<font color='orange'>[world.time] - has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to stab [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to stab [M.name] ([M.ckey])</font>")
if(M.reagents) reagents.trans_to(M, 50) //used to be 150
return
@@ -193,8 +193,8 @@
if (reagents.total_volume)
user << "\red You stab [M] with the penlight."
M << "\red You feel a tiny prick!"
M.attack_log += text("<font color='orange'>[world.time] - has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to stab [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to stab [M.name] ([M.ckey])</font>")
if(M.reagents) reagents.trans_to(M, 15)
..()
return

View File

@@ -207,8 +207,8 @@
user.lastattacked = M
M.lastattacker = user
user.attack_log += "<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name]</font>"
M.attack_log += "<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name]</font>"
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
//spawn(1800) // this wont work right
// M.lastattacker = null

View File

@@ -10,7 +10,7 @@
return
user << "Planting explosives..."
if(ismob(target))
user.attack_log += "<font color='red'>[world.time] - [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])</font>"
user.attack_log += "\[[time_stamp()]\] <font color='red'> [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])</font>"
user.visible_message("\red [user.name] is trying to plant some kind of explosive on [target.name]!")
if(do_after(user, 50) && in_range(user, target))
user.drop_item()
@@ -20,7 +20,7 @@
if (isturf(target)) location = target
if (isobj(target)) location = target.loc
if (ismob(target))
target:attack_log += "<font color='orange'>[world.time] - had the [name] planted on them by [user.real_name] ([user.ckey])</font>"
target:attack_log += "\[[time_stamp()]\]<font color='orange'> Had the [name] planted on them by [user.real_name] ([user.ckey])</font>"
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
target.overlays += image('assemblies.dmi', "plastic-explosive2")
user << "Bomb has been planted. Timer counting down from [timer]."

View File

@@ -187,6 +187,7 @@
freeze
name = "freeze beam"
icon_state = "ice_2"
damage = 0
var/temperature = 0
proc/Freeze(atom/A as mob|obj|turf|area)
@@ -198,6 +199,7 @@
plasma
name = "plasma blast"
icon_state = "plasma_2"
damage = 0
var/temperature = 800
proc/Heat(atom/A as mob|obj|turf|area)
@@ -232,10 +234,10 @@
else
M << "\red You've been shot!"
if(istype(firer, /mob))
M.attack_log += text("[] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", world.time, firer, firer.ckey, M, M.ckey, src)
firer.attack_log += text("[] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", world.time, firer, firer.ckey, M, M.ckey, src)
M.attack_log += text("\[[]\] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), firer, firer.ckey, M, M.ckey, src)
firer.attack_log += text("\[[]\] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), firer, firer.ckey, M, M.ckey, src)
else
M.attack_log += text("[] <b>UNKOWN SUBJECT (No longer exists)</b> shot <b>[]/[]</b> with a <b>[]</b>", world.time, M, M.ckey, src)
M.attack_log += text("\[[]\] <b>UNKOWN SUBJECT (No longer exists)</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), M, M.ckey, src)
spawn(0)
if(A)
@@ -550,12 +552,19 @@
pumped = 0
maxpump = 1
list/Storedshots = list() // a list where "used" shots are stored to be dumped or something
list/Storedshots = list()
load_into_chamber()
if(!loaded.len)
if(Storedshots.len > 0)
if(istype(src, /obj/item/weapon/gun/projectile/shotgun))
var/obj/item/weapon/gun/projectile/shotgun/S = src
S.pump(loc)
return 0
if(istype(src, /obj/item/weapon/gun/projectile/shotgun) && pumped >= maxpump)
return 1
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
if(!istype(src, /obj/item/weapon/gun/projectile/shotgun))
@@ -657,6 +666,7 @@
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
caliber = "shotgun"
origin_tech = "combat=2;materials=2"
var/recentpump = 0 // to prevent spammage
New()
for(var/i = 1, i <= max_shells, i++)
@@ -664,7 +674,11 @@
update_icon()
attack_self(mob/living/user as mob)
if(recentpump) return
pump()
recentpump = 1
sleep(10)
recentpump = 0
return
combat
@@ -758,6 +772,11 @@
mode = 0 //0 = stun, 1 = kill
charge_cost = 100 //How much energy is needed to fire.
emp_act(severity)
power_supply.use(round(power_supply.maxcharge / severity))
update_icon()
..()
New()
power_supply = new(src)
power_supply.give(power_supply.maxcharge)
@@ -1497,7 +1516,10 @@
update_icon()
playsound(user, fire_sound, 50, 1)
if(silenced)
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
if(!in_chamber)
return

View File

@@ -109,8 +109,8 @@ Deathnettle
if(!..()) return
if(istype(M, /mob/living))
M << "\red You are stunned by the powerful acid of the Deathnettle!"
M.attack_log += text("<font color='orange'>[world.time] - has had the [src.name] used on them by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] on [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had the [src.name] used on them by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] on [M.name] ([M.ckey])</font>")
M.eye_blurry += force/7
if(prob(20))

View File

@@ -301,8 +301,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
if (user && src.imp)
for (var/mob/O in viewers(M, null))
O.show_message("\red [M] has been implanted by [user].", 1)
M.attack_log += text("<font color='orange'>[world.time] - has been implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])</font>")
src.imp.loc = M
src.imp.imp_in = M
src.imp.implanted = 1

View File

@@ -52,8 +52,8 @@ KNIFE
user.take_organ_damage(10)
user.paralysis += 2
return
M.attack_log += text("<font color='orange'>[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
if (M.stat < 2 && M.health < 50 && prob(90))
var/mob/H = M
@@ -114,8 +114,8 @@ KNIFE
if (istype(location, /turf/simulated))
location.add_blood(H) ///Plik plik, the sound of blood
M.attack_log += text("<font color='orange'>[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
if(prob(15))
M.weakened += 3

View File

@@ -138,8 +138,8 @@ var/global/list/cached_icons = list()
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
return
M.attack_log += text("<font color='orange'>[world.time] - has been injected with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [name] to inject [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
if (user)
if (istype(M, /mob/living/carbon/human))

View File

@@ -21,11 +21,36 @@ MOP
return
var/obj/decal/D = new/obj/decal(get_turf(src))
D.name = "chemicals"
D.icon = 'chemical.dmi'
D.icon_state = "chempuff"
D.create_reagents(5)
src.reagents.trans_to(D, 5)
var/list/rgbcolor = list(0,0,0)
var/finalcolor
for(var/datum/reagent/re in D.reagents.reagent_list) // natural color mixing bullshit/algorithm
if(!finalcolor)
rgbcolor = GetColors(re.color)
finalcolor = re.color
else
var/newcolor[3]
var/prergbcolor[3]
prergbcolor = rgbcolor
newcolor = GetColors(re.color)
rgbcolor[1] = (prergbcolor[1]+newcolor[1])/2
rgbcolor[2] = (prergbcolor[2]+newcolor[2])/2
rgbcolor[3] = (prergbcolor[3]+newcolor[3])/2
finalcolor = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3])
// This isn't a perfect color mixing system, the more reagents that are inside,
// the darker it gets until it becomes absolutely pitch black! I dunno, maybe
// that's pretty realistic? I don't do a whole lot of color-mixing anyway.
// If you add brighter colors to it it'll eventually get lighter, though.
D.name = "chemicals"
D.icon = 'chempuff.dmi'
D.icon += finalcolor
playsound(src.loc, 'spray2.ogg', 50, 1, -6)
spawn(0)
@@ -48,7 +73,9 @@ MOP
/obj/item/weapon/cleaner/examine()
set src in usr
usr << text("\icon[] [] units of cleaner left!", src, src.reagents.total_volume)
for(var/datum/reagent/R in reagents.reagent_list)
usr << text("\icon[] [] units of [] left!", src, round(R.volume), R.name)
//usr << text("\icon[] [] units of cleaner left!", src, src.reagents.total_volume)
..()
return
@@ -68,22 +95,62 @@ MOP
user << "\blue Add more cleaner!"
return
var/obj/decal/D = new/obj/decal(get_turf(src))
D.name = "chemicals"
D.icon = 'chemical.dmi'
D.icon_state = "chempuff"
D.create_reagents(10)
src.reagents.trans_to(D, 10)
playsound(src.loc, 'spray2.ogg', 50, 1, -6)
spawn(0)
for(var/i=0, i<6, i++)
step_towards(D,A)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
sleep(6)
del(D)
var/Sprays[3]
for(var/i=1, i<=3, i++) // intialize sprays
if(src.reagents.total_volume < 1) break
var/obj/decal/D = new/obj/decal(get_turf(src))
D.name = "chemicals"
D.icon = 'chempuff.dmi'
D.create_reagents(5)
src.reagents.trans_to(D, 5)
var/rgbcolor[3]
var/finalcolor
for(var/datum/reagent/re in D.reagents.reagent_list)
if(!finalcolor)
rgbcolor = GetColors(re.color)
finalcolor = re.color
else
var/newcolor[3]
var/prergbcolor[3]
prergbcolor = rgbcolor
newcolor = GetColors(re.color)
rgbcolor[1] = (prergbcolor[1]+newcolor[1])/2
rgbcolor[2] = (prergbcolor[2]+newcolor[2])/2
rgbcolor[3] = (prergbcolor[3]+newcolor[3])/2
finalcolor = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3])
D.icon += finalcolor
Sprays[i] = D
var/direction = get_dir(src, A)
var/turf/T = get_turf(A)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
for(var/i=1, i<=Sprays.len, i++)
spawn()
var/obj/decal/D = Sprays[i]
if(!D) continue
// Spreads the sprays a little bit
var/turf/my_target = pick(the_targets)
the_targets -= my_target
for(var/j=1, j<=rand(6,8), j++)
step_towards(D, my_target)
D.reagents.reaction(get_turf(D))
for(var/atom/t in get_turf(D))
D.reagents.reaction(t)
sleep(2)
del(D)
sleep(1)
if(isrobot(user)) //Cyborgs can clean forever if they keep charged
var/mob/living/silicon/robot/janitor = user
@@ -141,3 +208,31 @@ MOP
mopcount = 0
return
/*
* Hope it's okay to stick this shit here: it basically just turns a hexadecimal color into rgb
*/
proc/GetColors(hex)
hex = uppertext(hex)
var
hi1 = text2ascii(hex, 2)
lo1 = text2ascii(hex, 3)
hi2 = text2ascii(hex, 4)
lo2 = text2ascii(hex, 5)
hi3 = text2ascii(hex, 6)
lo3 = text2ascii(hex, 7)
return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48),
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48))

View File

@@ -475,8 +475,8 @@ CLIPBOARDS
target:client:eye = present
target:loc = present
target.attack_log += text("<font color='orange'>[world.time] - has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to wrap [target.name] ([target.ckey])</font>")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to wrap [target.name] ([target.ckey])</font>")
else
user << "/blue You need more paper."

View File

@@ -121,8 +121,8 @@ STUN BATON
src.add_fingerprint(user)
var/mob/living/carbon/human/H = M
M.attack_log += text("<font color='orange'>[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey]) (INTENT: [uppertext(user.a_intent)])</font>")
if (status == 0 || (status == 1 && charges ==0))
@@ -218,8 +218,8 @@ STUN BATON
return
src.add_fingerprint(user)
M.attack_log += text("<font color='orange'>[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
if (user.a_intent == "hurt")
if(!..()) return

View File

@@ -23,8 +23,8 @@
return
M.attack_log += text("<font color='orange'>[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
var/t = user:zone_sel.selecting
if (t == "head")

View File

@@ -27,8 +27,8 @@
chaplain = 1
M.attack_log += text("<font color='orange'>[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"

View File

@@ -18,8 +18,8 @@
return
M.attack_log += text("<font color='orange'>[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
if (M.stat < 2 && M.health < 50 && prob(90))
var/mob/H = M

View File

@@ -1804,12 +1804,8 @@
playsound(loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
M.attack_log += text("<font color='red'>[world.time] - has punched [src.name] ([src.ckey])</font>")
src.attack_log += text("<font color='orange'>[world.time] - has been punched by [M.name] ([M.ckey])</font>")
M.attack_log += text("<font color='red'>[world.time] - has punched [src.name] ([src.ckey])</font>")
src.attack_log += text("<font color='orange'>[world.time] - has been punched by [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
if (def_zone == "head")
if ((((head && head.body_parts_covered & HEAD) || (wear_mask && wear_mask.body_parts_covered & HEAD)) && prob(99)))

View File

@@ -203,6 +203,8 @@
AIprocess() // the master AI process
if(AIproc) return
AIproc = 1
while(AIproc && stat != 2 && attacked > 0)
if(Victim) // can't eat AND have this little process at the same time

View File

@@ -237,8 +237,8 @@ obj/item/weapon/robot_module/syndicate/New()
attack(mob/M as mob, mob/living/silicon/robot/user as mob)
M.attack_log += text("<font color='orange'>[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("<font color='red'>[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
user.cell.charge -= 30
if (M.weakened < 5)
M.weakened = 5

View File

@@ -467,8 +467,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
icon_state = "grabbed+1"
if (!( affecting.buckled ))
affecting.loc = assailant.loc
affecting.attack_log += text("<font color='orange'>[world.time] - has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("<font color='red'>[world.time] - has grabbed the neck of [affecting.name] ([affecting.ckey])</font>")
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>")
hud1.icon_state = "disarm/kill"
hud1.name = "disarm/kill"
else
@@ -477,8 +477,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if (killing)
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has tightened his grip on []'s neck!", assailant, affecting), 1)
affecting.attack_log += text("<font color='orange'>[world.time] - has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("<font color='red'>[world.time] - has attempted to strangle (kill intent) [affecting.name] ([affecting.ckey])</font>")
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
assailant.next_move = world.time + 10
affecting.stunned = max(2, affecting.stunned)
affecting.paralysis = max(1, affecting.paralysis)

View File

@@ -63,6 +63,24 @@
return
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/C = W
if(!istype(src, /obj/item/clothing/gloves/yellow))
if(!wired)
if(C.amount >= 2)
C.amount -= 2
wired = 1
user << "You wrap some wires around [src]."
else
user << "There is not enough wire to cover [src]."
else
user << "[src] is already wired."
else
..()
return
// the power cable object
/obj/cable/New()

View File

@@ -79,6 +79,11 @@
// s.start()
// if (prob(80+(G.siemens_coefficient*100)) && electrocute_mob(user, src, src))
// return 1
if(!istype(src, /obj/item/clothing/gloves/yellow))
if(!G.wired)
user << "You run an electrical current through the gloves, but nothing happens!"
return
if(charge < 1000)
return

BIN
icons/obj/beaker1.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

BIN
icons/obj/beaker2.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

View File

@@ -293,6 +293,7 @@
#include "code\defines\procs\station_name.dm"
#include "code\defines\procs\statistics.dm"
#include "code\defines\procs\syndicate_name.dm"
#include "code\defines\procs\time_stamp.dm"
#include "code\FEA\FEA_airgroup.dm"
#include "code\FEA\FEA_fire.dm"
#include "code\FEA\FEA_gas_mixture.dm"
@@ -845,7 +846,6 @@
#include "code\WorkInProgress\Cameras.dm"
#include "code\WorkInProgress\Chemistry-Holder.dm"
#include "code\WorkInProgress\Chemistry-Machinery.dm"
#include "code\WorkInProgress\Chemistry-Readme.dm"
#include "code\WorkInProgress\Chemistry-Reagents.dm"
#include "code\WorkInProgress\Chemistry-Recipes.dm"
#include "code\WorkInProgress\Chemistry-Tools.dm"