Replaced some ifs with a switch statement.
Replaced an uneeded loop through a list (list.Remove() does this anyway)
Signed-off-by: carnie <elly1989@rocketmail.com>
>type mismatches in cigarette/attack()
>mob overlays now update correctly when lighting somebody else's cigarette/cigar/pipe/etc
>removed some copypasta procs (pipe/light(), pipe/attackby() and cigar/attackby())
Signed-off-by: carnie <elly1989@rocketmail.com>
I made some very minor modifications (mainly tidied up the code a little bit so it's easier to read/modify).
I have made it so opened_positions can be negative. This means that reopening original positions, which were just closed, no longer requires an annoying cooldown period.
Removed the "AI" "Cyborg" "Assistant" checks since they were already handled within the blacklist.
The can_close_job and can_open_job procs now return codes for different reasons for failure (this removed a little bit of code duplication)
Nice work for a first commit, Elo :3
- Added a GetCleanVar to be used when getting a global variable to use inside the game code, it will sanitize() the variable if the compare argument is not equal to it; the compare argument should used to see if NTSL has changed the value.
- Added a sanitize_data proc for the signal datum. It will sanitize all the data using strip_html_simple().
Add_fingerprint has sanity checks, which makes it a superior proc.
This fixes at the very least:
The following runtime has occured 14 time(s).
runtime error: Cannot execute null.Copy().
proc name: transfer fingerprints to (/atom/proc/transfer_fingerprints_to)
source file: detective_work.dm,155
usr: Engineering Cyborg-743 (/mob/living/silicon/robot)
src: the disposal pipe (/obj/structure/disposalpipe/segment)
runtime error: Cannot read null.occupant
proc name: Topic (/obj/machinery/computer/scan_consolenew/Topic)
Added a check to make sure there's an occupant.
runtime error: Cannot read null.key
proc name: toggle power (/obj/machinery/particle_accelerator/control_box/proc/toggle_power)
Added a check for if there's a usr.
runtime error: Cannot read null.backup_author
proc name: attack hand (/obj/machinery/newscaster/attack_hand)
Added a check for if the feed still exists.
* allows for random verbs per item while eating, and for items to be wrapped and require unwrapping before eating.
* this resolves the hunger message bug
* chocolate utilizes the unwrapping method using an all new sprite
* multiple items have been assigned custom verbs
* beet soup switch condensed
All usage of it on silicons is replaced by is_special_character()
is_special_character moved from admin.dm to mob_helpers.dm
Also fixed a runtime having to do with objectives.