mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-22 04:36:53 +01:00
* Better notifications * Add buttons to del/move tabs in edit mode * Add a <span> to emotes * Fix duplicate IDs in VChat and add more logging * VChat: Redone chat output in Vue.js * Ported tg asset cache * VChat DME Update * Replace \image macro with bicon() * NanoUI Subsystem Fixes Don't do this, the asset subsystem does this for you * Allow narrate/globalnarrate shenanigans Allows HTML if your entire thing is HTML * Disable bicon() icon object cache, and create text tag cache * Ore Scanner is written incorrectly Only revealed by vchat * Fixes 2 VChat bugs * Underline links in VChat * Fix LOOC color * VChat Improvements Hopefully, anyway. - Arbitrary font size setting - Line height setting - Multiple crush settings - Rewrote how tabs work hopefully for performance - Hidden messages are actually put elsewhere - Attempts to correct chat backlog restore on rejoin * Surgery steps to use <span> * Some VChat Tweaks - Chat remains between client reconnects if your client didn't close (so things like using the reconnect button, or autoreconnects at round end when that feels like working) - The client doesn't send pings to the server, the server sends pings to the client. This fixes AFK measurements for AFK kick purposes. - Turn latency indicator into a green/red indicator to show if you're connected, and when clicked will perform a one-time ping (and block doing it again for 10 seconds). It will display '?ms' if it never got a reply, or '999ms' if it did, but it was over 1s. * Include date in filename for VChat log save * Merge pull request #6767 from Cyantime/patch-2 Change chat export naming scheme * Adds VChat tab saving Saves every time you enter/exit edit mode. Persists between rounds, VChat reloads via verb, etc. * Fix chat exporting when someone has used unicode Only affects clients still using 512 * Use CLIENT_FROM_VAR for ease of code reading * Update code/modules/client/asset_cache.dm Co-Authored-By: Novacat <35587478+Novacat@users.noreply.github.com> * Fix runtime when client disconnects before vchat loads * Fix polaris version of command reports * Fix LOOC color in oldchat * Put some styles in various adminpm messages * Round info and advanced who spans * Fix missing tag-end * Maybe fix images for linux and statpanel but also doom everyone Co-authored-by: ShadowLarkens <ShadowLarkens@users.noreply.github.com> Co-authored-by: Novacat <35587478+Novacat@users.noreply.github.com>
113 lines
3.9 KiB
Plaintext
113 lines
3.9 KiB
Plaintext
/obj/item/weapon/syndie
|
|
icon = 'icons/obj/syndieweapons.dmi'
|
|
|
|
/*C-4 explosive charge and etc, replaces the old syndie transfer valve bomb.*/
|
|
|
|
|
|
/*The explosive charge itself. Flashes for five seconds before exploding.*/
|
|
|
|
/obj/item/weapon/syndie/c4explosive
|
|
icon_state = "c-4small_0"
|
|
item_state = "radio"
|
|
name = "normal-sized package"
|
|
desc = "A small wrapped package."
|
|
w_class = ITEMSIZE_NORMAL
|
|
|
|
var/devastate = 1
|
|
var/heavy_impact = 2
|
|
var/light_impact = 4
|
|
var/flash_range = 5
|
|
var/size = "small" /*Used for the icon, this one will make c-4small_0 for the off state.*/
|
|
|
|
/obj/item/weapon/syndie/c4explosive/heavy
|
|
icon_state = "c-4large_0"
|
|
item_state = "radio"
|
|
desc = "A mysterious package, it's quite heavy."
|
|
devastate = 1
|
|
heavy_impact = 3
|
|
light_impact = 5
|
|
flash_range = 7
|
|
size = "large"
|
|
|
|
/obj/item/weapon/syndie/c4explosive/heavy/super_heavy
|
|
name = "large-sized package"
|
|
desc = "A mysterious package, it's quite exceptionally heavy."
|
|
devastate = 2
|
|
heavy_impact = 5
|
|
light_impact = 7
|
|
flash_range = 7
|
|
|
|
/obj/item/weapon/syndie/c4explosive/New()
|
|
var/K = rand(1,2000)
|
|
K = md5(num2text(K)+name)
|
|
K = copytext(K,1,7)
|
|
desc += "\n You see [K] engraved on \the [src]."
|
|
var/obj/item/weapon/flame/lighter/zippo/c4detonator/detonator = new(src.loc)
|
|
detonator.desc += " You see [K] engraved on the lighter."
|
|
detonator.bomb = src
|
|
|
|
/obj/item/weapon/syndie/c4explosive/proc/detonate()
|
|
icon_state = "c-4[size]_1"
|
|
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1)
|
|
for(var/mob/O in hearers(src, null))
|
|
O.show_message("[bicon(src)] <span class = 'warning'> The [src.name] beeps! </span>")
|
|
sleep(50)
|
|
explosion(get_turf(src), devastate, heavy_impact, light_impact, flash_range)
|
|
for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors.
|
|
var/turf/simulated/wall/T = get_step(src,dirn)
|
|
if(locate(/obj/machinery/door/airlock) in T)
|
|
var/obj/machinery/door/airlock/D = locate() in T
|
|
if(D.density)
|
|
D.open()
|
|
if(istype(T,/turf/simulated/wall))
|
|
T.dismantle_wall(1)
|
|
qdel(src)
|
|
|
|
/obj/item/weapon/syndie/c4explosive/attackby(obj/item/weapon/W, mob/user)
|
|
if(istype(W, /obj/item/weapon/flame/lighter/zippo/c4detonator))
|
|
var/obj/item/weapon/flame/lighter/zippo/c4detonator/D = W
|
|
D.bomb = src
|
|
return
|
|
..()
|
|
|
|
/*Detonator, disguised as a lighter*/
|
|
/*Click it when closed to open, when open to bring up a prompt asking you if you want to close it or press the button.*/
|
|
|
|
/obj/item/weapon/flame/lighter/zippo/c4detonator
|
|
var/detonator_mode = 0
|
|
var/obj/item/weapon/syndie/c4explosive/bomb
|
|
|
|
/obj/item/weapon/flame/lighter/zippo/c4detonator/attack_self(mob/user as mob)
|
|
if(!detonator_mode)
|
|
..()
|
|
|
|
else if(!lit)
|
|
base_state = icon_state
|
|
lit = 1
|
|
icon_state = "[base_state]1"
|
|
//item_state = "[base_state]on"
|
|
user.visible_message("<span class='rose'>Without even breaking stride, \the [user] flips open \the [src] in one smooth movement.</span>")
|
|
|
|
else if(lit && detonator_mode)
|
|
switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter."))
|
|
if("Press the button.")
|
|
to_chat(user, "<span class='warning'>You press the button.</span>")
|
|
icon_state = "[base_state]click"
|
|
if(src.bomb)
|
|
src.bomb.detonate()
|
|
log_admin("[key_name(user)] has triggered [src.bomb] with [src].")
|
|
message_admins("<span class='danger'>[key_name_admin(user)] has triggered [src.bomb] with [src].</span>")
|
|
|
|
if("Close the lighter.")
|
|
lit = 0
|
|
icon_state = "[base_state]"
|
|
//item_state = "[base_state]"
|
|
user.visible_message("<span class='rose'>You hear a quiet click, as \the [user] shuts off \the [src] without even looking at what they're doing.</span>")
|
|
|
|
|
|
/obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob)
|
|
if(W.is_screwdriver())
|
|
detonator_mode = !detonator_mode
|
|
playsound(src, W.usesound, 50, 1)
|
|
to_chat(user, "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>")
|