Files
Polaris/code/modules/surgery/slimes.dm
Aronai Sieyes 715de43f35 VChat: Redone chat output done in Vue.js (#6761)
* 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>
2020-03-27 14:07:28 -07:00

100 lines
4.9 KiB
Plaintext

//////////////////////////////////////////////////////////////////
// SLIME CORE EXTRACTION //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/slime
is_valid_target(mob/living/simple_animal/slime/target)
return istype(target, /mob/living/simple_animal/slime/)
/datum/surgery_step/slime/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
return target.stat == 2
/datum/surgery_step/slime/cut_flesh
allowed_tools = list(
/obj/item/weapon/surgical/scalpel = 100, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 30
max_duration = 50
/datum/surgery_step/slime/cut_flesh/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
return ..() && istype(target) && target.core_removal_stage == 0
/datum/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
"You start cutting through [target]'s flesh with \the [tool].")
/datum/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='notice'>[user] cuts through [target]'s flesh with \the [tool].</span>", \
"<span class='notice'>You cut through [target]'s flesh with \the [tool], revealing its silky innards.</span>")
target.core_removal_stage = 1
/datum/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='danger'>[user]'s hand slips, tearing [target]'s flesh with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, tearing [target]'s flesh with \the [tool]!</span>")
/datum/surgery_step/slime/cut_innards
allowed_tools = list(
/obj/item/weapon/surgical/scalpel = 100, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 30
max_duration = 50
/datum/surgery_step/slime/cut_innards/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
return ..() && istype(target) && target.core_removal_stage == 1
/datum/surgery_step/slime/cut_innards/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
"You start cutting [target]'s silky innards apart with \the [tool].")
/datum/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='notice'>[user] cuts [target]'s innards apart with \the [tool], exposing the cores.</span>", \
"<span class='notice'>You cut [target]'s innards apart with \the [tool], exposing the cores.</span>")
target.core_removal_stage = 2
/datum/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='danger'>[user]'s hand slips, tearing [target]'s innards with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, tearing [target]'s innards with \the [tool]!</span>")
/datum/surgery_step/slime/saw_core
allowed_tools = list(
/obj/item/weapon/surgical/circular_saw = 100, \
/obj/item/weapon/material/knife/machete/hatchet = 75
)
min_duration = 50
max_duration = 70
/datum/surgery_step/slime/saw_core/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
return ..() && (istype(target) && target.core_removal_stage == 2 && target.cores > 0) //This is being passed a human as target, unsure why.
/datum/surgery_step/slime/saw_core/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
"You start cutting out one of [target]'s cores with \the [tool].")
/datum/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
target.cores--
user.visible_message("<span class='notice'>[user] cuts out one of [target]'s cores with \the [tool].</span>",, \
"<span class='notice'>You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.</span>")
if(target.cores >= 0)
new target.coretype(target.loc)
if(target.cores <= 0)
target.icon_state = "slime extracted"
/datum/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
var/datum/gender/T = gender_datums[user.get_visible_gender()]
user.visible_message("<span class='danger'>[user]'s hand slips, causing [T.him] to miss the core!</span>", \
"<span class='danger'>Your hand slips, causing you to miss the core!</span>")