mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-20 20:54:35 +01:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync
# Conflicts: # code/modules/client/preference_setup/general/03_body.dm # code/modules/mob/new_player/sprite_accessories.dm # html/changelogs/.all_changelog.yml # icons/mob/human_races/markings.dmi # vorestation.dme
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
name = "inteliCard"
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon_state = "aicard" // aicard-full
|
||||
item_state = "electronic"
|
||||
item_state = "aicard"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
show_messages = 0
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
var/state //0 off, 1 open, 2 working, 3 dead
|
||||
var/uses = 2 //Calculates initial uses based on starting cell size
|
||||
var/use_on_synthetic = 0 //If 1, this is only useful on FBPs, if 0, this is only useful on fleshies
|
||||
var/pad_name = "defib pads" //Just the name given for some cosmetic things
|
||||
var/chance = 75 //Percent chance of working
|
||||
var/charge_cost //Set in New() based on uses
|
||||
var/obj/item/weapon/cell/cell //The size is mostly irrelevant, see 'uses'
|
||||
@@ -32,13 +34,31 @@
|
||||
if(istype(onto) && Adjacent(usr) && !usr.restrained() && !usr.stat)
|
||||
var/mob/living/carbon/human/user = usr
|
||||
//<--Feel free to code clothing checks right here
|
||||
user.visible_message("<span class='warning'>[user] begins applying defib pads to [onto].</span>",
|
||||
"<span class='warning'>You begin applying defib pads to [onto].</span>")
|
||||
if(can_defib(onto))
|
||||
user.visible_message("<span class='warning'>[user] begins applying [pad_name] to [onto].</span>",
|
||||
"<span class='warning'>You begin applying [pad_name] to [onto].</span>")
|
||||
if(do_after(user, 100, onto))
|
||||
patient = onto
|
||||
statechange(1,patient)
|
||||
user.visible_message("<span class='warning'>[user] applies defib pads to [onto].</span>",
|
||||
"<span class='warning'>You finish applying defib pads to [onto].</span>")
|
||||
user.visible_message("<span class='warning'>[user] applies [pad_name] to [onto].</span>",
|
||||
"<span class='warning'>You finish applying [pad_name] to [onto].</span>")
|
||||
|
||||
|
||||
//can_defib() check is where all of the qualifying conditions should go
|
||||
//Could probably toss in checks here for damage, organs, etc, but for now I'll leave it as just this
|
||||
/obj/item/device/defib_kit/proc/can_defib(var/mob/living/carbon/human/target)
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(use_on_synthetic && !target.isSynthetic())
|
||||
to_chat(user, "[src] isn't designed for organics!")
|
||||
return 0
|
||||
else if(!use_on_synthetic && target.isSynthetic())
|
||||
to_chat(user, "[src] isn't designed for synthetics!")
|
||||
return 0
|
||||
else if(!target.isSynthetic() && ((world.time - target.timeofdeath) > (10 MINUTES)))//Can only revive organics within a few minutes
|
||||
to_chat(user, "There is no spark of life in [target.name], they've been dead too long to revive this way.")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/defib_kit/attackby(var/obj/item/A as obj, mob/living/user as mob)
|
||||
..()
|
||||
@@ -94,7 +114,7 @@
|
||||
|
||||
//Patient moved too far
|
||||
if(patient && !(get_dist(src,patient) <= 1)) //You separated the kit and pads too far
|
||||
audible_message("<span class='warning'>There's a clatter as the defib pads are yanked off of [patient].</span>")
|
||||
audible_message("<span class='warning'>There is a clatter as the [pad_name] are yanked off of [patient].</span>")
|
||||
statechange(0)
|
||||
patient = null
|
||||
return
|
||||
@@ -111,7 +131,7 @@
|
||||
patient.visible_message("<span class='warning'>[patient] convulses!</span>")
|
||||
playsound(src.loc, 'sound/effects/sparks2.ogg', 75, 1)
|
||||
//Actual rezzing code
|
||||
if(prob(chance) && ((world.time - patient.timeofdeath) < (10 MINUTES))) //Can only revive within a few minutes
|
||||
if(prob(chance))
|
||||
if(!patient.client && patient.mind) //Don't force the dead person to come back if they don't want to.
|
||||
for(var/mob/observer/dead/ghost in player_list)
|
||||
if(ghost.mind == patient.mind)
|
||||
@@ -155,3 +175,10 @@
|
||||
break
|
||||
|
||||
return
|
||||
|
||||
/obj/item/device/defib_kit/jumper_kit
|
||||
name = "jumper cable kit"
|
||||
desc = "This Morpheus-branded FBP defib kit is a semi-automated model. Apply cables, step back, wait."
|
||||
icon_state = "jumper_kit"
|
||||
use_on_synthetic = 1
|
||||
pad_name = "jumper cables"
|
||||
|
||||
@@ -181,6 +181,38 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/flashlight/MouseDrop(obj/over_object as obj)
|
||||
if(!canremove)
|
||||
return
|
||||
|
||||
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
|
||||
//there's got to be a better way of doing this.
|
||||
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
|
||||
return
|
||||
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
usr.u_equip(src)
|
||||
usr.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
usr.u_equip(src)
|
||||
usr.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
/obj/item/device/flashlight/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
if(power_use)
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
@@ -210,6 +242,26 @@
|
||||
w_class = ITEMSIZE_TINY
|
||||
power_use = 0
|
||||
|
||||
/obj/item/device/flashlight/color //Default color is blue, just roll with it.
|
||||
name = "blue flashlight"
|
||||
desc = "A hand-held emergency light. This one is blue."
|
||||
icon_state = "flashlight_blue"
|
||||
|
||||
/obj/item/device/flashlight/color/red
|
||||
name = "red flashlight"
|
||||
desc = "A hand-held emergency light. This one is red."
|
||||
icon_state = "flashlight_red"
|
||||
|
||||
/obj/item/device/flashlight/color/orange
|
||||
name = "orange flashlight"
|
||||
desc = "A hand-held emergency light. This one is orange."
|
||||
icon_state = "flashlight_orange"
|
||||
|
||||
/obj/item/device/flashlight/color/yellow
|
||||
name = "yellow flashlight"
|
||||
desc = "A hand-held emergency light. This one is yellow."
|
||||
icon_state = "flashlight_yellow"
|
||||
|
||||
/obj/item/device/flashlight/maglight
|
||||
name = "maglight"
|
||||
desc = "A very, very heavy duty flashlight."
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
syndie = 1//Signifies that it de-crypts Syndicate transmissions
|
||||
|
||||
/obj/item/device/encryptionkey/raider
|
||||
icon_state = "cypherkey"
|
||||
channels = list("Raider" = 1)
|
||||
origin_tech = list(TECH_ILLEGAL = 2)
|
||||
syndie = 1
|
||||
|
||||
/obj/item/device/encryptionkey/binary
|
||||
icon_state = "cypherkey"
|
||||
translate_binary = 1
|
||||
|
||||
@@ -75,6 +75,15 @@
|
||||
syndie = 1
|
||||
ks1type = /obj/item/device/encryptionkey/syndicate
|
||||
|
||||
/obj/item/device/radio/headset/raider
|
||||
origin_tech = list(TECH_ILLEGAL = 2)
|
||||
syndie = 1
|
||||
ks1type = /obj/item/device/encryptionkey/raider
|
||||
|
||||
/obj/item/device/radio/headset/raider/initialize()
|
||||
..()
|
||||
set_frequency(RAID_FREQ)
|
||||
|
||||
/obj/item/device/radio/headset/binary
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
ks1type = /obj/item/device/encryptionkey/binary
|
||||
@@ -289,6 +298,7 @@
|
||||
desc = "The headset of the boss's boss."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
centComm = 1
|
||||
// freerange = 1
|
||||
ks2type = /obj/item/device/encryptionkey/ert
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
/obj/item/device/radio/intercom/specops
|
||||
name = "\improper Spec Ops intercom"
|
||||
frequency = ERT_FREQ
|
||||
subspace_transmission = 1
|
||||
centComm = 1
|
||||
|
||||
/obj/item/device/radio/intercom/department
|
||||
canhear_range = 5
|
||||
@@ -81,6 +83,17 @@
|
||||
..()
|
||||
internal_channels[num2text(SYND_FREQ)] = list(access_syndicate)
|
||||
|
||||
/obj/item/device/radio/intercom/raider
|
||||
name = "illicit intercom"
|
||||
desc = "Pirate radio, but not in the usual sense of the word."
|
||||
frequency = RAID_FREQ
|
||||
subspace_transmission = 1
|
||||
syndie = 1
|
||||
|
||||
/obj/item/device/radio/intercom/raider/New()
|
||||
..()
|
||||
internal_channels[num2text(RAID_FREQ)] = list(access_syndicate)
|
||||
|
||||
/obj/item/device/radio/intercom/Destroy()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
@@ -40,6 +40,7 @@ var/global/list/default_medbay_channels = list(
|
||||
var/list/channels = list() //see communications.dm for full list. First channel is a "default" for :h
|
||||
var/subspace_transmission = 0
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrypted radio
|
||||
var/centComm = 0//Holder to see if it's a CentComm encrypted radio
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throw_speed = 2
|
||||
@@ -508,6 +509,9 @@ var/global/list/default_medbay_channels = list(
|
||||
if(freq in ANTAG_FREQS)
|
||||
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
return -1
|
||||
if(freq in CENT_FREQS)
|
||||
if(!(src.centComm))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
return -1
|
||||
if (!on)
|
||||
return -1
|
||||
if (!freq) //recieved on main frequency
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
name = "\improper T-ray scanner"
|
||||
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
|
||||
icon_state = "t-ray0"
|
||||
item_state = "t-ray"
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = ITEMSIZE_SMALL
|
||||
item_state = "electronic"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
||||
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user