diff --git a/code/WorkInProgress/Chemistry-Recipes.dm b/code/WorkInProgress/Chemistry-Recipes.dm index f0622958f65..a22c9da0297 100644 --- a/code/WorkInProgress/Chemistry-Recipes.dm +++ b/code/WorkInProgress/Chemistry-Recipes.dm @@ -363,6 +363,7 @@ datum S.start() sleep(10) S.start() + holder.clear_reagents() return chloralhydrate diff --git a/code/WorkInProgress/Chemistry-Tools.dm b/code/WorkInProgress/Chemistry-Tools.dm index 3ab32fe9360..51abaa370d5 100644 --- a/code/WorkInProgress/Chemistry-Tools.dm +++ b/code/WorkInProgress/Chemistry-Tools.dm @@ -1132,8 +1132,8 @@ user << "\blue You inject [M] with the hypospray." M << "\red You feel a tiny prick!" - M.attack_log += text("[world.time] - has been injected with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to inject [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.ckey])") 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("[world.time] - has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]") - user.attack_log += text("[world.time] - has fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]") + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]") + user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]") 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("[world.time] - has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]") - user.attack_log += text("[world.time] - has fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]") + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]") + user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]") 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("[world.time] - has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]") - user.attack_log += text("[world.time] - has fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]") + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]") + user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]") 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("[world.time] - has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]") - user.attack_log += text("[world.time] - has fed [src.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]") + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]") + user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]") if(reagents.total_volume) diff --git a/code/WorkInProgress/recycling/sortingmachinery.dm b/code/WorkInProgress/recycling/sortingmachinery.dm index f6fd60950b4..db27478076a 100644 --- a/code/WorkInProgress/recycling/sortingmachinery.dm +++ b/code/WorkInProgress/recycling/sortingmachinery.dm @@ -61,7 +61,7 @@ attack(target as obj, mob/user as mob) - user.attack_log += text("[world.time] - has used [src.name] on \ref[target]") + user.attack_log += text("\[[time_stamp()]\] Has used [src.name] on \ref[target]") if (istype(target, /obj/item)) var/obj/item/O = target diff --git a/code/defines/global.dm b/code/defines/global.dm index 96e08fbfa94..6efd9af3ed3 100644 --- a/code/defines/global.dm +++ b/code/defines/global.dm @@ -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 diff --git a/code/defines/obj/clothing/gimmick.dm b/code/defines/obj/clothing/gimmick.dm index 41830beb995..9c15772efb4 100644 --- a/code/defines/obj/clothing/gimmick.dm +++ b/code/defines/obj/clothing/gimmick.dm @@ -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" diff --git a/code/defines/obj/clothing/gloves.dm b/code/defines/obj/clothing/gloves.dm index f9e0f7ce5a3..b6509f428d5 100644 --- a/code/defines/obj/clothing/gloves.dm +++ b/code/defines/obj/clothing/gloves.dm @@ -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) diff --git a/code/defines/obj/clothing/jumpsuit.dm b/code/defines/obj/clothing/jumpsuit.dm index 4e536d8e2d7..e811b43c6b4 100644 --- a/code/defines/obj/clothing/jumpsuit.dm +++ b/code/defines/obj/clothing/jumpsuit.dm @@ -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." diff --git a/code/defines/obj/clothing/mask.dm b/code/defines/obj/clothing/mask.dm index 3c3b5bef143..4c4a121628a 100644 --- a/code/defines/obj/clothing/mask.dm +++ b/code/defines/obj/clothing/mask.dm @@ -190,4 +190,6 @@ icon_on = "cigar2on" icon_off = "cigar2off" icon_butt = "cigarbutt" - smoketime = 7200 \ No newline at end of file + smoketime = 7200 + + diff --git a/code/defines/procs/time_stamp.dm b/code/defines/procs/time_stamp.dm new file mode 100644 index 00000000000..a7f8a7205b5 --- /dev/null +++ b/code/defines/procs/time_stamp.dm @@ -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]" \ No newline at end of file diff --git a/code/game/magic/cultist/ritual.dm b/code/game/magic/cultist/ritual.dm index 62fa3ccee32..aa5ce166b8d 100644 --- a/code/game/magic/cultist/ritual.dm +++ b/code/game/magic/cultist/ritual.dm @@ -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("[world.time] - has had the [name] used on him by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used [name] on [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has had the [name] used on him by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used [name] on [M.name] ([M.ckey])") if(istype(M,/mob/dead)) M.invisibility = 0 diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index 184a40aac7b..e9dd2e2a79e 100644 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -695,8 +695,11 @@ user.show_message(text("\red Warning: [D.form] Detected\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) ) diff --git a/code/game/objects/devices/aicard.dm b/code/game/objects/devices/aicard.dm index 58277c759c3..d271a1f6e2f 100644 --- a/code/game/objects/devices/aicard.dm +++ b/code/game/objects/devices/aicard.dm @@ -13,8 +13,8 @@ if(!istype(M, /mob/living/silicon/ai))//If target is not an AI. return ..() - M.attack_log += text("[world.time] - has been carded with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to card [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been carded with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to card [M.name] ([M.ckey])") transfer_ai("AICORE", "AICARD", M, user) return diff --git a/code/game/objects/devices/flash.dm b/code/game/objects/devices/flash.dm index 1f4aee71959..4f546fc8d38 100644 --- a/code/game/objects/devices/flash.dm +++ b/code/game/objects/devices/flash.dm @@ -5,8 +5,8 @@ usr.drop_item() return if (src.shots > 0) - M.attack_log += text("[world.time] - has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to flash [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to flash [M.name] ([M.ckey])") var/safety = null if (istype(M, /mob/living/carbon/human)) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 69647eb7875..732156edd98 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -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("[world.time] - has been handcuffed (attempt) by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has attempted to handcuff [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [M.name] ([M.ckey])") 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("[world.time] - has been stabbed with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to stab [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])") 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("[world.time] - has been stabbed with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to stab [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])") if(M.reagents) reagents.trans_to(M, 15) ..() return diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index ca9db0a8388..765be368995 100644 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -207,8 +207,8 @@ user.lastattacked = M M.lastattacker = user - user.attack_log += " Attacked [M.name] ([M.ckey]) with [src.name]" - M.attack_log += " Attacked by [user.name] ([user.ckey]) with [src.name]" + user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" + M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" //spawn(1800) // this wont work right // M.lastattacker = null diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 26c432ccb33..210e695027d 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -10,7 +10,7 @@ return user << "Planting explosives..." if(ismob(target)) - user.attack_log += "[world.time] - [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])" + user.attack_log += "\[[time_stamp()]\] [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])" 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 += "[world.time] - had the [name] planted on them by [user.real_name] ([user.ckey])" + target:attack_log += "\[[time_stamp()]\] Had the [name] planted on them by [user.real_name] ([user.ckey])" 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]." diff --git a/code/game/objects/items/weapons/guns_new.dm b/code/game/objects/items/weapons/guns_new.dm index 38b6ae8be87..dc1b9cd532a 100644 --- a/code/game/objects/items/weapons/guns_new.dm +++ b/code/game/objects/items/weapons/guns_new.dm @@ -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("[] []/[] shot []/[] with a []", world.time, firer, firer.ckey, M, M.ckey, src) - firer.attack_log += text("[] []/[] shot []/[] with a []", world.time, firer, firer.ckey, M, M.ckey, src) + M.attack_log += text("\[[]\] []/[] shot []/[] with a []", time_stamp(), firer, firer.ckey, M, M.ckey, src) + firer.attack_log += text("\[[]\] []/[] shot []/[] with a []", time_stamp(), firer, firer.ckey, M, M.ckey, src) else - M.attack_log += text("[] UNKOWN SUBJECT (No longer exists) shot []/[] with a []", world.time, M, M.ckey, src) + M.attack_log += text("\[[]\] UNKOWN SUBJECT (No longer exists) shot []/[] with a []", 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 diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index 48dc7582961..6e8b320b3cc 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -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("[world.time] - has had the [src.name] used on them by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] on [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Had the [src.name] used on them by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [M.name] ([M.ckey])") M.eye_blurry += force/7 if(prob(20)) diff --git a/code/game/objects/items/weapons/implants.dm b/code/game/objects/items/weapons/implants.dm index 64d169d399d..5db570161dc 100644 --- a/code/game/objects/items/weapons/implants.dm +++ b/code/game/objects/items/weapons/implants.dm @@ -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("[world.time] - has been implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])") src.imp.loc = M src.imp.imp_in = M src.imp.implanted = 1 diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index a56fb98a388..042a5a49816 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -52,8 +52,8 @@ KNIFE user.take_organ_damage(10) user.paralysis += 2 return - M.attack_log += text("[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") 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("[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") if(prob(15)) M.weakened += 3 diff --git a/code/game/objects/items/weapons/misc.dm b/code/game/objects/items/weapons/misc.dm index 9698010c8db..0b6a0bbf004 100644 --- a/code/game/objects/items/weapons/misc.dm +++ b/code/game/objects/items/weapons/misc.dm @@ -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("[world.time] - has been injected with [name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [name] to inject [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [M.name] ([M.ckey])") if (user) if (istype(M, /mob/living/carbon/human)) diff --git a/code/game/objects/items/weapons/mops_cleaners.dm b/code/game/objects/items/weapons/mops_cleaners.dm index 8dfbc681499..01d5c616e75 100644 --- a/code/game/objects/items/weapons/mops_cleaners.dm +++ b/code/game/objects/items/weapons/mops_cleaners.dm @@ -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)) + + + + + + + + + diff --git a/code/game/objects/items/weapons/papers_bins.dm b/code/game/objects/items/weapons/papers_bins.dm index 671f11275d3..e576e335a84 100644 --- a/code/game/objects/items/weapons/papers_bins.dm +++ b/code/game/objects/items/weapons/papers_bins.dm @@ -475,8 +475,8 @@ CLIPBOARDS target:client:eye = present target:loc = present - target.attack_log += text("[world.time] - has been wrapped with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to wrap [target.name] ([target.ckey])") + target.attack_log += text("\[[time_stamp()]\] Has been wrapped with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to wrap [target.name] ([target.ckey])") else user << "/blue You need more paper." diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 4624e036629..49a84f577d6 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -121,8 +121,8 @@ STUN BATON src.add_fingerprint(user) var/mob/living/carbon/human/H = M - M.attack_log += text("[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey]) (INTENT: [uppertext(user.a_intent)])") if (status == 0 || (status == 1 && charges ==0)) @@ -218,8 +218,8 @@ STUN BATON return src.add_fingerprint(user) - M.attack_log += text("[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") if (user.a_intent == "hurt") if(!..()) return diff --git a/code/game/objects/secstorage/sbriefcase.dm b/code/game/objects/secstorage/sbriefcase.dm index 3a9b29bbdd3..cdec94b4f71 100644 --- a/code/game/objects/secstorage/sbriefcase.dm +++ b/code/game/objects/secstorage/sbriefcase.dm @@ -23,8 +23,8 @@ return - M.attack_log += text("[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") var/t = user:zone_sel.selecting if (t == "head") diff --git a/code/game/objects/storage/bible.dm b/code/game/objects/storage/bible.dm index 85e199b66b7..02685c7738a 100644 --- a/code/game/objects/storage/bible.dm +++ b/code/game/objects/storage/bible.dm @@ -27,8 +27,8 @@ chaplain = 1 - M.attack_log += text("[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") user << "\red You don't have the dexterity to do this!" diff --git a/code/game/objects/storage/briefcase.dm b/code/game/objects/storage/briefcase.dm index b33d20f29a3..3cbdc434126 100644 --- a/code/game/objects/storage/briefcase.dm +++ b/code/game/objects/storage/briefcase.dm @@ -18,8 +18,8 @@ return - M.attack_log += text("[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") if (M.stat < 2 && M.health < 50 && prob(90)) var/mob/H = M diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 990cba5f9c4..d29c4a591e5 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1804,12 +1804,8 @@ playsound(loc, "punch", 25, 1, -1) for(var/mob/O in viewers(src, null)) O.show_message(text("\red [] has punched []!", M, src), 1) - M.attack_log += text("[world.time] - has punched [src.name] ([src.ckey])") - src.attack_log += text("[world.time] - has been punched by [M.name] ([M.ckey])") - - M.attack_log += text("[world.time] - has punched [src.name] ([src.ckey])") - src.attack_log += text("[world.time] - has been punched by [M.name] ([M.ckey])") - + M.attack_log += text("\[[time_stamp()]\] Punched [src.name] ([src.ckey])") + src.attack_log += text("\[[time_stamp()]\] Has been punched by [M.name] ([M.ckey])") if (def_zone == "head") if ((((head && head.body_parts_covered & HEAD) || (wear_mask && wear_mask.body_parts_covered & HEAD)) && prob(99))) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index f6e38db49d4..dda691484a3 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -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 diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 12611f3cd79..68697bc7421 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -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("[world.time] - has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("[world.time] - has used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") user.cell.charge -= 30 if (M.weakened < 5) M.weakened = 5 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4527f5bc4be..49398dc0bc1 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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("[world.time] - has had their neck grabbed by [assailant.name] ([assailant.ckey])") - assailant.attack_log += text("[world.time] - has grabbed the neck of [affecting.name] ([affecting.ckey])") + affecting.attack_log += text("\[[time_stamp()]\] Has had their neck grabbed by [assailant.name] ([assailant.ckey])") + assailant.attack_log += text("\[[time_stamp()]\] Grabbed the neck of [affecting.name] ([affecting.ckey])") 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("[world.time] - has been strangled (kill intent) by [assailant.name] ([assailant.ckey])") - assailant.attack_log += text("[world.time] - has attempted to strangle (kill intent) [affecting.name] ([affecting.ckey])") + affecting.attack_log += text("\[[time_stamp()]\] Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])") + assailant.attack_log += text("\[[time_stamp()]\] Strangled (kill intent) [affecting.name] ([affecting.ckey])") assailant.next_move = world.time + 10 affecting.stunned = max(2, affecting.stunned) affecting.paralysis = max(1, affecting.paralysis) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 0d6ea353d2f..d7b3632d087 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -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() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 4b886564253..8df114482e3 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -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 diff --git a/icons/obj/beaker1.dmi b/icons/obj/beaker1.dmi new file mode 100644 index 00000000000..b63a5ae341b Binary files /dev/null and b/icons/obj/beaker1.dmi differ diff --git a/icons/obj/beaker2.dmi b/icons/obj/beaker2.dmi new file mode 100644 index 00000000000..5667a3fc72d Binary files /dev/null and b/icons/obj/beaker2.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 1aaf044e6dd..74596331ea9 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"