Merge remote-tracking branch 'refs/remotes/Citadel-Station-13/master' into screenshake

This commit is contained in:
deathride58
2017-09-23 11:07:32 -04:00
302 changed files with 4020 additions and 3018 deletions
+3
View File
@@ -125,6 +125,9 @@ var/path_type = /obj/item/baseball_bat
var/path_type = "/obj/item/baseball_bat"
```
### Use var/name format when declaring variables
While DM allows other ways of declaring variables, this one should be used for consistency.
### Tabs, not spaces
You must use tabs to indent your code, NOT SPACES.
+3 -2
View File
@@ -1,7 +1,5 @@
language: generic
sudo: false
dist: precise
env:
global:
- BYOND_MAJOR="511"
@@ -23,12 +21,15 @@ cache:
addons:
apt:
sources:
- sourceline: 'ppa:ondrej/php'
packages:
- libc6-i386
- libgcc1:i386
- libstdc++6:i386
- python
- python-pip
- php5.6
install:
- tools/travis/install_build_tools.sh
@@ -47,7 +47,7 @@
/area/ruin/powered/animal_hospital)
"al" = (
/obj/structure/table/wood,
/obj/item/toy/carpplushie,
/obj/item/toy/plush/carpplushie,
/turf/open/floor/plasteel/cmo,
/area/ruin/powered/animal_hospital)
"am" = (
@@ -590,9 +590,9 @@
"bW" = (
/obj/structure/closet/crate/secure/gear,
/obj/item/ammo_box/c10mm,
/obj/item/ammo_casing/shotgun/meteorshot,
/obj/item/ammo_casing/shotgun/meteorshot,
/obj/item/ammo_casing/shotgun/meteorshot,
/obj/item/ammo_casing/shotgun/meteorslug,
/obj/item/ammo_casing/shotgun/meteorslug,
/obj/item/ammo_casing/shotgun/meteorslug,
/turf/open/floor/mineral/titanium/yellow/airless,
/area/ruin/unpowered)
"bX" = (
@@ -5118,7 +5118,7 @@
/area/maintenance/starboard/fore)
"alA" = (
/obj/structure/table/wood,
/obj/item/toy/carpplushie,
/obj/item/toy/plush/carpplushie,
/obj/effect/decal/cleanable/cobweb,
/turf/open/floor/plasteel/vault{
dir = 8
+3 -3
View File
@@ -49068,7 +49068,7 @@
/area/bridge/showroom/corporate)
"bQl" = (
/obj/structure/table/wood,
/obj/item/toy/carpplushie{
/obj/item/toy/plush/carpplushie{
color = "red";
name = "Nanotrasen wildlife department space carp plushie"
},
@@ -122233,7 +122233,7 @@ cRu
cRi
cRi
cRi
bpu
cRi
aaf
aaa
aaf
@@ -129583,7 +129583,7 @@ arI
atd
bai
ate
dDM
dDL
axP
dnS
axY
+17 -18
View File
@@ -2243,7 +2243,6 @@
req_access = null;
req_access_txt = "57"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/effect/turf_decal/stripes/line{
dir = 2
},
@@ -5297,9 +5296,6 @@
icon_state = "0-2"
},
/obj/effect/spawner/structure/window/reinforced,
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 4
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 4
},
@@ -10506,6 +10502,7 @@
/obj/machinery/atmospherics/components/unary/vent_pump/on{
dir = 1
},
/obj/structure/closet/l3closet/security,
/turf/open/floor/plasteel/vault{
dir = 5
},
@@ -27154,6 +27151,7 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 5
},
/obj/structure/closet/l3closet,
/turf/open/floor/plasteel/vault{
dir = 5
},
@@ -34636,6 +34634,7 @@
/turf/open/floor/plasteel/whitepurple/side,
/area/science/xenobiology)
"bjG" = (
/obj/structure/closet/l3closet/scientist,
/turf/open/floor/plasteel/whitepurple/side{
dir = 6
},
@@ -80685,13 +80684,13 @@ aDc
aYc
aYW
byo
byt
byo
bbx
bcm
bdd
beb
byy
byA
byo
bys
bfK
aQd
bgT
@@ -80941,14 +80940,14 @@ aWQ
abt
aYc
aYW
byp
byo
baI
bby
bcn
bde
bec
beH
byB
byo
bfK
aQd
bgU
@@ -81455,14 +81454,14 @@ aWS
abt
aYe
aYW
byr
byo
baK
bbA
bcp
bdg
bee
beJ
byC
byo
bfK
avV
bgU
@@ -81713,13 +81712,13 @@ aIZ
aYc
aYW
bys
byu
byv
byw
byo
byo
byo
bdh
byx
byz
byD
byo
byo
byo
bfM
avV
bgV
@@ -86304,7 +86303,7 @@ ape
aqm
abt
abN
atu
acw
abt
aad
aad
+1 -1
View File
@@ -6423,7 +6423,7 @@
"qX" = (
/obj/structure/table,
/obj/item/toy/katana,
/obj/item/toy/carpplushie,
/obj/item/toy/plush/carpplushie,
/obj/effect/turf_decal/stripes/line{
dir = 1
},
+3 -2
View File
@@ -132,5 +132,6 @@
#define NOLIVER 29
#define NOSTOMACH 30
//citadel code
#define NOAROUSAL 29//Stops all arousal effects
#define NOGENITALS 30//Cannot create, use, or otherwise have genitals
#define NOAROUSAL 29 //Stops all arousal effects
#define NOGENITALS 30 //Cannot create, use, or otherwise have genitals
#define NO_DNA_COPY 31
+36 -14
View File
@@ -12,33 +12,55 @@
// When the signal is called: (signal arguments)
// /datum signals
#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (datum/component)
#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (datum/component)
#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (/datum/component)
#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (/datum/component)
#define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: ()
// /atom signals
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (obj/item, mob/living, params)
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (mob/living/carbon/human)
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (mob)
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable, atom)
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob)
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (/atom/movable, /atom)
#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target)
#define COMSIG_ATOM_EMP_ACT "atom_emp_act" //from base of atom/emp_act(): (severity)
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" //from base of atom/fire_act(): (exposed_temperature, exposed_volume)
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (obj/item/projectile, def_zone)
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (obj/structure/blob)
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (/obj/item/projectile, def_zone)
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob)
#define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume)
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): ()
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): ()
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_act(): ()
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (mob, obj/item/construction/rcd, passed_mode)
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size)
#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params)
#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob)
#define COMSIG_CLICK_ALT "alt_click" //from base of atom/AltClick(): (/mob)
#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" //from base of atom/CtrlShiftClick(/mob)
// /atom/movable signals
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (atom, dir)
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (atom/movable)
#define COMSIG_MOVABLE_COLLIDE "movable_collide" //from base of atom/movable/Collide(): (atom)
#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (atom, throwingdatum)
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
#define COMSIG_MOVABLE_COLLIDE "movable_collide" //from base of atom/movable/Collide(): (/atom)
#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (/atom, throwingdatum)
// /obj/item signals
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob)
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob)
// /obj/item/clothing signals
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
// /obj/item signals
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (mob/living/target, mob/living/user)
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (mob)
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (obj, mob)
// /obj/item/clothing signals
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
// /obj/machinery signals
#define COMSIG_MACHINE_PROCESS "machine_process" //from machinery subsystem fire(): ()
#define COMSIG_MACHINE_PROCESS_ATMOS "machine_process_atmos" //from air subsystem process_atmos_machinery(): ()
#define COMSIG_MACHINE_PROCESS_ATMOS "machine_process_atmos" //from air subsystem process_atmos_machinery(): ()
+1
View File
@@ -3,6 +3,7 @@
#define DM_DIGEST "Digest"
#define DM_HEAL "Heal"
#define DM_NOISY "Noisy"
#define DM_DRAGON "Dragon"
#define VORE_STRUGGLE_EMOTE_CHANCE 40
-1
View File
@@ -155,7 +155,6 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
var/size_factor = ((-cos(inputToDegrees) +1) /2) //returns a value from 0 to 1
return size_factor + scaling_modifier //scale mod of 0 results in a number from 0 to 1. A scale modifier of +0.5 returns 0.5 to 1.5
//to_chat(world, "Transform multiplier of [src] is [size_factor + scaling_modifer]")
//converts a uniform distributed random number into a normal distributed one
//since this method produces two random numbers, one is saved for subsequent calls
+5
View File
@@ -32,6 +32,7 @@
*/
/atom/Click(location,control,params)
if(initialized)
SendSignal(COMSIG_CLICK, location, control, params)
usr.ClickOn(src, params)
/atom/DblClick(location,control,params)
@@ -305,6 +306,7 @@
A.ShiftClick(src)
return
/atom/proc/ShiftClick(mob/user)
SendSignal(COMSIG_CLICK_SHIFT, user)
if(user.client && user.client.eye == user || user.client.eye == user.loc)
user.examinate(src)
return
@@ -319,6 +321,7 @@
return
/atom/proc/CtrlClick(mob/user)
SendSignal(COMSIG_CLICK_CTRL, user)
var/mob/living/ML = user
if(istype(ML))
ML.pulled(src)
@@ -348,6 +351,7 @@
..()
/atom/proc/AltClick(mob/user)
SendSignal(COMSIG_CLICK_ALT, user)
var/turf/T = get_turf(src)
if(T && user.TurfAdjacent(T))
if(user.listed_turf == T)
@@ -373,6 +377,7 @@
return
/atom/proc/CtrlShiftClick(mob/user)
SendSignal(COMSIG_CLICK_CTRL_SHIFT)
return
/*
+1 -1
View File
@@ -78,7 +78,7 @@
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
var settings = owner_hud.get_action_buttons_icons()
var/settings = owner_hud.get_action_buttons_icons()
icon = settings["bg_icon"]
icon_state = settings["bg_state"]
hide_icon = settings["toggle_icon"]
+20 -6
View File
@@ -242,9 +242,12 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
icon_state = "fire"
/obj/screen/alert/fire/Click()
if(isliving(usr))
var/mob/living/L = usr
return L.resist()
var/mob/living/L = usr
if(!L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
if(L.canmove)
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
//ALIENS
@@ -644,9 +647,20 @@ so as to remain in compliance with the most up-to-date laws."
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
/obj/screen/alert/restrained/Click()
if(isliving(usr))
var/mob/living/L = usr
return L.resist()
var/mob/living/L = usr
if(!L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
if((L.canmove) && (L.last_special <= world.time))
return L.resist_restraints()
/obj/screen/alert/restrained/buckled/Click()
var/mob/living/L = usr
if(!L.can_resist())
return
L.changeNext_move(CLICK_CD_RESIST)
if(L.last_special <= world.time)
return L.resist_buckle()
// PRIVATE = only edit, use, or override these if you're editing the system as a whole
+6 -3
View File
@@ -9,17 +9,18 @@
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
/obj/item/proc/attack_self(mob/user)
return
SendSignal(COMSIG_ITEM_ATTACK_SELF, user)
interact(user)
/obj/item/proc/pre_attackby(atom/A, mob/living/user, params) //do stuff before attackby!
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
// No comment
/atom/proc/attackby(obj/item/W, mob/user, params)
return
return SendSignal(COMSIG_PARENT_ATTACKBY, W, user, params)
/obj/attackby(obj/item/I, mob/living/user, params)
return I.attack_obj(src, user)
return ..() || I.attack_obj(src, user)
/mob/living/attackby(obj/item/I, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
@@ -35,6 +36,7 @@
/obj/item/proc/attack(mob/living/M, mob/living/user)
SendSignal(COMSIG_ITEM_ATTACK, M, user)
if(flags_1 & NOBLUDGEON_1)
return
if(!force)
@@ -54,6 +56,7 @@
//the equivalent of the standard version of attack() but for object targets.
/obj/item/proc/attack_obj(obj/O, mob/living/user)
SendSignal(COMSIG_ITEM_ATTACK_OBJ, O, user)
if(flags_1 & NOBLUDGEON_1)
return
user.changeNext_move(CLICK_CD_MELEE)
@@ -68,3 +68,13 @@
attack_verb = list("slapped")
resistance_flags = FLAMMABLE
var/bitesound = 'sound/items/bikehorn.ogg'
/*Zigfie*/
/obj/item/clothing/mask/luchador/zigfie
name = "Alboroto Rosa mask"
icon = 'icons/mob/mask.dmi'
icon_state = "lucharzigfie"
item_state = "lucharzigfie"
+21 -5
View File
@@ -136,7 +136,7 @@ GLOBAL_PROTECT(config_dir)
var/list/probabilities = list() // relative probability of each mode
var/list/min_pop = list() // overrides for acceptible player counts in a mode
var/list/max_pop = list()
var/list/repeated_mode_adjust = list() // weight adjustments for recent modes
var/humans_need_surnames = 0
var/allow_ai = 0 // allow ai job
var/forbid_secborg = 0 // disallow secborg module to be chosen.
@@ -278,6 +278,7 @@ GLOBAL_PROTECT(config_dir)
var/error_msg_delay = 50 // How long to wait between messaging admins about occurrences of a unique error
var/arrivals_shuttle_dock_window = 55 //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
var/arrivals_shuttle_require_undocked = FALSE //Require the arrivals shuttle to be undocked before latejoiners can join
var/arrivals_shuttle_require_safe_latejoin = FALSE //Require the arrivals shuttle to be operational in order for latejoiners to join
var/mice_roundstart = 10 // how many wire chewing rodents spawn at roundstart.
@@ -722,7 +723,14 @@ GLOBAL_PROTECT(config_dir)
WRITE_FILE(GLOB.config_error_log, "Unknown game mode probability configuration definition: [prob_name].")
else
WRITE_FILE(GLOB.config_error_log, "Incorrect probability configuration definition: [prob_name] [prob_value].")
if("repeated_mode_adjust")
if(value)
repeated_mode_adjust.Cut()
var/values = splittext(value," ")
for(var/v in values)
repeated_mode_adjust += text2num(v)
else
WRITE_FILE(GLOB.config_error_log, "Incorrect round weight adjustment configuration definition for [value].")
if("protect_roles_from_antagonist")
protect_roles_from_antagonist = 1
if("protect_assistant_from_antagonist")
@@ -818,6 +826,8 @@ GLOBAL_PROTECT(config_dir)
GLOB.MAX_EX_FLAME_RANGE = BombCap
if("arrivals_shuttle_dock_window")
arrivals_shuttle_dock_window = max(PARALLAX_LOOP_TIME, text2num(value))
if("arrivals_shuttle_require_undocked")
arrivals_shuttle_require_undocked = TRUE
if("arrivals_shuttle_require_safe_latejoin")
arrivals_shuttle_require_safe_latejoin = TRUE
if("mice_roundstart")
@@ -962,7 +972,6 @@ GLOBAL_PROTECT(config_dir)
var/list/datum/game_mode/runnable_modes = new
for(var/T in gamemode_cache)
var/datum/game_mode/M = new T()
//to_chat(world, "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]")
if(!(M.config_tag in modes))
qdel(M)
continue
@@ -974,8 +983,15 @@ GLOBAL_PROTECT(config_dir)
if(max_pop[M.config_tag])
M.maximum_players = max_pop[M.config_tag]
if(M.can_start())
runnable_modes[M] = probabilities[M.config_tag]
//to_chat(world, "DEBUG: runnable_mode\[[runnable_modes.len]\] = [M.config_tag]")
var/final_weight = probabilities[M.config_tag]
if(SSpersistence.saved_modes.len == 3 && repeated_mode_adjust.len == 3)
var/recent_round = min(SSpersistence.saved_modes.Find(M.config_tag),3)
var/adjustment = 0
while(recent_round)
adjustment += repeated_mode_adjust[recent_round]
recent_round = SSpersistence.saved_modes.Find(M.config_tag,recent_round+1,0)
final_weight *= ((100-adjustment)/100)
runnable_modes[M] = final_weight
return runnable_modes
/datum/configuration/proc/get_runnable_midround_modes(crew)
+1 -1
View File
@@ -274,7 +274,7 @@ SUBSYSTEM_DEF(blackbox)
details += "\"[deets]\""
/datum/feedback_variable/proc/get_details()
return details.Join(" | ")
return details ? details.Join(" | ") : null
/datum/feedback_variable/proc/get_parsed()
return list(variable,value,details.Join(" | "))
+26 -7
View File
@@ -8,7 +8,7 @@ SUBSYSTEM_DEF(persistence)
var/list/obj/structure/chisel_message/chisel_messages = list()
var/list/saved_messages = list()
var/list/saved_modes = list(1,2,3)
var/list/saved_trophies = list()
/datum/controller/subsystem/persistence/Initialize()
@@ -16,6 +16,7 @@ SUBSYSTEM_DEF(persistence)
LoadPoly()
LoadChiselMessages()
LoadTrophies()
LoadRecentModes()
..()
/datum/controller/subsystem/persistence/proc/LoadSatchels()
@@ -41,8 +42,7 @@ SUBSYSTEM_DEF(persistence)
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
if(!fexists(json_file))
return
var/list/json = list()
json = json_decode(file2text(json_file))
var/list/json = json_decode(file2text(json_file))
old_secret_satchels = json["data"]
if(old_secret_satchels.len)
if(old_secret_satchels.len >= 20) //guards against low drop pools assuring that one player cannot reliably find his own gear.
@@ -84,8 +84,7 @@ SUBSYSTEM_DEF(persistence)
var/json_file = file("data/npc_saves/ChiselMessages[SSmapping.config.map_name].json")
if(!fexists(json_file))
return
var/list/json
json = json_decode(file2text(json_file))
var/list/json = json_decode(file2text(json_file))
if(!json)
return
@@ -129,13 +128,22 @@ SUBSYSTEM_DEF(persistence)
var/json_file = file("data/npc_saves/TrophyItems.json")
if(!fexists(json_file))
return
var/list/json = list()
json = json_decode(file2text(json_file))
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_trophies = json["data"]
SetUpTrophies(saved_trophies.Copy())
/datum/controller/subsystem/persistence/proc/LoadRecentModes()
var/json_file = file("data/RecentModes.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_modes = json["data"]
/datum/controller/subsystem/persistence/proc/SetUpTrophies(list/trophy_items)
for(var/A in GLOB.trophy_cases)
var/obj/structure/displaycase/trophy/T = A
@@ -165,6 +173,7 @@ SUBSYSTEM_DEF(persistence)
CollectChiselMessages()
CollectSecretSatchels()
CollectTrophies()
CollectRoundtype()
/datum/controller/subsystem/persistence/proc/CollectSecretSatchels()
var/list/satchels = list()
@@ -224,3 +233,13 @@ SUBSYSTEM_DEF(persistence)
data["message"] = T.trophy_message
data["placer_key"] = T.placer_key
saved_trophies += list(data)
/datum/controller/subsystem/persistence/proc/CollectRoundtype()
saved_modes[3] = saved_modes[2]
saved_modes[2] = saved_modes[1]
saved_modes[1] = SSticker.mode.config_tag
var/json_file = file("data/RecentModes.json")
var/list/file_data = list()
file_data["data"] = saved_modes
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
-5
View File
@@ -430,17 +430,14 @@ SUBSYSTEM_DEF(shuttle)
continue base
if(!(T.flags_1 & UNUSED_TRANSIT_TURF_1))
continue base
//to_chat(world, "[COORD(topleft)] and [COORD(bottomright)]")
break base
if((!proposed_zone) || (!proposed_zone.len))
return FALSE
var/turf/topleft = proposed_zone[1]
//to_chat(world, "[COORD(topleft)] is TOPLEFT")
// Then create a transit docking port in the middle
var/coords = M.return_coords(0, 0, dock_dir)
//to_chat(world, json_encode(coords))
/* 0------2
| |
| |
@@ -478,11 +475,9 @@ SUBSYSTEM_DEF(shuttle)
if(WEST)
transit_path = /turf/open/space/transit/west
//to_chat(world, "Docking port at [transit_x], [transit_y], [topleft.z]")
var/turf/midpoint = locate(transit_x, transit_y, topleft.z)
if(!midpoint)
return FALSE
//to_chat(world, "Making transit dock at [COORD(midpoint)]")
var/area/shuttle/transit/A = new()
A.parallax_movedir = travel_dir
A.contents = proposed_zone
+4 -3
View File
@@ -1,6 +1,6 @@
// The Squeak
// because this is about placement of mice mobs, and nothing to do with
// mice - the computer peripheral
// mice - the computer peripheral
SUBSYSTEM_DEF(squeak)
name = "Squeak"
@@ -32,8 +32,9 @@ SUBSYSTEM_DEF(squeak)
/datum/controller/subsystem/squeak/proc/find_exposed_wires()
exposed_wires.Cut()
var/list/all_turfs = block(locate(1,1,1), locate(world.maxx,world.maxy,1))
var/list/all_turfs
for (var/z in GLOB.station_z_levels)
all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z))
for(var/turf/open/floor/plating/T in all_turfs)
if(is_blocked_turf(T))
continue
+1 -1
View File
@@ -310,7 +310,7 @@
replaceable_groups[LAW_INHERENT] = inherent.len
if(supplied.len && (LAW_SUPPLIED in groups))
replaceable_groups[LAW_SUPPLIED] = supplied.len
var picked_group = pickweight(replaceable_groups)
var/picked_group = pickweight(replaceable_groups)
switch(picked_group)
if(LAW_ZEROTH)
. = zeroth
-4
View File
@@ -256,7 +256,6 @@
winset(user, windowid, "on-close=\".windowclose [param]\"")
//to_chat(world, "OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]")
// the on-close client verb
@@ -268,12 +267,10 @@
set hidden = 1 // hide this verb from the user's panel
set name = ".windowclose" // no autocomplete on cmd line
//to_chat(world, "windowclose: [atomref]")
if(atomref!="null") // if passed a real atomref
var/hsrc = locate(atomref) // find the reffed atom
var/href = "close=1"
if(hsrc)
//to_chat(world, "[src] Topic [href] [hsrc]")
usr = src.mob
src.Topic(href, params2list(href), hsrc) // this will direct to the atom's
return // Topic() proc via client.Topic()
@@ -281,6 +278,5 @@
// no atomref specified (or not found)
// so just reset the user mob's machine var
if(src && src.mob)
//to_chat(world, "[src] was [src.mob.machine], setting to null")
src.mob.unset_machine()
return
@@ -5,22 +5,34 @@
amount - raw amount of the mineral this container is holding, calculated by the defined value MINERAL_MATERIAL_AMOUNT=2000.
max_amount - max raw amount of mineral this container can hold.
sheet_type - type of the mineral sheet the container handles, used for output.
owner - object that this container is being used by, used for output.
parent - object that this container is being used by, used for output.
MAX_STACK_SIZE - size of a stack of mineral sheets. Constant.
*/
/datum/material_container
/datum/component/material_container
var/total_amount = 0
var/max_amount
var/sheet_type
var/obj/owner
var/list/materials = list()
var/list/materials
var/show_on_examine
var/list/allowed_typecache
var/last_inserted_type
var/last_amount_inserted
var/last_insert_success
var/datum/callback/precondition
//MAX_STACK_SIZE = 50
//MINERAL_MATERIAL_AMOUNT = 2000
/datum/material_container/New(obj/O, list/mat_list, max_amt = 0)
owner = O
/datum/component/material_container/Initialize(list/mat_list, max_amt = 0, _show_on_examine = FALSE, list/allowed_types, datum/callback/_precondition)
materials = list()
max_amount = max(0, max_amt)
show_on_examine = _show_on_examine
if(allowed_types)
allowed_typecache = typecacheof(allowed_types)
precondition = _precondition
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
RegisterSignal(COMSIG_PARENT_EXAMINE, .proc/OnExamine)
var/list/possible_mats = list()
for(var/mat_type in subtypesof(/datum/material))
@@ -31,12 +43,47 @@
var/mat_path = possible_mats[id]
materials[id] = new mat_path()
/datum/material_container/Destroy()
owner = null
return ..()
/datum/component/material_container/proc/OnExamine(mob/user)
for(var/I in materials)
var/datum/material/M = materials[I]
var/amt = amount(M.id)
if(amt)
to_chat(user, "<span class='notice'>It has [amt] units of [lowertext(M.name)] stored.</span>")
/datum/component/material_container/proc/OnAttackBy(obj/item/I, mob/living/user)
var/list/tc = allowed_typecache
if(user.a_intent == INTENT_HARM || (I.flags_2 & HOLOGRAM_2) || (tc && !is_type_in_typecache(I, tc)))
return FALSE
. = TRUE
last_insert_success = FALSE
var/datum/callback/pc = precondition
if(pc && !pc.Invoke())
return
var/material_amount = get_item_material_amount(I)
if(!material_amount)
to_chat(user, "<span class='warning'>[I] does not contain sufficient amounts of metal or glass to be accepted by [parent].</span>")
return
if(!has_space(material_amount))
to_chat(user, "<span class='warning'>[parent] is full. Please remove metal or glass from [parent] in order to insert more.</span>")
return
if(!user.temporarilyRemoveItemFromInventory(I))
to_chat(user, "<span class='warning'>[I] is stuck to you and cannot be placed into [parent].</span>")
return
var/inserted = insert_item(I)
if(inserted)
last_insert_success = TRUE
if(istype(I, /obj/item/stack))
to_chat(user, "<span class='notice'>You insert [inserted] sheet[inserted>1 ? "s" : ""] into [parent].</span>")
if(!QDELETED(I))
user.put_in_active_hand(I)
else
to_chat(user, "<span class='notice'>You insert a material total of [inserted] into [parent].</span>")
qdel(I)
else
user.put_in_active_hand(I)
//For inserting an amount of material
/datum/material_container/proc/insert_amount(amt, id = null)
/datum/component/material_container/proc/insert_amount(amt, id = null)
if(amt > 0 && has_space(amt))
var/total_amount_saved = total_amount
if(id)
@@ -52,7 +99,7 @@
return (total_amount - total_amount_saved)
return 0
/datum/material_container/proc/insert_stack(obj/item/stack/S, amt = 0)
/datum/component/material_container/proc/insert_stack(obj/item/stack/S, amt = 0)
if(amt <= 0)
return 0
if(amt > S.amount)
@@ -67,10 +114,12 @@
return 0
insert_materials(S,amt)
last_inserted_type = S.type
S.use(amt)
last_amount_inserted = amt
return amt
/datum/material_container/proc/insert_item(obj/item/I, multiplier = 1)
/datum/component/material_container/proc/insert_item(obj/item/I, multiplier = 1)
if(!I)
return 0
if(istype(I, /obj/item/stack))
@@ -82,9 +131,11 @@
return 0
insert_materials(I, multiplier)
last_inserted_type = I.type
last_amount_inserted = material_amount
return material_amount
/datum/material_container/proc/insert_materials(obj/item/I, multiplier = 1) //for internal usage only
/datum/component/material_container/proc/insert_materials(obj/item/I, multiplier = 1) //for internal usage only
var/datum/material/M
for(var/MAT in materials)
M = materials[MAT]
@@ -93,7 +144,7 @@
//For consuming material
//mats is a list of types of material to use and the corresponding amounts, example: list(MAT_METAL=100, MAT_GLASS=200)
/datum/material_container/proc/use_amount(list/mats, multiplier=1)
/datum/component/material_container/proc/use_amount(list/mats, multiplier=1)
if(!mats || !mats.len)
return 0
@@ -112,7 +163,7 @@
return total_amount_save - total_amount
/datum/material_container/proc/use_amount_type(amt, id)
/datum/component/material_container/proc/use_amount_type(amt, id)
var/datum/material/M = materials[id]
if(M)
if(M.amount >= amt)
@@ -121,7 +172,7 @@
return amt
return 0
/datum/material_container/proc/can_use_amount(amt, id, list/mats)
/datum/component/material_container/proc/can_use_amount(amt, id, list/mats)
if(amt && id)
var/datum/material/M = materials[id]
if(M && M.amount >= amt)
@@ -136,7 +187,7 @@
return FALSE
//For spawning mineral sheets; internal use only
/datum/material_container/proc/retrieve(sheet_amt, datum/material/M, target = null)
/datum/component/material_container/proc/retrieve(sheet_amt, datum/material/M, target = null)
if(!M.sheet_type)
return 0
if(sheet_amt > 0)
@@ -144,12 +195,12 @@
sheet_amt = round(M.amount / MINERAL_MATERIAL_AMOUNT)
var/count = 0
while(sheet_amt > MAX_STACK_SIZE)
new M.sheet_type(get_turf(owner), MAX_STACK_SIZE)
new M.sheet_type(get_turf(parent), MAX_STACK_SIZE)
count += MAX_STACK_SIZE
use_amount_type(sheet_amt * MINERAL_MATERIAL_AMOUNT, M.id)
sheet_amt -= MAX_STACK_SIZE
if(round((sheet_amt * MINERAL_MATERIAL_AMOUNT) / MINERAL_MATERIAL_AMOUNT))
var/obj/item/stack/sheet/s = new M.sheet_type(get_turf(owner), sheet_amt)
var/obj/item/stack/sheet/s = new M.sheet_type(get_turf(parent), sheet_amt)
if(target)
s.forceMove(target)
count += sheet_amt
@@ -157,15 +208,15 @@
return count
return 0
/datum/material_container/proc/retrieve_sheets(sheet_amt, id, target = null)
/datum/component/material_container/proc/retrieve_sheets(sheet_amt, id, target = null)
if(materials[id])
return retrieve(sheet_amt, materials[id], target)
return 0
/datum/material_container/proc/retrieve_amount(amt, id, target)
/datum/component/material_container/proc/retrieve_amount(amt, id, target)
return retrieve_sheets(amount2sheet(amt), id, target)
/datum/material_container/proc/retrieve_all(target = null)
/datum/component/material_container/proc/retrieve_all(target = null)
var/result = 0
var/datum/material/M
for(var/MAT in materials)
@@ -173,10 +224,10 @@
result += retrieve_sheets(amount2sheet(M.amount), MAT, target)
return result
/datum/material_container/proc/has_space(amt = 0)
/datum/component/material_container/proc/has_space(amt = 0)
return (total_amount + amt) <= max_amount
/datum/material_container/proc/has_materials(list/mats, multiplier=1)
/datum/component/material_container/proc/has_materials(list/mats, multiplier=1)
if(!mats || !mats.len)
return 0
@@ -187,23 +238,23 @@
return 0
return 1
/datum/material_container/proc/amount2sheet(amt)
/datum/component/material_container/proc/amount2sheet(amt)
if(amt >= MINERAL_MATERIAL_AMOUNT)
return round(amt / MINERAL_MATERIAL_AMOUNT)
return 0
/datum/material_container/proc/sheet2amount(sheet_amt)
/datum/component/material_container/proc/sheet2amount(sheet_amt)
if(sheet_amt > 0)
return sheet_amt * MINERAL_MATERIAL_AMOUNT
return 0
/datum/material_container/proc/amount(id)
/datum/component/material_container/proc/amount(id)
var/datum/material/M = materials[id]
return M ? M.amount : 0
//returns the amount of material relevant to this container;
//if this container does not support glass, any glass in 'I' will not be taken into account
/datum/material_container/proc/get_item_material_amount(obj/item/I)
/datum/component/material_container/proc/get_item_material_amount(obj/item/I)
if(!istype(I))
return 0
var/material_amount = 0
+61
View File
@@ -0,0 +1,61 @@
/datum/component/squeak
var/static/list/default_squeak_sounds = list('sound/items/toysqueak1.ogg'=1, 'sound/items/toysqueak2.ogg'=1, 'sound/items/toysqueak3.ogg'=1)
var/list/override_squeak_sounds
var/squeak_chance = 100
var/volume = 30
// This is so shoes don't squeak every step
var/steps = 0
var/step_delay = 1
// This is to stop squeak spam from inhand usage
var/last_use = 0
var/use_delay = 20
/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override)
if(custom_sounds)
override_squeak_sounds = custom_sounds
if(chance_override)
squeak_chance = chance_override
if(volume_override)
volume = volume_override
if(step_delay_override)
step_delay = step_delay_override
if(use_delay_override)
use_delay = use_delay_override
if(istype(parent, /atom))
RegisterSignal(COMSIG_ATOM_BLOB_ACT, .proc/play_squeak)
RegisterSignal(COMSIG_ATOM_HULK_ATTACK, .proc/play_squeak)
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/play_squeak)
if(istype(parent, /atom/movable))
RegisterSignal(COMSIG_MOVABLE_CROSSED, .proc/play_squeak)
RegisterSignal(COMSIG_MOVABLE_COLLIDE, .proc/play_squeak)
RegisterSignal(COMSIG_MOVABLE_IMPACT, .proc/play_squeak)
if(istype(parent, /obj/item))
RegisterSignal(COMSIG_ITEM_ATTACK, .proc/play_squeak)
RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/use_squeak)
RegisterSignal(COMSIG_ITEM_ATTACK_OBJ, .proc/play_squeak)
if(istype(parent, /obj/item/clothing/shoes))
RegisterSignal(COMSIG_SHOES_STEP_ACTION, .proc/step_squeak)
else
RegisterSignal(COMSIG_ATOM_ENTERED, .proc/play_squeak)
/datum/component/squeak/proc/play_squeak()
if(prob(squeak_chance))
if(!override_squeak_sounds)
playsound(parent, pickweight(default_squeak_sounds), volume, 1, -1)
else
playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1)
/datum/component/squeak/proc/step_squeak()
if(steps > step_delay)
play_squeak()
steps = 0
else
steps++
/datum/component/squeak/proc/use_squeak()
if(last_use + use_delay < world.time)
last_use = world.time
play_squeak()
+2 -2
View File
@@ -83,10 +83,10 @@
if(isliving(A))
atomsnowflake += "<a href='?_src_=vars;[HrefToken()];rename=[refid]'><b>[D]</b></a>"
if(A.dir)
atomsnowflake += "<br><font size='1'><a href='?_src_=vars;[HrefToken()];rotatedatum=[refid];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=[refid];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=[refid];rotatedir=right'>>></a></font>"
atomsnowflake += "<br><font size='1'><a href='?_src_=vars;[HrefToken()];rotatedatum=[refid];rotatedir=left'><<</a> <a href='?_src_=vars;[HrefToken()];datumedit=[refid];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;[HrefToken()];rotatedatum=[refid];rotatedir=right'>>></a></font>"
var/mob/living/M = A
atomsnowflake += {"
<br><font size='1'><a href='?_src_=vars;[HrefToken()];datumedit=[refid];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=[refid];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>
<br><font size='1'><a href='?_src_=vars;[HrefToken()];datumedit=[refid];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;[HrefToken()];datumedit=[refid];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>
<br><font size='1'>
BRUTE:<font size='1'><a href='?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=brute'>[M.getBruteLoss()]</a>
FIRE:<font size='1'><a href='?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=fire'>[M.getFireLoss()]</a>
-5
View File
@@ -245,7 +245,6 @@
/datum/disease/advance/proc/GenerateCure()
if(properties && properties.len)
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
//to_chat(world, "Res = [res]")
cures = list(advance_cures[res])
// Get the cure name from the cure_id
@@ -333,9 +332,6 @@
// Mix a list of advance diseases and return the mixed result.
/proc/Advance_Mix(var/list/D_list)
//to_chat(world, "Mixing!!!!")
var/list/diseases = list()
for(var/datum/disease/advance/A in D_list)
@@ -359,7 +355,6 @@
D2.Mix(D1)
// Should be only 1 entry left, but if not let's only return a single entry
//to_chat(world, "END MIXING!!!!!")
var/datum/disease/advance/to_return = pick(diseases)
to_return.Refresh(1)
return to_return
+72 -72
View File
@@ -1,74 +1,74 @@
/datum/disease/dnaspread
name = "Space Retrovirus"
max_stages = 4
spread_text = "On contact"
spread_flags = CONTACT_GENERAL
cure_text = "Mutadone"
cures = list("mutadone")
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
agent = "S4E1 retrovirus"
viable_mobtypes = list(/mob/living/carbon/human)
var/datum/dna/original_dna = null
var/transformed = 0
desc = "This disease transplants the genetic code of the initial vector into new hosts."
severity = MEDIUM
/datum/disease/dnaspread/stage_act()
..()
if(!affected_mob.dna)
cure()
if(NOTRANSSTING in affected_mob.dna.species.species_traits) //Only species that can be spread by transformation sting can be spread by the retrovirus
cure()
if(!strain_data["dna"])
//Absorbs the target DNA.
strain_data["dna"] = new affected_mob.dna.type
affected_mob.dna.copy_dna(strain_data["dna"])
/datum/disease/dnaspread
name = "Space Retrovirus"
max_stages = 4
spread_text = "On contact"
spread_flags = CONTACT_GENERAL
cure_text = "Mutadone"
cures = list("mutadone")
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
agent = "S4E1 retrovirus"
viable_mobtypes = list(/mob/living/carbon/human)
var/datum/dna/original_dna = null
var/transformed = 0
desc = "This disease transplants the genetic code of the initial vector into new hosts."
severity = MEDIUM
/datum/disease/dnaspread/stage_act()
..()
if(!affected_mob.dna)
cure()
if((NOTRANSSTING in affected_mob.dna.species.species_traits) || (NO_DNA_COPY in affected_mob.dna.species.species_traits)) //Only species that can be spread by transformation sting can be spread by the retrovirus
cure()
if(!strain_data["dna"])
//Absorbs the target DNA.
strain_data["dna"] = new affected_mob.dna.type
affected_mob.dna.copy_dna(strain_data["dna"])
carrier = TRUE
stage = 4
return
switch(stage)
if(2 || 3) //Pretend to be a cold and give time to spread.
if(prob(8))
affected_mob.emote("sneeze")
if(prob(8))
affected_mob.emote("cough")
if(prob(1))
to_chat(affected_mob, "<span class='danger'>Your muscles ache.</span>")
if(prob(20))
affected_mob.take_bodypart_damage(1)
if(prob(1))
to_chat(affected_mob, "<span class='danger'>Your stomach hurts.</span>")
if(prob(20))
affected_mob.adjustToxLoss(2)
affected_mob.updatehealth()
if(4)
if(!transformed && !carrier)
//Save original dna for when the disease is cured.
original_dna = new affected_mob.dna.type
affected_mob.dna.copy_dna(original_dna)
to_chat(affected_mob, "<span class='danger'>You don't feel like yourself..</span>")
var/datum/dna/transform_dna = strain_data["dna"]
transform_dna.transfer_identity(affected_mob, transfer_SE = 1)
affected_mob.real_name = affected_mob.dna.real_name
affected_mob.updateappearance(mutcolor_update=1)
affected_mob.domutcheck()
transformed = 1
carrier = 1 //Just chill out at stage 4
return
/datum/disease/dnaspread/Destroy()
if (original_dna && transformed && affected_mob)
original_dna.transfer_identity(affected_mob, transfer_SE = 1)
affected_mob.real_name = affected_mob.dna.real_name
affected_mob.updateappearance(mutcolor_update=1)
affected_mob.domutcheck()
to_chat(affected_mob, "<span class='notice'>You feel more like yourself.</span>")
return ..()
return
switch(stage)
if(2 || 3) //Pretend to be a cold and give time to spread.
if(prob(8))
affected_mob.emote("sneeze")
if(prob(8))
affected_mob.emote("cough")
if(prob(1))
to_chat(affected_mob, "<span class='danger'>Your muscles ache.</span>")
if(prob(20))
affected_mob.take_bodypart_damage(1)
if(prob(1))
to_chat(affected_mob, "<span class='danger'>Your stomach hurts.</span>")
if(prob(20))
affected_mob.adjustToxLoss(2)
affected_mob.updatehealth()
if(4)
if(!transformed && !carrier)
//Save original dna for when the disease is cured.
original_dna = new affected_mob.dna.type
affected_mob.dna.copy_dna(original_dna)
to_chat(affected_mob, "<span class='danger'>You don't feel like yourself..</span>")
var/datum/dna/transform_dna = strain_data["dna"]
transform_dna.transfer_identity(affected_mob, transfer_SE = 1)
affected_mob.real_name = affected_mob.dna.real_name
affected_mob.updateappearance(mutcolor_update=1)
affected_mob.domutcheck()
transformed = 1
carrier = 1 //Just chill out at stage 4
return
/datum/disease/dnaspread/Destroy()
if (original_dna && transformed && affected_mob)
original_dna.transfer_identity(affected_mob, transfer_SE = 1)
affected_mob.real_name = affected_mob.dna.real_name
affected_mob.updateappearance(mutcolor_update=1)
affected_mob.domutcheck()
to_chat(affected_mob, "<span class='notice'>You feel more like yourself.</span>")
return ..()
+4 -2
View File
@@ -235,7 +235,9 @@
flavor_text = dna.features["flavor_text"] //Update the flavor_text to use new dna text
if(mrace)
set_species(mrace, icon_update=0)
var/datum/species/newrace = new mrace.type
newrace.copy_properties_from(mrace)
set_species(newrace, icon_update=0)
if(newreal_name)
real_name = newreal_name
@@ -396,4 +398,4 @@
value = values
return value
/////////////////////////// DNA HELPER-PROCS
/////////////////////////// DNA HELPER-PROCS
+3 -3
View File
@@ -121,8 +121,9 @@
new_character.key = key //now transfer the key to link the client to our new body
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
L.canbearoused = L.client.prefs.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
L.update_arousal_hud() //Removes the old icon
if(L.client && L.client.prefs)
L.canbearoused = L.client.prefs.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
L.update_arousal_hud() //Removes the old icon
/datum/mind/proc/store_memory(new_text)
memory += "[new_text]<BR>"
@@ -1278,7 +1279,6 @@
src = null
M = H.monkeyize()
src = M.mind
//to_chat(world, "DEBUG: \"healthy\": M=[M], M.mind=[M.mind], src=[src]!")
else if (istype(M) && length(M.viruses))
for(var/thing in M.viruses)
var/datum/disease/D = thing
-1
View File
@@ -29,7 +29,6 @@
bar.pixel_y = 32 + (PROGRESSBAR_HEIGHT * (listindex - 1))
/datum/progressbar/proc/update(progress)
//to_chat(world, "Update [progress] - [goal] - [(progress / goal)] - [((progress / goal) * 100)] - [round(((progress / goal) * 100), 5)]")
if (!user || !user.client)
shown = 0
return
+10 -1
View File
@@ -29,11 +29,20 @@
/datum/status_effect/incapacitating/knockdown
id = "knockdown"
/datum/status_effect/incapacitating/knockdown/tick()
if(owner.staminaloss)
owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
//UNCONSCIOUS
/datum/status_effect/incapacitating/unconscious
id = "unconscious"
needs_update_stat = TRUE
/datum/status_effect/incapacitating/unconscious/tick()
if(owner.staminaloss)
owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
//SLEEPING
/datum/status_effect/incapacitating/sleeping
id = "sleeping"
@@ -57,7 +66,7 @@
/datum/status_effect/incapacitating/sleeping/tick()
if(owner.staminaloss)
owner.adjustStaminaLoss(-0.35) //reduce stamina loss by 0.35 per tick, 7 per 2 seconds
owner.adjustStaminaLoss(-0.5) //reduce stamina loss by 0.5 per tick, 10 per 2 seconds
if(human_owner && human_owner.drunkenness)
human_owner.drunkenness *= 0.997 //reduce drunkenness by 0.3% per tick, 6% per 2 seconds
if(prob(20))
+4 -2
View File
@@ -454,7 +454,6 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
cur_y = y_arr.Find(src.z)
if(cur_y)
break
// to_chat(world, "X = [cur_x]; Y = [cur_y]")
if(cur_x && cur_y)
return list("x"=cur_x,"y"=cur_y)
else
@@ -637,4 +636,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
return L.AllowDrop() ? L : get_turf(L)
/atom/Entered(atom/movable/AM, atom/oldLoc)
SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
/atom/proc/return_temperature()
return
+1 -1
View File
@@ -261,7 +261,7 @@
/obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, type = "")
var /obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T)
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T)
var/mob/living/simple_animal/slaughter/S = new demon_type(holder)
S.holder = holder
S.key = C.key
+4 -1
View File
@@ -80,7 +80,7 @@
antag_candidates -= bro
team.members += bro
bro.restricted_roles = restricted_jobs
log_game("[key_name(bro)] has been selected as a Brother")
log_game("[bro.key] (ckey) has been selected as a Brother")
pre_brother_teams += team
return ..()
@@ -95,6 +95,9 @@
brother_teams += pre_brother_teams
return ..()
/datum/game_mode/traitor/bros/generate_report()
return "It's Syndicate recruiting season. Be alert for potential Syndicate infiltrators, but also watch out for disgruntled employees trying to defect. Unlike Nanotrasen, the Syndicate prides itself in teamwork and will only recruit pairs that share a brotherly trust."
/datum/game_mode/proc/auto_declare_completion_brother()
if(!LAZYLEN(brother_teams))
return
@@ -340,6 +340,10 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
return
if(!target)
return
if(NO_DNA_COPY in target.dna.species.species_traits)
if(verbose)
to_chat(user, "<span class='warning'>[target] is not compatible with our biology.</span>")
return
if((target.disabilities & NOCLONE) || (target.disabilities & HUSK))
if(verbose)
to_chat(user, "<span class='warning'>DNA of [target] is ruined beyond usability!</span>")
+1 -1
View File
@@ -121,7 +121,7 @@
var/list/datum/game_mode/runnable_modes = config.get_runnable_midround_modes(living_crew.len)
var/list/datum/game_mode/usable_modes = list()
for(var/datum/game_mode/G in runnable_modes)
if(G.reroll_friendly && living_crew >= G.required_players)
if(G.reroll_friendly && living_crew.len >= G.required_players)
usable_modes += G
else
qdel(G)
-13
View File
@@ -331,16 +331,3 @@
adjust_influence(bawss, amount/bosses.len)
announce_to_mind(bawss, "<span class='notice'>[name] Gang: [amount/bosses.len] influence given from internal automatic restructuring.</span>")
//Multiverse
/datum/gang/multiverse
dom_attempts = 0
fighting_style = "multiverse"
is_deconvertible = FALSE
/datum/gang/multiverse/New(loc, multiverse_override)
name = multiverse_override
ganghud = new()
/datum/gang/multiverse/income()
return
+1
View File
@@ -309,6 +309,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
/obj/effect/meteor/meaty/xeno/New()
meteordrop += subtypesof(/obj/item/organ/alien)
meteordrop -= /obj/item/organ/alien/eggsac
..()
/obj/effect/meteor/meaty/xeno/ram_turf(turf/T)
@@ -33,7 +33,7 @@
message_admins("No valid spawn locations found, aborting...")
return MAP_ERROR
var /obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter((pick(spawn_locs)))
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter((pick(spawn_locs)))
var/mob/living/simple_animal/slaughter/S = new /mob/living/simple_animal/slaughter/(holder)
S.holder = holder
player_mind.transfer_to(S)
+11 -11
View File
@@ -20,28 +20,28 @@
close(1)
if("unlock")
locked = FALSE
locked = FALSE
update_icon()
if("lock")
locked = TRUE
locked = TRUE
update_icon()
if("secure_open")
locked = FALSE
locked = FALSE
update_icon()
sleep(2)
open(1)
locked = TRUE
locked = TRUE
update_icon()
if("secure_close")
locked = FALSE
locked = FALSE
close(1)
locked = TRUE
locked = TRUE
sleep(2)
update_icon()
@@ -88,7 +88,7 @@
name = "airlock sensor"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
anchored = TRUE
anchored = TRUE
power_channel = ENVIRON
var/id_tag
@@ -97,8 +97,8 @@
var/datum/radio_frequency/radio_connection
var/on = TRUE
var/alert = FALSE
var/on = TRUE
var/alert = FALSE
/obj/machinery/airlock_sensor/update_icon()
@@ -143,9 +143,9 @@
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_AIRLOCK)
/obj/machinery/airlock_sensor/Initialize()
..()
. = ..()
set_frequency(frequency)
/obj/machinery/airlock_sensor/Destroy()
SSradio.remove_object(src,frequency)
SSradio.remove_object(src,frequency)
return ..()
+28 -39
View File
@@ -32,8 +32,6 @@
var/selected_category
var/screen = 1
var/datum/material_container/materials
var/list/categories = list(
"Tools",
"Electronics",
@@ -48,15 +46,15 @@
)
/obj/machinery/autolathe/Initialize()
materials = new /datum/material_container(src, list(MAT_METAL, MAT_GLASS))
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS))
. = ..()
wires = new /datum/wires/autolathe(src)
files = new /datum/research/autolathe(src)
matching_designs = list()
return ..()
/obj/machinery/autolathe/Destroy()
QDEL_NULL(wires)
QDEL_NULL(materials)
return ..()
/obj/machinery/autolathe/interact(mob/user)
@@ -81,6 +79,7 @@
popup.open()
/obj/machinery/autolathe/on_deconstruction()
GET_COMPONENT(materials, /datum/component/material_container)
materials.retrieve_all()
/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params)
@@ -123,42 +122,26 @@
busy = FALSE
return 1
if(O.flags_2 & HOLOGRAM_2)
return 1
return ..()
var/material_amount = materials.get_item_material_amount(O)
if(!material_amount)
to_chat(user, "<span class='warning'>This object does not contain sufficient amounts of metal or glass to be accepted by the autolathe.</span>")
return 1
if(!materials.has_space(material_amount))
to_chat(user, "<span class='warning'>The autolathe is full. Please remove metal or glass from the autolathe in order to insert more.</span>")
return 1
if(!user.temporarilyRemoveItemFromInventory(O))
to_chat(user, "<span class='warning'>\The [O] is stuck to you and cannot be placed into the autolathe.</span>")
return 1
busy = TRUE
var/inserted = materials.insert_item(O)
if(inserted)
if(istype(O, /obj/item/stack))
if (O.materials[MAT_METAL])
flick("autolathe_o",src)//plays metal insertion animation
if (O.materials[MAT_GLASS])
flick("autolathe_r",src)//plays glass insertion animation
to_chat(user, "<span class='notice'>You insert [inserted] sheet[inserted>1 ? "s" : ""] to the autolathe.</span>")
use_power(inserted*100)
if(!QDELETED(O))
user.put_in_active_hand(O)
/obj/machinery/mecha_part_fabricator/ComponentActivated(datum/component/C)
..()
if(istype(C, /datum/component/material_container))
var/datum/component/material_container/M = C
if(!M.last_insert_success)
return
var/lit = M.last_inserted_type
if(ispath(lit, /obj/item/ore/bluespace_crystal))
use_power(max(500,M.last_amount_inserted/10))
else
to_chat(user, "<span class='notice'>You insert a material total of [inserted] to the autolathe.</span>")
use_power(max(500,inserted/10))
qdel(O)
else
user.put_in_active_hand(O)
busy = FALSE
updateUsrDialog()
return 1
var/obj/item/stack/S = lit
var/list/initmats = initial(S.materials)
if (initmats[MAT_METAL])
flick("autolathe_o",src)//plays metal insertion animation
if (initmats[MAT_GLASS])
flick("autolathe_r",src)//plays glass insertion animation
use_power(M.last_amount_inserted*100)
updateUsrDialog()
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
@@ -193,6 +176,7 @@
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5)
GET_COMPONENT(materials, /datum/component/material_container)
if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff))
busy = TRUE
use_power(power)
@@ -246,6 +230,7 @@
var/T = 0
for(var/obj/item/stock_parts/matter_bin/MB in component_parts)
T += MB.rating*75000
GET_COMPONENT(materials, /datum/component/material_container)
materials.max_amount = T
T=1.2
for(var/obj/item/stock_parts/manipulator/M in component_parts)
@@ -294,6 +279,7 @@
dat += "<a href='?src=\ref[src];make=[D.id];multiplier=1'>[D.name]</a>"
if(ispath(D.build_path, /obj/item/stack))
GET_COMPONENT(materials, /datum/component/material_container)
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY)
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=10'>x10</a>"
@@ -325,6 +311,7 @@
dat += "<a href='?src=\ref[src];make=[D.id];multiplier=1'>[D.name]</a>"
if(ispath(D.build_path, /obj/item/stack))
GET_COMPONENT(materials, /datum/component/material_container)
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY)
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=10'>x10</a>"
@@ -339,6 +326,7 @@
return dat
/obj/machinery/autolathe/proc/materials_printout()
GET_COMPONENT(materials, /datum/component/material_container)
var/dat = "<b>Total amount:</b> [materials.total_amount] / [materials.max_amount] cm<sup>3</sup><br>"
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
@@ -351,6 +339,7 @@
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
GET_COMPONENT(materials, /datum/component/material_container)
if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
return 0
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount)))
+5 -5
View File
@@ -4,17 +4,17 @@
icon_screen = "crew"
icon_keyboard = "med_key"
circuit = /obj/item/circuitboard/computer/operating
var/mob/living/carbon/human/patient
var/obj/structure/table/optable/table
var/mob/living/carbon/human/patient
var/obj/structure/table/optable/table
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/operating/Initialize()
..()
. = ..()
find_table()
/obj/machinery/computer/operating/proc/find_table()
for(var/dir in GLOB.cardinals)
for(var/dir in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, dir))
if(table)
table.computer = src
@@ -63,4 +63,4 @@
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
dat += "Next step: [capitalize(surgery_step.name)]<BR>"
dat += "</div>"
return dat
return dat
@@ -84,7 +84,7 @@
light_color = LIGHT_COLOR_CYAN
/obj/machinery/computer/atmos_control/Initialize()
..()
. = ..()
set_frequency(frequency)
/obj/machinery/computer/atmos_control/Destroy()
@@ -227,4 +227,4 @@
else if(output_tag == id_tag)
output_info = signal.data
else
..(signal)
..(signal)
+26 -26
View File
@@ -40,25 +40,25 @@
return ..()
/obj/machinery/computer/message_monitor/emag_act(mob/user)
if(emagged)
return
if(!isnull(src.linkedServer))
emagged = TRUE
screen = 2
spark_system.set_up(5, 0, src)
src.spark_system.start()
var/obj/item/paper/monitorkey/MK = new/obj/item/paper/monitorkey
MK.loc = src.loc
// Will help make emagging the console not so easy to get away with.
MK.info += "<br><br><font color='red'>%@%(*$%&(&?*(%&/{}</font>"
var/time = 100 * length(src.linkedServer.decryptkey)
addtimer(CALLBACK(src, .proc/UnmagConsole), time)
message = rebootmsg
else
to_chat(user, "<span class='notice'>A no server error appears on the screen.</span>")
if(emagged)
return
if(!isnull(src.linkedServer))
emagged = TRUE
screen = 2
spark_system.set_up(5, 0, src)
src.spark_system.start()
var/obj/item/paper/monitorkey/MK = new/obj/item/paper/monitorkey
MK.loc = src.loc
// Will help make emagging the console not so easy to get away with.
MK.info += "<br><br><font color='red'>%@%(*$%&(&?*(%&/{}</font>"
var/time = 100 * length(src.linkedServer.decryptkey)
addtimer(CALLBACK(src, .proc/UnmagConsole), time)
message = rebootmsg
else
to_chat(user, "<span class='notice'>A no server error appears on the screen.</span>")
/obj/machinery/computer/message_monitor/Initialize()
..()
. = ..()
//Is the server isn't linked to a server, and there's a server available, default it to the first one in the list.
if(!linkedServer)
if(GLOB.message_servers && GLOB.message_servers.len > 0)
@@ -236,7 +236,7 @@
src.screen = 0 // Return the screen back to normal
/obj/machinery/computer/message_monitor/proc/UnmagConsole()
emagged = FALSE
emagged = FALSE
/obj/machinery/computer/message_monitor/proc/ResetMessage()
customsender = "System Administrator"
@@ -309,7 +309,7 @@
message = noserver
else
if(auth)
var/dkey = trim(stripped_input(usr, "Please enter the decryption key."))
var/dkey = trim(stripped_input(usr, "Please enter the decryption key."))
if(dkey && dkey != "")
if(src.linkedServer.decryptkey == dkey)
var/newkey = trim(input(usr,"Please enter the new key (3 - 16 characters max):"))
@@ -414,11 +414,11 @@
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[src]'>[customsender]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
customrecepient.audible_message("[icon2html(customrecepient, viewers(customrecepient))] *[customrecepient.ttone]*", null, 3)
customrecepient.audible_message("[icon2html(customrecepient, viewers(customrecepient))] *[customrecepient.ttone]*", null, 3)
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
to_chat(H, "[icon2html(customrecepient, viewers(H))] <b>Message from [customsender] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)")
log_talk(usr,"[key_name(usr)] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]",LOGPDA)
to_chat(H, "[icon2html(customrecepient, viewers(H))] <b>Message from [customsender] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)")
log_talk(usr,"[key_name(usr)] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]",LOGPDA)
customrecepient.cut_overlays()
customrecepient.add_overlay(mutable_appearance('icons/obj/pda.dmi', "pda-r"))
//Sender is faking as someone who exists
@@ -427,11 +427,11 @@
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[PDARec]'>[PDARec.owner]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
customrecepient.audible_message("[icon2html(customrecepient, viewers(customrecepient))] *[customrecepient.ttone]*", null, 3)
customrecepient.audible_message("[icon2html(customrecepient, viewers(customrecepient))] *[customrecepient.ttone]*", null, 3)
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
to_chat(H, "[icon2html(customrecepient, H)] <b>Message from [PDARec.owner] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[customrecepient];choice=Message;skiprefresh=1;target=\ref[PDARec]'>Reply</a>)")
log_talk(usr,"[key_name(usr)] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]",LOGPDA)
to_chat(H, "[icon2html(customrecepient, H)] <b>Message from [PDARec.owner] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[customrecepient];choice=Message;skiprefresh=1;target=\ref[PDARec]'>Reply</a>)")
log_talk(usr,"[key_name(usr)] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]",LOGPDA)
customrecepient.cut_overlays()
customrecepient.add_overlay(mutable_appearance('icons/obj/pda.dmi', "pda-r"))
//Finally..
@@ -468,4 +468,4 @@
info = "<center><h2>Daily Key Reset</h2></center><br>The new message monitor key is '[server.decryptkey]'.<br>Please keep this a secret and away from the clown.<br>If necessary, change the password to a more secure one."
info_links = info
add_overlay("paper_words")
break
break
+4 -4
View File
@@ -10,7 +10,7 @@
/obj/machinery/computer/pod/Initialize()
..()
. = ..()
for(var/obj/machinery/mass_driver/M in range(range, src))
if(M.id == id)
connected = M
@@ -21,7 +21,7 @@
return
if(!connected)
say("Cannot locate mass driver connector. Cancelling firing sequence!")
say("Cannot locate mass driver connector. Cancelling firing sequence!")
return
for(var/obj/machinery/door/poddoor/M in range(range, src))
@@ -130,7 +130,7 @@
name = "\improper ProComp Executive IIc"
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
title = "External Airlock Controls"
req_access = list(ACCESS_SYNDICATE)
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/pod/old/syndicate/attack_hand(mob/user)
if(!allowed(user))
@@ -142,4 +142,4 @@
/obj/machinery/computer/pod/old/swf
name = "\improper Magix System IV"
desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition"
desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition"
@@ -22,7 +22,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
var/obj/machinery/computer/telecrystals/boss/linkedboss = null
/obj/machinery/computer/telecrystals/uplinker/Initialize()
..()
. = ..()
var/ID = pick_n_take(GLOB.possible_uplinker_IDs)
if(!ID)
@@ -220,4 +220,4 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
src.updateUsrDialog()
return
#undef NUKESCALINGMODIFIER
#undef NUKESCALINGMODIFIER
+9
View File
@@ -434,6 +434,15 @@
constructionStep = CONSTRUCTION_GUTTED
update_icon()
return
if(istype(C, /obj/item/device/electroadaptive_pseudocircuit))
var/obj/item/device/electroadaptive_pseudocircuit/P = C
if(!P.adapt_circuit(user, 30))
return
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
"<span class='notice'>You adapt a firelock circuit and slot it into the assembly.</span>")
constructionStep = CONSTRUCTION_GUTTED
update_icon()
return
return ..()
/obj/structure/firelock_frame/heavy
+4 -29
View File
@@ -22,7 +22,6 @@
var/icon_recharging = "recharge"
var/icon_creating = "make"
var/datum/material_container/materials
var/list/using_materials
var/starting_amount = 0
var/metal_cost = 1000
@@ -55,14 +54,10 @@
/obj/machinery/droneDispenser/Initialize()
. = ..()
materials = new(src, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT*MAX_STACK_SIZE*2)
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE)
materials.insert_amount(starting_amount)
using_materials = list(MAT_METAL=metal_cost, MAT_GLASS=glass_cost)
/obj/machinery/droneDispenser/Destroy()
QDEL_NULL(materials)
return ..()
/obj/machinery/droneDispenser/preloaded
starting_amount = 5000
@@ -148,10 +143,6 @@
..()
if((mode == DRONE_RECHARGING) && !stat && recharging_text)
to_chat(user, "<span class='warning'>[recharging_text]</span>")
if(metal_cost)
to_chat(user, "<span class='notice'>It has [materials.amount(MAT_METAL)] units of metal stored.</span>")
if(glass_cost)
to_chat(user, "<span class='notice'>It has [materials.amount(MAT_GLASS)] units of glass stored.</span>")
/obj/machinery/droneDispenser/power_change()
..()
@@ -166,6 +157,7 @@
if((stat & (NOPOWER|BROKEN)) || !anchored)
return
GET_COMPONENT(materials, /datum/component/material_container)
if(!materials.has_materials(using_materials))
return // We require more minerals
@@ -232,25 +224,8 @@
icon_state = icon_on
/obj/machinery/droneDispenser/attackby(obj/item/O, mob/living/user)
if(istype(O, /obj/item/stack))
if(!O.materials[MAT_METAL] && !O.materials[MAT_GLASS])
return ..()
if(!metal_cost && !glass_cost)
to_chat(user, "<span class='warning'>There isn't a place to insert [O]!</span>")
return
var/obj/item/stack/sheets = O
if(!user.canUnEquip(sheets))
to_chat(user, "<span class='warning'>[O] is stuck to your hand, you can't get it off!</span>")
return
var/used = materials.insert_stack(sheets, sheets.amount)
if(used)
to_chat(user, "<span class='notice'>You insert [used] sheet[used > 1 ? "s" : ""] into [src].</span>")
else
to_chat(user, "<span class='warning'>The [src] isn't accepting the [sheets].</span>")
else if(istype(O, /obj/item/crowbar))
if(istype(O, /obj/item/crowbar))
GET_COMPONENT(materials, /datum/component/material_container)
materials.retrieve_all()
playsound(loc, O.usesound, 50, 1)
to_chat(user, "<span class='notice'>You retrieve the materials from [src].</span>")
+10
View File
@@ -220,6 +220,16 @@
update_icon()
return
else if(istype(W, /obj/item/device/electroadaptive_pseudocircuit))
var/obj/item/device/electroadaptive_pseudocircuit/P = W
if(!P.adapt_circuit(user, 15))
return
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
"<span class='notice'>You adapt a fire alarm circuit and slot it into the assembly.</span>")
buildstage = 1
update_icon()
return
else if(istype(W, /obj/item/wrench))
user.visible_message("[user] removes the fire alarm assembly from the wall.", \
"<span class='notice'>You remove the fire alarm assembly from the wall.</span>")
+2 -2
View File
@@ -215,7 +215,7 @@
/obj/machinery/magnetic_controller/Initialize()
..()
. = ..()
if(autolink)
for(var/obj/machinery/magnetic_module/M in GLOB.machines)
if(M.freq == frequency && M.code == code)
@@ -391,4 +391,4 @@
if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
rpath += copytext(path, i, i+1) // else, add to list
// there doesn't HAVE to be separators but it makes paths syntatically visible
// there doesn't HAVE to be separators but it makes paths syntatically visible
-13
View File
@@ -31,8 +31,6 @@
imap += icon('icons/misc/imap.dmi', "blank")
imap += icon('icons/misc/imap.dmi', "blank")
//to_chat(world, "[icount] images in list")
for(var/wx = 1 ; wx <= world.maxx; wx++)
@@ -142,13 +140,10 @@
var/rx = ((wx*2+xoff)%32) + 1
var/ry = ((wy*2+yoff)%32) + 1
//to_chat(world, "trying [ix],[iy] : [ix+icx*iy]")
var/icon/I = imap[1+(ix + icx*iy)*2]
var/icon/I2 = imap[2+(ix + icx*iy)*2]
//to_chat(world, "icon: [icon2html(I, world)]")
I.DrawBox(colour, rx, ry, rx+1, ry+1)
I2.DrawBox(colour2, rx, ry, rx+1, ry+1)
@@ -164,8 +159,6 @@
H.screen_loc = "[5 + i%icx],[6+ round(i/icx)]"
//to_chat(world, "[icon2html(I, world)] at [H.screen_loc]")
H.name = (i==0)?"maprefresh":"map"
var/icon/HI = new/icon
@@ -272,12 +265,8 @@
var/rx = ((wx*2+xoff)%32) + 1
var/ry = ((wy*2+yoff)%32) + 1
//to_chat(world, "trying [ix],[iy] : [ix+icx*iy]")
var/icon/I = imap[1+(ix + icx*iy)]
//to_chat(world, "icon: [icon2html(I, world)]")
I.DrawBox(colour, rx, ry, rx, ry)
@@ -291,8 +280,6 @@
H.screen_loc = "[5 + i%icx],[6+ round(i/icx)]"
//to_chat(world, "[icon2html(I, world)] at [H.screen_loc]")
H.name = (i==0)?"maprefresh":"map"
var/icon/I = imap[i+1]
@@ -570,8 +570,8 @@
/obj/machinery/porta_turret/syndicate/pod
integrity_failure = 20
max_integrity = 40
stun_projectile = /obj/item/projectile/bullet/weakbullet3
lethal_projectile = /obj/item/projectile/bullet/weakbullet3
stun_projectile = /obj/item/projectile/bullet/syndicate_turret
lethal_projectile = /obj/item/projectile/bullet/syndicate_turret
/obj/machinery/porta_turret/ai
faction = "silicon"
+4 -3
View File
@@ -14,15 +14,14 @@
var/blood = 0
var/eat_dir = WEST
var/amount_produced = 50
var/datum/material_container/materials
var/crush_damage = 1000
var/eat_victim_items = TRUE
var/item_recycle_sound = 'sound/items/welder.ogg'
/obj/machinery/recycler/Initialize()
materials = new /datum/material_container(src, list(MAT_METAL, MAT_GLASS, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM))
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM))
. = ..()
update_icon()
return ..()
/obj/machinery/recycler/RefreshParts()
var/amt_made = 0
@@ -32,6 +31,7 @@
mat_mod *= 50000
for(var/obj/item/stock_parts/manipulator/M in component_parts)
amt_made = 12.5 * M.rating //% of materials salvaged
GET_COMPONENT(materials, /datum/component/material_container)
materials.max_amount = mat_mod
amount_produced = min(50, amt_made) + 50
@@ -126,6 +126,7 @@
/obj/machinery/recycler/proc/recycle_item(obj/item/I)
I.loc = src.loc
GET_COMPONENT(materials, /datum/component/material_container)
var/material_amount = materials.get_item_material_amount(I)
if(!material_amount)
qdel(I)
+3 -3
View File
@@ -706,7 +706,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
..()
var/T = pick(subtypesof(/obj/machinery/vending/snack) - /obj/machinery/vending/snack/random)
new T(get_turf(src))
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/machinery/vending/snack/blue
icon_state = "snackblue"
@@ -758,7 +758,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
. = ..()
var/T = pick(subtypesof(/obj/machinery/vending/cola) - /obj/machinery/vending/cola/random)
new T(get_turf(src))
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/machinery/vending/cola/blue
icon_state = "Cola_Machine"
@@ -1195,4 +1195,4 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
#undef STANDARD_CHARGE
#undef CONTRABAND_CHARGE
#undef COIN_CHARGE
#undef COIN_CHARGE
+3 -3
View File
@@ -251,7 +251,7 @@
icon_state = "mecha_carbine"
origin_tech = "materials=4;combat=4"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/incendiary/shell
projectile = /obj/item/projectile/bullet/incendiary/fnx99
projectiles = 24
projectile_energy_cost = 15
@@ -271,7 +271,7 @@
icon_state = "mecha_scatter"
origin_tech = "combat=4"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/midbullet
projectile = /obj/item/projectile/bullet/scattershot
projectiles = 40
projectile_energy_cost = 25
projectiles_per_shot = 4
@@ -283,7 +283,7 @@
icon_state = "mecha_uac2"
origin_tech = "combat=4"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/weakbullet3
projectile = /obj/item/projectile/bullet/lmg
projectiles = 300
projectile_energy_cost = 20
projectiles_per_shot = 3
+28 -66
View File
@@ -12,7 +12,6 @@
circuit = /obj/item/circuitboard/machine/mechfab
var/time_coeff = 1
var/component_coeff = 1
var/datum/material_container/materials
var/datum/research/files
var/sync = 0
var/part_set
@@ -36,9 +35,11 @@
)
/obj/machinery/mecha_part_fabricator/Initialize()
AddComponent(/datum/component/material_container,
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE),
FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready))
. = ..()
files = new /datum/research(src) //Setup the research data holder.
materials = new(src, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE))
return ..()
/obj/machinery/mecha_part_fabricator/RefreshParts()
var/T = 0
@@ -46,6 +47,7 @@
//maximum stocking amount (default 300000, 600000 at T4)
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
T += M.rating
GET_COMPONENT(materials, /datum/component/material_container)
materials.max_amount = (200000 + (T*50000))
//resources adjustment coefficient (1 -> 0.85 -> 0.7 -> 0.55)
@@ -113,6 +115,7 @@
/obj/machinery/mecha_part_fabricator/proc/output_available_resources()
var/output
GET_COMPONENT(materials, /datum/component/material_container)
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
output += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm&sup3;"
@@ -133,6 +136,7 @@
/obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D)
if(D.reagents_list.len) // No reagents storage - no reagent designs.
return 0
GET_COMPONENT(materials, /datum/component/material_container)
if(materials.has_materials(get_resources_w_coeff(D)))
return 1
return 0
@@ -142,6 +146,7 @@
desc = "It's building \a [initial(D.name)]."
var/list/res_coef = get_resources_w_coeff(D)
GET_COMPONENT(materials, /datum/component/material_container)
materials.use_amount(res_coef)
add_overlay("fab-active")
use_power = ACTIVE_POWER_USE
@@ -398,15 +403,34 @@
break
if(href_list["remove_mat"] && href_list["material"])
GET_COMPONENT(materials, /datum/component/material_container)
materials.retrieve_sheets(text2num(href_list["remove_mat"]), href_list["material"])
updateUsrDialog()
return
/obj/machinery/mecha_part_fabricator/on_deconstruction()
GET_COMPONENT(materials, /datum/component/material_container)
materials.retrieve_all()
..()
/obj/machinery/mecha_part_fabricator/ComponentActivated(datum/component/C)
..()
if(istype(C, /datum/component/material_container))
var/datum/component/material_container/M = C
if(!M.last_insert_success)
return
var/lit = M.last_inserted_type
var/stack_name
if(ispath(lit, /obj/item/ore/bluespace_crystal))
stack_name = "bluespace"
else
var/obj/item/stack/S = lit
stack_name = material2name(initial(S.materials)[1])
add_overlay("fab-load-[stack_name]")
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "fab-load-[stack_name]"), 10)
updateUsrDialog()
/obj/machinery/mecha_part_fabricator/attackby(obj/item/W, mob/user, params)
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
return 1
@@ -417,55 +441,7 @@
if(default_deconstruction_crowbar(W))
return 1
if(istype(W, /obj/item/stack/sheet))
if(!is_insertion_ready(user))
return 1
var/material_amount = materials.get_item_material_amount(W)
if(!try_insert(user, W, material_amount))
return 1
var/inserted = materials.insert_item(W)
if(inserted)
to_chat(user, "<span class='notice'>You insert [inserted] sheet\s into [src].</span>")
if(W && W.materials.len)
if(!QDELETED(W))
user.put_in_active_hand(W)
var/mat_overlay = "fab-load-[material2name(W.materials[1])]"
add_overlay(mat_overlay)
sleep(10)
if(!QDELETED(src))
cut_overlay(mat_overlay) //No matter what the overlay shall still be deleted
updateUsrDialog()
else if(istype(W, /obj/item/ore/bluespace_crystal))
if(!is_insertion_ready(user))
return 1
var/material_amount = materials.get_item_material_amount(W)
if(!try_insert(user, W, material_amount))
return 1
var/inserted = materials.insert_item(W)
if(inserted)
to_chat(user, "<span class='notice'>You add [W] to the [src].</span>")
if(W && W.materials.len)
qdel(W)
var/mat_overlay = "fab-load-bluespace"
add_overlay(mat_overlay)
sleep(10)
if(!QDELETED(src))
cut_overlay(mat_overlay)
updateUsrDialog()
else
return ..()
return ..()
/obj/machinery/mecha_part_fabricator/proc/material2name(ID)
return copytext(ID,2)
@@ -479,17 +455,3 @@
return FALSE
return TRUE
/obj/machinery/mecha_part_fabricator/proc/try_insert(mob/user, obj/item/I, material_amount)
if(!material_amount)
to_chat(user, "<span class='warning'>This object does not contain sufficient amounts of materials to be accepted by [src].</span>")
return FALSE
if(!materials.has_space(material_amount))
to_chat(user, "<span class='warning'>\The [src] is full. Please remove some materials from [src] in order to insert more.</span>")
return FALSE
if(!user.temporarilyRemoveItemFromInventory(I))
to_chat(user, "<span class='warning'>\The [I] is stuck to you and cannot be placed into [src].</span>")
return FALSE
return TRUE
+1 -1
View File
@@ -766,7 +766,7 @@
. = t_air.return_pressure()
return
/obj/mecha/proc/return_temperature()
/obj/mecha/return_temperature()
var/datum/gas_mixture/t_air = return_air()
if(t_air)
. = t_air.return_temperature()
+15 -15
View File
@@ -160,7 +160,7 @@
/obj/effect/landmark/start/wizard/Initialize(mapload)
..()
GLOB.wizardstart += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/start/new_player
name = "New Player"
@@ -173,7 +173,7 @@
/obj/effect/landmark/start/new_player/Initialize(mapload)
..()
qdel(src)
return INITIALIZE_HINT_QDEL
@@ -183,7 +183,7 @@
/obj/effect/landmark/latejoin/Initialize(mapload)
..()
SSjob.latejoin_trackers += loc
qdel(src)
return INITIALIZE_HINT_QDEL
// carp.
/obj/effect/landmark/carpspawn
@@ -229,7 +229,7 @@
/obj/effect/landmark/xeno_spawn/Initialize(mapload)
..()
GLOB.xeno_spawn += loc
qdel(src)
return INITIALIZE_HINT_QDEL
// blobs.
/obj/effect/landmark/blobstart
@@ -238,7 +238,7 @@
/obj/effect/landmark/blobstart/Initialize(mapload)
..()
GLOB.blobstart += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/secequipment
name = "secequipment"
@@ -246,7 +246,7 @@
/obj/effect/landmark/secequipment/Initialize(mapload)
..()
GLOB.secequipment += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/prisonwarp
name = "prisonwarp"
@@ -254,15 +254,15 @@
/obj/effect/landmark/prisonwarp/Initialize(mapload)
..()
GLOB.prisonwarp += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/ert_spawn
name = "Emergencyresponseteam"
/obj/effect/landmark/ert_spawn/Initialize(mapload)
..()
GLOB.emergencyresponseteamspawn += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/holding_facility
name = "Holding Facility"
@@ -270,7 +270,7 @@
/obj/effect/landmark/holding_facility/Initialize(mapload)
..()
GLOB.holdingfacility += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/thunderdome/observe
name = "tdomeobserve"
@@ -278,7 +278,7 @@
/obj/effect/landmark/thunderdome/observe/Initialize(mapload)
..()
GLOB.tdomeobserve += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/thunderdome/one
name = "tdome1"
@@ -286,7 +286,7 @@
/obj/effect/landmark/thunderdome/one/Initialize(mapload)
..()
GLOB.tdome1 += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/thunderdome/two
name = "tdome2"
@@ -294,7 +294,7 @@
/obj/effect/landmark/thunderdome/two/Initialize(mapload)
..()
GLOB.tdome2 += loc
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/thunderdome/admin
name = "tdomeadmin"
@@ -302,7 +302,7 @@
/obj/effect/landmark/thunderdome/admin/Initialize(mapload)
..()
GLOB.tdomeadmin += loc
qdel(src)
return INITIALIZE_HINT_QDEL
//generic event spawns
/obj/effect/landmark/event_spawn
@@ -330,4 +330,4 @@
/obj/effect/landmark/ruin/Destroy()
GLOB.ruin_landmarks -= src
ruin_template = null
. = ..()
. = ..()
@@ -18,7 +18,7 @@
if(lootspawn)
new lootspawn(T)
lootcount--
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/effect/spawner/lootdrop/armory_contraband
name = "armory contraband gun spawner"
@@ -89,7 +89,7 @@
/obj/effect/spawner/lootdrop/maintenance/Initialize(mapload)
loot = GLOB.maintenance_loot
..()
. = ..()
/obj/effect/spawner/lootdrop/crate_spawner
name = "lootcrate spawner" //USE PROMO CODE "SELLOUT" FOR 20% OFF!
@@ -130,7 +130,7 @@
loot = list()
for(var/path in subtypesof(/obj/effect/spawner/bundle/costume))
loot[path] = TRUE
..()
. = ..()
// Minor lootdrops follow
@@ -162,4 +162,4 @@
name = "25% cyborg mask spawner"
loot = list(
/obj/item/clothing/mask/gas/cyborg = 25,
"" = 75)
"" = 75)
+1 -3
View File
@@ -61,6 +61,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/equip_delay_other = 20 //In deciseconds, how long an item takes to put on another person
var/strip_delay = 40 //In deciseconds, how long an item takes to remove from another person
var/breakouttime = 0
var/being_removed = FALSE
var/list/materials
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use.
@@ -218,9 +219,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/proc/speechModification(message) //For speech modification by mask slot items.
return message
/obj/item/attack_self(mob/user)
interact(user)
/obj/item/interact(mob/user)
add_fingerprint(user)
if(hidden_uplink && hidden_uplink.active)
+5 -5
View File
@@ -31,7 +31,7 @@ obj/item/construction
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on the device blinks yellow.</span>"
/obj/item/construction/Initialize()
..()
. = ..()
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
@@ -144,7 +144,7 @@ obj/item/construction
set category = "Object"
set src in usr // What does this do?
var window_type_name
var/window_type_name
if (window_type == /obj/structure/window/fulltile)
window_type = /obj/structure/window/reinforced/fulltile
@@ -240,11 +240,11 @@ obj/item/construction
set category = "Object"
set src in usr
var airlockcat = input(usr, "Select whether the airlock is solid or glass.") in list("Solid", "Glass")
var/airlockcat = input(usr, "Select whether the airlock is solid or glass.") in list("Solid", "Glass")
switch(airlockcat)
if("Solid")
if(advanced_airlock_setting == 1)
var airlockpaint = input(usr, "Select the paintjob of the airlock.") in list("Default", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining", "Maintenance", "External", "High Security")
var/airlockpaint = input(usr, "Select the paintjob of the airlock.") in list("Default", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining", "Maintenance", "External", "High Security")
switch(airlockpaint)
if("Default")
airlock_type = /obj/machinery/door/airlock
@@ -275,7 +275,7 @@ obj/item/construction
if("Glass")
if(advanced_airlock_setting == 1)
var airlockpaint = input(usr, "Select the paintjob of the airlock.") in list("Default", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining")
var/airlockpaint = input(usr, "Select the paintjob of the airlock.") in list("Default", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining")
switch(airlockpaint)
if("Default")
airlock_type = /obj/machinery/door/airlock/glass
+9 -9
View File
@@ -160,7 +160,7 @@ update_label("John Doe", "Clowny")
var/anyone = FALSE //Can anyone forge the ID or just syndicate?
/obj/item/card/id/syndicate/Initialize()
..()
. = ..()
var/datum/action/item_action/chameleon/change/chameleon_action = new(src)
chameleon_action.chameleon_type = /obj/item/card/id
chameleon_action.chameleon_name = "ID Card"
@@ -180,14 +180,14 @@ update_label("John Doe", "Clowny")
if(isliving(user) && user.mind)
if(user.mind.special_role || anyone)
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
var/t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm
if (t)
alert("Invalid name.")
return
registered_name = t
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN)
var/u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN)
if(!u)
registered_name = ""
return
@@ -220,7 +220,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/captains_spare/Initialize()
var/datum/job/captain/J = new/datum/job/captain
access = J.get_access()
..()
. = ..()
/obj/item/card/id/centcom
name = "\improper CentCom ID"
@@ -231,7 +231,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/centcom/Initialize()
access = get_all_centcom_access()
..()
. = ..()
/obj/item/card/id/ert
name = "\improper CentCom ID"
@@ -242,7 +242,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/Initialize()
access = get_all_accesses()+get_ert_access("commander")-ACCESS_CHANGE_IDS
..()
. = ..()
/obj/item/card/id/ert/Security
registered_name = "Security Response Officer"
@@ -250,7 +250,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/Security/Initialize()
access = get_all_accesses()+get_ert_access("sec")-ACCESS_CHANGE_IDS
..()
. = ..()
/obj/item/card/id/ert/Engineer
registered_name = "Engineer Response Officer"
@@ -258,7 +258,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/Engineer/Initialize()
access = get_all_accesses()+get_ert_access("eng")-ACCESS_CHANGE_IDS
..()
. = ..()
/obj/item/card/id/ert/Medical
registered_name = "Medical Response Officer"
@@ -266,7 +266,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert/Medical/Initialize()
access = get_all_accesses()+get_ert_access("med")-ACCESS_CHANGE_IDS
..()
. = ..()
/obj/item/card/id/prisoner
name = "prisoner ID card"
+16 -30
View File
@@ -107,39 +107,26 @@
throw_speed = 3
throw_range = 7
attack_verb = list("HONKED")
var/next_usable = 0
var/honksound = 'sound/items/bikehorn.ogg'
var/cooldowntime = 20
/obj/item/bikehorn/Initialize()
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
/obj/item/bikehorn/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src.loc, honksound, 50, 1)
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
return (BRUTELOSS)
/obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!(next_usable > world.time))
playsound(loc, honksound, 50, 1, -1) //plays instead of tap.ogg!
return ..()
/obj/item/bikehorn/attack_self(mob/user)
if(!(next_usable > world.time))
next_usable = world.time + cooldowntime
playsound(src.loc, honksound, 50, 1)
src.add_fingerprint(user)
/obj/item/bikehorn/Crossed(mob/living/L)
if(isliving(L))
playsound(loc, honksound, 50, 1, -1)
..()
/obj/item/bikehorn/airhorn
name = "air horn"
desc = "Damn son, where'd you find this?"
icon_state = "air_horn"
honksound = 'sound/items/airhorn2.ogg'
cooldowntime = 50
origin_tech = "materials=4;engineering=4"
/obj/item/bikehorn/airhorn/Initialize()
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/airhorn2.ogg'=1), 50)
/obj/item/bikehorn/golden
name = "golden bike horn"
desc = "Golden? Clearly, it's made with bananium! Honk!"
@@ -155,14 +142,13 @@
..()
/obj/item/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
if(!(next_usable > world.time))
var/turf/T = get_turf(src)
for(M in ohearers(7, T))
if(ishuman(M) && M.can_hear())
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
M.emote("flip")
var/turf/T = get_turf(src)
for(M in ohearers(7, T))
if(ishuman(M) && M.can_hear())
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
M.emote("flip")
/obj/item/reagent_containers/food/drinks/soda_cans/canned_laughter
name = "Canned Laughter"
+189 -186
View File
@@ -1,186 +1,189 @@
/obj/item/lipstick
gender = PLURAL
name = "red lipstick"
desc = "A generic brand of lipstick."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "lipstick"
w_class = WEIGHT_CLASS_TINY
var/colour = "red"
var/open = FALSE
/obj/item/lipstick/purple
name = "purple lipstick"
colour = "purple"
/obj/item/lipstick/jade
//It's still called Jade, but theres no HTML color for jade, so we use lime.
name = "jade lipstick"
colour = "lime"
/obj/item/lipstick/black
name = "black lipstick"
colour = "black"
/obj/item/lipstick/random
name = "lipstick"
/obj/item/lipstick/random/New()
..()
colour = pick("red","purple","lime","black","green","blue","white")
name = "[colour] lipstick"
/obj/item/lipstick/attack_self(mob/user)
cut_overlays()
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
open = !open
if(open)
var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color")
colored_overlay.color = colour
icon_state = "lipstick_uncap"
add_overlay(colored_overlay)
else
icon_state = "lipstick"
/obj/item/lipstick/attack(mob/M, mob/user)
if(!open)
return
if(!ismob(M))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.is_mouth_covered())
to_chat(user, "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>")
return
if(H.lip_style) //if they already have lipstick on
to_chat(user, "<span class='warning'>You need to wipe off the old lipstick first!</span>")
return
if(H == user)
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
"<span class='notice'>You begin to apply \the [src] on [H]'s lips...</span>")
if(do_after(user, 20, target = H))
user.visible_message("[user] does [H]'s lips with \the [src].", \
"<span class='notice'>You apply \the [src] on [H]'s lips.</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
to_chat(user, "<span class='warning'>Where are the lips on that?</span>")
//you can wipe off lipstick with paper!
/obj/item/paper/attack(mob/M, mob/user)
if(user.zone_selected == "mouth")
if(!ismob(M))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H == user)
to_chat(user, "<span class='notice'>You wipe off the lipstick with [src].</span>")
H.lip_style = null
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
"<span class='notice'>You begin to wipe off [H]'s lipstick...</span>")
if(do_after(user, 10, target = H))
user.visible_message("[user] wipes [H]'s lipstick off with \the [src].", \
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
H.lip_style = null
H.update_body()
else
..()
/obj/item/razor
name = "electric razor"
desc = "The latest and greatest power razor born from the science of shaving."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "razor"
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_TINY
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
if(location == "mouth")
H.facial_hair_style = "Shaved"
else
H.hair_style = "Skinhead"
H.update_hair()
playsound(loc, 'sound/items/welder2.ogg', 20, 1)
/obj/item/razor/attack(mob/M, mob/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/location = user.zone_selected
if(location == "mouth")
if(!(FACEHAIR in H.dna.species.species_traits))
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
return
if(!get_location_accessible(H, location))
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
return
if(H.facial_hair_style == "Shaved")
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
return
if(H == user) //shaving yourself
user.visible_message("[user] starts to shave their facial hair with [src].", \
"<span class='notice'>You take a moment to shave your facial hair with [src]...</span>")
if(do_after(user, 50, target = H))
user.visible_message("[user] shaves his facial hair clean with [src].", \
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
shave(H, location)
else
var/turf/H_loc = H.loc
user.visible_message("<span class='warning'>[user] tries to shave [H]'s facial hair with [src].</span>", \
"<span class='notice'>You start shaving [H]'s facial hair...</span>")
if(do_after(user, 50, target = H))
if(H_loc == H.loc)
user.visible_message("<span class='warning'>[user] shaves off [H]'s facial hair with [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
shave(H, location)
else if(location == "head")
if(!(HAIR in H.dna.species.species_traits))
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
return
if(!get_location_accessible(H, location))
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
return
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
return
if(H == user) //shaving yourself
user.visible_message("[user] starts to shave their head with [src].", \
"<span class='notice'>You start to shave your head with [src]...</span>")
if(do_after(user, 5, target = H))
user.visible_message("[user] shaves his head with [src].", \
"<span class='notice'>You finish shaving with [src].</span>")
shave(H, location)
else
var/turf/H_loc = H.loc
user.visible_message("<span class='warning'>[user] tries to shave [H]'s head with [src]!</span>", \
"<span class='notice'>You start shaving [H]'s head...</span>")
if(do_after(user, 50, target = H))
if(H_loc == H.loc)
user.visible_message("<span class='warning'>[user] shaves [H]'s head bald with [src]!</span>", \
"<span class='notice'>You shave [H]'s head bald.</span>")
shave(H, location)
else
..()
else
..()
/obj/item/lipstick
gender = PLURAL
name = "red lipstick"
desc = "A generic brand of lipstick."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "lipstick"
w_class = WEIGHT_CLASS_TINY
var/colour = "red"
var/open = FALSE
/obj/item/lipstick/purple
name = "purple lipstick"
colour = "purple"
/obj/item/lipstick/jade
//It's still called Jade, but theres no HTML color for jade, so we use lime.
name = "jade lipstick"
colour = "lime"
/obj/item/lipstick/black
name = "black lipstick"
colour = "black"
/obj/item/lipstick/random
name = "lipstick"
/obj/item/lipstick/random/New()
..()
colour = pick("red","purple","lime","black","green","blue","white")
name = "[colour] lipstick"
/obj/item/lipstick/attack_self(mob/user)
cut_overlays()
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
open = !open
if(open)
var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color")
colored_overlay.color = colour
icon_state = "lipstick_uncap"
add_overlay(colored_overlay)
else
icon_state = "lipstick"
/obj/item/lipstick/attack(mob/M, mob/user)
if(!open)
return
if(!ismob(M))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.is_mouth_covered())
to_chat(user, "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>")
return
if(H.lip_style) //if they already have lipstick on
to_chat(user, "<span class='warning'>You need to wipe off the old lipstick first!</span>")
return
if(H == user)
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
"<span class='notice'>You begin to apply \the [src] on [H]'s lips...</span>")
if(do_after(user, 20, target = H))
user.visible_message("[user] does [H]'s lips with \the [src].", \
"<span class='notice'>You apply \the [src] on [H]'s lips.</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
to_chat(user, "<span class='warning'>Where are the lips on that?</span>")
//you can wipe off lipstick with paper!
/obj/item/paper/attack(mob/M, mob/user)
if(user.zone_selected == "mouth")
if(!ismob(M))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H == user)
to_chat(user, "<span class='notice'>You wipe off the lipstick with [src].</span>")
H.lip_style = null
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
"<span class='notice'>You begin to wipe off [H]'s lipstick...</span>")
if(do_after(user, 10, target = H))
user.visible_message("[user] wipes [H]'s lipstick off with \the [src].", \
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
H.lip_style = null
H.update_body()
else
..()
/obj/item/razor
name = "electric razor"
desc = "The latest and greatest power razor born from the science of shaving."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "razor"
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_TINY
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
if(location == "mouth")
H.facial_hair_style = "Shaved"
else
H.hair_style = "Skinhead"
H.update_hair()
playsound(loc, 'sound/items/welder2.ogg', 20, 1)
/obj/item/razor/attack(mob/M, mob/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/location = user.zone_selected
if((location in list("eyes", "mouth", "head")) && !H.get_bodypart("head"))
to_chat(user, "<span class='warning'>[H] doesn't have a head!</span>")
return
if(location == "mouth")
if(!(FACEHAIR in H.dna.species.species_traits))
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
return
if(!get_location_accessible(H, location))
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
return
if(H.facial_hair_style == "Shaved")
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
return
if(H == user) //shaving yourself
user.visible_message("[user] starts to shave their facial hair with [src].", \
"<span class='notice'>You take a moment to shave your facial hair with [src]...</span>")
if(do_after(user, 50, target = H))
user.visible_message("[user] shaves his facial hair clean with [src].", \
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
shave(H, location)
else
var/turf/H_loc = H.loc
user.visible_message("<span class='warning'>[user] tries to shave [H]'s facial hair with [src].</span>", \
"<span class='notice'>You start shaving [H]'s facial hair...</span>")
if(do_after(user, 50, target = H))
if(H_loc == H.loc)
user.visible_message("<span class='warning'>[user] shaves off [H]'s facial hair with [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
shave(H, location)
else if(location == "head")
if(!(HAIR in H.dna.species.species_traits))
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
return
if(!get_location_accessible(H, location))
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
return
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
return
if(H == user) //shaving yourself
user.visible_message("[user] starts to shave their head with [src].", \
"<span class='notice'>You start to shave your head with [src]...</span>")
if(do_after(user, 5, target = H))
user.visible_message("[user] shaves his head with [src].", \
"<span class='notice'>You finish shaving with [src].</span>")
shave(H, location)
else
var/turf/H_loc = H.loc
user.visible_message("<span class='warning'>[user] tries to shave [H]'s head with [src]!</span>", \
"<span class='notice'>You start shaving [H]'s head...</span>")
if(do_after(user, 50, target = H))
if(H_loc == H.loc)
user.visible_message("<span class='warning'>[user] shaves [H]'s head bald with [src]!</span>", \
"<span class='notice'>You shave [H]'s head bald.</span>")
shave(H, location)
else
..()
else
..()
+3 -3
View File
@@ -4,13 +4,13 @@
*/
//Child of carpplushie because this should do everything the toy does and more
/obj/item/toy/carpplushie/dehy_carp
/obj/item/toy/plush/carpplushie/dehy_carp
var/mob/owner = null //Carp doesn't attack owner, set when using in hand
var/owned = 0 //Boolean, no owner to begin with
var/mobtype = /mob/living/simple_animal/hostile/carp //So admins can change what mob spawns via var fuckery
//Attack self
/obj/item/toy/carpplushie/dehy_carp/attack_self(mob/user)
/obj/item/toy/plush/carpplushie/dehy_carp/attack_self(mob/user)
src.add_fingerprint(user) //Anyone can add their fingerprints to it with this
if(!owned)
to_chat(user, "<span class='notice'>You pet [src]. You swear it looks up at you.</span>")
@@ -18,7 +18,7 @@
owned = 1
else return ..()
/obj/item/toy/carpplushie/dehy_carp/proc/Swell()
/obj/item/toy/plush/carpplushie/dehy_carp/proc/Swell()
desc = "It's growing!"
visible_message("<span class='notice'>[src] swells up!</span>")
@@ -0,0 +1,65 @@
//Used by engineering cyborgs in place of generic circuits.
/obj/item/device/electroadaptive_pseudocircuit
name = "electroadaptive pseudocircuit"
desc = "An all-in-one circuit imprinter, designer, synthesizer, outfitter, creator, and chef. It can be used in place of any generic circuit board during construction."
icon = 'icons/obj/module.dmi'
icon_state = "boris"
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL = 50, MAT_GLASS = 300)
origin_tech = "engineering=4"
var/recharging = FALSE
var/circuits = 5 //How many circuits the pseudocircuit has left
var/static/recycleable_circuits = typecacheof(list(/obj/item/electronics/firelock, /obj/item/electronics/airalarm, /obj/item/electronics/firealarm, \
/obj/item/electronics/apc))//A typecache of circuits consumable for material
/obj/item/device/electroadaptive_pseudocircuit/Initialize()
. = ..()
maptext = "[circuits]"
/obj/item/device/electroadaptive_pseudocircuit/examine(mob/user)
..()
if(iscyborg(user))
to_chat(user, "<span class='notice'>It has material for <b>[circuits]</b> circuit[circuits == 1 ? "" : "s"]. Use the pseudocircuit on existing circuits to gain material.</span>")
to_chat(user, "<span class='notice'>Serves as a substitute for <b>fire/air alarm</b>, <b>firelock</b>, and <b>APC</b> electronics.</span>")
to_chat(user, "<span class='notice'>It can also be used on an APC with no power cell to <b>fabricate a low-capacity cell</b> at a high power cost.</span>")
/obj/item/device/electroadaptive_pseudocircuit/proc/adapt_circuit(mob/living/silicon/robot/R, circuit_cost = 0)
if(QDELETED(R) || !istype(R))
return
if(!R.cell)
to_chat(R, "<span class='warning'>You need a power cell installed for that.</span>")
return
if(!R.cell.use(circuit_cost))
to_chat(R, "<span class='warning'>You don't have the power for that (you need [DisplayPower(circuit_cost)].)</span>")
return
if(recharging)
to_chat(R, "<span class='warning'>[src] needs some time to recharge first.</span>")
return
if(!circuits)
to_chat(R, "<span class='warning'>You need more material. Use [src] on existing simple circuits to break them down.</span>")
return
playsound(R, 'sound/items/rped.ogg', 50, TRUE)
recharging = TRUE
circuits--
maptext = "[circuits]"
icon_state = "[initial(icon_state)]_recharging"
var/recharge_time = min(600, circuit_cost * 5) //40W of cost for one fabrication = 20 seconds of recharge time; this is to prevent spamming
addtimer(CALLBACK(src, .proc/recharge), recharge_time)
return TRUE //The actual circuit magic itself is done on a per-object basis
/obj/item/device/electroadaptive_pseudocircuit/afterattack(atom/target, mob/living/user, proximity)
if(!proximity)
return
if(!is_type_in_typecache(target, recycleable_circuits))
return
circuits++
maptext = "[circuits]"
user.visible_message("<span class='notice'>User breaks down [target] with [src].</span>", \
"<span class='notice'>You recycle [target] into [src]. It now has material for <b>[circuits]</b> circuits.</span>")
playsound(user, 'sound/items/deconstruct.ogg', 50, TRUE)
qdel(target)
/obj/item/device/electroadaptive_pseudocircuit/proc/recharge()
playsound(src, 'sound/machines/chime.ogg', 25, TRUE)
recharging = FALSE
icon_state = initial(icon_state)
@@ -4,13 +4,13 @@
icon = 'icons/obj/radio.dmi'
icon_state = "electropack0"
item_state = "electropack"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
slot_flags = SLOT_BACK
w_class = WEIGHT_CLASS_HUGE
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
var/on = TRUE
var/on = TRUE
var/code = 2
var/frequency = 1449
var/shock_cooldown = 0
@@ -20,11 +20,11 @@
return (FIRELOSS)
/obj/item/device/electropack/Initialize()
..()
. = ..()
SSradio.add_object(src, frequency, GLOB.RADIO_CHAT)
/obj/item/device/electropack/Destroy()
SSradio.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
return ..()
/obj/item/device/electropack/attack_hand(mob/user)
@@ -52,8 +52,8 @@
user.put_in_hands(A)
A.add_fingerprint(user)
if(src.flags_1 & NODROP_1)
A.flags_1 |= NODROP_1
if(src.flags_1 & NODROP_1)
A.flags_1 |= NODROP_1
else
return ..()
@@ -108,7 +108,7 @@
spawn(100)
shock_cooldown = 0
var/mob/living/L = loc
step(L, pick(GLOB.cardinals))
step(L, pick(GLOB.cardinals))
to_chat(L, "<span class='danger'>You feel a sharp shock!</span>")
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
@@ -143,4 +143,4 @@ Code:
</TT>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
return
+4 -4
View File
@@ -37,10 +37,10 @@
"Very doubtful")
/obj/item/toy/eightball/Initialize(mapload)
..()
. = ..()
if(prob(1))
new /obj/item/toy/eightball/haunted(get_turf(src))
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/item/toy/eightball/attack_self(mob/user)
if(shaking)
@@ -81,7 +81,7 @@
var/fixed_answer
/obj/item/toy/eightball/broken/Initialize(mapload)
..()
. = ..()
fixed_answer = pick(possible_answers)
/obj/item/toy/eightball/broken/get_answer()
@@ -97,7 +97,7 @@
var/list/votes
/obj/item/toy/eightball/haunted/Initialize(mapload)
..()
. = ..()
votes = list()
GLOB.poi_list |= src
+2 -2
View File
@@ -253,7 +253,7 @@
var/trap_damage = 20
/obj/item/restraints/legcuffs/beartrap/Initialize()
..()
. = ..()
icon_state = "[initial(icon_state)][armed]"
/obj/item/restraints/legcuffs/beartrap/suicide_act(mob/user)
@@ -369,4 +369,4 @@
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy/cyborg(get_turf(hit_atom))
B.Crossed(hit_atom)
qdel(src)
..()
..()
@@ -61,7 +61,7 @@
return ..()
/obj/item/implantcase/Initialize(mapload)
..()
. = ..()
if(imp_type)
imp = new imp_type(src)
update_icon()
@@ -80,4 +80,4 @@
/obj/item/implantcase/adrenaline
name = "implant case - 'Adrenaline'"
desc = "A glass case containing an adrenaline implant."
imp_type = /obj/item/implant/adrenalin
imp_type = /obj/item/implant/adrenalin
@@ -59,7 +59,7 @@
return ..()
/obj/item/implanter/Initialize(mapload)
..()
. = ..()
if(imp_type)
imp = new imp_type(src)
update_icon()
@@ -70,4 +70,4 @@
/obj/item/implanter/emp
name = "implanter (EMP)"
imp_type = /obj/item/implant/emp
imp_type = /obj/item/implant/emp
+74
View File
@@ -0,0 +1,74 @@
/obj/item/toy/plush
name = "plush"
desc = "this is the special coder plush, do not steal"
icon = 'icons/obj/plushes.dmi'
icon_state = "debug"
attack_verb = list("thumped", "whomped", "bumped")
w_class = WEIGHT_CLASS_SMALL
resistance_flags = FLAMMABLE
var/list/squeak_override //Weighted list; If you want your plush to have different squeak sounds use this
/obj/item/toy/plush/Initialize()
. = ..()
AddComponent(/datum/component/squeak, squeak_override)
/obj/item/toy/plush/attack_self(mob/user)
. = ..()
to_chat(user, "<span class='notice'>You pet [src]. D'awww.</span>")
/obj/item/toy/plush/carpplushie
name = "space carp plushie"
desc = "An adorable stuffed toy that resembles a space carp."
icon_state = "carpplush"
item_state = "carp_plushie"
attack_verb = list("bitten", "eaten", "fin slapped")
squeak_override = list('sound/weapons/bite.ogg'=1)
/obj/item/toy/plush/bubbleplush
name = "bubblegum plushie"
desc = "The friendly red demon that gives good miners gifts."
icon_state = "bubbleplush"
attack_verb = list("rends")
squeak_override = list('sound/magic/demon_attack1.ogg'=1)
/obj/item/toy/plush/plushvar
name = "ratvar plushie"
desc = "An adorable plushie of the clockwork justiciar himself with new and improved spring arm action."
icon_state = "plushvar"
/obj/item/toy/plush/narplush
name = "nar'sie plushie"
desc = "A small stuffed doll of the elder god nar'sie. Who thought this was a good children's toy?"
icon_state = "narplush"
/obj/item/toy/plush/lizardplushie
name = "lizard plushie"
desc = "An adorable stuffed toy that resembles a lizardperson."
icon_state = "plushie_lizard"
item_state = "plushie_lizard"
attack_verb = list("clawed", "hissed", "tail slapped")
squeak_override = list('sound/weapons/slash.ogg' = 1)
/obj/item/toy/plush/snakeplushie
name = "snake plushie"
desc = "An adorable stuffed toy that resembles a snake. Not to be mistaken for the real thing."
icon_state = "plushie_snake"
item_state = "plushie_snake"
attack_verb = list("bitten", "hissed", "tail slapped")
squeak_override = list('sound/weapons/bite.ogg' = 1)
/obj/item/toy/plush/nukeplushie
name = "operative plushie"
desc = "An stuffed toy that resembles a syndicate nuclear operative. The tag claims operatives to be purely fictitious."
icon_state = "plushie_nuke"
item_state = "plushie_nuke"
attack_verb = list("shot", "nuked", "detonated")
squeak_override = list('sound/effects/hit_punch.ogg' = 1)
/obj/item/toy/plush/slimeplushie
name = "slime plushie"
desc = "An adorable stuffed toy that resembles a slime. It is practically just a hacky sack."
icon_state = "plushie_slime"
item_state = "plushie_slime"
attack_verb = list("blorbled", "slimed", "absorbed")
squeak_override = list('sound/effects/blobattack.ogg' = 1)
+2 -2
View File
@@ -289,7 +289,7 @@
icon_state = initial(icon_state)
/obj/item/storage/backpack/satchel/flat/Initialize(mapload)
..()
. = ..()
SSpersistence.new_secret_satchels += src
/obj/item/storage/backpack/satchel/flat/PopulateContents()
@@ -306,7 +306,7 @@
var/revealed = 0
/obj/item/storage/backpack/satchel/flat/secret/Initialize()
..()
. = ..()
if(isfloorturf(loc) && !istype(loc, /turf/open/floor/plating/))
hide(1)
+1 -1
View File
@@ -735,7 +735,7 @@
var/theme_name
/obj/item/storage/box/ingredients/Initialize()
..()
. = ..()
if(theme_name)
name = "[name] ([theme_name])"
desc = "A box containing supplementary ingredients for the aspiring chef. The box's theme is '[theme_name]'."
+56 -57
View File
@@ -1,57 +1,56 @@
/obj/item/storage/briefcase
name = "briefcase"
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
icon_state = "briefcase"
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
flags_1 = CONDUCT_1
force = 8
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
resistance_flags = FLAMMABLE
max_integrity = 150
var/folder_path = /obj/item/folder //this is the path of the folder that gets spawned in New()
/obj/item/storage/briefcase/PopulateContents()
new /obj/item/pen(src)
var/obj/item/folder/folder = new folder_path(src)
for(var/i in 1 to 6)
new /obj/item/paper(folder)
/obj/item/storage/briefcase/lawyer
folder_path = /obj/item/folder/blue
/obj/item/storage/briefcase/lawyer/PopulateContents()
new /obj/item/stamp/law(src)
..()
/obj/item/storage/briefcase/sniperbundle
name = "briefcase"
desc = "It's label reads genuine hardened Captain leather, but suspiciously has no other tags or branding. Smells like L'Air du Temps."
icon_state = "briefcase"
flags_1 = CONDUCT_1
force = 10
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
resistance_flags = FLAMMABLE
max_integrity = 150
/obj/item/storage/briefcase/sniperbundle/PopulateContents()
..() // in case you need any paperwork done after your rampage
new /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate(src)
new /obj/item/clothing/neck/tie/red(src)
new /obj/item/clothing/under/syndicate/sniper(src)
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
new /obj/item/ammo_box/magazine/sniper_rounds/haemorrhage(src)
new /obj/item/suppressor/specialoffer(src)
/obj/item/storage/briefcase
name = "briefcase"
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
icon_state = "briefcase"
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
flags_1 = CONDUCT_1
force = 8
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
resistance_flags = FLAMMABLE
max_integrity = 150
var/folder_path = /obj/item/folder //this is the path of the folder that gets spawned in New()
/obj/item/storage/briefcase/PopulateContents()
new /obj/item/pen(src)
var/obj/item/folder/folder = new folder_path(src)
for(var/i in 1 to 6)
new /obj/item/paper(folder)
/obj/item/storage/briefcase/lawyer
folder_path = /obj/item/folder/blue
/obj/item/storage/briefcase/lawyer/PopulateContents()
new /obj/item/stamp/law(src)
..()
/obj/item/storage/briefcase/sniperbundle
name = "briefcase"
desc = "It's label reads genuine hardened Captain leather, but suspiciously has no other tags or branding. Smells like L'Air du Temps."
icon_state = "briefcase"
flags_1 = CONDUCT_1
force = 10
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
resistance_flags = FLAMMABLE
max_integrity = 150
/obj/item/storage/briefcase/sniperbundle/PopulateContents()
..() // in case you need any paperwork done after your rampage
new /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate(src)
new /obj/item/clothing/neck/tie/red(src)
new /obj/item/clothing/under/syndicate/sniper(src)
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
new /obj/item/suppressor/specialoffer(src)
+1 -1
View File
@@ -56,7 +56,7 @@
item_state = "firstaid-ointment"
/obj/item/storage/firstaid/fire/Initialize(mapload)
..()
. = ..()
icon_state = pick("ointment","firefirstaid")
/obj/item/storage/firstaid/fire/PopulateContents()
+2 -2
View File
@@ -19,7 +19,7 @@
var/has_latches = TRUE
/obj/item/storage/toolbox/Initialize()
..()
. = ..()
if(has_latches)
if(prob(10))
latches = "double_latch"
@@ -183,4 +183,4 @@
new/obj/item/stack/cable_coil/pink(src)
new/obj/item/stack/cable_coil/orange(src)
new/obj/item/stack/cable_coil/cyan(src)
new/obj/item/stack/cable_coil/white(src)
new/obj/item/stack/cable_coil/white(src)
-4
View File
@@ -236,7 +236,6 @@
if(!istype(src.loc, /obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
//to_chat(world, "\blue[x],[y] tank is exploding: [pressure] kPa")
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
air_contents.react()
@@ -245,7 +244,6 @@
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
var/turf/epicenter = get_turf(loc)
//to_chat(world, "\blue Exploding Pressure: [pressure] kPa, intensity: [range]")
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
if(istype(src.loc, /obj/item/device/transfer_valve))
@@ -254,7 +252,6 @@
qdel(src)
else if(pressure > TANK_RUPTURE_PRESSURE)
//to_chat(world, "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]")
if(integrity <= 0)
var/turf/T = get_turf(src)
if(!T)
@@ -266,7 +263,6 @@
integrity--
else if(pressure > TANK_LEAK_PRESSURE)
//to_chat(world, "\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]")
if(integrity <= 0)
var/turf/T = get_turf(src)
if(!T)
+1 -28
View File
@@ -14,7 +14,6 @@
* Cards
* Toy nuke
* Fake meteor
* Carp plushie
* Foam armblade
* Toy big red button
* Beach ball
@@ -40,7 +39,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "waterballoon-e"
item_state = "balloon-empty"
/obj/item/toy/balloon/New()
create_reagents(10)
@@ -987,32 +986,6 @@
shake_camera(M, 3, 1)
qdel(src)
/*
* Carp plushie
*/
/obj/item/toy/carpplushie
name = "space carp plushie"
desc = "An adorable stuffed toy that resembles a space carp."
icon = 'icons/obj/toy.dmi'
icon_state = "carpplushie"
item_state = "carp_plushie"
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("bitten", "eaten", "fin slapped")
resistance_flags = FLAMMABLE
var/bitesound = 'sound/weapons/bite.ogg'
//Attack mob
/obj/item/toy/carpplushie/attack(mob/M, mob/user)
playsound(loc, bitesound, 20, 1) //Play bite sound in local area
return ..()
//Attack self
/obj/item/toy/carpplushie/attack_self(mob/user)
playsound(src.loc, bitesound, 20, 1)
to_chat(user, "<span class='notice'>You pet [src]. D'awww.</span>")
return ..()
/*
* Toy big red button
*/
@@ -450,3 +450,7 @@
/obj/structure/closet/AllowDrop()
return TRUE
/obj/structure/closet/return_temperature()
return
+3 -3
View File
@@ -55,7 +55,7 @@
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
/obj/structure/lattice/clockwork/Initialize(mapload)
..()
. = ..()
ratvar_act()
/obj/structure/lattice/clockwork/ratvar_act()
@@ -63,7 +63,7 @@
new /obj/structure/lattice/clockwork/large(loc) // deletes old one
/obj/structure/lattice/clockwork/large/Initialize(mapload)
..()
. = ..()
icon = 'icons/obj/smooth_structures/lattice_clockwork_large.dmi'
pixel_x = -9
pixel_y = -9
@@ -101,7 +101,7 @@
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
/obj/structure/lattice/catwalk/clockwork/Initialize(mapload)
..()
. = ..()
new /obj/effect/temp_visual/ratvar/floor/catwalk(loc)
new /obj/effect/temp_visual/ratvar/beam/catwalk(loc)
+214 -214
View File
@@ -1,214 +1,214 @@
/////// MANNED TURRET ////////
/obj/machinery/manned_turret
name = "machine gun turret"
desc = "While the trigger is held down, this gun will redistribute recoil to allow its user to easily shift targets."
icon = 'icons/obj/turrets.dmi'
icon_state = "machinegun"
can_buckle = TRUE
density = TRUE
max_integrity = 100
buckle_lying = FALSE
layer = ABOVE_MOB_LAYER
var/view_range = 10
var/cooldown = 0
var/projectile_type = /obj/item/projectile/bullet/weakbullet3
var/rate_of_fire = 1
var/number_of_shots = 40
var/cooldown_duration = 90
var/atom/target
var/turf/target_turf
var/warned = FALSE
var/list/calculated_projectile_vars
/obj/machinery/manned_turret/Destroy()
target = null
target_turf = null
..()
//BUCKLE HOOKS
/obj/machinery/manned_turret/unbuckle_mob(mob/living/buckled_mob,force = FALSE)
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
for(var/obj/item/I in buckled_mob.held_items)
if(istype(I, /obj/item/gun_control))
qdel(I)
if(istype(buckled_mob))
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.client.change_view(world.view)
anchored = FALSE
. = ..()
STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user)
if(user.incapacitated() || !istype(user))
return
M.forceMove(get_turf(src))
. = ..()
if(!.)
return
for(var/V in M.held_items)
var/obj/item/I = V
if(istype(I))
if(M.dropItemToGround(I))
var/obj/item/gun_control/TC = new(src)
M.put_in_hands(TC)
else //Entries in the list should only ever be items or null, so if it's not an item, we can assume it's an empty hand
var/obj/item/gun_control/TC = new(src)
M.put_in_hands(TC)
M.pixel_y = 14
layer = ABOVE_MOB_LAYER
setDir(SOUTH)
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
anchored = TRUE
if(M.client)
M.client.change_view(view_range)
START_PROCESSING(SSfastprocess, src)
/obj/machinery/manned_turret/process()
if(!LAZYLEN(buckled_mobs))
return PROCESS_KILL
update_positioning()
/obj/machinery/manned_turret/proc/update_positioning()
var/mob/living/controller = buckled_mobs[1]
if(!istype(controller))
return
var/client/C = controller.client
if(C)
var/atom/A = C.mouseObject
var/turf/T = get_turf(A)
if(istype(T)) //They're hovering over something in the map.
direction_track(controller, T)
calculated_projectile_vars = calculate_projectile_angle_and_pixel_offsets(controller, C.mouseParams)
/obj/machinery/manned_turret/proc/direction_track(mob/user, atom/targeted)
if(user.incapacitated())
return
setDir(get_dir(src,targeted))
user.setDir(dir)
switch(dir)
if(NORTH)
layer = BELOW_MOB_LAYER
user.pixel_x = 0
user.pixel_y = -14
if(NORTHEAST)
layer = BELOW_MOB_LAYER
user.pixel_x = -8
user.pixel_y = -4
if(EAST)
layer = ABOVE_MOB_LAYER
user.pixel_x = -14
user.pixel_y = 0
if(SOUTHEAST)
layer = BELOW_MOB_LAYER
user.pixel_x = -8
user.pixel_y = 4
if(SOUTH)
layer = ABOVE_MOB_LAYER
user.pixel_x = 0
user.pixel_y = 14
if(SOUTHWEST)
layer = BELOW_MOB_LAYER
user.pixel_x = 8
user.pixel_y = 4
if(WEST)
layer = ABOVE_MOB_LAYER
user.pixel_x = 14
user.pixel_y = 0
if(NORTHWEST)
layer = BELOW_MOB_LAYER
user.pixel_x = 8
user.pixel_y = -4
/obj/machinery/manned_turret/proc/checkfire(atom/targeted_atom, mob/user)
target = targeted_atom
if(target == user || user.incapacitated() || target == get_turf(src))
return
if(world.time < cooldown)
if(!warned && world.time > (cooldown - cooldown_duration + rate_of_fire*number_of_shots)) // To capture the window where one is done firing
warned = TRUE
playsound(src, 'sound/weapons/sear.ogg', 100, 1)
return
else
cooldown = world.time + cooldown_duration
warned = FALSE
volley(user)
/obj/machinery/manned_turret/proc/volley(mob/user)
target_turf = get_turf(target)
for(var/i in 1 to number_of_shots)
addtimer(CALLBACK(src, /obj/machinery/manned_turret/.proc/fire_helper, user), i*rate_of_fire)
/obj/machinery/manned_turret/proc/fire_helper(mob/user)
if(user.incapacitated())
return
update_positioning() //REFRESH MOUSE TRACKING!!
var/turf/targets_from = get_turf(src)
if(QDELETED(target))
target = target_turf
var/obj/item/projectile/P = new projectile_type(targets_from)
P.current = targets_from
P.starting = targets_from
P.firer = user
P.original = target
playsound(src, 'sound/weapons/gunshot_smg.ogg', 75, 1)
P.xo = target.x - targets_from.x
P.yo = target.y - targets_from.y
P.Angle = calculated_projectile_vars[1] + rand(-9, 9)
P.p_x = calculated_projectile_vars[2]
P.p_y = calculated_projectile_vars[3]
P.fire()
/obj/machinery/manned_turret/ultimate // Admin-only proof of concept for autoclicker automatics
name = "Infinity Gun"
view_range = 12
projectile_type = /obj/item/projectile/bullet/weakbullet3
/obj/machinery/manned_turret/ultimate/checkfire(atom/targeted_atom, mob/user)
target = targeted_atom
if(target == user || target == get_turf(src))
return
target_turf = get_turf(target)
fire_helper(user)
/obj/item/gun_control
name = "turret controls"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags_1 = ABSTRACT_1 | NODROP_1 | NOBLUDGEON_1 | DROPDEL_1
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/obj/machinery/manned_turret/turret
/obj/item/gun_control/Initialize()
. = ..()
turret = loc
if(!istype(turret))
return INITIALIZE_HINT_QDEL
/obj/item/gun_control/Destroy()
turret = null
..()
/obj/item/gun_control/CanItemAutoclick()
return TRUE
/obj/item/gun_control/attack_obj(obj/O, mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
O.attacked_by(src, user)
/obj/item/gun_control/attack(mob/living/M, mob/living/user)
user.lastattacked = M
M.lastattacker = user
M.attacked_by(src, user)
add_fingerprint(user)
/obj/item/gun_control/afterattack(atom/targeted_atom, mob/user, flag, params)
..()
var/obj/machinery/manned_turret/E = user.buckled
E.calculated_projectile_vars = calculate_projectile_angle_and_pixel_offsets(user, params)
E.direction_track(user, targeted_atom)
E.checkfire(targeted_atom, user)
/////// MANNED TURRET ////////
/obj/machinery/manned_turret
name = "machine gun turret"
desc = "While the trigger is held down, this gun will redistribute recoil to allow its user to easily shift targets."
icon = 'icons/obj/turrets.dmi'
icon_state = "machinegun"
can_buckle = TRUE
density = TRUE
max_integrity = 100
buckle_lying = FALSE
layer = ABOVE_MOB_LAYER
var/view_range = 10
var/cooldown = 0
var/projectile_type = /obj/item/projectile/bullet/manned_turret
var/rate_of_fire = 1
var/number_of_shots = 40
var/cooldown_duration = 90
var/atom/target
var/turf/target_turf
var/warned = FALSE
var/list/calculated_projectile_vars
/obj/machinery/manned_turret/Destroy()
target = null
target_turf = null
..()
//BUCKLE HOOKS
/obj/machinery/manned_turret/unbuckle_mob(mob/living/buckled_mob,force = FALSE)
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
for(var/obj/item/I in buckled_mob.held_items)
if(istype(I, /obj/item/gun_control))
qdel(I)
if(istype(buckled_mob))
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.client.change_view(world.view)
anchored = FALSE
. = ..()
STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user)
if(user.incapacitated() || !istype(user))
return
M.forceMove(get_turf(src))
. = ..()
if(!.)
return
for(var/V in M.held_items)
var/obj/item/I = V
if(istype(I))
if(M.dropItemToGround(I))
var/obj/item/gun_control/TC = new(src)
M.put_in_hands(TC)
else //Entries in the list should only ever be items or null, so if it's not an item, we can assume it's an empty hand
var/obj/item/gun_control/TC = new(src)
M.put_in_hands(TC)
M.pixel_y = 14
layer = ABOVE_MOB_LAYER
setDir(SOUTH)
playsound(src,'sound/mecha/mechmove01.ogg', 50, 1)
anchored = TRUE
if(M.client)
M.client.change_view(view_range)
START_PROCESSING(SSfastprocess, src)
/obj/machinery/manned_turret/process()
if(!LAZYLEN(buckled_mobs))
return PROCESS_KILL
update_positioning()
/obj/machinery/manned_turret/proc/update_positioning()
var/mob/living/controller = buckled_mobs[1]
if(!istype(controller))
return
var/client/C = controller.client
if(C)
var/atom/A = C.mouseObject
var/turf/T = get_turf(A)
if(istype(T)) //They're hovering over something in the map.
direction_track(controller, T)
calculated_projectile_vars = calculate_projectile_angle_and_pixel_offsets(controller, C.mouseParams)
/obj/machinery/manned_turret/proc/direction_track(mob/user, atom/targeted)
if(user.incapacitated())
return
setDir(get_dir(src,targeted))
user.setDir(dir)
switch(dir)
if(NORTH)
layer = BELOW_MOB_LAYER
user.pixel_x = 0
user.pixel_y = -14
if(NORTHEAST)
layer = BELOW_MOB_LAYER
user.pixel_x = -8
user.pixel_y = -4
if(EAST)
layer = ABOVE_MOB_LAYER
user.pixel_x = -14
user.pixel_y = 0
if(SOUTHEAST)
layer = BELOW_MOB_LAYER
user.pixel_x = -8
user.pixel_y = 4
if(SOUTH)
layer = ABOVE_MOB_LAYER
user.pixel_x = 0
user.pixel_y = 14
if(SOUTHWEST)
layer = BELOW_MOB_LAYER
user.pixel_x = 8
user.pixel_y = 4
if(WEST)
layer = ABOVE_MOB_LAYER
user.pixel_x = 14
user.pixel_y = 0
if(NORTHWEST)
layer = BELOW_MOB_LAYER
user.pixel_x = 8
user.pixel_y = -4
/obj/machinery/manned_turret/proc/checkfire(atom/targeted_atom, mob/user)
target = targeted_atom
if(target == user || user.incapacitated() || target == get_turf(src))
return
if(world.time < cooldown)
if(!warned && world.time > (cooldown - cooldown_duration + rate_of_fire*number_of_shots)) // To capture the window where one is done firing
warned = TRUE
playsound(src, 'sound/weapons/sear.ogg', 100, 1)
return
else
cooldown = world.time + cooldown_duration
warned = FALSE
volley(user)
/obj/machinery/manned_turret/proc/volley(mob/user)
target_turf = get_turf(target)
for(var/i in 1 to number_of_shots)
addtimer(CALLBACK(src, /obj/machinery/manned_turret/.proc/fire_helper, user), i*rate_of_fire)
/obj/machinery/manned_turret/proc/fire_helper(mob/user)
if(user.incapacitated())
return
update_positioning() //REFRESH MOUSE TRACKING!!
var/turf/targets_from = get_turf(src)
if(QDELETED(target))
target = target_turf
var/obj/item/projectile/P = new projectile_type(targets_from)
P.current = targets_from
P.starting = targets_from
P.firer = user
P.original = target
playsound(src, 'sound/weapons/gunshot_smg.ogg', 75, 1)
P.xo = target.x - targets_from.x
P.yo = target.y - targets_from.y
P.Angle = calculated_projectile_vars[1] + rand(-9, 9)
P.p_x = calculated_projectile_vars[2]
P.p_y = calculated_projectile_vars[3]
P.fire()
/obj/machinery/manned_turret/ultimate // Admin-only proof of concept for autoclicker automatics
name = "Infinity Gun"
view_range = 12
projectile_type = /obj/item/projectile/bullet/manned_turret
/obj/machinery/manned_turret/ultimate/checkfire(atom/targeted_atom, mob/user)
target = targeted_atom
if(target == user || target == get_turf(src))
return
target_turf = get_turf(target)
fire_helper(user)
/obj/item/gun_control
name = "turret controls"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags_1 = ABSTRACT_1 | NODROP_1 | NOBLUDGEON_1 | DROPDEL_1
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/obj/machinery/manned_turret/turret
/obj/item/gun_control/Initialize()
. = ..()
turret = loc
if(!istype(turret))
return INITIALIZE_HINT_QDEL
/obj/item/gun_control/Destroy()
turret = null
..()
/obj/item/gun_control/CanItemAutoclick()
return TRUE
/obj/item/gun_control/attack_obj(obj/O, mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
O.attacked_by(src, user)
/obj/item/gun_control/attack(mob/living/M, mob/living/user)
user.lastattacked = M
M.lastattacker = user
M.attacked_by(src, user)
add_fingerprint(user)
/obj/item/gun_control/afterattack(atom/targeted_atom, mob/user, flag, params)
..()
var/obj/machinery/manned_turret/E = user.buckled
E.calculated_projectile_vars = calculate_projectile_angle_and_pixel_offsets(user, params)
E.direction_track(user, targeted_atom)
E.checkfire(targeted_atom, user)
-4
View File
@@ -97,19 +97,15 @@
cur_acc[i] = "n"
for(var/line in lines)
//to_chat(world, line)
for(var/beat in splittext(lowertext(line), ","))
//to_chat(world, "beat: [beat]")
var/list/notes = splittext(beat, "/")
for(var/note in splittext(notes[1], "-"))
//to_chat(world, "note: [note]")
if(!playing || shouldStopPlaying(user))//If the instrument is playing, or special case
playing = FALSE
hearing_mobs = null
return
if(!lentext(note))
continue
//to_chat(world, "Parse: [copytext(note,1,2)]")
var/cur_note = text2ascii(note) - 96
if(cur_note < 1 || cur_note > 7)
continue
+2 -2
View File
@@ -34,8 +34,8 @@
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
/obj/structure/table/New()
..()
/obj/structure/table/Initialize()
. = ..()
for(var/obj/structure/table/T in src.loc)
if(T != src)
qdel(T)
@@ -180,3 +180,6 @@
if(TT.has_exit(direction))
setDir(direction)
return
/obj/structure/transit_tube_pod/return_temperature()
return air_contents.temperature
+1 -1
View File
@@ -16,7 +16,7 @@
var/datum/effect_system/spark_spread/spark_system
/obj/structure/trap/Initialize(mapload)
..()
. = ..()
spark_system = new
spark_system.set_up(4,1,src)
spark_system.attach(src)
+2
View File
@@ -178,4 +178,6 @@
'sound/vore/prey/death_10.ogg')
if("bullet_miss")
soundin = pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg')
if("law")
soundin = pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg')
return soundin
+1 -1
View File
@@ -69,7 +69,7 @@
icon = 'icons/obj/smooth_structures/reinforced_window.dmi'
/turf/closed/indestructible/fakeglass/Initialize()
..()
. = ..()
icon_state = null //set the icon state to null, so our base state isn't visible
underlays += mutable_appearance('icons/obj/structures.dmi', "grille") //add a grille underlay
underlays += mutable_appearance('icons/turf/floors.dmi', "plating") //add the plating underlay, below the grille
+1 -1
View File
@@ -21,7 +21,7 @@
broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
if (!burnt_states)
burnt_states = list()
..()
. = ..()
//This is so damaged or burnt tiles or platings don't get remembered as the default tile
var/static/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","damaged4",
"damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2", "foam_plating",
@@ -71,7 +71,7 @@
var/turfverb = "uproot"
/turf/open/floor/grass/Initialize()
..()
. = ..()
update_icon()
/turf/open/floor/grass/attackby(obj/item/C, mob/user, params)
@@ -109,7 +109,7 @@
slowdown = 0
/turf/open/floor/grass/snow/basalt/Initialize()
..()
. = ..()
if(prob(15))
icon_state = "basalt[rand(0, 12)]"
set_basalt_light(src)
@@ -126,7 +126,7 @@
slowdown = 0
/turf/open/floor/grass/fakebasalt/Initialize()
..()
. = ..()
if(prob(15))
icon_state = "basalt[rand(0, 12)]"
set_basalt_light(src)
@@ -144,7 +144,7 @@
flags_1 = NONE
/turf/open/floor/carpet/Initialize()
..()
. = ..()
update_icon()
/turf/open/floor/carpet/update_icon()
@@ -205,7 +205,7 @@
plane = PLANE_SPACE
/turf/open/floor/fakespace/Initialize()
..()
. = ..()
icon_state = SPACE_ICON_STATE
/turf/open/floor/fakespace/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
@@ -13,7 +13,7 @@
/turf/open/floor/light/Initialize()
..()
. = ..()
update_icon()
/turf/open/floor/light/break_tile()
@@ -18,7 +18,7 @@
/turf/open/floor/mineral/Initialize()
broken_states = list("[initial(icon_state)]_dam")
..()
. = ..()
if (!icons)
icons = list()
@@ -221,7 +221,7 @@
icons = list("alienpod1", "alienpod2", "alienpod3", "alienpod4", "alienpod5", "alienpod6", "alienpod7", "alienpod8", "alienpod9")
/turf/open/floor/mineral/abductor/Initialize()
..()
. = ..()
icon_state = "alienpod[rand(1,9)]"
/turf/open/floor/mineral/abductor/break_tile()
@@ -20,7 +20,7 @@
/turf/open/floor/circuit/Initialize()
SSmapping.nuke_tiles += src
update_icon()
..()
. = ..()
/turf/open/floor/circuit/Destroy()
SSmapping.nuke_tiles -= src
@@ -145,7 +145,7 @@
var/obj/effect/clockwork/overlay/floor/realappearence
/turf/open/floor/clockwork/Initialize()
..()
. = ..()
new /obj/effect/temp_visual/ratvar/floor(src)
new /obj/effect/temp_visual/ratvar/beam(src)
realappearence = new /obj/effect/clockwork/overlay/floor(src)
+1 -1
View File
@@ -17,7 +17,7 @@
broken_states = list("platingdmg1", "platingdmg2", "platingdmg3")
if (!burnt_states)
burnt_states = list("panelscorched")
..()
. = ..()
icon_plating = icon_state
/turf/open/floor/plating/update_icon()
@@ -108,7 +108,7 @@
var/obj/effect/clockwork/overlay/floor/bloodcult/realappearence
/turf/open/floor/engine/cult/Initialize()
..()
. = ..()
new /obj/effect/temp_visual/cult/turf/floor(src)
realappearence = new /obj/effect/clockwork/overlay/floor/bloodcult(src)
realappearence.linked = src
+3 -3
View File
@@ -30,7 +30,7 @@
pixel_y = -4
pixel_x = -4
icon = smooth_icon
..()
. = ..()
if (mineralType && mineralAmt && spread && spreadChance)
for(var/dir in GLOB.cardinals)
if(prob(spreadChance))
@@ -153,7 +153,7 @@
/turf/closed/mineral/gibtonite = 4, /turf/open/floor/plating/asteroid/airless/cave = 2, /turf/closed/mineral/bscrystal = 1)
if (display_icon_state)
icon_state = display_icon_state
..()
. = ..()
if (prob(mineralChance))
var/path = pickweight(mineralSpawnChanceList)
var/turf/T = ChangeTurf(path,FALSE,FALSE,TRUE)
@@ -393,7 +393,7 @@
/turf/closed/mineral/gibtonite/Initialize()
det_time = rand(8,10) //So you don't know exactly when the hot potato will explode
..()
. = ..()
/turf/closed/mineral/gibtonite/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/mining_scanner) || istype(I, /obj/item/device/t_scanner/adv_mining_scanner) && stage == 1)
+1 -1
View File
@@ -73,7 +73,7 @@
/turf/open/space/transit/Initialize()
..()
. = ..()
update_icon()
for(var/atom/movable/AM in src)
throw_atom(AM)
+2
View File
@@ -354,6 +354,7 @@
output += "<form method='GET' action='?src=\ref[src]'><b>Add custom ban:</b> (ONLY use this if you can't ban through any other method)"
output += "<input type='hidden' name='src' value='\ref[src]'>"
output += HrefTokenFormField()
output += "<table width='100%'><tr>"
output += "<td><b>Ban type:</b><select name='dbbanaddtype'>"
output += "<option value=''>--</option>"
@@ -387,6 +388,7 @@
output += "<form method='GET' action='?src=\ref[src]'><b>Search:</b> "
output += "<input type='hidden' name='src' value='\ref[src]'>"
output += HrefTokenFormField()
output += "<b>Ckey:</b> <input type='text' name='dbsearchckey' value='[playerckey]'>"
output += "<b>Admin ckey:</b> <input type='text' name='dbsearchadmin' value='[adminckey]'>"
output += "<input type='submit' value='search'>"

Some files were not shown because too many files have changed in this diff Show More