mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-24 20:46:29 +01:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into engineering_sprites
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -452,23 +452,27 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
|
||||
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
|
||||
//give the syndies a bit of stealth
|
||||
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Security")
|
||||
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Medical")
|
||||
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "General")
|
||||
// a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Security")
|
||||
// a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Medical")
|
||||
else
|
||||
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Security")
|
||||
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Medical")
|
||||
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "General")
|
||||
// a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Security")
|
||||
// a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Medical")
|
||||
qdel(a)
|
||||
processing_objects.Remove(src)
|
||||
if ("emp")
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
|
||||
var/name = prob(50) ? t.name : pick(teleportlocs)
|
||||
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Security")
|
||||
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Medical")
|
||||
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "General")
|
||||
// a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Security")
|
||||
// a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Medical")
|
||||
qdel(a)
|
||||
else
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
|
||||
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Security")
|
||||
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Medical")
|
||||
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "General")
|
||||
// a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Security")
|
||||
// a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Medical")
|
||||
qdel(a)
|
||||
processing_objects.Remove(src)
|
||||
|
||||
|
||||
@@ -68,3 +68,40 @@
|
||||
qdel(src)
|
||||
user.put_in_hands(finished)
|
||||
update_icon(user)
|
||||
|
||||
/obj/item/woodcirclet
|
||||
name = "wood circlet"
|
||||
desc = "A small wood circlet for making a flower crown."
|
||||
icon = 'icons/obj/buildingobject.dmi'
|
||||
icon_state = "woodcirclet"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
/obj/item/woodcirclet/attackby(obj/item/W as obj, mob/user as mob)
|
||||
var/obj/item/complete
|
||||
if(istype(W,/obj/item/seeds/poppyseed))
|
||||
user << "You attach the poppy to the circlet and create a beautiful flower crown."
|
||||
complete = new /obj/item/clothing/head/poppy_crown(get_turf(user))
|
||||
user.drop_from_inventory(W)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
user.put_in_hands(complete)
|
||||
return
|
||||
else if(istype(W,/obj/item/seeds/sunflowerseed))
|
||||
user << "You attach the sunflower to the circlet and create a beautiful flower crown."
|
||||
complete = new /obj/item/clothing/head/sunflower_crown(get_turf(user))
|
||||
user.drop_from_inventory(W)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
user.put_in_hands(complete)
|
||||
return
|
||||
else if(istype(W,/obj/item/seeds/lavenderseed))
|
||||
user << "You attach the lavender to the circlet and create a beautiful flower crown."
|
||||
complete = new /obj/item/clothing/head/lavender_crown(get_turf(user))
|
||||
user.drop_from_inventory(W)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
user.put_in_hands(complete)
|
||||
return
|
||||
@@ -35,6 +35,13 @@
|
||||
icon_state = "switchblade"
|
||||
unbreakable = 1
|
||||
|
||||
/obj/item/weapon/material/butterfly/boxcutter
|
||||
name = "box cutter"
|
||||
desc = "A thin, inexpensive razor-blade knife designed to open cardboard boxes."
|
||||
icon_state = "boxcutter"
|
||||
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.2 // 4 when thrown with weight 20 (steel)
|
||||
|
||||
/obj/item/weapon/material/butterfly/attack_self(mob/user)
|
||||
active = !active
|
||||
if(active)
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
if(affecting.take_damage(force, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
if(affecting.can_feel_pain())
|
||||
if(affecting.organ_can_feel_pain())
|
||||
H.Weaken(3)
|
||||
return
|
||||
check -= picked
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
new /obj/item/weapon/storage/pill_bottle/dylovene(src)
|
||||
new /obj/item/weapon/storage/pill_bottle/tramadol(src)
|
||||
new /obj/item/weapon/storage/pill_bottle/spaceacillin(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting(src)
|
||||
new /obj/item/stack/medical/splint(src)
|
||||
return
|
||||
|
||||
@@ -150,6 +151,19 @@
|
||||
new /obj/item/stack/medical/advanced/bruise_pack(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/firstaid/clotting
|
||||
name = "clotting kit"
|
||||
desc = "Contains chemicals to stop bleeding."
|
||||
max_storage_space = ITEMSIZE_COST_SMALL * 7
|
||||
|
||||
/obj/item/weapon/storage/firstaid/clotting/New()
|
||||
..()
|
||||
if (empty)
|
||||
return
|
||||
for(var/i = 1 to 8)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting(src)
|
||||
return
|
||||
|
||||
/*
|
||||
* Pill Bottles
|
||||
*/
|
||||
|
||||
@@ -172,7 +172,8 @@
|
||||
|
||||
/obj/item/weapon/weldingtool/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
|
||||
if(max_fuel)
|
||||
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
@@ -234,18 +235,22 @@
|
||||
|
||||
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
|
||||
O.reagents.trans_to_obj(src, max_fuel)
|
||||
user << "<span class='notice'>Welder refueled</span>"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.welding)
|
||||
message_admins("[key_name_admin(user)] triggered a fueltank explosion with a welding tool.")
|
||||
log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.")
|
||||
user << "<span class='danger'>You begin welding on the fueltank and with a moment of lucidity you realize, this might not have been the smartest thing you've ever done.</span>"
|
||||
var/obj/structure/reagent_dispensers/fueltank/tank = O
|
||||
tank.explode()
|
||||
return
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !welding)
|
||||
if(!welding && max_fuel)
|
||||
O.reagents.trans_to_obj(src, max_fuel)
|
||||
user << "<span class='notice'>Welder refueled</span>"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
else if(!welding)
|
||||
user << "<span class='notice'>[src] doesn't use fuel.</span>"
|
||||
return
|
||||
else
|
||||
message_admins("[key_name_admin(user)] triggered a fueltank explosion with a welding tool.")
|
||||
log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.")
|
||||
user << "<span class='danger'>You begin welding on the fueltank and with a moment of lucidity you realize, this might not have been the smartest thing you've ever done.</span>"
|
||||
var/obj/structure/reagent_dispensers/fueltank/tank = O
|
||||
tank.explode()
|
||||
return
|
||||
if (src.welding)
|
||||
remove_fuel(1)
|
||||
var/turf/location = get_turf(user)
|
||||
@@ -286,7 +291,7 @@
|
||||
|
||||
/obj/item/weapon/weldingtool/update_icon()
|
||||
..()
|
||||
icon_state = welding ? "welder1" : "welder"
|
||||
icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]"
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
M.update_inv_l_hand()
|
||||
@@ -313,7 +318,8 @@
|
||||
processing_objects |= src
|
||||
else
|
||||
if(M)
|
||||
M << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
var/msg = max_fuel ? "welding fuel" : "charge"
|
||||
M << "<span class='notice'>You need more [msg] to complete this task.</span>"
|
||||
return
|
||||
//Otherwise
|
||||
else if(!set_welding && welding)
|
||||
@@ -370,7 +376,6 @@
|
||||
user.disabilities &= ~NEARSIGHTED
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
max_fuel = 40
|
||||
@@ -405,6 +410,108 @@
|
||||
if(get_fuel() < max_fuel && nextrefueltick < world.time)
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("fuel", 1)
|
||||
|
||||
/*
|
||||
* Electric/Arc Welder
|
||||
*/
|
||||
|
||||
/obj/item/weapon/weldingtool/electric //AND HIS WELDING WAS ELECTRIC
|
||||
name = "electric welding tool"
|
||||
icon_state = "arcwelder"
|
||||
max_fuel = 0 //We'll handle the consumption later.
|
||||
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
|
||||
var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery
|
||||
var/cell_type = null
|
||||
var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/New()
|
||||
..()
|
||||
if(cell_type)
|
||||
power_supply = new cell_type(src)
|
||||
else
|
||||
power_supply = new /obj/item/weapon/cell/device(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/examine(mob/user)
|
||||
..()
|
||||
if(power_supply)
|
||||
user << text("\icon[] [] has [] charge left.", src, src.name, get_fuel())
|
||||
else
|
||||
user << text("\icon[] [] has power for no power cell!", src, src.name)
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/get_fuel()
|
||||
if(use_external_power)
|
||||
var/obj/item/weapon/cell/external = get_external_power_supply()
|
||||
return external.charge
|
||||
else if(power_supply)
|
||||
return power_supply.charge
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null)
|
||||
if(!welding)
|
||||
return 0
|
||||
if(get_fuel() >= amount)
|
||||
power_supply.checked_use(charge_cost)
|
||||
if(use_external_power)
|
||||
var/obj/item/weapon/cell/external = get_external_power_supply()
|
||||
if(!external || !external.use(charge_cost)) //Take power from the borg...
|
||||
power_supply.give(charge_cost) //Give it back to the cell.
|
||||
if(M)
|
||||
eyecheck(M)
|
||||
return 1
|
||||
else
|
||||
if(M)
|
||||
M << "<span class='notice'>You need more energy to complete this task.</span>"
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/attack_hand(mob/user as mob)
|
||||
if(user.get_inactive_hand() == src)
|
||||
if(power_supply)
|
||||
power_supply.update_icon()
|
||||
user.put_in_hands(power_supply)
|
||||
power_supply = null
|
||||
user << "<span class='notice'>You remove the cell from the [src].</span>"
|
||||
setWelding(0)
|
||||
update_icon()
|
||||
return
|
||||
..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(istype(W, /obj/item/weapon/cell/device))
|
||||
if(!power_supply)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
power_supply = W
|
||||
user << "<span class='notice'>You install a cell in \the [src].</span>"
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='notice'>\The [src] already has a cell.</span>"
|
||||
else
|
||||
user << "<span class='notice'>\The [src] cannot use that type of cell.</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/proc/get_external_power_supply()
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
return R.cell
|
||||
if(istype(src.loc, /obj/item/rig_module))
|
||||
var/obj/item/rig_module/module = src.loc
|
||||
if(module.holder && module.holder.wearer)
|
||||
var/mob/living/carbon/human/H = module.holder.wearer
|
||||
if(istype(H) && H.back)
|
||||
var/obj/item/weapon/rig/suit = H.back
|
||||
if(istype(suit))
|
||||
return suit.cell
|
||||
return null
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/mounted
|
||||
use_external_power = 1
|
||||
|
||||
/*
|
||||
* Crowbar
|
||||
*/
|
||||
|
||||
@@ -77,11 +77,15 @@
|
||||
|
||||
//armour
|
||||
var/blocked = L.run_armor_check(target_zone, "melee")
|
||||
var/soaked = L.get_armor_soak(target_zone, "melee")
|
||||
|
||||
if(blocked >= 100)
|
||||
return
|
||||
|
||||
if(!L.apply_damage(30, BRUTE, target_zone, blocked, used_weapon=src))
|
||||
if(soaked >= 30)
|
||||
return
|
||||
|
||||
if(!L.apply_damage(30, BRUTE, target_zone, blocked, soaked, used_weapon=src))
|
||||
return 0
|
||||
|
||||
//trap the victim in place
|
||||
|
||||
Reference in New Issue
Block a user